ATLAS Offline Software
Functions
QuirksConfig Namespace Reference

Functions

def load_files_for_quirks_scenario (flags)
 
def QuirkPhysicsToolCfg (flags, name="QuirkPhysicsTool", **kwargs)
 
def DebugSteppingActionToolCfg (flags, name="DebugSteppingActionTool", **kwargs)
 
def QuirksCfg (flags)
 

Function Documentation

◆ DebugSteppingActionToolCfg()

def QuirksConfig.DebugSteppingActionToolCfg (   flags,
  name = "DebugSteppingActionTool",
**  kwargs 
)

Definition at line 50 of file QuirksConfig.py.

50 def DebugSteppingActionToolCfg(flags, name="DebugSteppingActionTool", **kwargs):
51  result = ComponentAccumulator()
52  # TODO UserActionConfig flag not yet migrated
53  # example custom configuration
54  # if name in flags.Sim.UserActionConfig.keys():
55  # for prop,value in flags.Sim.UserActionConfig[name].iteritems():
56  # kwargs.setdefault(prop,value)
57  result.setPrivateTools( CompFactory.G4UA.DebugSteppingActionTool(name, **kwargs) )
58  return result
59 
60 

◆ load_files_for_quirks_scenario()

def QuirksConfig.load_files_for_quirks_scenario (   flags)

Definition at line 10 of file QuirksConfig.py.

11  from ExtraParticles.PDGHelpers import getPDGTABLE
12  if getPDGTABLE('PDGTABLE.MeV'):
13  quirk_firststring=1e-6 #mm
14  quirk_maxboost=1e-2
15  quirk_maxmerge=1e-6 #mm
16  quirk_debugenabled=False
17  quirk_debugdist=1000 #mm
18  quirk_debugsteps=1000
19  simdict = flags.Input.SpecialConfiguration
20  quirk_mass = float(simdict["MASS"])
21  quirk_charge = float(simdict["CHARGE"])
22  quirk_pdgid = int(simdict["PDGID"])
23  quirk_stringforce = float(simdict["STRINGFORCE"])
24 
25  f = open('PDGTABLE.MeV', 'a')
26  f.write("M%8d %.8E +0.0E+00 -0.0E+00 Quirk +\n" % (quirk_pdgid, quirk_mass))
27  f.write("W%8d 0.E+00 +0.0E+00 -0.0E+00 Quirk +\n" % quirk_pdgid)
28  f.close()
29 
30  if flags.Common.ProductionStep == ProductionStep.Simulation:
31  f = open('quirks_setup.txt', 'w')
32  for x in [quirk_mass, quirk_charge, quirk_pdgid, quirk_stringforce, quirk_firststring, quirk_maxboost, quirk_maxmerge, quirk_maxmerge]:
33  f.write(repr(x) + "\n")
34  if quirk_debugenabled:
35  f.write("1\n")
36  f.write(repr(quirk_debugdist) + "\n")
37  f.write(repr(quirk_debugsteps) + "\n")
38  else:
39  f.write("0\n")
40  f.close()
41  del quirk_firststring, quirk_maxboost, quirk_maxmerge, quirk_debugenabled, quirk_debugdist, quirk_debugsteps, doG4SimConfig, simdict, f, quirk_mass, quirk_charge, quirk_pdgid, quirk_stringforce
42 
43 

◆ QuirkPhysicsToolCfg()

def QuirksConfig.QuirkPhysicsToolCfg (   flags,
  name = "QuirkPhysicsTool",
**  kwargs 
)

Definition at line 44 of file QuirksConfig.py.

44 def QuirkPhysicsToolCfg(flags, name="QuirkPhysicsTool", **kwargs):
45  result = ComponentAccumulator()
46  result.setPrivateTools( CompFactory.QuirkPhysicsToolTool(name, **kwargs) )
47  return result
48 
49 

◆ QuirksCfg()

def QuirksConfig.QuirksCfg (   flags)

Definition at line 61 of file QuirksConfig.py.

61 def QuirksCfg(flags):
62  result = ComponentAccumulator()
63  if flags.Common.ProductionStep == ProductionStep.Simulation:
64  from G4AtlasServices.G4AtlasServicesConfig import PhysicsListSvcCfg
65  result.merge(PhysicsListSvcCfg(flags))
67  if flags.Common.ProductionStep == ProductionStep.Simulation:
68  result.getService("PhysicsListSvc").PhysOption += [ result.popToolsAndMerge(QuirkPhysicsToolCfg(flags)) ]
69  return result
python.JetAnalysisCommon.ComponentAccumulator
ComponentAccumulator
Definition: JetAnalysisCommon.py:302
CaloCellPos2Ntuple.int
int
Definition: CaloCellPos2Ntuple.py:24
PDGHelpers.getPDGTABLE
def getPDGTABLE(table)
Definition: PDGHelpers.py:37
QuirksConfig.QuirksCfg
def QuirksCfg(flags)
Definition: QuirksConfig.py:61
QuirksConfig.load_files_for_quirks_scenario
def load_files_for_quirks_scenario(flags)
Definition: QuirksConfig.py:10
QuirksConfig.DebugSteppingActionToolCfg
def DebugSteppingActionToolCfg(flags, name="DebugSteppingActionTool", **kwargs)
Definition: QuirksConfig.py:50
PyAthena::repr
std::string repr(PyObject *o)
returns the string representation of a python object equivalent of calling repr(o) in python
Definition: PyAthenaUtils.cxx:106
G4AtlasServicesConfig.PhysicsListSvcCfg
def PhysicsListSvcCfg(flags, name="PhysicsListSvc", **kwargs)
Definition: G4AtlasServicesConfig.py:22
QuirksConfig.QuirkPhysicsToolCfg
def QuirkPhysicsToolCfg(flags, name="QuirkPhysicsTool", **kwargs)
Definition: QuirksConfig.py:44
Trk::open
@ open
Definition: BinningType.h:40
readCCLHist.float
float
Definition: readCCLHist.py:83