187 """Fill pile-up digitization configuration flags from run arguments."""
188 if hasattr(runArgs,
"numberOfLowPtMinBias"):
189 flags.Digitization.PU.NumberOfLowPtMinBias = runArgs.numberOfLowPtMinBias
191 if hasattr(runArgs,
"numberOfHighPtMinBias"):
192 flags.Digitization.PU.NumberOfHighPtMinBias = runArgs.numberOfHighPtMinBias
194 if hasattr(runArgs,
"numberOfBeamHalo"):
195 flags.Digitization.PU.NumberOfBeamHalo = runArgs.numberOfBeamHalo
197 if hasattr(runArgs,
"numberOfBeamGas"):
198 flags.Digitization.PU.NumberOfBeamGas = runArgs.numberOfBeamGas
200 if hasattr(runArgs,
"numberOfCavernBkg"):
201 flags.Digitization.PU.NumberOfCavern = runArgs.numberOfCavernBkg
203 if hasattr(runArgs,
"bunchSpacing"):
204 flags.Digitization.PU.BunchSpacing = runArgs.bunchSpacing
206 if hasattr(runArgs,
"pileupInitialBunch"):
207 flags.Digitization.PU.InitialBunchCrossing = runArgs.pileupInitialBunch
209 if hasattr(runArgs,
"pileupFinalBunch"):
210 flags.Digitization.PU.FinalBunchCrossing = runArgs.pileupFinalBunch
213 if flags.Digitization.PU.InitialBunchCrossing > flags.Digitization.PU.FinalBunchCrossing:
214 raise ValueError(
"Initial bunch crossing should not be larger than the final one")
216 if hasattr(runArgs,
"inputLowPtMinbiasHitsFile"):
217 from RunDependentSimComps.PileUpUtils
import generateBackgroundInputCollections
218 flags.Digitization.PU.LowPtMinBiasInputCols = \
220 flags.Digitization.PU.NumberOfLowPtMinBias,
True)
222 if hasattr(runArgs,
"inputHighPtMinbiasHitsFile"):
223 from RunDependentSimComps.PileUpUtils
import getInputCollectionOffset, generateBackgroundInputCollections
224 if flags.Digitization.PU.HighPtMinBiasInputColOffset < 0:
226 flags.Digitization.PU.HighPtMinBiasInputColOffset =
getInputCollectionOffset(flags, runArgs.inputHighPtMinbiasHitsFile)
228 flags.Digitization.PU.HighPtMinBiasInputCols = \
230 flags.Digitization.PU.NumberOfHighPtMinBias,
True)
232 if hasattr(runArgs,
"inputCavernHitsFile"):
233 from RunDependentSimComps.PileUpUtils
import generateBackgroundInputCollections
234 flags.Digitization.PU.CavernInputCols = \
236 flags.Digitization.PU.NumberOfCavern,
True)
238 if hasattr(runArgs,
"inputBeamHaloHitsFile"):
239 from RunDependentSimComps.PileUpUtils
import generateBackgroundInputCollections
240 flags.Digitization.PU.BeamHaloInputCols = \
242 flags.Digitization.PU.NumberOfBeamHalo,
True)
244 if hasattr(runArgs,
"inputBeamGasHitsFile"):
245 from RunDependentSimComps.PileUpUtils
import generateBackgroundInputCollections
246 flags.Digitization.PU.BeamGasInputCols = \
248 flags.Digitization.PU.NumberOfBeamGas,
True)