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;
T getParameter(std::string const &) const
Abstract base class for a PFBlock element (track, cluster...)
bool isNonnull() const
Checks for non-null.
ROOT::Math::LorentzVector< ROOT::Math::PxPyPzE4D< double > > XYZTLorentzVectorD
Lorentz vector with cylindrical internal representation using pseudorapidity.
const PFClusterRef & clusterRef() const override
virtual const PFClusterRef & clusterRef() const
bool elementPassesCleaning(const reco::PFCandidateRef &pfCand, const reco::PFCandidateRef &pfEGCand)
std::vector< reco::PFCandidateRef > calculate(math::XYZTLorentzVectorD p4, const reco::PFCandidateRef pfEGCand, const edm::Handle< reco::PFCandidateCollection > pfCandidateHandle)
const SuperClusterRef & superClusterRef() const
std::vector< ElementInBlock > ElementsInBlocks
bool passesCleaningNeutralHadron(const reco::PFCandidateRef &pfCand, const reco::PFCandidateRef &pfEGCand)
void setup(const edm::ParameterSet &conf)
bool passesCleaningPhoton(const reco::PFCandidateRef &pfCand, const reco::PFCandidateRef &pfEGCand)
def elem(elemtype, innerHTML='', html_class='', kwargs)
XYZVectorD XYZVector
spatial vector with cartesian internal representation
Particle reconstructed by the particle flow algorithm.
const reco::PFBlockElementCluster * getHighestEtECALCluster(const reco::PFCandidate &pfCand)
bool passesCleaningChargedHadron(const reco::PFCandidateRef &pfCand, const reco::PFCandidateRef &pfEGCand)
const ElementsInBlocks & elementsInBlocks() const