2 ISF_SimulationSelectors for ComponentAccumulator configuration
4 Copyright (C) 2002-2024 CERN for the benefit of the ATLAS collaboration
6 from AthenaConfiguration.ComponentAccumulator
import ComponentAccumulator
7 from AthenaConfiguration.ComponentFactory
import CompFactory
8 from ISF_SimulationSelectors
import SimulationFlavor
9 from ISF_Services.ISF_ServicesCoreConfig
import ParticleKillerSvcCfg
10 from ISF_Geant4Services.ISF_Geant4ServicesConfig
import (
11 Geant4SimCfg, ATLFAST_Geant4SimCfg,
12 FullGeant4SimCfg, PassBackGeant4SimCfg,
18 if flags.Concurrency.NumThreads == 0
and not flags.Sim.ISF.Simulator.isMT():
20 kwargs.setdefault(
"SimulationFlavor", SimulationFlavor.ParticleKiller)
21 acc.setPrivateTools(CompFactory.ISF.DefaultSimSelector(name, **kwargs))
27 if "Simulator" not in kwargs:
28 if flags.Concurrency.NumThreads == 0
and not flags.Sim.ISF.Simulator.isMT():
29 kwargs.setdefault(
"Simulator", acc.getPrimaryAndMerge(
Geant4SimCfg(flags)).name)
30 kwargs.setdefault(
"SimulationFlavor", SimulationFlavor.Geant4)
31 acc.setPrivateTools(CompFactory.ISF.DefaultSimSelector(name, **kwargs))
37 if flags.Concurrency.NumThreads == 0
and not flags.Sim.ISF.Simulator.isMT():
39 kwargs.setdefault(
"Simulator", acc.getService(
"ISF_ATLFAST_Geant4SimSvc"))
41 acc.setPrivateTools(tool)
47 if flags.Concurrency.NumThreads == 0
and not flags.Sim.ISF.Simulator.isMT():
48 kwargs.setdefault(
"Simulator", acc.getPrimaryAndMerge(
FullGeant4SimCfg(flags)).name)
49 kwargs.setdefault(
"SimulationFlavor", SimulationFlavor.Geant4)
50 acc.setPrivateTools(CompFactory.ISF.DefaultSimSelector(name, **kwargs))
56 if flags.Concurrency.NumThreads == 0
and not flags.Sim.ISF.Simulator.isMT():
58 kwargs.setdefault(
"SimulationFlavor", SimulationFlavor.Geant4)
59 acc.setPrivateTools(CompFactory.ISF.DefaultSimSelector(name, **kwargs))
65 if flags.Concurrency.NumThreads == 0
and not flags.Sim.ISF.Simulator.isMT():
66 from ISF_FastCaloSimServices.ISF_FastCaloSimServicesConfig
import FastCaloSimSvcCfg
67 kwargs.setdefault(
"Simulator", acc.getPrimaryAndMerge(FastCaloSimSvcCfg(flags)).name)
68 kwargs.setdefault(
"SimulationFlavor", SimulationFlavor.FastCaloSim)
69 acc.setPrivateTools(CompFactory.ISF.DefaultSimSelector(name, **kwargs))
75 if flags.Concurrency.NumThreads == 0
and not flags.Sim.ISF.Simulator.isMT():
76 from ISF_FastCaloSimServices.ISF_FastCaloSimServicesConfig
import FastCaloSimV2SvcCfg
78 kwargs.setdefault(
"SimulationFlavor", SimulationFlavor.FastCaloSimV2)
79 acc.setPrivateTools(CompFactory.ISF.DefaultSimSelector(name, **kwargs))
85 if flags.Concurrency.NumThreads == 0
and not flags.Sim.ISF.Simulator.isMT():
86 from ISF_FastCaloSimServices.ISF_FastCaloSimServicesConfig
import DNNCaloSimSvcCfg
87 kwargs.setdefault(
"Simulator", acc.getPrimaryAndMerge(
DNNCaloSimSvcCfg(flags)).name)
88 acc.setPrivateTools(CompFactory.ISF.DefaultSimSelector(name, **kwargs))
94 if flags.Concurrency.NumThreads == 0
and not flags.Sim.ISF.Simulator.isMT():
95 from ISF_FastCaloSimServices.ISF_FastCaloSimServicesConfig
import FastHitConvAlgFastCaloSimSvcCfg
96 kwargs.setdefault(
"Simulator", acc.getPrimaryAndMerge(FastHitConvAlgFastCaloSimSvcCfg(flags)).name)
97 kwargs.setdefault(
"SimulationFlavor", SimulationFlavor.FastCaloSim)
98 acc.setPrivateTools(CompFactory.ISF.DefaultSimSelector(name, **kwargs))
104 if flags.Concurrency.NumThreads == 0
and not flags.Sim.ISF.Simulator.isMT():
105 from ISF_FatrasServices.ISF_FatrasConfig
import fatrasSimServiceIDCfg
107 kwargs.setdefault(
"SimulationFlavor", SimulationFlavor.Fatras)
108 acc.setPrivateTools(CompFactory.ISF.DefaultSimSelector(name, **kwargs))
114 if not flags.Sim.ISF.Simulator.isMT():
115 raise RuntimeError(
"SimulationSelector '%s' does not support running with SimKernel." % name)
116 kwargs.setdefault(
'SimulationFlavor', SimulationFlavor.Fatras)
117 acc.setPrivateTools(CompFactory.ISF.DefaultSimSelector(name, **kwargs))
126 if flags.Concurrency.NumThreads == 0
and not flags.Sim.ISF.Simulator.isMT():
128 kwargs.setdefault(
"Simulator", acc.getService(
"ISFG4SimSvc"))
129 kwargs.setdefault(
"SimulationFlavor", SimulationFlavor.Geant4)
130 acc.setPrivateTools(CompFactory.ISF.KinematicSimSelector(name, **kwargs))
136 if flags.Concurrency.NumThreads == 0
and not flags.Sim.ISF.Simulator.isMT():
138 kwargs.setdefault(
"SimulationFlavor", SimulationFlavor.Geant4)
139 acc.setPrivateTools(CompFactory.ISF.KinematicSimSelector(name, **kwargs))
145 if flags.Concurrency.NumThreads == 0
and not flags.Sim.ISF.Simulator.isMT():
146 from ISF_FatrasServices.ISF_FatrasConfig
import fatrasSimServiceIDCfg
148 kwargs.setdefault(
"SimulationFlavor", SimulationFlavor.Fatras)
149 acc.setPrivateTools(CompFactory.ISF.KinematicSimSelector(name, **kwargs))
155 if flags.Concurrency.NumThreads == 0
and not flags.Sim.ISF.Simulator.isMT():
156 from ISF_FastCaloSimServices.ISF_FastCaloSimServicesConfig
import FastCaloSimSvcCfg
157 kwargs.setdefault(
"Simulator", acc.getPrimaryAndMerge(FastCaloSimSvcCfg(flags)).name)
158 kwargs.setdefault(
"SimulationFlavor", SimulationFlavor.FastCaloSim)
159 acc.setPrivateTools(CompFactory.ISF.KinematicSimSelector(name, **kwargs))
165 if flags.Concurrency.NumThreads == 0
and not flags.Sim.ISF.Simulator.isMT():
167 kwargs.setdefault(
"SimulationFlavor", SimulationFlavor.ParticleKiller)
168 acc.setPrivateTools(CompFactory.ISF.KinematicSimSelector(name, **kwargs))
174 kwargs.setdefault(
"MaxEkin", 400)
175 kwargs.setdefault(
"ParticlePDG", 2212)
181 kwargs.setdefault(
"MaxEkin", 200)
182 kwargs.setdefault(
"ParticlePDG", 211)
188 kwargs.setdefault(
"MaxEkin", 400)
189 kwargs.setdefault(
"ParticlePDG", 2112)
195 kwargs.setdefault(
"MaxEkin", 400)
196 kwargs.setdefault(
"ParticlePDG", 321)
202 kwargs.setdefault(
"MaxEkin", 400)
203 kwargs.setdefault(
"ParticlePDG", 130)
209 kwargs.setdefault(
"ParticlePDG", 13)
215 kwargs.setdefault(
'MinPosEta' , -5.0 )
216 kwargs.setdefault(
'MaxPosEta' , 5.0 )
221 kwargs.setdefault(
"MinPosEta", -5.0)
222 kwargs.setdefault(
"MaxPosEta", 5.0)
223 kwargs.setdefault(
"InvertCuts",
True)