3from AthenaConfiguration.ComponentAccumulator
import ComponentAccumulator
4from AthenaConfiguration.ComponentFactory
import CompFactory
5from SimulationConfig.SimEnums
import CalibrationRun
15 result = ComponentAccumulator()
17 if "ATLAS" in flags.GeoModel.AtlasVersion:
18 kwargs.setdefault(
'KillAllNeutrinos',
True)
20 if flags.Sim.NRRThreshold
and flags.Sim.NRRWeight:
21 if flags.Sim.CalibrationRun
is not CalibrationRun.Off:
22 raise NotImplementedError(
"Neutron Russian Roulette should not be used in Calibration Runs.")
23 kwargs.setdefault(
'ApplyNRR',
True)
24 kwargs.setdefault(
'NRRThreshold', flags.Sim.NRRThreshold)
25 kwargs.setdefault(
'NRRWeight', flags.Sim.NRRWeight)
27 if flags.Sim.PRRThreshold
and flags.Sim.PRRWeight:
28 if flags.Sim.CalibrationRun
is not CalibrationRun.Off:
29 raise NotImplementedError(
"Photon Russian Roulette should not be used in Calibration Runs.")
30 kwargs.setdefault(
'ApplyPRR',
True)
31 kwargs.setdefault(
'PRRThreshold', flags.Sim.PRRThreshold)
32 kwargs.setdefault(
'PRRWeight', flags.Sim.PRRWeight)
33 kwargs.setdefault(
'IsISFJob', flags.Sim.ISFRun)
35 result.setPrivateTools( CompFactory.G4UA.AthenaStackingActionTool(name,**kwargs) )
40 result = ComponentAccumulator()
41 result.setPrivateTools(CompFactory.G4UA.LooperKillerTool(name, **kwargs))
46 kwargs.setdefault("MaxSteps", 2000000)
47 kwargs.setdefault(
"PrintSteps", 2)
48 kwargs.setdefault(
"VerboseLevel", 0)
49 kwargs.setdefault(
"BSM_Only",
True)
54 result = ComponentAccumulator()
55 result.setPrivateTools(CompFactory.G4UA.G4SimTimerTool(name,**kwargs))
60 result = ComponentAccumulator()
61 result.setPrivateTools(CompFactory.G4UA.G4TrackCounterTool(name,**kwargs))
67 result = ComponentAccumulator()
73 result.setPrivateTools(CompFactory.G4UA.StoppedParticleActionTool(name, **kwargs))
78 result = ComponentAccumulator()
79 result.setPrivateTools(CompFactory.G4UA.FixG4CreatorProcessTool(name, **kwargs))
84 result = ComponentAccumulator()
90 result.setPrivateTools(CompFactory.G4UA.HitWrapperTool(name, **kwargs))
95 THistSvc= CompFactory.THistSvc
96 result = ComponentAccumulator()
97 histsvc = THistSvc(name="THistSvc")
98 histsvc.Output = [
"lengths DATAFILE='LengthIntegrator.root' OPT='RECREATE'"]
99 result.addService(histsvc)
100 kwargs.setdefault(
"HistoSvc",
"THistSvc")
101 result.setPrivateTools(CompFactory.G4UA.LengthIntegratorTool(name, **kwargs))
105 result = ComponentAccumulator()
106 kwargs.setdefault("ActivationFileName",
"Activations.txt")
107 kwargs.setdefault(
"NBinsDPhi",1)
108 kwargs.setdefault(
"NBinsTheta",1)
109 kwargs.setdefault(
"NBinsR3D",120)
110 kwargs.setdefault(
"NBinsZ3D",240)
111 kwargs.setdefault(
"NBinsPhi3D",28)
112 kwargs.setdefault(
"NBinsLogTimeCut",26)
113 kwargs.setdefault(
"PhiMinZoom",0.0)
114 kwargs.setdefault(
"PhiMaxZoom",22.5)
115 kwargs.setdefault(
"LogTMin",-3.0)
116 kwargs.setdefault(
"LogTMax",10.0)
117 kwargs.setdefault(
"ElemZMin",1)
118 kwargs.setdefault(
"ElemZMax",1)
119 result.setPrivateTools(CompFactory.G4UA.RadiationMapsMakerTool(name, **kwargs))
124 result = ComponentAccumulator()
125 result.setPrivateTools(CompFactory.G4UA.HIPKillerTool(name, **kwargs))
131 isDalek = True : kill all particles with kinetic energy below
132 'energyCut' leaving the ID envelope (R,Z).
134 isDalek = False : kill all particles leaving the ID envelope
135 (R,Z), except e+-/gamma with total energy >= 'energyCut'
137 result = ComponentAccumulator()
143 from AthenaCommon.SystemOfUnits
import MeV, mm
144 kwargs.setdefault(
"energyCut", 100.*MeV)
145 kwargs.setdefault(
"isDalek",
False)
146 kwargs.setdefault(
"R", 1150.*mm)
147 kwargs.setdefault(
"Z", 3490.*mm)
148 result.setPrivateTools(CompFactory.G4UA.FastIDKillerTool(name, **kwargs))
154 Kill every particle leaving the ID envelope (R,Z), with no exception:
155 isDalek mode covers muons as well, and the energy threshold is put far
156 above any particle the LHC produces so that nothing is spared.
158 from AthenaCommon.SystemOfUnits
import MeV
159 kwargs.setdefault(
"energyCut", 1.e9*MeV)
160 kwargs.setdefault(
"isDalek",
True)
AthenaStackingActionToolCfg(flags, name='G4UA::AthenaStackingActionTool', **kwargs)
MonopoleLooperKillerToolCfg(flags, name="G4UA::MonopoleLooperKillerTool", **kwargs)
HitWrapperToolCfg(flags, name="G4UA::HitWrapperTool", **kwargs)
LooperKillerToolCfg(flags, name='G4UA::LooperKillerTool', **kwargs)
G4TrackCounterToolCfg(flags, name='G4UA::G4TrackCounterTool', **kwargs)
StoppedParticleActionToolCfg(flags, name="G4UA::StoppedParticleActionTool", **kwargs)
FastIDKillerAllToolCfg(flags, name="G4UA::FastIDKillerTool", **kwargs)
HIPKillerToolCfg(flags, name="G4UA::HIPKillerTool", **kwargs)
RadiationMapsMakerToolCfg(flags, name="G4UA::UserActionSvc.RadiationMapsMakerTool", **kwargs)
FixG4CreatorProcessToolCfg(flags, name="G4UA::FixG4CreatorProcessTool", **kwargs)
LengthIntegratorToolCfg(flags, name="G4UA::UserActionSvc.LengthIntegratorTool", **kwargs)
G4SimTimerToolCfg(flags, name='G4UA::G4SimTimerTool', **kwargs)
FastIDKillerToolCfg(flags, name="G4UA::FastIDKillerTool", **kwargs)