32 if (!inputCollection.
isValid()) {
33 ATH_MSG_ERROR(
"Could not get input hits collection " << inputCollection.
name() <<
" from store " << inputCollection.
store());
34 return StatusCode::FAILURE;
36 ATH_MSG_DEBUG(
"Found input hits collection " << inputCollection.
name() <<
" in store " << inputCollection.
store());
39 ATH_CHECK(outputCollection.record(std::make_unique<RPCSimHitCollection>()));
40 if (!outputCollection.isValid()) {
41 ATH_MSG_ERROR(
"Could not record output hits collection " << outputCollection.name() <<
" to store " << outputCollection.store());
42 return StatusCode::FAILURE;
44 ATH_MSG_DEBUG(
"Recorded output hits collection " << outputCollection.name() <<
" in store " << outputCollection.store());
50 for (
const RPCSimHit & hit : *inputCollection) {
53 double time = hit.globalTime();
56 double energyDeposit = hit.energyDeposit();
57 int pdgID = hit.particleEncoding();
58 double kineticEnergy = hit.kineticEnergy();
59 double stepLength = hit.stepLength();
61 outputCollection->Emplace(
id, time, prePos, particleLink, postPos, energyDeposit, stepLength, pdgID, kineticEnergy);
64 return StatusCode::SUCCESS;
a link optimized in size for a GenParticle in a McEventCollection