How to make track jets from AOD

From ATLAS-TRIUMF

Jump to: navigation, search
  1. Event selector

include( "AthenaPoolCnvSvc/ReadAthenaPool_jobOptions.py" ) EventSelector = Service( "EventSelector" )

  1. EventSelector.BackNavigation = True
  1. Particle Properties

include( "PartPropSvc/PartPropSvc.py" )

  1. the POOL converters

include( "ParticleBuilderOptions/ESD_PoolCnv_jobOptions.py" ) include( "ParticleBuilderOptions/AOD_PoolCnv_jobOptions.py" ) include( "ParticleBuilderOptions/McAOD_PoolCnv_jobOptions.py" ) include( "EventAthenaPool/EventAthenaPool_joboptions.py" )

  1. The AOD input file

EventSelector.InputCollections = [ "/home/yoshio/carnage/users/yoshio/vbfhww/FakeMet/AODtoNTPL/misal1_csc11.005015.J6_pythia_jetjet.KAOD.v12000301_tid003096._00033.1.root" ]

  1. The libraries to loaded at run time

theApp.Dlls+=[ "AnalysisTools" ] theApp.Dlls+=[ "UserAnalysisUtils" ] theApp.Dlls+=[ "UserAnalysis" ]

  1. Athena-Aware NTuple making Tools

CBNTAthenaAware = True include("CBNT_Athena/CBNT_AthenaAware_jobOptions.py" ) include("CBNT_Athena/CBNT_EventInfo_jobOptions.py" )

  1. include ( "JetRec/ConeTowerJet_jobOptions.py" )

include ( "ConeTowerJet_jobOptions.py" ) ConeTowerJets.InputCollectionNames = [ "TrackParticleCandidate" ] ConeTowerJets.JetCollectionName = "TrackJets"

  1. include ( "Cone4TopoJet_jobOptions.py" )
  2. Cone4TopoJetAlg.InputCollectionNames = [ "TrackParticleCandidate" ]
  3. Cone4TopoJetAlg.JetCollectionName = "TrackJets"
  1. from(PhysicsAnalysis/JetMissingEtID/JetMissingEtAlgs/share/ParticleJetBuilder_jobOptions.py)

import EventKernel.ParticleDataType

theApp.Dlls += ["JetMissingEtUtils"] theApp.Dlls += ["JetMissingEtAlgs"]

ParticleJetList = [ "TrackJets" ]

for key in ParticleJetList:

   algname=key.replace("Jets","ParticleJet")+"Builder"
   theApp.TopAlg += ["ParticleJetBuilder/"+algname]
   thisAlg = Algorithm( algname )
   thisAlg.JetCollection=key
   thisAlg.ParticleJetContainer = key.replace("Jet","ParticleJet")

thisAlg.ParticleJetBuilderTool.dataType=EventKernel.ParticleDataType.Full

  1. thisAlg.ParticleJetBuilderTool.CellCalibratorName="H1WeightToolCSC12"
  1. list of the algorithms to be executed at run time

CBNT_AthenaAware=Algorithm( "CBNT_AthenaAware" ) CBNT_AthenaAware.Members+=[ "AnalysisSkeleton" ]

                          1. The properties of the AnalysisSkeleton Algorithm

AnalysisSkeleton = Algorithm( "AnalysisSkeleton" ) AnalysisSkeleton.ElectronContainer ="ElectronCollection"

  1. AnalysisSkeleton.ElectronTruthContainer ="SpclMC"

AnalysisSkeleton.MuonContainer ="MuidMuonCollection"

  1. AnalysisSkeleton.MuonTruthContainer ="SpclMC"

AnalysisSkeleton.ParticleJetContainer ="ConeTowerParticleJets" AnalysisSkeleton.ParticleJetTruthContainer ="ConeTruthParticleJets" AnalysisSkeleton.MissingEtContainer ="MET_Final" AnalysisSkeleton.MissingEtMuonContainer ="MET_Muon" AnalysisSkeleton.MissingEtBaseContainer ="MET_Base" AnalysisSkeleton.MissingEtTruthContainer ="MET_Truth" AnalysisSkeleton.MissingEtMuonTruthContainer="MET_Truth" AnalysisSkeleton.TrackParticleContainer ="TrackParticleCandidate" AnalysisSkeleton.TrackParticleTruthContainer="TrackParticleTruthCollection" AnalysisSkeleton.TrackParticleJetContainer ="TrackParticleJets" AnalysisSkeleton.OutputLevel =INFO

  1. setup TTree registration Service
  2. save ROOT histograms and Tuple

THistSvc=Service( "THistSvc" ) THistSvc.Output=[ "AANT DATAFILE='test.root' OPT='RECREATE'" ] theApp.TopAlg+=[ "AANTupleStream" ] AANTupleStream=Algorithm( "AANTupleStream" ) AANTupleStream.ExtraRefNames=[ "StreamESD","Stream1" ] AANTupleStream.OutputName='test.root' AANTupleStream.WriteInputDataHeader=True AANTupleStream.OutputLevel=WARNING

  1. Set output level threshold (2=DEBUG, 3=INFO, 4=WARNING, 5=ERROR, 6=FATAL )

MessageSvc = Service( "MessageSvc" ) MessageSvc.OutputLevel=ERROR

  1. Number of Events to process

theApp.EvtMax=500

                                            1. For interactive analysis
  1. include ("PyAnalysisCore/InitPyAnalysisCore.py")
                                            1. Detail time measurement and auditors
  1. Use auditors

theApp.AuditAlgorithms=True theApp.Dlls+=[ "GaudiAud" ]

theAuditorSvc=AuditorSvc() theAuditorSvc.Auditors+=[ "ChronoAuditor" ]

AthenaPoolCnvSvc=Service( "AthenaPoolCnvSvc" ) AthenaPoolCnvSvc.UseDetailChronoStat=TRUE

  1. StoreGateSvc=Service( "StoreGateSvc" )
  2. StoreGateSvc.Dump=True
  3. MessageSvc.OutputLevel=DEBUG
  1. print "HERE"
  2. print theApp.TopAlg

theApp.TopAlg = [ 'JetAlgorithm/ConeTowerJets',

                 'ParticleJetBuilder/TrackParticleJetBuilder',
                 'CBNT_AthenaAware',
                 'AANTupleStream' ]
  1. theApp.TopAlg = [ 'JetAlgorithm/Cone4TopoJetAlg',
  2. 'ParticleJetBuilder/TrackParticleJetBuilder',
  3. 'CBNT_AthenaAware',
  4. 'AANTupleStream' ]
Personal tools