9#include <GeoModelKernel/throwExcept.h>
19 return StatusCode::FAILURE;
23 return StatusCode::FAILURE;
36 return StatusCode::SUCCESS;
40 unsigned int nInputEvents) {
42 ATH_MSG_DEBUG(
"prepareEvent() called for " << nInputEvents <<
" input events");
45 return StatusCode::SUCCESS;
49 for (
const auto& [timeIndex, simHitColl] : hitColl) {
50 timedHits.reserve(timedHits.capacity() + simHitColl->size());
52 timedHits.emplace_back(timeIndex.time(), timeIndex.index(), simHit, timeIndex.type());
57 if (a->identify() != b->identify()){
58 return a->identify() < b->identify();
60 if (
a.eventId() != b.eventId()) {
61 return a.eventId() < b.eventId();
63 return a.eventTime() < b.eventTime();
65 return StatusCode::SUCCESS;
68 return hit.eventTime() +
hit->globalTime();
90 return StatusCode::SUCCESS;
100 return StatusCode::SUCCESS;
111 for (
auto& [hitPtr, hitContainer] : hitList) {
112 auto copyContainer = std::make_unique<xAOD::MuonSimHitContainer>();
113 auto copyAuxContainer = std::make_unique<xAOD::MuonSimHitAuxContainer>();
114 copyContainer->setStore(copyAuxContainer.get());
116 (*copyContainer->push_back(std::make_unique<xAOD::MuonSimHit>())) = (*copyMe);
118 hitListPermanent.emplace_back(hitPtr, copyContainer.get());
119 m_simHits.emplace_back(std::move(copyContainer), std::move(copyAuxContainer));
122 return StatusCode::SUCCESS;
128 rngWrapper->
setSeed(rngName, ctx);
155 acc_eventTime(*sdoHit) =
hit.eventTime();
156 acc_eventID(*sdoHit) =
hit.eventId();
157 acc_puType(*sdoHit) =
hit.pileupType();
162 const double deadTimeWindow,
164 auto insertItr = deadTimeMap.insert(std::make_pair(channelId,
hitTime));
166 if (insertItr.second) {
169 if (
hitTime - insertItr.first->second < deadTimeWindow) {
173 insertItr.first->second =
hitTime;
#define ATH_CHECK
Evaluate an expression and check for errors.
#define ATH_MSG_VERBOSE(x)
A wrapper class for event-slot-local random engines.
void setSeed(const std::string &algName, const EventContext &ctx)
Set the random seed using a string (e.g.
CLHEP::HepRandomEngine * getEngine(const EventContext &ctx) const
Retrieve the random engine corresponding to the provided EventContext.
value_type push_back(value_type pElem)
Add an element to the end of the collection.
Helper class to provide type-safe access to aux data.
StatusCode record(const SG::WriteHandleKey< Cont_t > &key, const EventContext &ctx)
Record the container to store gate using the passed write handle key.
Cont_t * get() const
get operator
bool ignoreTruthLink(const T &p, bool vetoPileUp)
Helper function for SDO creation in PileUpTools.
This header ties the generic definitions in this package.
const T * get(const ReadCondHandleKey< T > &key, const EventContext &ctx)
Convenience function to retrieve an object given a ReadCondHandleKey.
void stable_sort(DataModel_detail::iterator< DVL > beg, DataModel_detail::iterator< DVL > end)
Specialization of stable_sort for DataVector/List.
MuonSimHitAuxContainer_v1 MuonSimHitAuxContainer
Define the version of the pixel cluster container.
MuonSimHitContainer_v1 MuonSimHitContainer
Define the version of the pixel cluster container.
MuonSimHit_v1 MuonSimHit
Defined the version of the MuonSimHit.
a struct encapsulating the identifier of a pile-up event
#define THROW_EXCEPTION(MESSAGE)