27 drVetoBarrel_(drVetoBarrel),
28 drVetoEndcap_(drVetoEndcap),
29 etaStripBarrel_(etaStripBarrel),
30 etaStripEndcap_(etaStripEndcap),
31 energyBarrel_(energyBarrel),
32 energyEndcap_(energyEndcap)
45 if (fabs(candRef->eta()) < 1.479) {
46 drVeto2_ = drVetoBarrel_*drVetoBarrel_;
47 etaStrip = etaStripBarrel_;
49 drVeto2_ = drVetoEndcap_*drVetoEndcap_;
50 etaStrip = etaStripEndcap_;
54 for (
size_t i=0;
i<clusterHandle->size();
i++) {
57 if (fabs(candRef->eta()) < 1.479) {
58 if (fabs(pfclu->pt()) < energyBarrel_)
61 if (fabs(pfclu->energy()) < energyEndcap_)
65 float dEta = fabs(candRef->eta() - pfclu->eta());
66 if(dEta < etaStrip)
continue;
67 if (not computedRVeto(candRef, pfclu))
continue;
78 float dR2 =
deltaR2(candRef->eta(), candRef->phi(), pfclu->eta(), pfclu->phi());
79 if(dR2 > (drMax_*drMax_))
82 if (candRef->superCluster().
isNonnull()) {
84 for (
reco::CaloCluster_iterator it = candRef->superCluster()->clustersBegin(); it != candRef->superCluster()->clustersEnd(); ++it) {
85 if ((*it)->seed() == pfclu->seed()) {
97 float dR2 =
deltaR2(candRef->eta(), candRef->phi(), pfclu->eta(), pfclu->phi());
98 if(dR2 > (drMax_*drMax_) || dR2 < drVeto2_)
EcalPFClusterIsolation(double drMax, double drVetoBarrel, double drVetoEndcap, double etaStripBarrel, double etaStripEndcap, double energyBarrel, double energyEndcap)
bool isNonnull() const
Checks for non-null.
~EcalPFClusterIsolation()
double deltaR2(const T1 &t1, const T2 &t2)
bool computedRVeto(T1Ref candRef, reco::PFClusterRef pfclu)
double getSum(T1Ref, edm::Handle< std::vector< reco::PFCluster > >)