def atlfast1D3PD(file, tuplename='atlfast1', seq=topSequence, D3PDSvc='D3PD::RootD3PDSvc'): #-------------------------------------------------------------------------- # Configuration #-------------------------------------------------------------------------- if rec.doTruth(): truthParticleConfig(seq) #TruthJetFilterConfig (seq, excludeWZdecays = False) # PartonJetConfig is used to build parton-level jets # PartonJetConfig requires JetSimTools-00-01-22 or higher PartonJetConfig(doPythia=True, doHerwig=False) #-------------------------------------------------------------------------- # Make the D3PD #-------------------------------------------------------------------------- alg = D3PDMakerCoreComps.MakerAlg(tuplename, seq, file=file, D3PDSvc=D3PDSvc) alg += EventInfoD3PDObject(10) alg += Atlfast1ElectronD3PDObject(10) alg += Atlfast1PhotonD3PDObject(10) alg += MuonD3PDObject(0) alg += JetD3PDObject(0) alg += Atlfast1MissingETD3PDObject(0) #alg += TauD3PDObject (0) #alg += TrackParticleD3PDObject (0) if rec.doTruth(): alg += GenEventD3PDObject(1) alg += TruthParticleD3PDObject(1) alg += TruthMETD3PDObject(level=10) alg += TruthJetD3PDObject(level=10, sgkey='AntiKt4TruthJets', prefix='AntiKt4TruthJets_') alg += TruthJetD3PDObject(level=10, sgkey='AntiKt4TruthPartonJets', prefix='AntiKt4TruthPartonJets_') alg += HforD3PDObject(**_args(0, 'HforInfo', kw)) return alg
def evgenD3PD(file, tuplename='evgen', seq=topSequence, D3PDSvc='D3PD::RootD3PDSvc'): #-------------------------------------------------------------------------- # Configuration #-------------------------------------------------------------------------- if rec.doTruth(): # compatibility with jets from RecExConfig.RecConfFlags import jobproperties jobproperties.RecConfFlags.AllowBackNavigation = True from JetRec.JetRecFlags import jobproperties as jobpropjet jobpropjet.JetRecFlags.inputFileType = "GEN" # Build list of particles stored in D3PD truthParticleConfig(seq) # Build list of particles used to jet building # Be careful, if doExcludeWZdecays == True, # then W and Z decays (including electrons, QCD FSRs) are excluded from jet building doExcludeWZdecays = True mysuffix = 'WZ' if doExcludeWZdecays else '' TruthJetFilterConfig(seq, writePartons=True, writeHadrons=True, excludeWZdecays=doExcludeWZdecays) # PartonJetConfig is used to build parton-level jets # PartonJetConfig requires JetSimTools-00-01-22 or higher PartonJetConfig(doPythia=True, doHerwig=False, finder='AntiKt', size=0.4, suffix=mysuffix, inputCollections=['FilteredD3PDTruth']) PartonJetConfig(doPythia=True, doHerwig=False, finder='AntiKt', size=0.6, suffix=mysuffix, inputCollections=['FilteredD3PDTruth']) # Build truth particle (hadron-level) jets # flags for AOD from ParticleBuilderOptions.AODFlags import AODFlags AODFlags.MissingEtTruth = True AODFlags.TruthParticleJet = True AODFlags.McEventKey = "GEN_EVENT" # The function that makes the truth jets, with appropriate arguments antikt4truthAlg = make_StandardJetGetter( 'AntiKt', 0.4, 'Truth', globalSuff=mysuffix, disable=False, includeMuons=True, useInteractingOnly=False).jetAlgorithmHandle() antikt4truthAlg.AlgTools['InputToJet'].InputCollectionKeys = [ 'FilteredD3PDTruth' ] print 'antikt4truthAlg', antikt4truthAlg antikt6truthAlg = make_StandardJetGetter( 'AntiKt', 0.6, 'Truth', globalSuff=mysuffix, disable=False, includeMuons=True, useInteractingOnly=False).jetAlgorithmHandle() antikt6truthAlg.AlgTools['InputToJet'].InputCollectionKeys = [ 'FilteredD3PDTruth' ] if doExcludeWZdecays: # Reconstruct standard ATLAS truth jets antikt4truthAlgStd = make_StandardJetGetter( 'AntiKt', 0.4, 'Truth', disable=False).jetAlgorithmHandle() antikt6truthAlgStd = make_StandardJetGetter( 'AntiKt', 0.6, 'Truth', disable=False).jetAlgorithmHandle() #-------------------------------------------------------------------------- # Make the D3PD #-------------------------------------------------------------------------- alg = D3PDMakerCoreComps.MakerAlg(tuplename, seq, file=file, D3PDSvc=D3PDSvc) alg += EventInfoD3PDObject(10) if rec.doTruth(): alg += GenEventD3PDObject(1) alg += TruthParticleD3PDObject(1) alg += TruthMETD3PDObject(level=10) alg += TruthJetD3PDObject(level=10, sgkey='AntiKt4Truth' + mysuffix + 'Jets', prefix='jet_antikt4truth' + mysuffix + 'jets_') alg += TruthJetD3PDObject(level=10, sgkey='AntiKt6Truth' + mysuffix + 'Jets', prefix='jet_antikt6truth' + mysuffix + 'jets_') if doExcludeWZdecays: alg += TruthJetD3PDObject(level=10, sgkey='AntiKt4TruthJets', prefix='jet_antikt4truthjets_') alg += TruthJetD3PDObject(level=10, sgkey='AntiKt6TruthJets', prefix='jet_antikt6truthjets_') alg += TruthJetD3PDObject( level=10, sgkey='AntiKt4TruthParton' + mysuffix + 'Jets', prefix='jet_antikt4truthparton' + mysuffix + 'jets_') alg += TruthJetD3PDObject( level=10, sgkey='AntiKt6TruthParton' + mysuffix + 'Jets', prefix='jet_antikt6truthparton' + mysuffix + 'jets_') return alg
]) alg += JetD3PDObject(2, 'Jet_Truth6_WZ', sgkey='AntiKt6TruthJets_WZ', prefix='jet_AntiKt6TruthJets_WZ_', include=['TrueFlavorComponents'], exclude=[ 'L1Kinematics', 'L2Kinematics', 'EFKinematics', 'El02Match', 'Mu02Match', 'L1Info', 'L2Info', 'EFInfo' ]) from SUSYD3PDMaker.SUSYTruthParticleD3PDObject import SUSYTruthParticleD3PDObject alg += SUSYTruthParticleD3PDObject(1, 'SUSYTruthParticle') from TruthD3PDMaker.Atlfast1MissingETD3PDObject import TruthMETD3PDObject alg += TruthMETD3PDObject(level=10) #from MissingETD3PDMaker.MissingETD3PDMakerFlags import MissingETD3PDMakerFlags #MissingETD3PDMakerFlags.doMissingETRegions=False #from MissingETD3PDMaker.MissingETD3PDObject import RefFinalMETD3PDObject #alg += RefFinalMETD3PDObject( 10 , name='MET_Simplified20' , lebel=1, sgkey='MET_Truth_NonInt' , prefix='MET_Simplified20_' , label='MET_Simplified20_' , exclude=['MET_Regions'] , include = ['MET','MET_Phi','MET_Et','MET_SumEt'] ) from TruthD3PDMaker.TruthParticleFakerObject import * alg += TruthParticleFakerElD3PDObject(level=10, sgkey='GEN_EVENT', prefix="el_", label='GrumpyEl_') alg += TruthParticleFakerMuD3PDObject(level=10, sgkey='GEN_EVENT', prefix="mu_muid_", label='mu_m_')