ATLAS Offline Software
Functions | Variables
python.Geant4MSFollowing Namespace Reference

Functions

def setupArgParser ()
 
def MSCfg (flags)
 
def ExtrapolationToolCfg (flags, args)
 
def GeantFollowerMSCfg (flags, args, name="GeantFollowerMSSvc", **kwargs)
 

Variables

 args
 
 flags
 
 Files
 
 HITSFileName
 
 AtlasVersion
 
 GlobalTag
 
 isMC
 
 Dynamic
 
 NumThreads
 
 NumConcurrentEvents
 
 SkipEvents
 
 ProductionStep
 
 doAlign
 
 TightMuonStepping
 
 detectors
 
 toggle_geometry
 
 evaluate
 
 acc
 
 GeantFollowerMSTool
 
 UserActionTools
 
 ExtraInputs
 
 withDetails
 
 maxEvents
 

Function Documentation

◆ ExtrapolationToolCfg()

def python.Geant4MSFollowing.ExtrapolationToolCfg (   flags,
  args 
)

Definition at line 75 of file Geant4MSFollowing.py.

75 def ExtrapolationToolCfg(flags, args):
76 
77  acc = ComponentAccumulator()
78 
79  # the layer material inspector
80  LayerMaterialInspector = CompFactory.Trk.LayerMaterialInspector("LayerMaterialInspector",
81  OutputLevel=INFO)
82  acc.addPublicTool(LayerMaterialInspector)
83 
84  # the tracking volume displayer
85  from TrkDetDescrSvc.TrkDetDescrJobProperties import TrkDetFlags
86  TrackingVolumeDisplayer = CompFactory.Trk.TrackingVolumeDisplayer("TrackingVolumeDisplayer",
87  TrackingVolumeOutputFile='TrackingVolumes-'+TrkDetFlags.MaterialMagicTag()+'.C',
88  LayerOutputFile='Layers-'+TrkDetFlags.MaterialMagicTag()+'.C',
89  SurfaceOutputFile='Surfaces-'+TrkDetFlags.MaterialMagicTag()+'.C')
90  acc.addPublicTool(TrackingVolumeDisplayer)
91 
92  # PROPAGATOR DEFAULTS
93  TestPropagators = []
94  TestPropagator = CompFactory.Trk.RungeKuttaPropagator("TestPropagator")
95  acc.addPublicTool(TestPropagator)
96  TestPropagators += [TestPropagator]
97 
98  from TrkConfig.TrkExSTEP_PropagatorConfig import AtlasSTEP_PropagatorCfg
99  TestSTEP_Propagator = acc.popToolsAndMerge(AtlasSTEP_PropagatorCfg(flags, name="TestSTEP_Propagator", DetailedEloss=True))
100  TestPropagators += [TestSTEP_Propagator]
101 
102  TestSTEP_Propagator.Straggling = False
103 
104  if args.myPDG == 998 :
105  TestSTEP_Propagator.MultipleScattering = False
106  TestSTEP_Propagator.EnergyLoss = False
107 
108  # UPDATOR DEFAULTS
109  TestUpdators = []
110 
111  TestMaterialEffectsUpdator = CompFactory.Trk.MaterialEffectsUpdator("TestMaterialEffectsUpdator")
112  acc.addPublicTool(TestMaterialEffectsUpdator)
113  if args.myPDG == 998 :
114  TestMaterialEffectsUpdator.EnergyLoss = False
115  TestMaterialEffectsUpdator.MultipleScattering = False
116 
117  TestUpdators += [TestMaterialEffectsUpdator]
118 
119  TestMaterialEffectsUpdatorLandau = CompFactory.Trk.MaterialEffectsUpdator("TestMaterialEffectsUpdatorLandau",
120  LandauMode=True)
121  acc.addPublicTool(TestMaterialEffectsUpdatorLandau)
122 
123  if args.myPDG == 998 :
124  TestMaterialEffectsUpdatorLandau.EnergyLoss = False
125  TestMaterialEffectsUpdatorLandau.MultipleScattering = False
126 
127 
128 
129  # the UNIQUE NAVIGATOR ( === UNIQUE GEOMETRY)
130  TestNavigator = CompFactory.Trk.Navigator("TestNavigator",
131  TrackingGeometrySvc="Trk::TrackingGeometrySvc/AtlasTrackingGeometrySvc")
132  acc.addPublicTool(TestNavigator)
133 
134  # CONFIGURE PROPAGATORS/UPDATORS ACCORDING TO GEOMETRY SIGNATURE
135 
136  TestSubPropagators = []
137  TestSubUpdators = []
138 
139  # -------------------- set it depending on the geometry ----------------------------------------------------
140  # default for Global is (Rk,Mat)
141  TestSubPropagators += [ TestPropagator.name ]
142  TestSubUpdators += [ TestMaterialEffectsUpdator.name ]
143 
144  # default for ID is (Rk,Mat)
145  TestSubPropagators += [ TestPropagator.name ]
146  TestSubUpdators += [ TestMaterialEffectsUpdator.name ]
147 
148  # default for Beam pipe is (Rk,Mat) // sometimes the STEP is used
149  TestSubPropagators += [ TestPropagator.name ]
150  TestSubUpdators += [ TestMaterialEffectsUpdator.name ]
151 
152  # default for Calo is (STEP,Mat) // sometimes MatLandau is used
153  TestSubPropagators += [ TestSTEP_Propagator.name ]
154  #TestSubPropagators += [ TestPropagator.name ] #Switch to RK
155  TestSubUpdators += [ TestMaterialEffectsUpdator.name ]
156 
157  # default for MS is (STEP,Mat)
158  TestSubPropagators += [ TestSTEP_Propagator.name ]
159  TestSubUpdators += [ TestMaterialEffectsUpdator.name ]
160 
161  # default for Cavern is (Rk,Mat)
162  TestSubPropagators += [ TestPropagator.name ]
163  TestSubUpdators += [ TestMaterialEffectsUpdator.name ]
164  # ----------------------------------------------------------------------------------------------------------
165 
166  AtlasEnergyLossUpdator = CompFactory.Trk.EnergyLossUpdator("AtlasEnergyLossUpdator",
167  DetailedEloss=True)
168  acc.addPublicTool(AtlasEnergyLossUpdator)
169 
170  # AtlasELossUpdater = acc.popToolsAndMerge(TC.AtlasEnergyLossUpdatorCfg(flags))
171  # AtlasEnergyLossUpdater = AtlasELossUpdater
172 
173  # from TrkConfig.AtlasExtrapolatorToolsConfig as TC
174  # AtlasEnergyLossUpdator = acc.popToolsAndMerge(AtlasEnergyLossUpdatorCfg(flags, name="AtlasEnergyLossUpdator", DetailedEloss=True) )
175 
176  # call the base class constructor
177  TestExtrapolator = CompFactory.Trk.Extrapolator("TestExtrapolator",
178  Navigator = TestNavigator,
179  MaterialEffectsUpdators = TestUpdators,
180  STEP_Propagator = TestSTEP_Propagator.name,
181  Propagators = TestPropagators,
182  SubPropagators = TestSubPropagators,
183  SubMEUpdators = TestSubUpdators,
184  EnergyLossUpdater = AtlasEnergyLossUpdator
185  )
186  acc.addPublicTool(TestExtrapolator, primary=True)
187  # acc.setPrivateTools(TestExtrapolator)
188 
189  return acc
190 
191 

◆ GeantFollowerMSCfg()

def python.Geant4MSFollowing.GeantFollowerMSCfg (   flags,
  args,
  name = "GeantFollowerMSSvc",
**  kwargs 
)

Definition at line 192 of file Geant4MSFollowing.py.

192 def GeantFollowerMSCfg(flags, args, name="GeantFollowerMSSvc", **kwargs):
193 
194  result = ComponentAccumulator()
195 # from TrkConfig.AtlasExtrapolatorConfig import MuonExtrapolatorCfg
196 # extrapolator = result.getPrimaryAndMerge(MuonExtrapolatorCfg(flags))
197  extrapolator = result.getPrimaryAndMerge(ExtrapolationToolCfg(flags,args))
198  result.addPublicTool(extrapolator)
199 
200  #Setup Helper
201  followingHelper = CompFactory.Trk.GeantFollowerMSHelper("GeantFollowerMSHelper",
202  Extrapolator= extrapolator,
203  ExtrapolateDirectly=False,
204  ExtrapolateIncrementally=False,
205  SpeedUp=True,
206  UseCovMatrix=True,
207  OutputLevel=INFO)
208  result.addPublicTool(followingHelper, primary = True)
209 
210  #Setting up the CA for the GeantFollowerMS
211  from G4AtlasServices.G4AtlasUserActionConfig import getDefaultActions
212  kwargs.setdefault("UserActionTools", result.popToolsAndMerge(getDefaultActions(flags)))
213  result.addService(CompFactory.G4UA.UserActionSvc(name, **kwargs))
214  return result
215 
216 

◆ MSCfg()

def python.Geant4MSFollowing.MSCfg (   flags)

Definition at line 49 of file Geant4MSFollowing.py.

49 def MSCfg(flags):
50  # Setup main services
51  from AthenaConfiguration.MainServicesConfig import MainServicesCfg
52  acc = MainServicesCfg(flags)
53  acc.getService("MessageSvc").debugLimit = 1000000
54 
55  from AthenaPoolCnvSvc.PoolReadConfig import PoolReadCfg
56  acc.merge(PoolReadCfg(flags))
57 
58  from BeamSpotConditions.BeamSpotConditionsConfig import BeamSpotCondAlgCfg
59  acc.merge(BeamSpotCondAlgCfg(flags))
60 
61  from BeamEffects.BeamEffectsAlgConfig import BeamEffectsAlgCfg
62  acc.merge(BeamEffectsAlgCfg(flags))
63 
64  from BeamPipeGeoModel.BeamPipeGMConfig import BeamPipeGeometryCfg
65  acc.merge(BeamPipeGeometryCfg(flags))
66 
67  from TrackingGeometryCondAlg.AtlasTrackingGeometryCondAlgConfig import TrackingGeometryCondAlgCfg
68  acc.merge(TrackingGeometryCondAlgCfg(flags))
69 
70  from TrkConfig.AtlasTrackingGeometrySvcConfig import TrackingGeometrySvcCfg
71  acc.merge(TrackingGeometrySvcCfg(flags))
72 
73  return acc
74 

◆ setupArgParser()

def python.Geant4MSFollowing.setupArgParser ( )

Definition at line 17 of file Geant4MSFollowing.py.

17 def setupArgParser():
18  from argparse import ArgumentParser
19  parser = ArgumentParser()
20  parser.add_argument("--inputEVNTFile",
21  default="/cvmfs/atlas-nightlies.cern.ch/repo/data/data-art/MuonRecRTT/EVGEN_ParticleGun_FourMuon_Pt10to500.root",
22  type=str,
23  help="The input EVNT file to use")
24  parser.add_argument("--outputHITSFile",
25  default="myHITS.pool.root",
26  type=str,
27  help="The output HITS filename")
28  parser.add_argument("--geometryTag",
29  default="ATLAS-R3S-2021-03-02-00",
30  type=str,
31  help="The geometry tag to use")
32  parser.add_argument("--globalTag",
33  default="OFLCOND-MC21-SDR-RUN3-09",
34  type=str,
35  help="The global tag to use")
36  parser.add_argument("--myPDG",
37  default=998,
38  type=int,
39  help="PDG for particle gun sim. 998 = Charged Geantino 999 = neutral Geantino, 13 = Muon")
40  parser.add_argument("--maxEvents",
41  default=10000,
42  type = int,
43  help="Maximum number of events to run on.")
44  parser.add_argument("--skipEvents", help="Number of events to skip", type = int , default =0)
45 
46  return parser
47 
48 

Variable Documentation

◆ acc

python.Geant4MSFollowing.acc

Definition at line 246 of file Geant4MSFollowing.py.

◆ args

python.Geant4MSFollowing.args

Definition at line 220 of file Geant4MSFollowing.py.

◆ AtlasVersion

python.Geant4MSFollowing.AtlasVersion

Definition at line 225 of file Geant4MSFollowing.py.

◆ detectors

python.Geant4MSFollowing.detectors

Definition at line 239 of file Geant4MSFollowing.py.

◆ doAlign

python.Geant4MSFollowing.doAlign

Definition at line 234 of file Geant4MSFollowing.py.

◆ Dynamic

python.Geant4MSFollowing.Dynamic

Definition at line 228 of file Geant4MSFollowing.py.

◆ evaluate

python.Geant4MSFollowing.evaluate

Definition at line 243 of file Geant4MSFollowing.py.

◆ ExtraInputs

python.Geant4MSFollowing.ExtraInputs

Definition at line 257 of file Geant4MSFollowing.py.

◆ Files

python.Geant4MSFollowing.Files

Definition at line 223 of file Geant4MSFollowing.py.

◆ flags

python.Geant4MSFollowing.flags

Definition at line 222 of file Geant4MSFollowing.py.

◆ GeantFollowerMSTool

python.Geant4MSFollowing.GeantFollowerMSTool

Definition at line 252 of file Geant4MSFollowing.py.

◆ GlobalTag

python.Geant4MSFollowing.GlobalTag

Definition at line 226 of file Geant4MSFollowing.py.

◆ HITSFileName

python.Geant4MSFollowing.HITSFileName

Definition at line 224 of file Geant4MSFollowing.py.

◆ isMC

python.Geant4MSFollowing.isMC

Definition at line 227 of file Geant4MSFollowing.py.

◆ maxEvents

python.Geant4MSFollowing.maxEvents

Definition at line 262 of file Geant4MSFollowing.py.

◆ NumConcurrentEvents

python.Geant4MSFollowing.NumConcurrentEvents

Definition at line 230 of file Geant4MSFollowing.py.

◆ NumThreads

python.Geant4MSFollowing.NumThreads

Definition at line 229 of file Geant4MSFollowing.py.

◆ ProductionStep

python.Geant4MSFollowing.ProductionStep

Definition at line 233 of file Geant4MSFollowing.py.

◆ SkipEvents

python.Geant4MSFollowing.SkipEvents

Definition at line 231 of file Geant4MSFollowing.py.

◆ TightMuonStepping

python.Geant4MSFollowing.TightMuonStepping

Definition at line 235 of file Geant4MSFollowing.py.

◆ toggle_geometry

python.Geant4MSFollowing.toggle_geometry

Definition at line 240 of file Geant4MSFollowing.py.

◆ UserActionTools

python.Geant4MSFollowing.UserActionTools

Definition at line 256 of file Geant4MSFollowing.py.

◆ withDetails

python.Geant4MSFollowing.withDetails

Definition at line 261 of file Geant4MSFollowing.py.

python.JetAnalysisCommon.ComponentAccumulator
ComponentAccumulator
Definition: JetAnalysisCommon.py:302
python.BeamSpotConditionsConfig.BeamSpotCondAlgCfg
def BeamSpotCondAlgCfg(flags, name="BeamSpotCondAlg", **kwargs)
Definition: BeamSpotConditionsConfig.py:7
BeamPipeGMConfig.BeamPipeGeometryCfg
def BeamPipeGeometryCfg(flags)
Definition: BeamPipeGMConfig.py:5
AtlasTrackingGeometryCondAlgConfig.TrackingGeometryCondAlgCfg
def TrackingGeometryCondAlgCfg(flags, name='AtlasTrackingGeometryCondAlg', doMaterialValidation=False, **kwargs)
Definition: AtlasTrackingGeometryCondAlgConfig.py:128
python.AtlasTrackingGeometrySvcConfig.TrackingGeometrySvcCfg
def TrackingGeometrySvcCfg(flags, name='AtlasTrackingGeometrySvc', doMaterialValidation=False, **kwargs)
Definition: AtlasTrackingGeometrySvcConfig.py:7
BeamEffectsAlgConfig.BeamEffectsAlgCfg
def BeamEffectsAlgCfg(flags, name="BeamEffectsAlg", **kwargs)
Definition: BeamEffectsAlgConfig.py:101
python.Geant4MSFollowing.ExtrapolationToolCfg
def ExtrapolationToolCfg(flags, args)
Definition: Geant4MSFollowing.py:75
python.TrkExSTEP_PropagatorConfig.AtlasSTEP_PropagatorCfg
def AtlasSTEP_PropagatorCfg(flags, name='AtlasSTEP_Propagator', **kwargs)
Definition: TrkExSTEP_PropagatorConfig.py:16
python.MainServicesConfig.MainServicesCfg
def MainServicesCfg(flags, LoopMgr='AthenaEventLoopMgr')
Definition: MainServicesConfig.py:256
python.Geant4MSFollowing.GeantFollowerMSCfg
def GeantFollowerMSCfg(flags, args, name="GeantFollowerMSSvc", **kwargs)
Definition: Geant4MSFollowing.py:192
python.Geant4MSFollowing.MSCfg
def MSCfg(flags)
Definition: Geant4MSFollowing.py:49
python.Geant4MSFollowing.setupArgParser
def setupArgParser()
Definition: Geant4MSFollowing.py:17
G4AtlasUserActionConfig.getDefaultActions
def getDefaultActions(flags)
Definition: G4AtlasUserActionConfig.py:106
python.PoolReadConfig.PoolReadCfg
def PoolReadCfg(flags)
Definition: PoolReadConfig.py:69