10 const std::string&
name,
11 const IInterface*
parent) :
13 m_pMergeSvc(
"PileUpMergeSvc",
name),
31 return StatusCode::SUCCESS;
36 ATH_MSG_DEBUG(
"prepareEvent: there are " << nInputEvents <<
" subevents in this event.");
43 return StatusCode::SUCCESS;
53 while (iEvt != eSubEvents) {
59 bunchXing, iEvt).isSuccess()){
61 return StatusCode::FAILURE;
68 const double timeOfBCID(
static_cast<double>(iEvt->time()));
81 ATH_MSG_ERROR (
" Cannot record new GenericMuonSimHitCollection in overlayed event " );
82 return StatusCode::FAILURE;
85 return StatusCode::SUCCESS;
93 ATH_MSG_FATAL (
"processAllSubEvents: Could not find PileUpMergeSvc" );
94 return StatusCode::FAILURE;
106 if (!simHitList.empty()) {
108 SimHitList::const_iterator simHitColl_iter(simHitList.begin());
109 const SimHitList::const_iterator endOfSimHitColls(simHitList.end());
110 while (simHitColl_iter!=endOfSimHitColls) {
111 const double timeOfBCID(
static_cast<double>((simHitColl_iter)->
first.time()));
117 ATH_MSG_ERROR(
" Cannot record new GenericMuonSimHitCollection in overlayed event ");
119 return StatusCode::FAILURE;
123 return StatusCode::SUCCESS;
129 const int idHit = simhitIter->GenericId();
130 outputCollection->Emplace(idHit, simhitIter->globalTime()+timeOfBCID, simhitIter->globalpreTime()+timeOfBCID, simhitIter->globalPosition(), simhitIter->localPosition(), simhitIter->globalPrePosition(),simhitIter->localPrePosition(), simhitIter->particleEncoding(),simhitIter->kineticEnergy(), simhitIter->globalDirection(),simhitIter->depositEnergy(), simhitIter->StepLength(),simhitIter->truthBarcode() );