3 from AthenaConfiguration.ComponentAccumulator
import ComponentAccumulator
4 from AthenaConfiguration.ComponentFactory
import CompFactory
5 from SimulationConfig.SimEnums
import CalibrationRun
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) )
41 kwargs.setdefault('SecondarySavingLevel', 2)
44 if "ATLAS" in flags.GeoModel.AtlasVersion
and flags.Detector.GeometryCavern:
47 kwargs.setdefault(
'SubDetVolumeLevel', subDetLevel)
48 result.setPrivateTools( CompFactory.G4UA.AthenaTrackingActionTool(name,**kwargs) )
54 result.setPrivateTools(CompFactory.G4UA.LooperKillerTool(name, **kwargs))
59 kwargs.setdefault("MaxSteps", 2000000)
60 kwargs.setdefault(
"PrintSteps", 2)
61 kwargs.setdefault(
"VerboseLevel", 0)
62 kwargs.setdefault(
"BSM_Only",
True)
68 result.setPrivateTools(CompFactory.G4UA.G4SimTimerTool(name,**kwargs))
74 result.setPrivateTools(CompFactory.G4UA.G4TrackCounterTool(name,**kwargs))
86 result.setPrivateTools(CompFactory.G4UA.StoppedParticleActionTool(name, **kwargs))
92 result.setPrivateTools(CompFactory.G4UA.FixG4CreatorProcessTool(name, **kwargs))
103 result.setPrivateTools(CompFactory.G4UA.HitWrapperTool(name, **kwargs))
108 THistSvc= CompFactory.THistSvc
111 histsvc.Output = [
"lengths DATAFILE='LengthIntegrator.root' OPT='RECREATE'"]
112 result.addService(histsvc)
113 kwargs.setdefault(
"HistoSvc",
"THistSvc")
114 result.setPrivateTools(CompFactory.G4UA.LengthIntegratorTool(name, **kwargs))
119 kwargs.setdefault("ActivationFileName",
"Activations.txt")
120 kwargs.setdefault(
"NBinsDPhi",1)
121 kwargs.setdefault(
"NBinsTheta",1)
122 kwargs.setdefault(
"NBinsR3D",120)
123 kwargs.setdefault(
"NBinsZ3D",240)
124 kwargs.setdefault(
"NBinsPhi3D",28)
125 kwargs.setdefault(
"NBinsLogTimeCut",26)
126 kwargs.setdefault(
"PhiMinZoom",0.0)
127 kwargs.setdefault(
"PhiMaxZoom",22.5)
128 kwargs.setdefault(
"LogTMin",-3.0)
129 kwargs.setdefault(
"LogTMax",10.0)
130 kwargs.setdefault(
"ElemZMin",1)
131 kwargs.setdefault(
"ElemZMax",1)
132 result.setPrivateTools(CompFactory.G4UA.RadiationMapsMakerTool(name, **kwargs))
138 result.setPrivateTools(CompFactory.G4UA.HIPKillerTool(name, **kwargs))
144 isDalek = True : kill all particles with kinetic energy below
145 'energyCut' leaving the ID envelope (R,Z).
147 isDalek = False : kill all particles leaving the ID envelope
148 (R,Z), except e+-/gamma with total energy >= 'energyCut'
157 kwargs.setdefault(
"energyCut", 100.*MeV)
158 kwargs.setdefault(
"isDalek",
False)
159 kwargs.setdefault(
"R", 1150.*mm)
160 kwargs.setdefault(
"Z", 3490.*mm)
161 result.setPrivateTools(CompFactory.G4UA.FastIDKillerTool(name, **kwargs))