45 std::vector<reco::PFCandidateRef> myVec;
51 reco::PFCandidate::ElementsInBlocks::const_iterator ieg = theElementsInpfEGcand.begin();
55 unsigned nObj = pfCandidateHandle->size();
56 for(
unsigned int lCand=0; lCand < nObj; lCand++) {
62 dR =
deltaR(candidateDirection.Eta(), candidateDirection.Phi(), pfCandRef->eta(), pfCandRef->phi());
68 bool elementFound=
false;
69 for (reco::PFCandidate::ElementsInBlocks::const_iterator ipf = theElementsInPFcand.begin(); ipf<theElementsInPFcand.end(); ++ipf) {
71 if ( ipf->first == egblock && !elementFound ) {
73 for (ieg = theElementsInpfEGcand.begin(); ieg<theElementsInpfEGcand.end(); ++ieg) {
74 if ( ipf->second == ieg->second && !elementFound ) {
76 myVec.push_back(pfCandRef);
T getParameter(std::string const &) const
ROOT::Math::LorentzVector< ROOT::Math::PxPyPzE4D< double > > XYZTLorentzVectorD
Lorentz vector with cylindrical internal representation using pseudorapidity.
void setup(const edm::ParameterSet &conf)
std::vector< ElementInBlock > ElementsInBlocks
std::vector< reco::PFCandidateRef > calculate(math::XYZTLorentzVectorD p4, const reco::PFCandidateRef pfEGCand, const edm::Handle< reco::PFCandidateCollection > pfCandidateHandle)
double deltaR(double eta1, double eta2, double phi1, double phi2)
XYZVectorD XYZVector
spatial vector with cartesian internal representation