13 const std::string& name,
14 const IInterface *parent) :
25 return StatusCode::SUCCESS;
41 return StatusCode::RECOVERABLE;
46 return StatusCode::SUCCESS;
55 while (iEvt != eSubEvents)
60 ATH_MSG_DEBUG (
"processBunchXing: SubEvt McEventCollection from StoreGate " << seStore.name() );
69 static_cast<int>(iEvt->time()),
70 static_cast<int>(iEvt->type())
74 return StatusCode::SUCCESS;
83 return StatusCode::FAILURE;
86 return StatusCode::SUCCESS;
94 ATH_CHECK(outputMcEventCollection.
record(std::make_unique<McEventCollection>()));
98 TimedTruthList truthList;
109 return StatusCode::RECOVERABLE;
114 TimedTruthList::iterator timedTruthListIter(truthList.begin()), endOfTimedTruthList(truthList.end());
116 while (timedTruthListIter != endOfTimedTruthList)
121 pBackgroundMcEvtColl,
122 outputMcEventCollection.
ptr(),
123 currentPileUpTimeEventIndex.
index(),
124 static_cast<int>(currentPileUpTimeEventIndex.
time()),
125 static_cast<int>(currentPileUpTimeEventIndex.
type())
127 ++timedTruthListIter;
131 return StatusCode::SUCCESS;
138 if (outputMcEventCollection->
at(0)->heavy_ion())
return StatusCode::SUCCESS;
139 if (pMcEvtColl->
at(0)->heavy_ion())
143 outputMcEventCollection->
at(0)->set_heavy_ion(std::move(hinew));
145 return StatusCode::SUCCESS;
150 ATH_MSG_VERBOSE (
"processEvent() Event Type: " << pileupType <<
", BunchCrossingTime: " << bunchCrossingTime );
151 if (!outputMcEventCollection) {
152 ATH_MSG_ERROR( this->name()<<
"::processEvent() was passed an null output McEventCollection pointer." );
153 return StatusCode::FAILURE;
156 ATH_MSG_ERROR( this->name()<<
"::processEvent() was passed an null input McEventCollection pointer." );
157 return StatusCode::FAILURE;
162 return StatusCode::SUCCESS;
171 copiedEvent->set_event_number(currentBkgEventIndex);
175 copiedEvent->add_attribute(
HepMCStr::PileUpType,std::make_shared<HepMC3::IntAttribute>(pileupType));
176 outputMcEventCollection->
push_back(copiedEvent);
180 return StatusCode::SUCCESS;
185 if (outputMcEventCollection->
empty()) {
return; }
188 ATH_MSG_INFO (
"$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$" );
190 while(outputEventItr!=endOfEvents)
193 const int event_number((*outputEventItr)->event_number());
194 ATH_MSG_INFO (
"GenEvent #"<<event_number<<
", signal_process_id="<<signal_process_id<<
", number of Vertices="<<(*outputEventItr)->vertices_size() );
197 std::ofstream of(fname);
198 HepMC::Print::line(of,*(*outputEventItr));
202 ATH_MSG_INFO (
"$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$" );
#define ATH_CHECK
Evaluate an expression and check for errors.
#define ATH_MSG_VERBOSE(x)
#define ATH_MSG_WARNING(x)
the preferred mechanism to access information from the different event stores in a pileup job.
DataModel_detail::const_iterator< DataVector > const_iterator
Standard const_iterator.
const T * at(size_type n) const
Access an element, as an rvalue.
value_type push_back(value_type pElem)
Add an element to the end of the collection.
const_iterator end() const noexcept
Return a const_iterator pointing past the end of the collection.
const_iterator begin() const noexcept
Return a const_iterator pointing at the beginning of the collection.
bool empty() const noexcept
Returns true if the collection is empty.
This defines the McEventCollection, which is really just an ObjectVector of McEvent objectsFile: Gene...
StatusCode record(std::unique_ptr< T > data)
Record a const object to the store.
pointer_type ptr()
Dereference the pointer.
The Athena Transient Store API.
StatusCode retrieve(const T *&ptr) const
Retrieve the default object into a const T*.
const std::string BunchCrossingTime
const std::string PileUpType
int signal_process_id(const GenEvent &evt)
HepMC3::GenHeavyIonPtr GenHeavyIonPtr
void fillBarcodesAttribute(GenEvent *e)
HepMC3::GenEvent GenEvent
std::list< value_t > type
type of the collection of timed data object
a struct encapsulating the identifier of a pile-up event
index_type index() const
the index of the component event in PileUpEventInfo
PileUpType type() const
the pileup type - minbias, cavern, beam halo, signal?
time_type time() const
bunch xing time in ns