10 template <
typename T1>
20 drVetoBarrel_(drVetoBarrel),
21 drVetoEndcap_(drVetoEndcap),
22 etaStripBarrel_(etaStripBarrel),
23 etaStripEndcap_(etaStripEndcap),
24 energyBarrel_(energyBarrel),
25 energyEndcap_(energyEndcap),
28 template <
typename T1>
31 template <
typename T1>
35 double candAbsEta =
std::abs(cand.eta());
39 if (candAbsEta < 1.479) {
40 dRVeto = drVetoBarrel_;
41 etaStrip = etaStripBarrel_;
43 dRVeto = drVetoEndcap_;
44 etaStrip = etaStripEndcap_;
47 for (
unsigned int nHandle = 0; nHandle < clusterHandles.size(); nHandle++) {
48 for (
unsigned i = 0;
i < clusterHandles[nHandle]->size();
i++) {
51 if (candAbsEta < 1.479) {
52 if (
std::abs(pfclu->pt()) < energyBarrel_)
55 if (
std::abs(pfclu->energy()) < energyEndcap_)
59 float dEta =
std::abs(cand.eta() - pfclu->eta());
63 float dR2 =
deltaR2(cand.eta(), cand.phi(), pfclu->eta(), pfclu->phi());
64 if (dR2 > (drMax_ * drMax_) || dR2 < (dRVeto * dRVeto))
70 etSum += pfclu->energy();
77 template <
typename T1>
80 return getSum(*ref, clusterHandles);
Abs< T >::type abs(const T &t)
double getSum(const T1Ref candRef, const std::vector< edm::Handle< reco::PFClusterCollection >> &clusterHandles)
constexpr auto deltaR2(const T1 &t1, const T2 &t2) -> decltype(t1.eta())
HcalPFClusterIsolation(double drMax, double drVetoBarrel, double drVetoEndcap, double etaStripBarrel, double etaStripEndcap, double energyBarrel, double energyEndcap, bool useEt)
~HcalPFClusterIsolation()