2 #include "Math/GenVector/VectorUtil.h" 42 vector<vector<PFCandidatePtr>>
47 vector<PFCandidatePtr> cands;
48 for(
unsigned int i=0;
i<candidates.size();++
i)
50 cands.push_back(candidates.at(
i));
55 std::vector<vector<PFCandidatePtr>>
strips;
59 while(cands.size()>0) {
62 vector<PFCandidatePtr> notAssociated;
65 vector<PFCandidatePtr>
strip;
67 strip.push_back(cands.at(0));
68 stripVector=cands.at(0)->p4();
71 for(
unsigned int i=1;
i<cands.size();++
i) {
74 strip.push_back(cands.at(
i));
75 stripVector+=cands.at(
i)->p4();
78 notAssociated.push_back(cands.at(
i));
82 strips.push_back(strip);
85 cands.swap(notAssociated);
87 notAssociated.clear();
T getParameter(std::string const &) const
std::vector< int > inputPdgIds_
double etaAssociationDistance_
XYZTLorentzVectorD XYZTLorentzVector
Lorentz vector with cylindrical internal representation using pseudorapidity.
bool candidateMatches(const reco::PFCandidatePtr &)
virtual int pdgId() const final
PDG identifier.
~PFCandidateStripMerger()
Abs< T >::type abs(const T &t)
std::vector< std::vector< reco::PFCandidatePtr > > mergeCandidates(const std::vector< reco::PFCandidatePtr > &)
double phiAssociationDistance_