EF-style pattern recognition to create prototracks.
26 {
27
28
29 std::vector<const PRD_MultiTruthCollection*> prdMultiTruthCollections;
31
33 {
34
35 SG::ReadHandle<PRD_MultiTruthCollection> curColl (pmtCollNameIter, ctx);
36 if (!curColl.isValid())
37 {
38 ATH_MSG_WARNING(
"Could not retrieve " << pmtCollNameIter <<
". Ignoring ... ");
39 }
40 else
41 {
42 ATH_MSG_INFO(
"Added " << pmtCollNameIter <<
" to collection list for truth track creation.");
43 prdMultiTruthCollections.push_back(curColl.cptr());
44 }
45 }
46
47
48 std::map<Identifier, HepMC::ConstGenParticlePtr> identToHepMCMap;
49 for (auto & PRD_truthCollec: prdMultiTruthCollections )
50 {
51
52 PRD_MultiTruthCollection::const_iterator prdMtCIter = PRD_truthCollec->begin();
53 PRD_MultiTruthCollection::const_iterator prdMtCIterE = PRD_truthCollec->end();
54 for ( ; prdMtCIter != prdMtCIterE; ++ prdMtCIter ){
55
56
57#ifdef HEPMC3
59#else
60
62#endif
63 Identifier curIdentifier = (*prdMtCIter).first;
64
65
66 if ( curGenP->momentum().perp() < 500. ) continue;
67
68
69
70 identToHepMCMap[curIdentifier] = curGenP;
71 }
72 }
73
74
75 std::map<HepMC::ConstGenParticlePtr, std::vector<ActsTrk::ATLASUncalibSourceLink>> trackCollections;
76
77 for(const auto cluster: pixelContainer)
78 {
79
80 auto identifierList = cluster->rdoList();
81
82
83 for(auto& id: identifierList)
84 {
85
86 if(identToHepMCMap.find(id) != identToHepMCMap.end())
87 {
88 auto truthParticle = identToHepMCMap.at(id);
90 }
91 }
92 }
93
94 for(const auto cluster: stripContainer)
95 {
96
97 auto identifierList = cluster->rdoList();
98
99
100 for(auto& id: identifierList)
101 {
102
103 if(identToHepMCMap.find(id) != identToHepMCMap.end())
104 {
105 auto truthParticle = identToHepMCMap.at(id);
107 }
108 }
109 }
110
111 for(const auto& var: trackCollections)
112 {
113
114 if(
var.second.size() < 3)
continue;
115
116
118 ATH_MSG_INFO(
"Found " <<
var.second.size() <<
" clusters for truth partcle "<<
var.first);
119 foundProtoTracks.push_back({
var.second,std::move(inputPerigee)});
120 }
121
122
123
124 return StatusCode::SUCCESS;
125}
#define ATH_MSG_WARNING(x)
ATLASUncalibSourceLink makeATLASUncalibSourceLink(const xAOD::UncalibratedMeasurementContainer *container, std::size_t index, const EventContext &ctx)
const GenParticle * ConstGenParticlePtr