5 #ifndef PILEUPMT_PILEUPMTALG_H
6 #define PILEUPMT_PILEUPMTALG_H
24 #include <fmt/chrono.h>
25 #include <fmt/compile.h>
26 #include <fmt/format.h>
32 #include <string_view>
43 using namespace std::chrono;
44 std::lock_guard lck{
m_mtx};
54 std::lock_guard lck{
m_mtx};
62 std::lock_guard lck{
m_mtx};
81 virtual bool isClonable()
const override {
return true; }
95 "MinbiasSvc for low pT minbias"};
97 "MinbiasSvc for high pT minbias"};
99 "MinbiasSvc for cavern background"};
101 this,
"BeamHaloMinbiasSvc",
"",
"MinbiasSvc for beam halo background"};
103 this,
"BeamGasMinbiasSvc",
"",
"MinbiasSvc for beam gas background"};
105 "Beam intensity service"};
107 this,
"BeamLumiSvc",
"LumiProfileSvc",
"Beam luminosity service"};
109 "RNG service for pile-up digitization"};
110 ToolHandle<xAODMaker::IEventInfoCnvTool> m_xAODEICnvTool{
111 this,
"xAODCnvTool",
"xAODMaker::EventInfoCnvTool/EventInfoCnvTool",
112 "xAOD EventInfo conversion tool"};
113 ToolHandleArray<IPileUpTool> m_puTools{
114 this,
"PileUpTools", {},
"Pileup tools"};
115 Gaudi::Property<bool> m_writeTrace{
this,
"WriteTrace",
false,
"Write trace of pileup events used"};
116 Gaudi::Property<int> m_skippedHSEvents{
this,
"SkippedHSEvents", 0,
117 "Number of skipped HS events"};
118 Gaudi::Property<float> m_avgMu{
this,
"AverageMu", 200,
"Average mu"};
119 Gaudi::Property<float> m_fracLowPt{
this,
"FracLowPt", 0.,
120 "Fraction of pileup that has low pT"};
121 Gaudi::Property<float> m_fracHighPt{
this,
"FracHighPt", 0.,
122 "Fraction of pileup that has high pT"};
123 Gaudi::Property<float> m_numCavern{
124 this,
"NumCavern", 0.,
"Number of cavern background events per BC"};
125 Gaudi::Property<float> m_numBeamGas{
126 this,
"NumBeamGas", 0.,
"Number of beam gas background events per BC"};
127 Gaudi::Property<float> m_numBeamHalo{
128 this,
"NumBeamHalo", 0.,
"Number of beam halo background events per BC"};
129 Gaudi::Property<int> m_BCSpacing{
this,
"BCSpacing", 25,
130 "Bunch crossing spacing in ns"};
131 Gaudi::Property<int> m_earliestDeltaBC{
132 this,
"EarliestDeltaBC", -32,
133 "Earliest bunch crossing to consider (as delta)"};
134 Gaudi::Property<int> m_latestDeltaBC{
135 this,
"LatestDeltaBC", +6,
136 "Latest bunch crossing to consider (as delta)"};
138 this,
"SkipEvtIdxSvc",
"SkipEventIdxSvc",
139 "Skipped event index (run / lb num) provider"};
141 "Overlay EventInfo key"};
145 std::unique_ptr<const xAOD::EventInfo>& ei,
146 std::unique_ptr<xAOD::EventAuxInfo>& eiAux,
147 bool pileup =
false)
const;
148 inline unsigned int get_BCID(
int bc,
unsigned int central_BCID)
const {
149 constexpr
int maxBCPerOrbit = 3564;
150 return static_cast<unsigned int>((bc +
static_cast<int>(central_BCID)) %
158 const EventContext& ctx,
unsigned long subevt_id,
159 std::vector<std::uint64_t>& trace);
164 #endif //> !PILEUPMT_PILEUPMTALG_H