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<MDTSimHitCollection>()));
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 MDTSimHit &hit : *inputCollection) {
53 double time = hit.globalTime();
54 double radius = hit.driftRadius();
56 double stepLength = hit.stepLength();
57 double energyDeposit = hit.energyDeposit();
58 int pdgID = hit.particleEncoding();
59 double kineticEnergy = hit.kineticEnergy();
61 outputCollection->Emplace(
id, time, radius, position, particleLink, stepLength, energyDeposit, pdgID, kineticEnergy);
64 return StatusCode::SUCCESS;
a link optimized in size for a GenParticle in a McEventCollection