26 std::vector<ActsTrk::ProtoTrack> & foundProtoTracks )
const {
29 std::vector<const PRD_MultiTruthCollection*> prdMultiTruthCollections;
38 ATH_MSG_WARNING(
"Could not retrieve " << pmtCollNameIter <<
". Ignoring ... ");
42 ATH_MSG_INFO(
"Added " << pmtCollNameIter <<
" to collection list for truth track creation.");
43 prdMultiTruthCollections.push_back(curColl.
cptr());
48 std::map<Identifier, HepMC::ConstGenParticlePtr> identToHepMCMap;
49 for (
auto & PRD_truthCollec: prdMultiTruthCollections )
52 PRD_MultiTruthCollection::const_iterator prdMtCIter = PRD_truthCollec->begin();
53 PRD_MultiTruthCollection::const_iterator prdMtCIterE = PRD_truthCollec->end();
54 for ( ; prdMtCIter != prdMtCIterE; ++ prdMtCIter ){
58 Identifier curIdentifier = (*prdMtCIter).first;
61 if ( curGenP->momentum().perp() < 500. )
continue;
65 identToHepMCMap[curIdentifier] = curGenP;
71 std::vector<const xAOD::UncalibratedMeasurement*>> trackCollections;
73 for(
const auto cluster: pixelContainer)
76 auto identifierList = cluster->rdoList();
79 for(
auto& id_value: identifierList)
83 if(identToHepMCMap.find(
id) != identToHepMCMap.end())
85 auto truthParticle = identToHepMCMap.at(
id);
86 trackCollections[truthParticle].emplace_back(cluster);
91 for(
const auto cluster: stripContainer)
94 auto identifierList = cluster->rdoList();
97 for(
auto& id_value: identifierList)
101 if(identToHepMCMap.find(
id) != identToHepMCMap.end())
103 auto truthParticle = identToHepMCMap.at(
id);
104 trackCollections[truthParticle].emplace_back(cluster);
109 for(
const auto& var: trackCollections)
112 if(var.second.size() < 3)
continue;
116 ATH_MSG_INFO(
"Found " << var.second.size() <<
" clusters for truth partcle "<<var.first);
117 foundProtoTracks.push_back({var.second,std::move(inputPerigee)});
122 return StatusCode::SUCCESS;
129 using namespace Acts::UnitLiterals;
130 std::shared_ptr<const Acts::Surface> actsSurface = Acts::Surface::makeShared<Acts::PerigeeSurface>(
131 Acts::Vector3(0., 0., 0.));
132 Acts::BoundVector params;
139 truthParticle->momentum().phi(), truthParticle->momentum().theta(),
140 static_cast<float>(
MC::charge(truthParticle)) / (truthParticle->momentum().e()), 0.;
144 Acts::BoundMatrix cov = Acts::BoundMatrix::Identity();
150 Acts::PdgParticle absPdg = Acts::makeAbsolutePdgParticle(Acts::ePionPlus);
151 Acts::ParticleHypothesis actsHypothesis{
152 absPdg, mass,
static_cast<float>(
MC::charge(truthParticle))};
154 return std::make_unique<Acts::BoundTrackParameters>(actsSurface, params,
155 cov, actsHypothesis);
constexpr double mass[PARTICLEHYPOTHESES]
the array of masses