ATLAS Offline Software
Functions | Variables
BeamEffectsAlgConfig Namespace Reference

Functions

def ValidityCheckerCfg (flags, name="GenEventValidityChecker", **kwargs)
 
def GenEventRotatorCfg (flags, name="GenEventRotator", **kwargs)
 
def GenEventBeamEffectBoosterCfg (flags, name="GenEventBeamEffectBooster", **kwargs)
 
def GenEventVertexPositionerCfg (flags, name="GenEventVertexPositioner", **kwargs)
 
def VertexBeamCondPositionerCfg (flags, name="VertexBeamCondPositioner", **kwargs)
 
def MatchingBkgVertexPositionerCfg (flags, name="MatchingBkgVertexPositioner", **kwargs)
 
def CrabKissingVertexPositionerCfg (flags, name="CrabKissingVertexPositioner", **kwargs)
 
def LongBeamspotVertexPositionerCfg (flags, name="LongBeamspotVertexPositioner", **kwargs)
 
def BeamEffectsAlgCfg (flags, name="BeamEffectsAlg", **kwargs)
 
def BeamEffectsAlgOutputCfg (flags, **kwargs)
 
def BeamSpotFixerAlgCfg (flags, name="BeamSpotFixerAlg", **kwargs)
 
def ZeroLifetimePositionerCfg (flags, name="ZeroLifetimePositioner", **kwargs)
 
def BeamSpotReweightingAlgCfg (flags, name="BeamSpotReweightingAlg", **kwargs)
 

Variables

 flags = initConfigFlags()
 
 inputDir
 
 Files
 
 HITSFileName
 
 VertexSource
 
 isMC
 
 AtlasVersion
 
 GlobalTag
 
 RunNumbers
 
 cfg = MainServicesCfg(flags)
 
 Dump
 
 withDetails
 
 maxEvents
 

Function Documentation

◆ BeamEffectsAlgCfg()

def BeamEffectsAlgConfig.BeamEffectsAlgCfg (   flags,
  name = "BeamEffectsAlg",
**  kwargs 
)
Return an accumulator and algorithm for beam effects, wihout output

Definition at line 106 of file BeamEffectsAlgConfig.py.

106 def BeamEffectsAlgCfg(flags, name="BeamEffectsAlg", **kwargs):
107  """Return an accumulator and algorithm for beam effects, wihout output"""
108  acc = ComponentAccumulator()
109 
110  from SimulationConfig.SimEnums import LArParameterization
111  if flags.Sim.LArParameterization is LArParameterization.FastCaloSim:
112  kwargs.setdefault("ISFRun", True)
113  else:
114  kwargs.setdefault("ISFRun", flags.Sim.ISFRun)
115 
116  # Set default properties
117  if flags.Sim.DoFullChain and flags.Digitization.PileUp:
118  kwargs.setdefault("InputMcEventCollection", "OriginalEvent_SG+GEN_EVENT")
119  else:
120  kwargs.setdefault("InputMcEventCollection", "GEN_EVENT")
121 
122  if flags.Sim.DoFullChain and flags.Common.isOverlay and not flags.Overlay.DataOverlay:
123  kwargs.setdefault('OutputMcEventCollection', f"{flags.Overlay.SigPrefix}TruthEvent")
124  else:
125  kwargs.setdefault('OutputMcEventCollection', 'BeamTruthEvent')
126 
127  # Set (todo) the appropriate manipulator tools
128  manipulators = []
129  manipulators.append(acc.popToolsAndMerge(ValidityCheckerCfg(flags)))
130  from SimulationConfig.SimEnums import VertexSource
131  if not flags.Sim.VertexSource == VertexSource.AsGenerated:
132  # Vertex manipulation required
133  from SimulationConfig.SimEnums import CavernBackground
134  if flags.Beam.Type not in [BeamType.Cosmics, BeamType.TestBeam] and flags.Sim.CavernBackground is not CavernBackground.Read:
135  manipulators.append(acc.popToolsAndMerge(GenEventVertexPositionerCfg(flags)))
136  # manipulators.append(acc.popToolsAndMerge(GenEventBeamEffectBoosterCfg(flags))) # todo segmentation violation
137  # manipulators.append(acc.popToolsAndMerge(CrabKissingVertexPositionerCfg(flags))) # todo Callback registration failed
138  kwargs.setdefault("GenEventManipulators", manipulators)
139 
140  acc.addEventAlgo(CompFactory.Simulation.BeamEffectsAlg(name, **kwargs), primary=True)
141  return acc
142 
143 

◆ BeamEffectsAlgOutputCfg()

def BeamEffectsAlgConfig.BeamEffectsAlgOutputCfg (   flags,
**  kwargs 
)
Return an accumulator and algorithm for beam effects, with output

Definition at line 144 of file BeamEffectsAlgConfig.py.

144 def BeamEffectsAlgOutputCfg(flags, **kwargs):
145  """Return an accumulator and algorithm for beam effects, with output"""
146  acc = BeamEffectsAlgCfg(flags, **kwargs)
147  # Set to write HITS pool file
148  alg = acc.getPrimary()
149  ItemList = ["McEventCollection#" + alg.OutputMcEventCollection]
150  from OutputStreamAthenaPool.OutputStreamConfig import OutputStreamCfg
151  acc.merge(OutputStreamCfg(flags, "HITS", ItemList=ItemList, disableEventTag=True))
152  return acc
153 
154 

◆ BeamSpotFixerAlgCfg()

def BeamEffectsAlgConfig.BeamSpotFixerAlgCfg (   flags,
  name = "BeamSpotFixerAlg",
**  kwargs 
)

Definition at line 155 of file BeamEffectsAlgConfig.py.

155 def BeamSpotFixerAlgCfg(flags, name="BeamSpotFixerAlg", **kwargs):
156  from BeamSpotConditions.BeamSpotConditionsConfig import BeamSpotCondAlgCfg
157  acc = BeamSpotCondAlgCfg(flags)
158 
159  kwargs.setdefault("InputKey", "Input_EventInfo")
160  if flags.Common.ProductionStep == ProductionStep.PileUpPresampling:
161  kwargs.setdefault("OutputKey", flags.Overlay.BkgPrefix + "EventInfo")
162  else:
163  kwargs.setdefault("OutputKey", "EventInfo")
164 
165  acc.addEventAlgo(CompFactory.Simulation.BeamSpotFixerAlg(name, **kwargs))
166  return acc
167 
168 

◆ BeamSpotReweightingAlgCfg()

def BeamEffectsAlgConfig.BeamSpotReweightingAlgCfg (   flags,
  name = "BeamSpotReweightingAlg",
**  kwargs 
)

Definition at line 177 of file BeamEffectsAlgConfig.py.

177 def BeamSpotReweightingAlgCfg(flags, name="BeamSpotReweightingAlg", **kwargs):
178  from BeamSpotConditions.BeamSpotConditionsConfig import BeamSpotCondAlgCfg
179  acc = BeamSpotCondAlgCfg(flags)
180 
181  kwargs.setdefault("Input_beam_sigma_z", flags.Digitization.InputBeamSigmaZ)
182 
183  acc.addEventAlgo(CompFactory.Simulation.BeamSpotReweightingAlg(name, **kwargs))
184 
185  # Ignore dependencies
186  from AthenaConfiguration.MainServicesConfig import OutputUsageIgnoreCfg
187  acc.merge(OutputUsageIgnoreCfg(flags, name))
188 
189  return acc
190 
191 

◆ CrabKissingVertexPositionerCfg()

def BeamEffectsAlgConfig.CrabKissingVertexPositionerCfg (   flags,
  name = "CrabKissingVertexPositioner",
**  kwargs 
)
Return a Crab-Kissing vertex positioner tool

Definition at line 89 of file BeamEffectsAlgConfig.py.

89 def CrabKissingVertexPositionerCfg(flags, name="CrabKissingVertexPositioner", **kwargs):
90  """Return a Crab-Kissing vertex positioner tool"""
91  # todo needs BunchLength, RandomSvc, BunchShape
92  acc = ComponentAccumulator()
93  acc.setPrivateTools(CompFactory.Simulation.CrabKissingVertexPositioner(name, **kwargs))
94  return acc
95 
96 

◆ GenEventBeamEffectBoosterCfg()

def BeamEffectsAlgConfig.GenEventBeamEffectBoosterCfg (   flags,
  name = "GenEventBeamEffectBooster",
**  kwargs 
)
Return a lorentz booster tool

Definition at line 31 of file BeamEffectsAlgConfig.py.

31 def GenEventBeamEffectBoosterCfg(flags, name="GenEventBeamEffectBooster", **kwargs):
32  """Return a lorentz booster tool"""
33  # todo needs random seed, more?
34  acc = ComponentAccumulator()
35  acc.setPrivateTools(CompFactory.Simulation.GenEventBeamEffectBooster(name, **kwargs))
36  return acc
37 
38 

◆ GenEventRotatorCfg()

def BeamEffectsAlgConfig.GenEventRotatorCfg (   flags,
  name = "GenEventRotator",
**  kwargs 
)
Return a event rotator tool

Definition at line 24 of file BeamEffectsAlgConfig.py.

24 def GenEventRotatorCfg(flags, name="GenEventRotator", **kwargs):
25  """Return a event rotator tool"""
26  acc = ComponentAccumulator()
27  acc.setPrivateTools(CompFactory.Simulation.GenEventRotator(name, **kwargs))
28  return acc
29 
30 

◆ GenEventVertexPositionerCfg()

def BeamEffectsAlgConfig.GenEventVertexPositionerCfg (   flags,
  name = "GenEventVertexPositioner",
**  kwargs 
)
Return a vertex positioner tool

Definition at line 39 of file BeamEffectsAlgConfig.py.

39 def GenEventVertexPositionerCfg(flags, name="GenEventVertexPositioner", **kwargs):
40  """Return a vertex positioner tool"""
41  # todo needs input file(s?)
42 
43  acc = ComponentAccumulator()
44 
45  from SimulationConfig.SimEnums import VertexSource
46  if flags.Sim.VertexSource is VertexSource.MatchingBkg:
47  kwargs.setdefault("VertexShifters", [acc.popToolsAndMerge(MatchingBkgVertexPositionerCfg(flags))])
48  elif flags.Sim.VertexSource is VertexSource.CondDB:
49  kwargs.setdefault("VertexShifters", [acc.popToolsAndMerge(VertexBeamCondPositionerCfg(flags))])
50  elif flags.Sim.VertexSource is VertexSource.LongBeamspotVertexPositioner:
51  kwargs.setdefault("VertexShifters", [acc.popToolsAndMerge(LongBeamspotVertexPositionerCfg(flags))])
52 
53  acc.setPrivateTools(CompFactory.Simulation.GenEventVertexPositioner(name, **kwargs))
54  return acc
55 
56 
57 # LorentzVectorGenerators

◆ LongBeamspotVertexPositionerCfg()

def BeamEffectsAlgConfig.LongBeamspotVertexPositionerCfg (   flags,
  name = "LongBeamspotVertexPositioner",
**  kwargs 
)
Return a long beamspot vertex positioner tool

Definition at line 97 of file BeamEffectsAlgConfig.py.

97 def LongBeamspotVertexPositionerCfg(flags, name="LongBeamspotVertexPositioner", **kwargs):
98  """Return a long beamspot vertex positioner tool"""
99  # todo needs LParameter and RandomSvc
100  acc = ComponentAccumulator()
101  kwargs.setdefault("SimpleTimeSmearing", flags.Sim.VertexTimeSmearing)
102  acc.setPrivateTools(CompFactory.Simulation.LongBeamspotVertexPositioner(name, **kwargs))
103  return acc
104 
105 

◆ MatchingBkgVertexPositionerCfg()

def BeamEffectsAlgConfig.MatchingBkgVertexPositionerCfg (   flags,
  name = "MatchingBkgVertexPositioner",
**  kwargs 
)
Return a vertex positioner tool that reads a matching vertex from the background input file.

Definition at line 75 of file BeamEffectsAlgConfig.py.

75 def MatchingBkgVertexPositionerCfg(flags, name="MatchingBkgVertexPositioner", **kwargs):
76  """Return a vertex positioner tool that reads a matching vertex from the background input file."""
77  acc = ComponentAccumulator()
78 
79  if flags.Overlay.DataOverlay:
80  kwargs.setdefault("PrimaryVertexContainerName", f"{flags.Overlay.BkgPrefix}PrimaryVertices")
81 
82  from SGComps.SGInputLoaderConfig import SGInputLoaderCfg
83  acc.merge(SGInputLoaderCfg(flags, [f'xAOD::VertexContainer#{kwargs["PrimaryVertexContainerName"]}']))
84 
85  acc.setPrivateTools(CompFactory.Simulation.MatchingBkgVertexPositioner(name, **kwargs))
86  return acc
87 
88 

◆ ValidityCheckerCfg()

def BeamEffectsAlgConfig.ValidityCheckerCfg (   flags,
  name = "GenEventValidityChecker",
**  kwargs 
)
Return a validity checker tool

Definition at line 17 of file BeamEffectsAlgConfig.py.

17 def ValidityCheckerCfg(flags, name="GenEventValidityChecker", **kwargs):
18  """Return a validity checker tool"""
19  acc = ComponentAccumulator()
20  acc.setPrivateTools(CompFactory.Simulation.GenEventValidityChecker(name, **kwargs))
21  return acc
22 
23 

◆ VertexBeamCondPositionerCfg()

def BeamEffectsAlgConfig.VertexBeamCondPositionerCfg (   flags,
  name = "VertexBeamCondPositioner",
**  kwargs 
)
Return a conditional (? todo) vertex positioner tool

Definition at line 58 of file BeamEffectsAlgConfig.py.

58 def VertexBeamCondPositionerCfg(flags, name="VertexBeamCondPositioner", **kwargs):
59  """Return a conditional (? todo) vertex positioner tool"""
60  from RngComps.RngCompsConfig import AthRNGSvcCfg
61 
62  acc = ComponentAccumulator()
63 
64  kwargs.setdefault("RandomSvc", acc.getPrimaryAndMerge(AthRNGSvcCfg(flags)).name)
65  kwargs.setdefault("SimpleTimeSmearing", flags.Sim.VertexTimeSmearing)
66  kwargs.setdefault("TimeWidth", flags.Sim.VertexTimeWidth)
67 
68  from BeamSpotConditions.BeamSpotConditionsConfig import BeamSpotCondAlgCfg
69  acc.merge(BeamSpotCondAlgCfg(flags))
70 
71  acc.setPrivateTools(CompFactory.Simulation.VertexBeamCondPositioner(name, **kwargs))
72  return acc
73 
74 

◆ ZeroLifetimePositionerCfg()

def BeamEffectsAlgConfig.ZeroLifetimePositionerCfg (   flags,
  name = "ZeroLifetimePositioner",
**  kwargs 
)

Definition at line 169 of file BeamEffectsAlgConfig.py.

169 def ZeroLifetimePositionerCfg(flags, name="ZeroLifetimePositioner", **kwargs):
170  result = ComponentAccumulator()
171  kwargs.setdefault('ApplyPatch', True)
172  kwargs.setdefault('RemovePatch', True)
173  result.addService(CompFactory.Simulation.ZeroLifetimePositioner(name, **kwargs), primary = True)
174  return result
175 
176 

Variable Documentation

◆ AtlasVersion

BeamEffectsAlgConfig.AtlasVersion

Definition at line 225 of file BeamEffectsAlgConfig.py.

◆ cfg

BeamEffectsAlgConfig.cfg = MainServicesCfg(flags)

Definition at line 233 of file BeamEffectsAlgConfig.py.

◆ Dump

BeamEffectsAlgConfig.Dump

Definition at line 240 of file BeamEffectsAlgConfig.py.

◆ Files

BeamEffectsAlgConfig.Files

Definition at line 209 of file BeamEffectsAlgConfig.py.

◆ flags

BeamEffectsAlgConfig.flags = initConfigFlags()

Definition at line 200 of file BeamEffectsAlgConfig.py.

◆ GlobalTag

BeamEffectsAlgConfig.GlobalTag

Definition at line 226 of file BeamEffectsAlgConfig.py.

◆ HITSFileName

BeamEffectsAlgConfig.HITSFileName

Definition at line 215 of file BeamEffectsAlgConfig.py.

◆ inputDir

BeamEffectsAlgConfig.inputDir
Initial value:
1 = os.environ.get("ATLAS_REFERENCE_DATA",
2  "/cvmfs/atlas-nightlies.cern.ch/repo/data/data-art")

Definition at line 206 of file BeamEffectsAlgConfig.py.

◆ isMC

BeamEffectsAlgConfig.isMC

Definition at line 224 of file BeamEffectsAlgConfig.py.

◆ maxEvents

BeamEffectsAlgConfig.maxEvents

Definition at line 249 of file BeamEffectsAlgConfig.py.

◆ RunNumbers

BeamEffectsAlgConfig.RunNumbers

Definition at line 227 of file BeamEffectsAlgConfig.py.

◆ VertexSource

BeamEffectsAlgConfig.VertexSource

Definition at line 220 of file BeamEffectsAlgConfig.py.

◆ withDetails

BeamEffectsAlgConfig.withDetails

Definition at line 241 of file BeamEffectsAlgConfig.py.

BeamEffectsAlgConfig.ValidityCheckerCfg
def ValidityCheckerCfg(flags, name="GenEventValidityChecker", **kwargs)
Definition: BeamEffectsAlgConfig.py:17
python.JetAnalysisCommon.ComponentAccumulator
ComponentAccumulator
Definition: JetAnalysisCommon.py:302
BeamEffectsAlgConfig.LongBeamspotVertexPositionerCfg
def LongBeamspotVertexPositionerCfg(flags, name="LongBeamspotVertexPositioner", **kwargs)
Definition: BeamEffectsAlgConfig.py:97
python.OutputStreamConfig.OutputStreamCfg
def OutputStreamCfg(flags, streamName, ItemList=[], MetadataItemList=[], disableEventTag=False, trigNavThinningSvc=None, takeItemsFromInput=False, extendProvenanceRecord=True, AcceptAlgs=[], HelperTools=[])
Definition: OutputStreamConfig.py:12
python.BeamSpotConditionsConfig.BeamSpotCondAlgCfg
def BeamSpotCondAlgCfg(flags, name="BeamSpotCondAlg", **kwargs)
Definition: BeamSpotConditionsConfig.py:7
python.MainServicesConfig.OutputUsageIgnoreCfg
def OutputUsageIgnoreCfg(flags, algorithm)
Definition: MainServicesConfig.py:57
BeamEffectsAlgConfig.BeamEffectsAlgCfg
def BeamEffectsAlgCfg(flags, name="BeamEffectsAlg", **kwargs)
Definition: BeamEffectsAlgConfig.py:106
SGInputLoaderConfig.SGInputLoaderCfg
def SGInputLoaderCfg(flags, Load=None, **kwargs)
Definition: SGInputLoaderConfig.py:7
BeamEffectsAlgConfig.GenEventVertexPositionerCfg
def GenEventVertexPositionerCfg(flags, name="GenEventVertexPositioner", **kwargs)
Definition: BeamEffectsAlgConfig.py:39
BeamEffectsAlgConfig.CrabKissingVertexPositionerCfg
def CrabKissingVertexPositionerCfg(flags, name="CrabKissingVertexPositioner", **kwargs)
Definition: BeamEffectsAlgConfig.py:89
BeamEffectsAlgConfig.BeamSpotFixerAlgCfg
def BeamSpotFixerAlgCfg(flags, name="BeamSpotFixerAlg", **kwargs)
Definition: BeamEffectsAlgConfig.py:155
BeamEffectsAlgConfig.VertexBeamCondPositionerCfg
def VertexBeamCondPositionerCfg(flags, name="VertexBeamCondPositioner", **kwargs)
Definition: BeamEffectsAlgConfig.py:58
BeamEffectsAlgConfig.BeamEffectsAlgOutputCfg
def BeamEffectsAlgOutputCfg(flags, **kwargs)
Definition: BeamEffectsAlgConfig.py:144
BeamEffectsAlgConfig.BeamSpotReweightingAlgCfg
def BeamSpotReweightingAlgCfg(flags, name="BeamSpotReweightingAlg", **kwargs)
Definition: BeamEffectsAlgConfig.py:177
BeamEffectsAlgConfig.GenEventBeamEffectBoosterCfg
def GenEventBeamEffectBoosterCfg(flags, name="GenEventBeamEffectBooster", **kwargs)
Definition: BeamEffectsAlgConfig.py:31
BeamEffectsAlgConfig.GenEventRotatorCfg
def GenEventRotatorCfg(flags, name="GenEventRotator", **kwargs)
Definition: BeamEffectsAlgConfig.py:24
BeamEffectsAlgConfig.MatchingBkgVertexPositionerCfg
def MatchingBkgVertexPositionerCfg(flags, name="MatchingBkgVertexPositioner", **kwargs)
Definition: BeamEffectsAlgConfig.py:75
BeamEffectsAlgConfig.ZeroLifetimePositionerCfg
def ZeroLifetimePositionerCfg(flags, name="ZeroLifetimePositioner", **kwargs)
Definition: BeamEffectsAlgConfig.py:169
RngCompsConfig.AthRNGSvcCfg
def AthRNGSvcCfg(flags, name="AthRNGSvc")
Definition: RngCompsConfig.py:51