25 std::vector<reco::PFCandidateRef> myVec;
31 reco::PFCandidate::ElementsInBlocks::const_iterator ieg = theElementsInpfEGcand.begin();
34 unsigned nObj = pfCandidateHandle->size();
35 for (
unsigned int lCand = 0; lCand < nObj; lCand++) {
40 dR =
deltaR(candidateDirection.Eta(), candidateDirection.Phi(), pfCandRef->eta(), pfCandRef->phi());
47 bool elementFound =
false;
48 for (reco::PFCandidate::ElementsInBlocks::const_iterator ipf = theElementsInPFcand.begin();
49 ipf < theElementsInPFcand.end();
51 if (ipf->first == egblock && !elementFound) {
52 for (ieg = theElementsInpfEGcand.begin(); ieg < theElementsInpfEGcand.end(); ++ieg) {
53 if (ipf->second == ieg->second && !elementFound) {
55 myVec.push_back(pfCandRef);
96 bool passesCleaning =
false;
98 if (ecalClusWithMaxEt) {
101 pfEGCand->superClusterRef()
104 passesCleaning =
true;
106 for (
auto cluster : pfEGCand->superClusterRef()->clusters()) {
110 if (ecalClusWithMaxEt->
clusterRef()->seed() == cluster->seed()) {
111 passesCleaning =
true;
116 return passesCleaning;
120 float maxECALEt = -1;
123 for (
auto& elemIndx : elementsInPFCand) {
125 elemIndx.second < elemIndx.first->elements().size() ? &elemIndx.first->elements()[elemIndx.second] :
nullptr;
128 maxEtECALCluster = elem;
131 return dynamic_cast<const reco::PFBlockElementCluster*>(maxEtECALCluster);