43 std::pair<std::unique_ptr<PFCandToVertexAssMap>, std::unique_ptr<VertexToPFCandAssMap>>
51 vector<VertexRef> vtxColl_help;
55 for (
unsigned i = 0;
i < pfCandH->size();
i++) {
63 TrackRef PFCtrackref = candref->trackRef();
65 if (PFCtrackref.
isNull()) {
70 pfcand2vertex->insert(vtxColl_help.at(0), make_pair(candref,
quality));
71 vertex2pfcand->insert(candref, make_pair(vtxColl_help.at(0),
quality));
86 int step = assocVtx.second;
92 pfcand2vertex->insert(assocVtx.first, make_pair(candref,
quality));
93 vertex2pfcand->insert(candref, make_pair(assocVtx.first,
quality));
139 assomap_ite != pfcvertexassInput->
end();
149 for (
unsigned int pfccoll_ite = 0; pfccoll_ite < pfccoll.size(); pfccoll_ite++) {
150 pfcandref = pfccoll[pfccoll_ite].first;
151 int quality = pfccoll[pfccoll_ite].second;
156 double man_pT = pfcandref->pt();
158 ptsum += man_pT * man_pT;
161 vertexptsumvector.push_back(make_pair(assomap_vertexref, ptsum));
164 while (!vertexptsumvector.empty()) {
166 float highestpT = 0.;
167 int highestpT_index = 0;
169 for (
unsigned int vtxptsumvec_ite = 0; vtxptsumvec_ite < vertexptsumvector.size(); vtxptsumvec_ite++) {
170 if (vertexptsumvector[vtxptsumvec_ite].
second > highestpT) {
171 vertexref_highestpT = vertexptsumvector[vtxptsumvec_ite].first;
172 highestpT = vertexptsumvector[vtxptsumvec_ite].second;
173 highestpT_index = vtxptsumvec_ite;
179 assomap_ite != pfcvertexassInput->
end();
186 if (assomap_vertexref == vertexref_highestpT)
187 for (
unsigned int pfccoll_ite = 0; pfccoll_ite < pfccoll.size(); pfccoll_ite++)
188 pfcvertexassOutput->insert(assomap_vertexref, pfccoll[pfccoll_ite]);
191 vertexptsumvector.erase(vertexptsumvector.begin() + highestpT_index);
194 return pfcvertexassOutput;