|
ATLAS Offline Software
|
Go to the documentation of this file.
6 #ifndef PILEUPMT_BATCHEDMINBIASSVC_H
7 #define PILEUPMT_BATCHEDMINBIASSVC_H
18 #include "Gaudi/Property.h"
19 #include "GaudiKernel/IEvtSelector.h"
20 #include "GaudiKernel/ServiceHandle.h"
40 std::size_t
getNumForBunch(
const EventContext& ctx,
int bunch)
const override;
42 std::int64_t
get_hs_id(
const EventContext& ctx)
const override {
50 Gaudi::Property<std::uint64_t>
m_seed{
this,
"Seed", 0,
51 "Additional seed for PRNGs"};
53 this,
"OnDemandMB",
false,
54 "Should minbias event contents be read on demand"};
56 "Whether to use a Poisson distribution "
57 "(if False, use a delta distribution)"};
59 this,
"UseBeamInt",
true,
"Whether to use the beam intensity service"};
61 this,
"UseBeamLumi",
true,
"Whether to use the beam luminosity service"};
63 this,
"MBBatchSize", 10000,
64 "Number of low pT minbias events to load per batch"};
66 this,
"NSimultaneousBatches", 1,
67 "Max number of batches to load simultaneously"};
69 this,
"HSBatchSize", 1,
70 "Number of HS events per batch (aka max reuse factor)"};
72 "Number of skipped HS events"};
74 this,
"AvgMBPerBunch", 0,
75 "Average (max) number of minbias events per bunch"};
77 this,
"EarliestDeltaBC", -32,
78 "Earliest bunch crossing to consider (as delta)"};
80 this,
"LatestDeltaBC", +6,
81 "Latest bunch crossing to consider (as delta)"};
84 "actualNHSEventsPerBatch",
86 "Dynamic map of actual number of HS events for each batch, in this run."};
88 this,
"SkipEvtIdxSvc",
"SkipEventIdxSvc",
89 "Skipped event index (run / lb num) provider"};
91 this,
"BkgEventSelector", {},
"Event selector for minbias events"};
93 "Beam intensity service"};
95 this,
"BeamLumiSvc",
"LumiProfileSvc",
"Beam luminosity service"};
97 this,
"ActiveStoreSvc",
"ActiveStoreSvc",
"ActiveStoreSvc"};
101 "StoreGate for discarding events"};
106 std::map<int, std::unique_ptr<SGHandleArray>>
m_cache;
116 unsigned int run,
unsigned int lumi,
120 #endif // PILEUPMT_BATCHEDMINBIASSVC_H
ServiceHandle< ISkipEventIdxSvc > m_skipEventIdxSvc
std::deque< std::unique_ptr< SGHandleArray > > m_empty_caches
Gaudi::Property< int > m_earliestDeltaBC
~BatchedMinbiasSvc()
Destructor.
Gaudi::Property< int > m_MBBatchSize
int event_to_batch(std::int64_t hs_id)
std::size_t getNumForBunch(const EventContext &ctx, int bunch) const override
Gaudi::Property< std::uint64_t > m_seed
std::mutex m_empty_caches_mtx
Gaudi::Property< bool > m_usePoisson
Gaudi::Property< int > m_HSBatchSize
StatusCode initialize() override
AthService initialize.
Gaudi::Property< bool > m_useBeamInt
Gaudi::Property< bool > m_onDemandMB
StatusCode endHardScatter(const EventContext &ctx) override
The Athena Transient Store API.
std::map< int, std::mutex > m_cache_mtxs
POOL::TEvent event(POOL::TEvent::kClassAccess)
std::map< int, std::unique_ptr< SGHandleArray > > m_cache
::StatusCode StatusCode
StatusCode definition for legacy code.
AthROOTErrorHandlerSvc * svc
IEvtSelector::Context * m_bkg_evt_sel_ctx
Gaudi::Property< int > m_latestDeltaBC
ServiceHandle< ActiveStoreSvc > m_activeStoreSvc
std::size_t calcMBRequired(std::int64_t hs_id, std::size_t slot, unsigned int run, unsigned int lumi, std::uint64_t event)
BatchedMinbiasSvc(const std::string &name, ISvcLocator *svc)
Constructor.
std::vector< std::unique_ptr< std::atomic_int > > m_batch_use_count
Gaudi::Property< std::vector< int > > m_actualNHSEventsPerBatch
Gaudi::Property< float > m_nPerBunch
std::vector< std::vector< std::uint64_t > > m_num_mb_by_bunch
std::vector< SGHandle > SGHandleArray
virtual std::int64_t get_hs_id(const EventContext &ctx) const override
Gaudi::Property< int > m_skippedHSEvents
provides the relative beam intensity as a function of the bunch xing.
ServiceHandle< IEvtSelector > m_bkgEventSelector
Gaudi::Property< int > m_NSimultaneousBatches
Gaudi::Property< bool > m_useBeamLumi
std::vector< std::vector< std::uint64_t > > m_idx_lists
std::atomic_int m_last_loaded_batch
ServiceHandle< IBeamLuminosity > m_beamLumi
StoreGateSvc * getMinbias(const EventContext &ctx, std::uint64_t mb_id) override
StatusCode beginHardScatter(const EventContext &ctx) override
std::mutex m_reading_batch_mtx
provides the relative beam luminosity as a function of the bunch xing.
ServiceHandle< IBeamIntensity > m_beamInt