ATLAS Offline Software
Functions | Variables
python.DigitizationSteering Namespace Reference

Functions

def HepMCVersion ()
 
def DigitizationMainServicesCfg (flags)
 
def DigitizationMainCfg (flags)
 
def DigitizationMainContentCfg (flags)
 
def DigitizationMessageSvcCfg (flags)
 
def DigitizationTestingPostInclude (flags, acc)
 

Variables

 logDigiSteering = logging.getLogger('DigitizationSteering')
 

Detailed Description

Main steering for the digitization jobs

Copyright (C) 2002-2024 CERN for the benefit of the ATLAS collaboration

Function Documentation

◆ DigitizationMainCfg()

def python.DigitizationSteering.DigitizationMainCfg (   flags)

Definition at line 50 of file DigitizationSteering.py.

50 def DigitizationMainCfg(flags):
51  # Construct main services
52  acc = DigitizationMainServicesCfg(flags)
53 
54  acc.merge(DigitizationMainContentCfg(flags))
55 
56  return acc
57 

◆ DigitizationMainContentCfg()

def python.DigitizationSteering.DigitizationMainContentCfg (   flags)

Definition at line 58 of file DigitizationSteering.py.

59 
60  acc = ComponentAccumulator()
61 
62  acc.merge(writeDigitizationMetadata(flags))
63 
64  if not flags.Digitization.PileUp:
65  # Old EventInfo conversion
66  if "EventInfo" not in flags.Input.Collections:
67  from xAODEventInfoCnv.xAODEventInfoCnvConfig import EventInfoCnvAlgCfg
68  acc.merge(EventInfoCnvAlgCfg(flags,
69  inputKey="McEventInfo",
70  outputKey="Input_EventInfo"))
71 
72  from xAODEventInfoCnv.xAODEventInfoCnvConfig import EventInfoUpdateFromContextAlgCfg
73  acc.merge(EventInfoUpdateFromContextAlgCfg(flags))
74 
75  # Decorate pile-up values
76  from DigitizationConfig.PileUpConfig import NoPileUpMuWriterCfg
77  acc.merge(NoPileUpMuWriterCfg(flags))
78 
79  # Signal-only truth information
80  if flags.Digitization.PileUp:
81  if HepMCVersion() == 3:
82  from MCTruthSimAlgs.MCTruthSimAlgsConfig import SimpleMergeMcEventCollCfg as MergeMcEventCollCfg
83  from MCTruthSimAlgs.MCTruthSimAlgsConfig import InTimeOnlySimpleMergeMcEventCollCfg as InTimeOnlyMergeMcEventCollCfg
84  from MCTruthSimAlgs.MCTruthSimAlgsConfig import SignalOnlySimpleMergeMcEventCollCfg as SignalOnlyMergeMcEventCollCfg
85  else:
86  from MCTruthSimAlgs.MCTruthSimAlgsConfig import MergeMcEventCollCfg
87  from MCTruthSimAlgs.MCTruthSimAlgsConfig import InTimeOnlyMcEventCollCfg as InTimeOnlyMergeMcEventCollCfg
88  from MCTruthSimAlgs.MCTruthSimAlgsConfig import SignalOnlyMcEventCollCfg as SignalOnlyMergeMcEventCollCfg
89  from MCTruthSimAlgs.MCTruthSimAlgsConfig import (
90  MergeAntiKt4TruthJetsCfg,
91  MergeAntiKt6TruthJetsCfg,
92  MergeTruthParticlesCfg,
93  MergeMuonEntryLayerCfg,
94  MergeCalibHitsCfg,
95  MergeHijingParsCfg,
96  )
97  if flags.Common.ProductionStep is not ProductionStep.FastChain and getEnabledDetectors(flags):
98  if flags.Digitization.DigiSteeringConf=="StandardPileUpToolsAlg":
99  acc.merge(MergeMcEventCollCfg(flags))
100  elif flags.Digitization.DigiSteeringConf=="StandardInTimeOnlyTruthPileUpToolsAlg":
101  acc.merge(InTimeOnlyMergeMcEventCollCfg(flags))
102  else:
103  acc.merge(SignalOnlyMergeMcEventCollCfg(flags))
104  if flags.Digitization.EnableTruth:
105  puCollections = pileupInputCollections(flags.Digitization.PU.LowPtMinBiasInputCols)
106  if "AntiKt4TruthJets" in puCollections:
107  acc.merge(MergeAntiKt4TruthJetsCfg(flags))
108  if "AntiKt6TruthJets" in puCollections:
109  acc.merge(MergeAntiKt6TruthJetsCfg(flags))
110  if "TruthPileupParticles" in puCollections:
111  acc.merge(MergeTruthParticlesCfg(flags))
112  acc.merge(MergeMuonEntryLayerCfg(flags))
113  acc.merge(MergeCalibHitsCfg(flags))
114  if 'Hijing_event_params' in pileupInputCollections(flags.Digitization.PU.CavernInputCols):
115  acc.merge(MergeHijingParsCfg(flags))
116 
117 
118  from DigitizationConfig.TruthDigitizationOutputConfig import TruthDigitizationOutputCfg
119  acc.merge(TruthDigitizationOutputCfg(flags))
120 
121  # Beam spot reweighting
122  if flags.Common.ProductionStep != ProductionStep.PileUpPresampling and flags.Digitization.InputBeamSigmaZ > 0:
123  from BeamEffects.BeamEffectsAlgConfig import BeamSpotReweightingAlgCfg
124  acc.merge(BeamSpotReweightingAlgCfg(flags))
125 
126  # Inner Detector
127  if flags.Detector.EnableBCM:
128  from BCM_Digitization.BCM_DigitizationConfig import BCM_DigitizationCfg
129  acc.merge(BCM_DigitizationCfg(flags))
130  if flags.Detector.EnablePixel:
131  from PixelDigitization.PixelDigitizationConfig import PixelDigitizationCfg
132  acc.merge(PixelDigitizationCfg(flags))
133  if flags.Detector.EnableSCT:
134  from SCT_Digitization.SCT_DigitizationConfig import SCT_DigitizationCfg
135  acc.merge(SCT_DigitizationCfg(flags))
136  if flags.Detector.EnableTRT:
137  from TRT_Digitization.TRT_DigitizationConfig import TRT_DigitizationCfg
138  acc.merge(TRT_DigitizationCfg(flags))
139 
140  # ITk
141  if flags.Detector.EnableITkPixel:
142  from PixelDigitization.ITkPixelDigitizationConfig import ITkPixelDigitizationCfg
143  acc.merge(ITkPixelDigitizationCfg(flags))
144  if flags.Detector.EnableITkStrip:
145  from StripDigitization.StripDigitizationConfig import ITkStripDigitizationCfg
146  acc.merge(ITkStripDigitizationCfg(flags))
147  if flags.Detector.EnablePLR:
148  from PixelDigitization.PLR_DigitizationConfig import PLR_DigitizationCfg
149  acc.merge(PLR_DigitizationCfg(flags))
150 
151  # HGTD
152  if flags.Detector.EnableHGTD:
153  from HGTD_Digitization.HGTD_DigitizationConfig import HGTD_DigitizationCfg
154  acc.merge(HGTD_DigitizationCfg(flags))
155 
156  # Calorimeter
157  if flags.Detector.EnableLAr:
158  from LArDigitization.LArDigitizationConfig import LArTriggerDigitizationCfg
159  acc.merge(LArTriggerDigitizationCfg(flags))
160  if flags.Detector.EnableTile:
161  from TileSimAlgs.TileDigitizationConfig import TileDigitizationCfg, TileTriggerDigitizationCfg
162  acc.merge(TileDigitizationCfg(flags))
163  acc.merge(TileTriggerDigitizationCfg(flags))
164 
165  # Muon Spectrometer
166  if flags.Detector.EnableMDT:
167  from MuonConfig.MDT_DigitizationConfig import MDT_DigitizationDigitToRDOCfg
168  acc.merge(MDT_DigitizationDigitToRDOCfg(flags))
169  if flags.Detector.EnableTGC:
170  from MuonConfig.TGC_DigitizationConfig import TGC_DigitizationDigitToRDOCfg
171  acc.merge(TGC_DigitizationDigitToRDOCfg(flags))
172  if flags.Detector.EnableRPC:
173  from MuonConfig.RPC_DigitizationConfig import RPC_DigitizationDigitToRDOCfg
174  acc.merge(RPC_DigitizationDigitToRDOCfg(flags))
175  if flags.Detector.EnableCSC:
176  from MuonConfig.CSC_DigitizationConfig import CSC_DigitizationDigitToRDOCfg
177  acc.merge(CSC_DigitizationDigitToRDOCfg(flags))
178  if flags.Detector.EnablesTGC:
179  from MuonConfig.sTGC_DigitizationConfig import sTGC_DigitizationDigitToRDOCfg
180  acc.merge(sTGC_DigitizationDigitToRDOCfg(flags))
181  if flags.Detector.EnableMM:
182  from MuonConfig.MM_DigitizationConfig import MM_DigitizationDigitToRDOCfg
183  acc.merge(MM_DigitizationDigitToRDOCfg(flags))
184 
185  # LUCID
186  if flags.Detector.EnableLucid:
187  from LUCID_Digitization.LUCID_DigitizationConfig import LUCID_DigitizationCfg
188  acc.merge(LUCID_DigitizationCfg(flags))
189 
190  # AFP
191  if flags.Detector.EnableAFP:
192  from AFP_Digitization.AFP_DigitizationConfig import AFP_DigitizationCfg
193  acc.merge(AFP_DigitizationCfg(flags))
194 
195  # ALFA
196  if flags.Detector.EnableALFA:
197  from ALFA_Digitization.ALFA_DigitizationConfig import ALFA_DigitizationCfg
198  acc.merge(ALFA_DigitizationCfg(flags))
199 
200  # ZDC
201  if flags.Detector.EnableZDC:
202  from ZDC_SimuDigitization.ZDC_SimuDigitizationConfig import ZDC_DigitizationCfg
203  acc.merge(ZDC_DigitizationCfg(flags))
204 
205  # Add MT-safe PerfMon
206  if flags.PerfMon.doFastMonMT or flags.PerfMon.doFullMonMT:
207  from PerfMonComps.PerfMonCompsConfig import PerfMonMTSvcCfg
208  acc.merge(PerfMonMTSvcCfg(flags))
209 
210  # Add in-file MetaData
211  from xAODMetaDataCnv.InfileMetaDataConfig import SetupMetaDataForStreamCfg
212  acc.merge(SetupMetaDataForStreamCfg(flags, "RDO"))
213 
214  return acc
215 
216 

◆ DigitizationMainServicesCfg()

def python.DigitizationSteering.DigitizationMainServicesCfg (   flags)
Configure main digitization services

Definition at line 28 of file DigitizationSteering.py.

29  """Configure main digitization services"""
30  if flags.Digitization.PileUp:
31  if flags.Concurrency.NumThreads > 0:
32  logDigiSteering.info("DigitizationMainServicesCfg: Attempting to run pile-up digitization AthenaMT using %s threads!", str(flags.Concurrency.NumThreads))
33  logDigiSteering.info("DigitizationMainServicesCfg: Using new PileUpMT code.")
34  # raise RuntimeError("DigitizationSteering.DigitizationMainServicesCfg: Running pile-up digitization with AthenaMT is not supported. Please update your configuration.")
35  from DigitizationConfig.PileUpMTConfig import PileUpMTAlgCfg
36  acc = MainServicesCfg(flags)
37  acc.merge(PileUpMTAlgCfg(flags))
38  else:
39  from DigitizationConfig.PileUpConfig import PileUpEventLoopMgrCfg
40  acc = MainServicesCfg(flags, LoopMgr="PileUpEventLoopMgr")
41  acc.merge(PileUpEventLoopMgrCfg(flags))
42  else:
43  acc = MainServicesCfg(flags)
44 
45  acc.merge(PoolReadCfg(flags))
46 
47  return acc
48 
49 

◆ DigitizationMessageSvcCfg()

def python.DigitizationSteering.DigitizationMessageSvcCfg (   flags)
MessageSvc for digitization and overlay

Definition at line 217 of file DigitizationSteering.py.

217 def DigitizationMessageSvcCfg(flags):
218  """MessageSvc for digitization and overlay"""
219  MessageSvc = CompFactory.MessageSvc
220  acc = ComponentAccumulator()
221  acc.addService(MessageSvc(setError=["HepMcParticleLink"]))
222  return acc
223 
224 

◆ DigitizationTestingPostInclude()

def python.DigitizationSteering.DigitizationTestingPostInclude (   flags,
  acc 
)
Testing digitization post-include

Definition at line 225 of file DigitizationSteering.py.

225 def DigitizationTestingPostInclude(flags, acc):
226  """Testing digitization post-include"""
227  # dump config
228  configName = "DigiPUConfigCA" if flags.Digitization.PileUp else "DigiConfigCA"
229  from AthenaConfiguration.JobOptsDumper import JobOptsDumperCfg
230  acc.merge(JobOptsDumperCfg(flags, FileName=f"{configName}.txt"))
231 
232  # dump pickle
233  with open(f"{configName}.pkl", "wb") as f:
234  acc.store(f)

◆ HepMCVersion()

def python.DigitizationSteering.HepMCVersion ( )

Definition at line 19 of file DigitizationSteering.py.

19 def HepMCVersion():
20  try:
21  from AthenaPython.PyAthena import HepMC3 # noqa: F401
22  HepMCVersion=3
23  except ImportError:
24  HepMCVersion=2
25  return HepMCVersion
26 
27 

Variable Documentation

◆ logDigiSteering

python.DigitizationSteering.logDigiSteering = logging.getLogger('DigitizationSteering')

Definition at line 17 of file DigitizationSteering.py.

LUCID_DigitizationConfig.LUCID_DigitizationCfg
def LUCID_DigitizationCfg(flags, **kwargs)
Definition: LUCID_DigitizationConfig.py:113
python.DigitizationSteering.DigitizationMainContentCfg
def DigitizationMainContentCfg(flags)
Definition: DigitizationSteering.py:58
python.PileUpConfig.PileUpEventLoopMgrCfg
def PileUpEventLoopMgrCfg(flags, name="PileUpEventLoopMgr", **kwargs)
Definition: PileUpConfig.py:248
MCTruthSimAlgsConfig.MergeMuonEntryLayerCfg
def MergeMuonEntryLayerCfg(flags, name="MergeMuonEntryLayerTool", **kwargs)
Definition: MCTruthSimAlgsConfig.py:258
StripDigitizationConfig.ITkStripDigitizationCfg
def ITkStripDigitizationCfg(flags, **kwargs)
Definition: StripDigitizationConfig.py:315
MCTruthSimAlgsConfig.MergeAntiKt6TruthJetsCfg
def MergeAntiKt6TruthJetsCfg(flags, name="MergeAntiKt6TruthJetsTool", **kwargs)
Definition: MCTruthSimAlgsConfig.py:151
ALFA_DigitizationConfig.ALFA_DigitizationCfg
def ALFA_DigitizationCfg(flags, **kwargs)
Definition: ALFA_DigitizationConfig.py:110
python.JetAnalysisCommon.ComponentAccumulator
ComponentAccumulator
Definition: JetAnalysisCommon.py:302
python.DetectorConfigFlags.getEnabledDetectors
def getEnabledDetectors(flags, geometry=False)
Definition: DetectorConfigFlags.py:147
PLR_DigitizationConfig.PLR_DigitizationCfg
def PLR_DigitizationCfg(flags, **kwargs)
Definition: PLR_DigitizationConfig.py:245
python.TruthDigitizationOutputConfig.TruthDigitizationOutputCfg
def TruthDigitizationOutputCfg(flags)
Definition: TruthDigitizationOutputConfig.py:9
python.PileUpUtils.pileupInputCollections
def pileupInputCollections(inputFiles)
Definition: PileUpUtils.py:10
python.JobOptsDumper.JobOptsDumperCfg
def JobOptsDumperCfg(flags, FileName="JobOptsConfig.txt")
Definition: JobOptsDumper.py:6
TileDigitizationConfig.TileTriggerDigitizationCfg
def TileTriggerDigitizationCfg(flags)
Definition: TileDigitizationConfig.py:10
python.CSC_DigitizationConfig.CSC_DigitizationDigitToRDOCfg
def CSC_DigitizationDigitToRDOCfg(flags)
Definition: CSC_DigitizationConfig.py:147
python.sTGC_DigitizationConfig.sTGC_DigitizationDigitToRDOCfg
def sTGC_DigitizationDigitToRDOCfg(flags)
Definition: sTGC_DigitizationConfig.py:158
python.xAODEventInfoCnvConfig.EventInfoUpdateFromContextAlgCfg
def EventInfoUpdateFromContextAlgCfg(flags, name="EventInfoUpdateFromContextAlg", **kwargs)
Definition: xAODEventInfoCnvConfig.py:111
python.PerfMonCompsConfig.PerfMonMTSvcCfg
def PerfMonMTSvcCfg(flags, **kwargs)
A minimal new-style configuration for PerfMonMTSvc.
Definition: PerfMonCompsConfig.py:10
MCTruthSimAlgsConfig.MergeAntiKt4TruthJetsCfg
def MergeAntiKt4TruthJetsCfg(flags, name="MergeAntiKt4TruthJetsTool", **kwargs)
Definition: MCTruthSimAlgsConfig.py:133
ZDC_SimuDigitizationConfig.ZDC_DigitizationCfg
def ZDC_DigitizationCfg(flags, **kwargs)
Definition: ZDC_SimuDigitizationConfig.py:117
python.DigitizationSteering.DigitizationMessageSvcCfg
def DigitizationMessageSvcCfg(flags)
Definition: DigitizationSteering.py:217
BCM_DigitizationConfig.BCM_DigitizationCfg
def BCM_DigitizationCfg(flags, **kwargs)
Definition: BCM_DigitizationConfig.py:146
jobOptions.MessageSvc
MessageSvc
Definition: jobOptions.crmc.py:63
MCTruthSimAlgsConfig.MergeTruthParticlesCfg
def MergeTruthParticlesCfg(flags, name="MergeTruthParticlesTool", **kwargs)
Definition: MCTruthSimAlgsConfig.py:198
python.MainServicesConfig.MainServicesCfg
def MainServicesCfg(flags, LoopMgr='AthenaEventLoopMgr')
Definition: MainServicesConfig.py:260
ITkPixelDigitizationConfig.ITkPixelDigitizationCfg
def ITkPixelDigitizationCfg(flags, **kwargs)
Definition: ITkPixelDigitizationConfig.py:274
MCTruthSimAlgsConfig.MergeCalibHitsCfg
def MergeCalibHitsCfg(flags, name="MergeCalibHitsTool", **kwargs)
Definition: MCTruthSimAlgsConfig.py:318
MCTruthSimAlgsConfig.MergeMcEventCollCfg
def MergeMcEventCollCfg(flags, name="MergeMcEventCollTool", **kwargs)
Definition: MCTruthSimAlgsConfig.py:38
python.MDT_DigitizationConfig.MDT_DigitizationDigitToRDOCfg
def MDT_DigitizationDigitToRDOCfg(flags)
Definition: MDT_DigitizationConfig.py:186
TileDigitizationConfig.TileDigitizationCfg
def TileDigitizationCfg(flags)
Definition: TileDigitizationConfig.py:46
python.DigitizationSteering.DigitizationMainCfg
def DigitizationMainCfg(flags)
Definition: DigitizationSteering.py:50
python.PileUpMTConfig.PileUpMTAlgCfg
def PileUpMTAlgCfg(flags, **kwargs)
Definition: PileUpMTConfig.py:154
python.TGC_DigitizationConfig.TGC_DigitizationDigitToRDOCfg
def TGC_DigitizationDigitToRDOCfg(flags)
Definition: TGC_DigitizationConfig.py:156
MCTruthSimAlgsConfig.MergeHijingParsCfg
def MergeHijingParsCfg(flags, name="MergeHijingParsTool", **kwargs)
Definition: MCTruthSimAlgsConfig.py:280
python.DigitizationSteering.DigitizationMainServicesCfg
def DigitizationMainServicesCfg(flags)
Definition: DigitizationSteering.py:28
HGTD_DigitizationConfig.HGTD_DigitizationCfg
def HGTD_DigitizationCfg(flags, **kwargs)
Definition: HGTD_DigitizationConfig.py:152
python.MM_DigitizationConfig.MM_DigitizationDigitToRDOCfg
def MM_DigitizationDigitToRDOCfg(flags)
Definition: MM_DigitizationConfig.py:181
TRT_DigitizationConfig.TRT_DigitizationCfg
def TRT_DigitizationCfg(flags, **kwargs)
Definition: TRT_DigitizationConfig.py:234
Trk::open
@ open
Definition: BinningType.h:40
BeamEffectsAlgConfig.BeamSpotReweightingAlgCfg
def BeamSpotReweightingAlgCfg(flags, name="BeamSpotReweightingAlg", **kwargs)
Definition: BeamEffectsAlgConfig.py:174
PixelDigitizationConfig.PixelDigitizationCfg
def PixelDigitizationCfg(flags, **kwargs)
Definition: PixelDigitizationConfig.py:334
SCT_DigitizationConfig.SCT_DigitizationCfg
def SCT_DigitizationCfg(flags, **kwargs)
Definition: SCT_DigitizationConfig.py:313
python.DigitizationParametersConfig.writeDigitizationMetadata
def writeDigitizationMetadata(flags)
Definition: DigitizationParametersConfig.py:11
str
Definition: BTagTrackIpAccessor.cxx:11
python.PileUpConfig.NoPileUpMuWriterCfg
def NoPileUpMuWriterCfg(flags, name="NoPileUpMuWriter", **kwargs)
Definition: PileUpConfig.py:319
python.xAODEventInfoCnvConfig.EventInfoCnvAlgCfg
def EventInfoCnvAlgCfg(flags, name="EventInfoCnvAlg", inputKey="McEventInfo", outputKey="EventInfo", disableBeamSpot=False, **kwargs)
Definition: xAODEventInfoCnvConfig.py:11
InfileMetaDataConfig.SetupMetaDataForStreamCfg
def SetupMetaDataForStreamCfg(flags, streamName="", AcceptAlgs=None, createMetadata=None, propagateMetadataFromInput=True, *args, **kwargs)
Definition: InfileMetaDataConfig.py:219
python.RPC_DigitizationConfig.RPC_DigitizationDigitToRDOCfg
def RPC_DigitizationDigitToRDOCfg(flags)
Definition: RPC_DigitizationConfig.py:196
python.DigitizationSteering.DigitizationTestingPostInclude
def DigitizationTestingPostInclude(flags, acc)
Definition: DigitizationSteering.py:225
AFP_DigitizationConfig.AFP_DigitizationCfg
def AFP_DigitizationCfg(flags, **kwargs)
Definition: AFP_DigitizationConfig.py:120
python.PoolReadConfig.PoolReadCfg
def PoolReadCfg(flags)
Definition: PoolReadConfig.py:69
python.LArDigitizationConfig.LArTriggerDigitizationCfg
def LArTriggerDigitizationCfg(flags, **kwargs)
Definition: LArDigitizationConfig.py:369
python.HepMCVersion
int HepMCVersion
Definition: Generators/ParticleGun/python/__init__.py:11