35 std::vector<reco::PFCandidateRef> myVec;
41 reco::PFCandidate::ElementsInBlocks::const_iterator ieg = theElementsInpfEGcand.begin();
44 unsigned nObj = pfCandidateHandle->size();
45 for (
unsigned int lCand = 0; lCand < nObj; lCand++) {
50 dR =
deltaR(candidateDirection.Eta(), candidateDirection.Phi(), pfCandRef->eta(), pfCandRef->phi());
57 bool elementFound =
false;
58 for (reco::PFCandidate::ElementsInBlocks::const_iterator ipf = theElementsInPFcand.begin();
59 ipf < theElementsInPFcand.end();
61 if (ipf->first == egblock && !elementFound) {
62 for (ieg = theElementsInpfEGcand.begin(); ieg < theElementsInpfEGcand.end(); ++ieg) {
63 if (ipf->second == ieg->second && !elementFound) {
65 myVec.push_back(pfCandRef);
106 bool passesCleaning =
false;
108 if (ecalClusWithMaxEt) {
111 pfEGCand->superClusterRef()
114 passesCleaning =
true;
116 for (
auto cluster : pfEGCand->superClusterRef()->clusters()) {
120 if (ecalClusWithMaxEt->
clusterRef()->seed() == cluster->seed()) {
121 passesCleaning =
true;
126 return passesCleaning;
130 float maxECALEt = -1;
133 for (
auto& elemIndx : elementsInPFCand) {
135 elemIndx.second < elemIndx.first->elements().size() ? &elemIndx.first->elements()[elemIndx.second] :
nullptr;
138 maxEtECALCluster = elem;
141 return dynamic_cast<const reco::PFBlockElementCluster*>(maxEtECALCluster);