42 std::pair<std::unique_ptr<PFCandToVertexAssMap>, std::unique_ptr<VertexToPFCandAssMap>>
50 vector<VertexRef> vtxColl_help;
54 for (
unsigned i = 0;
i < pfCandH->size();
i++) {
62 TrackRef PFCtrackref = candref->trackRef();
64 if (PFCtrackref.
isNull()) {
69 pfcand2vertex->insert(vtxColl_help.at(0), make_pair(candref,
quality));
70 vertex2pfcand->insert(candref, make_pair(vtxColl_help.at(0),
quality));
80 transtrk.
setES(iSetup);
84 int step = assocVtx.second;
90 pfcand2vertex->insert(assocVtx.first, make_pair(candref,
quality));
91 vertex2pfcand->insert(candref, make_pair(assocVtx.first,
quality));
137 assomap_ite != pfcvertexassInput->
end();
147 for (
unsigned int pfccoll_ite = 0; pfccoll_ite < pfccoll.size(); pfccoll_ite++) {
148 pfcandref = pfccoll[pfccoll_ite].first;
149 int quality = pfccoll[pfccoll_ite].second;
154 double man_pT = pfcandref->pt();
156 ptsum += man_pT * man_pT;
159 vertexptsumvector.push_back(make_pair(assomap_vertexref, ptsum));
162 while (!vertexptsumvector.empty()) {
164 float highestpT = 0.;
165 int highestpT_index = 0;
167 for (
unsigned int vtxptsumvec_ite = 0; vtxptsumvec_ite < vertexptsumvector.size(); vtxptsumvec_ite++) {
168 if (vertexptsumvector[vtxptsumvec_ite].
second > highestpT) {
169 vertexref_highestpT = vertexptsumvector[vtxptsumvec_ite].first;
170 highestpT = vertexptsumvector[vtxptsumvec_ite].second;
171 highestpT_index = vtxptsumvec_ite;
177 assomap_ite != pfcvertexassInput->
end();
184 if (assomap_vertexref == vertexref_highestpT)
185 for (
unsigned int pfccoll_ite = 0; pfccoll_ite < pfccoll.size(); pfccoll_ite++)
186 pfcvertexassOutput->insert(assomap_vertexref, pfccoll[pfccoll_ite]);
189 vertexptsumvector.erase(vertexptsumvector.begin() + highestpT_index);
192 return pfcvertexassOutput;