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 ){
63 Identifier curIdentifier = (*prdMtCIter).first;
66 if ( curGenP->momentum().perp() < 500. )
continue;
70 identToHepMCMap[curIdentifier] = curGenP;
75 std::map<HepMC::ConstGenParticlePtr, std::vector<ActsTrk::ATLASUncalibSourceLink>> trackCollections;
77 for(
const auto cluster: pixelContainer)
80 auto identifierList = cluster->rdoList();
83 for(
auto&
id: identifierList)
86 if(identToHepMCMap.find(
id) != identToHepMCMap.end())
88 auto truthParticle = identToHepMCMap.at(
id);
94 for(
const auto cluster: stripContainer)
97 auto identifierList = cluster->rdoList();
100 for(
auto&
id: identifierList)
103 if(identToHepMCMap.find(
id) != identToHepMCMap.end())
105 auto truthParticle = identToHepMCMap.at(
id);
111 for(
const auto& var: trackCollections)
114 if(var.second.size() < 3)
continue;
118 ATH_MSG_INFO(
"Found " << var.second.size() <<
" clusters for truth partcle "<<var.first);
119 foundProtoTracks.push_back({var.second,std::move(inputPerigee)});
124 return StatusCode::SUCCESS;
131 using namespace Acts::UnitLiterals;
132 std::shared_ptr<const Acts::Surface> actsSurface = Acts::Surface::makeShared<Acts::PerigeeSurface>(
133 Acts::Vector3(0., 0., 0.));
134 Acts::BoundVector params;
141 truthParticle->momentum().phi(), truthParticle->momentum().theta(),
142 static_cast<float>(
::charge(truthParticle)) / (truthParticle->momentum().e()), 0.;
146 Acts::BoundSquareMatrix cov = Acts::BoundSquareMatrix::Identity();
152 Acts::PdgParticle absPdg = Acts::makeAbsolutePdgParticle(Acts::ePionPlus);
153 Acts::ParticleHypothesis actsHypothesis{
154 absPdg, mass, Acts::AnyCharge{
static_cast<float>(
::charge(truthParticle))}};
156 return std::make_unique<Acts::BoundTrackParameters>(actsSurface, params,
157 cov, actsHypothesis);
constexpr double mass[PARTICLEHYPOTHESES]
the array of masses