2 #include "Math/GenVector/VectorUtil.h" 42 vector<vector<CandidatePtr>>
47 vector<CandidatePtr>
cands;
48 for(
unsigned int i=0;
i<candidates.size();++
i)
50 cands.push_back(candidates.at(
i));
55 std::vector<vector<CandidatePtr>>
strips;
59 while(!cands.empty()) {
62 vector<CandidatePtr> notAssociated;
65 vector<CandidatePtr>
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::CandidatePtr &)
virtual int pdgId() const =0
PDG identifier.
Abs< T >::type abs(const T &t)
double phiAssociationDistance_
std::vector< std::vector< reco::CandidatePtr > > mergeCandidates(const std::vector< reco::CandidatePtr > &) override
~PFCandidateStripMerger() override