if not "ToolSvc" in theApp.ExtSvc and \ not "ToolSvc/ToolSvc" in theApp.ExtSvc: theApp.ExtSvc += [ "ToolSvc/ToolSvc"] pass # make sure we have Configurable-aware jobO # ie: hack that we'll remove someday... FIXME from AthenaCommon.AlgSequence import AlgSequence job = AlgSequence() from McParticleAlgs.JobOptCfg import McAodBuilder,createMcAodBuilder,PileUpClassification #if (objKeyStore.isInInput( "McEventCollection", "TruthEvent" ) and # not objKeyStore.isInInput( "McEventCollection", "GEN_AOD" )): job += McAodBuilder() # pass def getMcAODBuilder(putype): """ putype is expected to be a string ! """ builder = createMcAodBuilder( name = "McAodBuilder"+putype, outMcEvtCollection = "GEN_AOD", # this is the input to the CnvTool outTruthParticles = "SpclMC"+putype, ) builder.CnvTool.SelectSignalType = PileUpClassification.fromString(putype) # min bias only objKeyStore.addStreamAOD("TruthParticleContainer","SpclMC"+putype) return builder
from AthenaCommon.AlgSequence import AlgSequence topSequence = AlgSequence() from AthenaCommon.AppMgr import ToolSvc from McParticleAlgs.McAodFlags import jobproperties as jp jp.McAodFlags.doTruthEtIsolations = True # Deal with truth: # from McParticleAlgs.JobOptCfg import McAodBuilder # from McParticleTools.McParticleToolsConf import NoopFilterTool from McParticleTools.McParticleToolsConf import OldSpclMcFilterTool from McParticleTools.McParticleToolsConf import TruthParticleCnvTool topSequence += McAodBuilder( "McAodBuilder", OutputLevel=INFO, FilterTool=OldSpclMcFilterTool( McEvents="GEN_AOD", McEventsOutput="GEN_DPD", DoEtIsolations=jp.McAodFlags.doTruthEtIsolations(), IncludeSimul=False, IncludePartonShowers=False, ptGammaMin=5000.), CnvTool=TruthParticleCnvTool( McEvents="GEN_DPD", TruthParticlesOutput="SpclMC", DoEtIsolations=jp.McAodFlags.doTruthEtIsolations())) ToolSvc.TruthIsolationTool.McEventsOutput = "GEN_DPD"
from McParticleAlgs.McAodFlags import jobproperties as jp jp.McAodFlags.doTruthEtIsolations = True ######## # Create the AOD McEventCollection # from McParticleAlgs.JobOptCfg import McAodBuilder from McParticleTools.McParticleToolsConf import NoopFilterTool from McParticleTools.McParticleToolsConf import TruthParticleCnvTool topSequence += McAodBuilder( "McAodBuilder", OutputLevel = DEBUG, FilterTool = NoopFilterTool( McEvents = "GEN_EVENT", DoEtIsolations = jp.McAodFlags.doTruthEtIsolations() ), CnvTool = TruthParticleCnvTool( McEvents = "GEN_AOD", TruthParticlesOutput = "SpclMC", DoEtIsolations = jp.McAodFlags.doTruthEtIsolations() ) ) ######## # Read the TruthParticleContainer # Validates some aspects of both TPContainer and McEventCollections # if 'DUMP' not in dir(): DUMP = False pass if DUMP:
# Generate the event #################### if not 'GENERATOR' in dir(): GENERATOR = "Pythia" if not 'PROCESS' in dir(): PROCESS = "ttbar" from McParticleTests.tests import makeGenEvents topSequence += makeGenEvents(genName=GENERATOR, genProcess=PROCESS, cfgGenName="EvGen") ######## # Create the AOD McEventCollection # from McParticleAlgs.JobOptCfg import McAodBuilder topSequence += McAodBuilder() topSequence.McAodBuilder.DoFiltering = False topSequence.McAodBuilder.CnvTool.McEvents = "GEN_EVENT" topSequence.McAodBuilder.CnvTool.TruthParticlesOutput = "SpclMC" if not 'ALGMODE' in dir(): ALGMODE = 'cpp' pass if ALGMODE == 'py': from McParticleTests.Lib import PyMcAodSymLinkTests as McAodSymLinkTests else: from McParticleTests.McParticleTestsConf import McAodSymLinkTests topSequence += McAodSymLinkTests(OutputLevel=DEBUG) #--------------------------------------------------------------- # Pool Persistency