33 if (!inputCollection.
isValid()) {
34 ATH_MSG_ERROR(
"Could not get input hits collection " << inputCollection.
name() <<
" from store " << inputCollection.
store());
35 return StatusCode::FAILURE;
37 ATH_MSG_DEBUG(
"Found input hits collection " << inputCollection.
name() <<
" in store " << inputCollection.
store());
40 ATH_CHECK(outputCollection.record(std::make_unique<TRTUncompressedHitCollection>()));
41 if (!outputCollection.isValid()) {
42 ATH_MSG_ERROR(
"Could not record output hits collection " << outputCollection.name() <<
" to store " << outputCollection.store());
43 return StatusCode::FAILURE;
45 ATH_MSG_DEBUG(
"Recorded output hits collection " << outputCollection.name() <<
" in store " << outputCollection.store());
52 int pdgID = hit.GetParticleEncoding();
54 int id = hit.GetHitID();
55 float kineticEnergy = hit.GetKineticEnergy();
56 float energyDeposit = hit.GetEnergyDeposit();
57 float preX = hit.GetPreStepX();
58 float preY = hit.GetPreStepY();
59 float preZ = hit.GetPreStepZ();
60 float postX = hit.GetPostStepX();
61 float postY = hit.GetPostStepY() ;
62 float postZ = hit.GetPostStepZ();
63 float time = hit.GetGlobalTime();
65 outputCollection->Emplace(
id, particleLink, pdgID, kineticEnergy, energyDeposit, preX, preY, preZ, postX, postY, postZ, time);
68 return StatusCode::SUCCESS;
a link optimized in size for a GenParticle in a McEventCollection
int id() const
Return the id of the target particle.
index_type eventIndex() const
Return the event number of the referenced GenEvent.
void setTruthSuppressionType(EBC_SUPPRESSED_TRUTH truthSupp)
Return whether the truth particle has been suppressed.