close Warning: Can't synchronize with repository "(default)" (/SVN/atlas does not appear to be a Subversion repository.). Look in the Trac log for more information.

Changes between Version 4 and Version 5 of PageTopViewAtLpsc


Ignore:
Timestamp:
May 28, 2008 2:36:36 PM (13 years ago)
Author:
/O=GRID-FR/C=FR/O=CNRS/OU=LPSC/CN=Arnaud Lucotte
Comment:

--

Legend:

Unmodified
Added
Removed
Modified
  • PageTopViewAtLpsc

    v4 v5  
    9393}}}
    9494
    95 and you should have to compile other packages too.
    96 
    97 To test, do
     95
     96Pour tester : 
    9897{{{
    9998athena !TopView/Analysis_topOptions.py
     
    104103}}}
    105104
     105Exemple de script fonctionnant :
     106{{{
     107    ###################################################
     108
     109     ####################################################
     110     # Common imports and includes (no need to edit)    #
     111     ####################################################
     112
     113
     114from EventViewConfiguration import *
     115from EventViewPerformance import *
     116from TopView import *
     117from HighPtView import *
     118
     119# used for fitter
     120theApp.Dlls += ["TopTools"]
     121#theApp.Dlls += ["EventViewPerformance"]
     122theApp.Dlls += ["TopView"]
     123theApp.Dlls += ["HiggsAnalysisUtils"]
     124theApp.Dlls += ["SUSYView"]
     125include("EventViewConfiguration/EventViewFullInclude_jobOptions.py")
     126# for reading event pool file
     127include( "AthenaPoolCnvSvc/ReadAthenaPool_jobOptions.py" )
     128
     129
     130     ############################################
     131     # Job Properties setting (change as appr)  #
     132     ############################################
     133# specify input filea
     134if not "InFileNames" in dir():
     135  # single top sample
     136  import glob
     137 # EventSelector.InputCollections = \
     138 # glob.glob("/usatlas/u/akira/workarea/data/AOD/*")
     139 #["/afs/cern.ch/user/a/ashibata/scratch0/data/trig1_misal1_mc12.005200.T1_McAtNlo_Jimmy.recon.AOD.v12000601_tid005997._01149.pool.root.1"]a default ttbar AOD sitting in Akira's scratch area. Please not this is a release 12 AOD
     140  EventSelector.InputCollections = \
     141                                 ["/afs/cern.ch/user/l/lucotte/scratch0/TopView/PhysicsAnalysis/TopPhys/TopView/TopView-00-12-14-03/run/mc12.005175.AcerMC_Zbb_2l.evgen.EVNT.v12000401_tid004390._00190.pool.root.1"]   
     142else: # you can also set input file from external jobOp
     143  EventSelector.InputCollections = InFileNames
     144
     145# number of events to process, -1 for "all"
     146if not "EvtMax" in dir(): EvtMax=10
     147theApp.EvtMax = EvtMax
     148
     149     ##############################################
     150     # Pre-config settings (change as appropriate)#
     151     ##############################################
     152
     153# you can set the following option from outside either by using -c option of athena
     154# or including another joboption BEFORE this jobOption. That's what the "if not..." does
     155# so the following is the default
     156if not "Analysis"           in dir():      Analysis=["Truth","Atlfast"]
     157if not "SaveTrees"          in dir():      SaveTrees=["FullReco", "FastSim", "FastSimAna", "Truth", "TruthAna", "TruthAll"]
     158if not "TtbarAnalysis"      in dir():      TtbarAnalysis=["LepJets"] #"LepJetsFit", "NoBTag"
     159if not "SingleTopAnalysis"  in dir():      SingleTopAnalysis=[] # "Leptonic", "LepJetsFit", "NoBTag"
     160if not "OutputLevel"        in dir():      OutputLevel=3
     161if not "KinematicsOnly"     in dir():      KinematicsOnly=False
     162if not "ParamBtag"          in dir():      ParamBtag=False
     163if not "SemilepTagging"     in dir():      SemilepTagging=False
     164if not "SecondaryVertex"    in dir():      SecondaryVertex=False
     165if not "NtupleName"         in dir():      NtupleName="TopViewAANtuple.root"
     166if not "doScreenDump"       in dir():      doScreenDump=True
     167if not "showUserData"       in dir():      showUserData=False
     168if not "doHisto"            in dir():      doHisto=True
     169if not "doAnalysis"         in dir():      doAnalysis=True
     170if not "doMatch"            in dir():      doMatch=True
     171if not "doJiveXML"          in dir():      doJiveXML=False
     172if not "doTrigger"          in dir():      doTrigger=False
     173if not "doPrintMC"          in dir():      doPrintMC=False
     174if not "doDumpMC"           in dir():      doDumpMC=False
     175if not "doSGDump"           in dir():      doSGDump=False
     176if not "readEvgen"          in dir():      readEvgen=True
     177if not "exportContainer"    in dir():      exportContainer=False
     178if not "removeOverlap"      in dir():      removeOverlap=True;     
     179if not "doObjSelection"     in dir():      doObjSelection=True
     180if not "fix1mmBug"          in dir():      fix1mmBug=False
     181if not "fixTauBug"          in dir():      fixTauBug=True
     182if not "doStream"           in dir():      doStream=True
     183if not "eventQuery"         in dir():      eventQuery=""
     184
     185
     186if doStream:
     187  if "Truth" in Analysis: Analysis.pop(Analysis.index("Truth"))
     188  if "Atlfast" in Analysis: Analysis.pop(Analysis.index("Atlfast"))
     189
     190if doPrintMC or doDumpMC or doSGDump:  Analysis=[]
     191
     192if readEvgen:
     193  include("TopView/EvgenToAtlfast_jobOptions.py")
     194  Analysis=["Truth","Atlfast"]
     195
     196if "LepJetsFit" in TtbarAnalysis:
     197  import shutil
     198  from AthenaCommon.Utils.unixtools import FindFile
     199  shutil.copy(FindFile("defaults.txt",os.environ[ 'DATAPATH' ].split(os.pathsep),os.R_OK ), ".")
     200
     201if fix1mmBug:
     202  #do 1mm correction
     203  doAODFix1mm=True
     204  include( "ElectronPhotonAlgs/ElectronPhotonCorrector_jobOptions.py")
     205  include( "JetMissingEtAlgs/ParticleJet1mmCorrection_jobOptions.py")
     206  include( "JetMissingEtAlgs/MissingET1mmCorrection_jobOptions.py")
     207
     208  if not "FullRecoInserter" in dir():
     209    FullRecoInserter = TopViewInserters("Inserter", mode="FullReco" , overlapRemoval=removeOverlap, selection=doObjSelection)
     210
     211  FullRecoInserter.METInserter.override(
     212    {  "MissingETKeys" : ["MET_Final",
     213                         "MET_RefFinal",
     214                         "ObjMET_Final",
     215                         "MET_Base",
     216                         "MET_Calib",
     217                         "MET_Muon",
     218                         "MET_MuonBoy",
     219                         "MET_Final",
     220                         "MET_Cryo",
     221                         "MET_CryoCone",
     222                         "MET_Topo",
     223                         "MET_CellOut",
     224                         "MET_RefEle",
     225                         "MET_RefJet",
     226                        ],
     227       "DefaultMETKey":"MET_RefFinal_1mmCorrection",
     228      })
     229
     230if fixTauBug:
     231  doTauRecEtCorrection=True
     232  include("TauAlgs/TauRecEtCorrection_jobOptions.py")
     233
     234# current limitation due to duplicate preparator issue
     235if "Trigger" in Analysis:
     236  doTrigger=True
     237if not "Truth" in Analysis:
     238  doMatch=False
     239
     240def newMOLooper(name, output, input="", outputLevel=3):
     241  looper = EVMultipleOutputToolLooper(name)
     242  looper.EventViewCollectionOutputName=output
     243  if input: looper.EventViewCollectionInputName=input
     244  looper.OutputLevel=outputLevel
     245  return looper
     246
     247# not working now...
     248from ROOT import *
     249def saveLog(logString, name):
     250  macroName=name+"Append.C"
     251  f = open(macroName, "w")
     252  f.write('{ \
     253    TDirectory *dir = gDirectory; \
     254    dir->mkdir("Selection"); \
     255    dir->cd("Selection"); \
     256    TText str; \
     257    str.SetName("'+name+'"); \
     258    str.SetText(0.0,0.9,"'+logString+'"); \
     259    str.Write(); \
     260  }')
     261  f.close()
     262  return macroName
     263 
     264    #str.SetText(0.0,0.9,"test"); \
     265     ###########################################
     266     # JobOptions (cook up your job)           #
     267     ###########################################
     268
     269# instanciate the top alg sequence for athena, only one is required
     270theJob = AlgSequence()
     271
     272if "Trigger" in Analysis:
     273  # include full trigger tree
     274  theApp.Dlls += ["EventViewTrigger"]
     275  triggerLooper = EVMultipleOutputToolLooper( "triggerLooper" )
     276  triggerLooper.EventViewCollectionOutputName = "TriggerView"
     277  theJob += triggerLooper
     278
     279  triggerLooper += TriggerInserters( "trigInserters", slices = [ "Muon", "Electron", "Photon", "Tau", "Jet"  ] )
     280  triggerLooper += TriggerCalculators( "trigCalculators", slices = [ "Muon", "Electron", "Jet", "Tau", "Photon" ] )
     281
     282  if "Trigger" in SaveTrees:
     283    triggerLooper += AANtupleFromUserData( "TriggerAADumper", filename = NtupleName,
     284                      sequencer = theJob, EventTree = True,
     285                      CandTree = False, Prefix = "Trigger",
     286                      MakeFriends=False )
     287
     288if doTrigger :
     289  theApp.Dlls += ["EventViewTrigger"]
     290  TriggerPrepLooper= EVMultipleOutputToolLooper("TriggerPrepLooper")
     291  TriggerPrepLooper.EventViewCollectionOutputName="DummyTriggerView"
     292  if not "TriggerLevels" in dir(): TriggerLevels=[ "L1", "L2", "EF",
     293                                      "Muon", "E/Gamma", "Electron", "Photon", "Tau",
     294                                      "Jet", "MissingEt" ]
     295  theJob += TriggerPrepLooper
     296 
     297  if not "Trigger" in Analysis:
     298    TriggerPrepLooper += L1TriggerPreparators("L1TrigPrep",TriggerLevels)
     299    TriggerPrepLooper += L2TriggerPreparators("L2TrigPrep",TriggerLevels)
     300    TriggerPrepLooper += EFTriggerPreparators("EFTrigPrep",TriggerLevels)
     301  else:
     302    TriggerPrepLooper += anEVTool( "ManT::EVL1EMTauObjPreparator/L1EMTauObjPreparator")
     303    TriggerPrepLooper += anEVTool( "ManT::EVL1JetObjPreparator/L1JetObjPreparator")
     304
     305    TriggerPrepLooper.L1EMTauObjPreparator.setProperty( {
     306      "OutputKey"      : "Temp_L1EMTauObjectContainer",
     307      "SGKeyContains"   : [ "L1EMTauObjectContainer" ]
     308      } )
     309             
     310    TriggerPrepLooper.L1JetObjPreparator.setProperty( {
     311      "OutputKey"      : "Temp_L1JetObjectContainer",
     312      "SGKeyContains"   : [ "L1JetObjectContainer" ]
     313      } )
     314
     315     ###########################################
     316     # Reco Insertion (with comments!)         #
     317     ###########################################
     318
     319if "FullReco" in Analysis:
     320  # Instanciate one tool looper for reconstructed EV
     321  FullRecoLooper = newMOLooper("FullRecoLooper", "FullRecoView", outputLevel=OutputLevel)
     322  theJob += FullRecoLooper
     323  # Insert objects and label them
     324  if "FullRecoInserter" in dir(): FullRecoLooper += FullRecoInserter
     325  else:
     326    FullRecoLooper += TopViewInserters("Inserter", mode="FullReco", overlapRemoval=removeOverlap, selection=doObjSelection )
     327  FullRecoLooper += TopViewLabel("AnalysisLabel")
     328
     329  if exportContainer :
     330    FullRecoLooper += ContainerExport("Exporter", FullRecoLooper.Inserter)
     331    Analysis.pop(Analysis.index("FullReco")) # don't do the rest
     332
     333  # apply correction to jets from leptons, not on by default.
     334  # merge muon with jet if it's close
     335  # FullRecoLooper += MergeMuonAndJetTag("MuonJetMerge") 
     336  # subtract electron from jet when close
     337  # FullRecoLooper += SubtractElecFromJet("ElecJetSub")
     338
     339if "FullReco" in Analysis:
     340  # dump object info into user data
     341  FullRecoLooper += RecoUserDataDump("UDCalc", Labels=[], onlyKin=KinematicsOnly , semilepB=SemilepTagging)
     342  if ParamBtag: FullRecoLooper += ParamBTagger("Paramtagger", process=ParamBtag)
     343  if doTrigger:
     344    FullRecoLooper += HighPtRecoCalculator("HiPTUDCalc" , DetailLevel=["Jet_Info_C4_.LooperToolProperties['Prefix']:'PJet_'"], truthMatch=False,
     345               JetContainers=[["C4_","Cone4TruthParticleJets","Cone4"]],     
     346               triggerMatch=True,triggerLevels=[ "L1", "L2", "EF","Muon", "E/Gamma", "Electron", "Photon", "Tau","Jet", "MissingEt" ],
     347               saveHLTMET=True)
     348
     349  # calculate top variables (HT, MTot, Transverse Mass)
     350  FullRecoLooper += EventVarCalculator("EventVar")
     351  # Find forward jets
     352  FullRecoLooper += ForwardJetFinder("FWJet") 
     353
     354  # added by Joerg Walbersloh for SecondaryVertexTool <walbers@physik.uni-dortmund.de>
     355  if SecondaryVertex: FullRecoLooper += EVSecVtxUserData("SecVertexCalculator", outputLevel=OutputLevel)
     356  # end addition by Joerg Walbersloh
     357
     358  # performance analysis on object distance
     359  #FullRecoLooper += NearestAssociators("distance") 
     360
     361     ###########################################
     362     # Atlfast Insertion                       #
     363     ###########################################
     364
     365if "Atlfast" in Analysis:
     366  FastSimLooper = newMOLooper("FastSimLooper", "FastSimView", outputLevel=OutputLevel)
     367  theJob += FastSimLooper
     368 
     369  if "FastSimInserter" in dir(): FastSimLooper += FastSimInserter
     370  else:  FastSimLooper += TopViewInserters("Inserter", mode="FastSim" , overlapRemoval=removeOverlap, selection=doObjSelection)
     371  FastSimLooper += TopViewLabel("AnalysisLabel")
     372
     373  if exportContainer :
     374    FastSimLooper += ContainerExport("Exporter", FastSimLooper.Inserter)
     375    Analysis.pop(Analysis.index("Atlfast")) # don't do the rest
     376
     377if "Atlfast" in Analysis:
     378  FastSimLooper += RecoUserDataDump("UDCalc", Labels=[], onlyKin=True, semilepB=False, AtlfastB=True)
     379  if ParamBtag: FastSimLooper += ParamBTagger("FastParamtagger", process=ParamBtag)
     380  FastSimLooper += EventVarCalculator("EventVar", sphericity=True)
     381  FastSimLooper.EventVar.SumAllObj.ObjectName="FastSimAllObjects"
     382  FastSimLooper += ForwardJetFinder("FWJet" ) 
     383
     384     ###########################################
     385     # Truth Insertion                         #
     386     ###########################################
     387
     388if "Truth" in Analysis:
     389  TruthLooper = newMOLooper("TruthLooper", "TruthView", outputLevel=OutputLevel)
     390  theJob += TruthLooper
     391
     392  if "TruthInserter" in dir(): TruthLooper += TruthInserter
     393  else: TruthLooper += TopViewTruthInserters("Inserter", allTruth=False)
     394  #TruthLooper.Inserter.EventInfo.AlternativeWeight=True
     395
     396  if exportContainer :
     397    TruthLooper += ContainerExport("Exporter", TruthLooper.Inserter, truth=True)
     398    Analysis=[] # don't do the rest
     399    StoreGateSvc = Service( "StoreGateSvc" )
     400    StoreGateSvc.Dump = True  #true will dump data store contents
     401
     402if "Truth" in Analysis:
     403  TruthLooper += anEVTool("EVUDFinalStateLooper/looper")
     404  TruthLooper.looper.Labels=["Truth"]
     405  TruthLooper.looper.Prefix="Tru_"
     406  TruthLooper.looper += anEVTool("MotherInfo/TopMother")
     407  TruthLooper.looper += anEVTool("EVUDTruthParticleTree/truthtree")
     408  TruthLooper.looper.truthtree.OutputLevel=ERROR
     409  TruthLooper.looper.TopMother.MotherLabel="Top"
     410  #TruthLooper.looper += anEVTool("TruthPdgLabeller")
     411
     412  if doMatch:
     413    if "FullReco" in Analysis: TruthLooper += TruthToRecoAssociators("PerformanceFullReco", "FullRecoView", singleEVLooper=False)
     414    elif "Atlfast" in Analysis: TruthLooper += TruthToRecoAssociators("PerformanceFastSim", "FastSimView", singleEVLooper=False)
     415  if "Truth" in SaveTrees:
     416    TruthLooper += AANtupleFromUserData("AADumper", filename=NtupleName, sequencer=theJob, \
     417                                            EventTree=True, CandTree=False, Prefix="Truth", MakeFriends=False)
     418  #TruthLooper.AADumper.setMacro(saveLog(str(TruthLooper.Inserter), "TruthSelection"))
     419
     420# this will insert all truth
     421if "TruthAll" in Analysis:
     422  TruthLooperAll = newMOLooper("TruthLooperAll", "TruthViewAll", outputLevel=OutputLevel)
     423  theJob += TruthLooperAll
     424  TruthLooperAll += TopViewTruthInserters("Inserter", allTruth=True)
     425
     426  TruthLooperAll += anEVTool("EVUDFinalStateLooper/looper")
     427  TruthLooperAll.looper.Labels=["Truth"]
     428  TruthLooperAll.looper.Prefix="Tru_"
     429  TruthLooperAll.looper += anEVTool("EVUDKinCalc")
     430  TruthLooperAll.looper += anEVTool("EVUDTruthParticleAll")
     431  TruthLooperAll.looper += anEVTool("EVUDTruthParticleTree")
     432
     433  if "TruthAll" in SaveTrees:
     434    TruthLooperAll += AANtupleFromUserData("AADumper", filename=NtupleName, sequencer=theJob, \
     435                                            EventTree=True, CandTree=False, Prefix="TruthAll", MakeFriends=False)
     436
     437     ###########################################
     438     # post truth processing (match)           #
     439     ###########################################
     440
     441# save object part only
     442if "FullReco" in Analysis:
     443  FullRecoLooperPost = newMOLooper("FullRecoLooperPost", "FullRecoViewPost", "FullRecoView", outputLevel=OutputLevel)
     444  theJob += FullRecoLooperPost
     445
     446  if "Truth" in Analysis and doMatch: # FullRec to Truth match
     447    FullRecoLooperPost += MatchRecoToTruth("TruthMatch",  "TruthView", onlyKin=KinematicsOnly)
     448  if "FullReco" in SaveTrees:
     449    FullRecoLooperPost += AANtupleFromUserData("AADumper", filename=NtupleName, sequencer=theJob, \
     450                                                EventTree=True, CandTree=False, Prefix="FullReco", MakeFriends=False)
     451  #FullRecoLooperPost.AADumper.setMacro(saveLog(str(FullRecoLooper.Inserter), "FullRecoSelection"))
     452
     453if "Atlfast" in Analysis:
     454  FastSimLooperPost = newMOLooper("FastSimLooperPost", "FastSimViewPost", "FastSimView", outputLevel=OutputLevel)
     455  theJob += FastSimLooperPost
     456
     457  if "Truth" in Analysis and doMatch:
     458    FastSimLooperPost += MatchRecoToTruth("TruthMatch",  "TruthView", onlyKin=KinematicsOnly)
     459  if "FastSim" in SaveTrees:
     460    FastSimLooperPost += AANtupleFromUserData("AADumper", filename=NtupleName, sequencer=theJob, \
     461                                              EventTree=True, CandTree=False, Prefix="FastSim", MakeFriends=False)
     462  #FastSimLooperPost.AADumper.setMacro(saveLog(str(FastSimLooper.Inserter), "FastSimSelection"))
     463
     464     ###########################################
     465     # a ttbar analysis                        #
     466     ###########################################
     467
     468if doAnalysis:
     469  if "FullReco" in Analysis:
     470    FullRecoLooperAna = newMOLooper("FullRecoLooperAna", "FullRecoViewAna", "FullRecoView", outputLevel=OutputLevel)
     471    theJob += FullRecoLooperAna
     472
     473    FullRecoLooperAna += anEVTool("EVMakeChild/MakeChildEV") # for ntuple organization purpose
     474    #if doScreenDump: FullRecoLooperAna+=EVScreenDump("RecoScreenDumpertmp", printUD=showUserData, printUDVals=showUserData)
     475
     476    if "LepJets" in TtbarAnalysis:
     477      if "BTag" in TtbarAnalysis:
     478        FullRecoLooperAna += TTBarReconstruction("ttbar", sort=True)
     479      else:
     480        FullRecoLooperAna += TTBarReconstructionNoB("ttbar", keepCombination=False)
     481    elif "LepJetsFit" in TtbarAnalysis:
     482      theApp.Dlls += ["TopTools"]
     483      if "BTag" in TtbarAnalysis:
     484        FullRecoLooperAna += TTBarReconstructionFit("ttbar")
     485      else:
     486        FullRecoLooperAna += TTBarReconstructionFit("ttbar")
     487   
     488    if "Leptonic" in SingleTopAnalysis:
     489      FullRecoLooperAna += WgluonSingleTopReconstruction("singleT", sort=True)
     490      # example of using booster
     491      #FullRecoLooperAna += TopRestFrameBooster("topbooster", "TopWithLeptonicW")
     492      #FullRecoLooperAna.topbooster.OutputLevel=2
     493
     494    FullRecoLooperAna += anEVTool("EVEventInfoUserData/EventInfo"),
     495    FullRecoLooperAna += TopViewSelection("Selection", ttbarCut=True)
     496
     497
     498  if "Atlfast" in Analysis:
     499    FastSimLooperAna = newMOLooper("FastSimLooperAna", "FastSimViewAna", "FastSimView", outputLevel=OutputLevel)
     500    theJob += FastSimLooperAna
     501
     502    FastSimLooperAna += anEVTool("EVMakeChild/MakeChildEV") # for ntuple organization purpose
     503
     504    if "LepJets" in TtbarAnalysis:
     505      if "BTag" in TtbarAnalysis:
     506        FastSimLooperAna += TTBarReconstruction("ttbar", sort=True)
     507      else:
     508        FastSimLooperAna += TTBarReconstructionNoB("ttbar")
     509    elif "LepJetsFit" in TtbarAnalysis:
     510      theApp.Dlls += ["TopTools"]
     511      if "BTag" in TtbarAnalysis:
     512        FastSimLooperAna += TTBarReconstructionFit("ttbar")
     513      else:
     514        FastSimLooperAna += TTBarReconstructionFit("ttbar")
     515   
     516    if "Leptonic" in SingleTopAnalysis:
     517      FastSimLooperAna += WgluonSingleTopReconstruction("singleT", sort=True)
     518
     519    FastSimLooperAna += anEVTool("EVEventInfoUserData/EventInfo"),
     520    FastSimLooperAna += TopViewSelection("Selection", ttbarCut=True)
     521
     522     ###########################################
     523     # truth match (from truth)                #
     524     ###########################################
     525
     526  if "Truth" in Analysis:
     527    TruthLooperPost = newMOLooper("TruthLooperPost", "TruthViewPost", "TruthView", outputLevel=OutputLevel)
     528    theJob += TruthLooperPost
     529    TruthLooperPost += anEVTool("EVMakeChild/MakeChildEV") # for ntuple organization purpose
     530
     531    TruthLooperPost+=EventVarCalculator("EventVar", sphericity=False)
     532    TruthLooperPost.EventVar.ObjectsForHT.RejectLabels=["Top","W","Neutrino"]
     533    TruthLooperPost.EventVar.EtCalc.MissEtName="MissingEtTruth"
     534    TruthLooperPost.EventVar.EtCalc.VariableName="HT"
     535    TruthLooperPost.EventVar.SumAllObj.ObjectName="TruAllObjects"
     536
     537    if "FullReco" in Analysis and doMatch:
     538      TruthLooperPost += MatchTruthToReco("TruthMatch",  "FullRecoViewAna" , onlyKin=KinematicsOnly)
     539    elif "Atlfast" in Analysis and doMatch: # if run on fast AOD
     540      TruthLooperPost += MatchTruthToReco("TruthMatch",  "FastSimViewAna" , onlyKin=KinematicsOnly)
     541
     542    TruthLooperPost += anEVTool("EventTypeCalcTtbar/EventType")
     543
     544    # calculates polarization of top, only for single top
     545    # TruthLooperPost += anEVTool("TopMotherInserter/motherIns")
     546
     547    if doScreenDump: TruthLooperPost+=EVScreenDump("TruthScreenDumper", printUD=showUserData, printUDVals=showUserData)
     548    if "TruthAna" in SaveTrees:
     549      TruthLooperPost += AANtupleFromUserData("AADumper", filename=NtupleName, sequencer=theJob, \
     550                                              EventTree=True, CandTree=False, Prefix="TruthAna", SaveParent=False, MakeFriends=False)
     551    if doHisto: TruthLooperPost += TruthHistograms("truthHisto",  match=True)
     552
     553     ###########################################
     554     # Reco to Truth match                     #
     555     ###########################################
     556
     557  if "FullReco" in Analysis:
     558    FullRecoLooperAnaPost = newMOLooper("FullRecoLooperAnaPost", "FullRecoViewAnaPost", "FullRecoViewAna", outputLevel=OutputLevel)
     559    theJob += FullRecoLooperAnaPost
     560
     561    if SingleTopAnalysis or TtbarAnalysis:
     562      FullRecoLooperAnaPost += WTopCalculator("RecCalculator","TruthView", match=doMatch, onlyKin=KinematicsOnly)
     563
     564    if doScreenDump: FullRecoLooperAnaPost +=EVScreenDump("RecoScreenDumper", printUD=showUserData, printUDVals=showUserData)
     565
     566    if "FullRecoAna" in SaveTrees:
     567      FullRecoLooperAnaPost += AANtupleFromUserData("RecoAADumper", filename=NtupleName, sequencer=theJob, \
     568                                            EventTree=True, CandTree=False, Prefix="FullRecoAna", SaveParent=False, MakeFriends=False)
     569
     570    # validation histogram
     571    if doHisto: FullRecoLooperAnaPost += RecoHistograms("recoHisto",  match=True, stream=doStream)
     572
     573  if "Atlfast" in Analysis:
     574    FastSimLooperAnaPost = newMOLooper("FastSimLooperAnaPost", "FastSimViewAnaPost", "FastSimViewAna", outputLevel=OutputLevel)
     575    theJob += FastSimLooperAnaPost
     576
     577    if SingleTopAnalysis or TtbarAnalysis:
     578      FastSimLooperAnaPost += WTopCalculator("WTopCalc","TruthView", match=doMatch, onlyKin=KinematicsOnly)
     579    if doScreenDump: FastSimLooperAnaPost+=EVScreenDump("FastScreenDumper", printUD=showUserData, printUDVals=showUserData)
     580    if "FastSimAna" in SaveTrees:
     581      FastSimLooperAnaPost += AANtupleFromUserData("FastAADumper", filename=NtupleName, sequencer=theJob, \
     582                                            EventTree=True, CandTree=False, Prefix="FastSimAna", SaveParent=False, MakeFriends=False)
     583    # not making histogram from fast sim
     584    if doHisto and not "FullReco" in Analysis : FastSimLooperAnaPost += RecoHistograms("fastHisto", match=True, stream=doStream)
     585
     586     ###########################################
     587     # Jive XML                                #
     588     ###########################################
     589
     590  if "FullReco" in Analysis:
     591    if doJiveXML:
     592      FullRecoLooperJive = EVMultipleOutputToolLooper("FullRecoLooperJive")
     593      FullRecoLooperJive.EventViewCollectionOutputName="FullRecoViewJive"
     594      FullRecoLooperJive.EventViewCollectionInputName="FullRecoViewAnaPost"
     595      theJob += FullRecoLooperJive
     596      # example of using JiveXML with a cut
     597      FullRecoLooperJive += EVJiveXML("jive") 
     598      FullRecoLooperJive.jive.XMLDumper.EventData2XML.EventViewkey="FullRecoViewAnaPost"
     599      FullRecoLooperJive.jive.XMLDumper.EventData2XML.CompositeParticlekey=""
     600      FullRecoLooperJive.jive.XMLDumper.CutName="tt_CommissioningCut"
     601
     602     ###########################################
     603     # Event Query                             #
     604     ###########################################
     605
     606if eventQuery:
     607  EventSelector.CollectionType="ExplicitROOT"
     608  EventSelector.Query= eventQuery
     609
     610     ###########################################
     611     # Small Tools                             #
     612     ###########################################
     613
     614# misc job Options when running these, don't rune the above
     615
     616# dump truth info
     617if doDumpMC: include("TopView/DumpMC_jobOptions.py")
     618if doPrintMC: include("TopView/PrintMC_jobOptions.py")
     619
     620# dump the contents of the StoreGate
     621# you shoud use "athena -i" to use this one
     622if doSGDump:
     623  theApp.EvtMax = 1
     624  StoreGateSvc = Service( "StoreGateSvc" )
     625  StoreGateSvc.Dump = True  #true will dump data store contents
     626
     627     ###########################################
     628     # Final setup (no need to edit)           #
     629     ###########################################
     630
     631# useful for debugging, larger left margin (comment out as necessary)
     632MessageSvc.Format = "% F%70W%S%7W%R%T %0W%M"
     633MessageSvc.defaultLimit = 9999999
     634
     635#FullRecoLooperAna.ttbar.HitFit.fitter.UseMinuit=True
     636print theJob
     637
     638}}}
     639
    106640 * NOTE: TopView is a runtime package, you can run your jobs from TopView/run directory. You don't need to go to !UserAnalysis.
    107641