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_value: identifierList)
87 if(identToHepMCMap.find(
id) != identToHepMCMap.end())
89 auto truthParticle = identToHepMCMap.at(
id);
95 for(
const auto cluster: stripContainer)
98 auto identifierList = cluster->rdoList();
101 for(
auto& id_value: identifierList)
105 if(identToHepMCMap.find(
id) != identToHepMCMap.end())
107 auto truthParticle = identToHepMCMap.at(
id);
113 for(
const auto& var: trackCollections)
116 if(var.second.size() < 3)
continue;
120 ATH_MSG_INFO(
"Found " << var.second.size() <<
" clusters for truth partcle "<<var.first);
121 foundProtoTracks.push_back({var.second,std::move(inputPerigee)});
126 return StatusCode::SUCCESS;
133 using namespace Acts::UnitLiterals;
134 std::shared_ptr<const Acts::Surface> actsSurface = Acts::Surface::makeShared<Acts::PerigeeSurface>(
135 Acts::Vector3(0., 0., 0.));
136 Acts::BoundVector params;
143 truthParticle->momentum().phi(), truthParticle->momentum().theta(),
144 static_cast<float>(
MC::charge(truthParticle)) / (truthParticle->momentum().e()), 0.;
148 Acts::BoundMatrix cov = Acts::BoundMatrix::Identity();
154 Acts::PdgParticle absPdg = Acts::makeAbsolutePdgParticle(Acts::ePionPlus);
155 Acts::ParticleHypothesis actsHypothesis{
156 absPdg, mass,
static_cast<float>(
MC::charge(truthParticle))};
158 return std::make_unique<Acts::BoundTrackParameters>(actsSurface, params,
159 cov, actsHypothesis);
constexpr double mass[PARTICLEHYPOTHESES]
the array of masses