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_value: identifierList)
84 {
85 Identifier
id(id_value);
86
87 if(identToHepMCMap.find(id) != identToHepMCMap.end())
88 {
89 auto truthParticle = identToHepMCMap.at(id);
91 }
92 }
93 }
94
95 for(const auto cluster: stripContainer)
96 {
97
98 auto identifierList = cluster->rdoList();
99
100
101 for(auto& id_value: identifierList)
102 {
103 Identifier
id(id_value);
104
105 if(identToHepMCMap.find(id) != identToHepMCMap.end())
106 {
107 auto truthParticle = identToHepMCMap.at(id);
109 }
110 }
111 }
112
113 for(const auto& var: trackCollections)
114 {
115
116 if(
var.second.size() < 3)
continue;
117
118
120 ATH_MSG_INFO(
"Found " <<
var.second.size() <<
" clusters for truth partcle "<<
var.first);
121 foundProtoTracks.push_back({
var.second,std::move(inputPerigee)});
122 }
123
124
125
126 return StatusCode::SUCCESS;
127}
#define ATH_MSG_WARNING(x)
ATLASUncalibSourceLink makeATLASUncalibSourceLink(const xAOD::UncalibratedMeasurementContainer *container, std::size_t index, const EventContext &ctx)
const GenParticle * ConstGenParticlePtr