CMS 3D CMS Logo

List of all members | Public Types | Public Member Functions | Private Attributes
HcalPFClusterIsolation< T1 > Class Template Reference

#include <HcalPFClusterIsolation.h>

Public Types

typedef std::vector< T1 > T1Collection
 
typedef edm::Ref< T1CollectionT1Ref
 

Public Member Functions

double getSum (const T1Ref candRef, const std::vector< edm::Handle< reco::PFClusterCollection >> &clusterHandles)
 
 HcalPFClusterIsolation (double drMax, double drVetoBarrel, double drVetoEndcap, double etaStripBarrel, double etaStripEndcap, double energyBarrel, double energyEndcap, bool useEt)
 
 ~HcalPFClusterIsolation ()
 

Private Attributes

const double drMax_
 
const double drVetoBarrel_
 
const double drVetoEndcap_
 
const double energyBarrel_
 
const double energyEndcap_
 
const double etaStripBarrel_
 
const double etaStripEndcap_
 
const bool useEt_
 

Detailed Description

template<typename T1>
class HcalPFClusterIsolation< T1 >

Definition at line 17 of file HcalPFClusterIsolation.h.

Member Typedef Documentation

template<typename T1>
typedef std::vector<T1> HcalPFClusterIsolation< T1 >::T1Collection

Definition at line 20 of file HcalPFClusterIsolation.h.

template<typename T1>
typedef edm::Ref<T1Collection> HcalPFClusterIsolation< T1 >::T1Ref

Definition at line 21 of file HcalPFClusterIsolation.h.

Constructor & Destructor Documentation

template<typename T1 >
HcalPFClusterIsolation< T1 >::HcalPFClusterIsolation ( double  drMax,
double  drVetoBarrel,
double  drVetoEndcap,
double  etaStripBarrel,
double  etaStripEndcap,
double  energyBarrel,
double  energyEndcap,
bool  useEt 
)

Definition at line 11 of file HcalPFClusterIsolation.cc.

18  :
19  drMax_(drMax),
26  useEt_(useEt)
27 {}
template<typename T1 >
HcalPFClusterIsolation< T1 >::~HcalPFClusterIsolation ( )

Definition at line 30 of file HcalPFClusterIsolation.cc.

31 {}

Member Function Documentation

template<typename T1 >
double HcalPFClusterIsolation< T1 >::getSum ( const T1Ref  candRef,
const std::vector< edm::Handle< reco::PFClusterCollection >> &  clusterHandles 
)

Definition at line 34 of file HcalPFClusterIsolation.cc.

References boostedElectronIsolation_cff::deltaR, particleFlow_cfi::dEta, PFRecoTauDiscriminationAgainstElectronDeadECAL_cfi::dR, HcalPFClusterIsolation< T1 >::drMax_, HcalPFClusterIsolation< T1 >::drVetoBarrel_, HcalPFClusterIsolation< T1 >::drVetoEndcap_, HcalPFClusterIsolation< T1 >::energyBarrel_, HcalPFClusterIsolation< T1 >::energyEndcap_, HcalPFClusterIsolation< T1 >::etaStripBarrel_, HcalPFClusterIsolation< T1 >::etaStripEndcap_, mps_fire::i, and HcalPFClusterIsolation< T1 >::useEt_.

Referenced by EgammaHcalPFClusterIsolationProducer< T1 >::produce(), and HLTHcalPFClusterIsolationProducer< T1 >::produce().

34  {
35 
36  double etSum = 0.;
37 
38  float etaStrip = 0;
39  float dRVeto = 0;
40  if (fabs(candRef->eta()) < 1.479) {
41  dRVeto = drVetoBarrel_;
42  etaStrip = etaStripBarrel_;
43  } else {
44  dRVeto = drVetoEndcap_;
45  etaStrip = etaStripEndcap_;
46  }
47 
48 
49  for (unsigned int nHandle=0; nHandle<clusterHandles.size(); nHandle++) {
50  for(unsigned i=0; i<clusterHandles[nHandle]->size(); i++) {
51  const reco::PFClusterRef pfclu(clusterHandles[nHandle], i);
52 
53  if (fabs(candRef->eta()) < 1.479) {
54  if (fabs(pfclu->pt()) < energyBarrel_)
55  continue;
56  } else {
57  if (fabs(pfclu->energy()) < energyEndcap_)
58  continue;
59  }
60 
61  float dEta = fabs(candRef->eta() - pfclu->eta());
62  if(dEta < etaStrip)
63  continue;
64 
65  float dR = deltaR(candRef->eta(), candRef->phi(), pfclu->eta(), pfclu->phi());
66  if(dR > drMax_ || dR < dRVeto)
67  continue;
68 
69  if (useEt_)
70  etSum += pfclu->pt();
71  else
72  etSum += pfclu->energy();
73  }
74  }
75 
76  return etSum;
77 }

Member Data Documentation

template<typename T1>
const double HcalPFClusterIsolation< T1 >::drMax_
private

Definition at line 36 of file HcalPFClusterIsolation.h.

Referenced by HcalPFClusterIsolation< T1 >::getSum().

template<typename T1>
const double HcalPFClusterIsolation< T1 >::drVetoBarrel_
private

Definition at line 37 of file HcalPFClusterIsolation.h.

Referenced by HcalPFClusterIsolation< T1 >::getSum().

template<typename T1>
const double HcalPFClusterIsolation< T1 >::drVetoEndcap_
private

Definition at line 38 of file HcalPFClusterIsolation.h.

Referenced by HcalPFClusterIsolation< T1 >::getSum().

template<typename T1>
const double HcalPFClusterIsolation< T1 >::energyBarrel_
private

Definition at line 41 of file HcalPFClusterIsolation.h.

Referenced by HcalPFClusterIsolation< T1 >::getSum().

template<typename T1>
const double HcalPFClusterIsolation< T1 >::energyEndcap_
private

Definition at line 42 of file HcalPFClusterIsolation.h.

Referenced by HcalPFClusterIsolation< T1 >::getSum().

template<typename T1>
const double HcalPFClusterIsolation< T1 >::etaStripBarrel_
private

Definition at line 39 of file HcalPFClusterIsolation.h.

Referenced by HcalPFClusterIsolation< T1 >::getSum().

template<typename T1>
const double HcalPFClusterIsolation< T1 >::etaStripEndcap_
private

Definition at line 40 of file HcalPFClusterIsolation.h.

Referenced by HcalPFClusterIsolation< T1 >::getSum().

template<typename T1>
const bool HcalPFClusterIsolation< T1 >::useEt_
private

Definition at line 43 of file HcalPFClusterIsolation.h.

Referenced by HcalPFClusterIsolation< T1 >::getSum().