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<SiHitCollection>()));
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 SiHit &hit : *inputCollection) {
52 HepGeom::Point3D<double> lP1 = hit.localStartPosition();
53 HepGeom::Point3D<double> lP2 = hit.localEndPosition();
54 double energyLoss = hit.energyLoss();
55 double meanTime = hit.meanTime();
56 unsigned int id = hit.identify();
57 outputCollection->Emplace(lP1, lP2, energyLoss, meanTime, particleLink,
id);
60 return StatusCode::SUCCESS;
a link optimized in size for a GenParticle in a McEventCollection