CMS 3D CMS Logo

 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Pages
List of all members | Public Types | Public Member Functions | Private Member Functions | Private Attributes
EgammaHcalIsolation Class Reference

#include <EgammaHcalIsolation.h>

Public Types

enum  HcalDepth { AllDepths =0, Depth1 =1, Depth2 =2 }
 

Public Member Functions

 EgammaHcalIsolation (double extRadius, double intRadius, double eLowB, double eLowE, double etLowB, double etLowE, edm::ESHandle< CaloGeometry > theCaloGeom, HBHERecHitMetaCollection *mhbhe)
 
double getHcalESum (const reco::Candidate *c) const
 
double getHcalESum (const reco::SuperCluster *sc) const
 
double getHcalESum (const math::XYZPoint &p) const
 
double getHcalESum (const GlobalPoint &pclu) const
 
double getHcalESumDepth1 (const reco::Candidate *c) const
 
double getHcalESumDepth1 (const reco::SuperCluster *sc) const
 
double getHcalESumDepth1 (const math::XYZPoint &p) const
 
double getHcalESumDepth1 (const GlobalPoint &pclu) const
 
double getHcalESumDepth2 (const reco::Candidate *c) const
 
double getHcalESumDepth2 (const reco::SuperCluster *sc) const
 
double getHcalESumDepth2 (const math::XYZPoint &p) const
 
double getHcalESumDepth2 (const GlobalPoint &pclu) const
 
double getHcalEtSum (const reco::Candidate *c) const
 
double getHcalEtSum (const reco::SuperCluster *sc) const
 
double getHcalEtSum (const math::XYZPoint &p) const
 
double getHcalEtSum (const GlobalPoint &pclu) const
 
double getHcalEtSumDepth1 (const reco::Candidate *c) const
 
double getHcalEtSumDepth1 (const reco::SuperCluster *sc) const
 
double getHcalEtSumDepth1 (const math::XYZPoint &p) const
 
double getHcalEtSumDepth1 (const GlobalPoint &pclu) const
 
double getHcalEtSumDepth2 (const reco::Candidate *c) const
 
double getHcalEtSumDepth2 (const reco::SuperCluster *sc) const
 
double getHcalEtSumDepth2 (const math::XYZPoint &p) const
 
double getHcalEtSumDepth2 (const GlobalPoint &pclu) const
 
 ~EgammaHcalIsolation ()
 

Private Member Functions

double getHcalSum (const GlobalPoint &, const HcalDepth &, double(*)(const double &)) const
 
bool isDepth2 (const DetId &) const
 

Private Attributes

CaloDualConeSelectordoubleConeSel_
 
double eLowB_
 
double eLowE_
 
double etLowB_
 
double etLowE_
 
double extRadius_
 
double intRadius_
 
HBHERecHitMetaCollectionmhbhe_
 
edm::ESHandle< CaloGeometrytheCaloGeom_
 

Detailed Description

Definition at line 32 of file EgammaHcalIsolation.h.

Member Enumeration Documentation

Constructor & Destructor Documentation

EgammaHcalIsolation::EgammaHcalIsolation ( double  extRadius,
double  intRadius,
double  eLowB,
double  eLowE,
double  etLowB,
double  etLowE,
edm::ESHandle< CaloGeometry theCaloGeom,
HBHERecHitMetaCollection mhbhe 
)

Definition at line 28 of file EgammaHcalIsolation.cc.

References doubleConeSel_, extRadius_, DetId::Hcal, intRadius_, edm::ESHandle< class >::product(), and theCaloGeom_.

37  :
38  extRadius_(extRadius),
39  intRadius_(intRadius),
40  eLowB_(eLowB),
41  eLowE_(eLowE),
42  etLowB_(etLowB),
43  etLowE_(etLowE),
44  theCaloGeom_(theCaloGeom) ,
45  mhbhe_(mhbhe)
46 {
47  //set up the geometry and selector
48  const CaloGeometry* caloGeom = theCaloGeom_.product();
50 }
edm::ESHandle< CaloGeometry > theCaloGeom_
CaloDualConeSelector * doubleConeSel_
HBHERecHitMetaCollection * mhbhe_
T const * product() const
Definition: ESHandle.h:62
EgammaHcalIsolation::~EgammaHcalIsolation ( )

Definition at line 52 of file EgammaHcalIsolation.cc.

References doubleConeSel_.

53 {
54  delete doubleConeSel_;
55 }
CaloDualConeSelector * doubleConeSel_

Member Function Documentation

double EgammaHcalIsolation::getHcalESum ( const reco::Candidate c) const
inline

Definition at line 53 of file EgammaHcalIsolation.h.

References reco::Candidate::get(), edm::Ref< C, T, F >::get(), and getHcalESum().

Referenced by getHcalESum(), and ElectronHcalHelper::hcalESum().

53 { return getHcalESum(c->get<reco::SuperClusterRef>().get()); }
double getHcalESum(const reco::Candidate *c) const
T get() const
get a component
Definition: Candidate.h:219
T const * get() const
Returns C++ pointer to the item.
Definition: Ref.h:242
double EgammaHcalIsolation::getHcalESum ( const reco::SuperCluster sc) const
inline

Definition at line 55 of file EgammaHcalIsolation.h.

References getHcalESum(), and reco::CaloCluster::position().

Referenced by getHcalESum().

55 { return getHcalESum(sc->position()); }
const math::XYZPoint & position() const
cluster centroid position
Definition: CaloCluster.h:123
double getHcalESum(const reco::Candidate *c) const
double EgammaHcalIsolation::getHcalESum ( const math::XYZPoint p) const
inline

Definition at line 57 of file EgammaHcalIsolation.h.

References getHcalESum().

Referenced by getHcalESum().

57 { return getHcalESum(GlobalPoint(p.x(),p.y(),p.z())); }
Global3DPoint GlobalPoint
Definition: GlobalPoint.h:10
double getHcalESum(const reco::Candidate *c) const
double EgammaHcalIsolation::getHcalESum ( const GlobalPoint pclu) const
inline

Definition at line 59 of file EgammaHcalIsolation.h.

References AllDepths, getHcalSum(), and scaleToE().

59 { return getHcalSum(pclu,AllDepths,&scaleToE); }
double getHcalSum(const GlobalPoint &, const HcalDepth &, double(*)(const double &)) const
double scaleToE(const double &eta)
double EgammaHcalIsolation::getHcalESumDepth1 ( const reco::Candidate c) const
inline

Definition at line 63 of file EgammaHcalIsolation.h.

References reco::Candidate::get(), edm::Ref< C, T, F >::get(), and getHcalESumDepth1().

Referenced by getHcalESumDepth1(), and ElectronHcalHelper::hcalESumDepth1().

63 { return getHcalESumDepth1(c->get<reco::SuperClusterRef>().get()); }
T get() const
get a component
Definition: Candidate.h:219
double getHcalESumDepth1(const reco::Candidate *c) const
T const * get() const
Returns C++ pointer to the item.
Definition: Ref.h:242
double EgammaHcalIsolation::getHcalESumDepth1 ( const reco::SuperCluster sc) const
inline

Definition at line 65 of file EgammaHcalIsolation.h.

References getHcalESumDepth1(), and reco::CaloCluster::position().

Referenced by getHcalESumDepth1().

65 { return getHcalESumDepth1(sc->position()); }
const math::XYZPoint & position() const
cluster centroid position
Definition: CaloCluster.h:123
double getHcalESumDepth1(const reco::Candidate *c) const
double EgammaHcalIsolation::getHcalESumDepth1 ( const math::XYZPoint p) const
inline

Definition at line 67 of file EgammaHcalIsolation.h.

References getHcalESumDepth1().

Referenced by getHcalESumDepth1().

67 { return getHcalESumDepth1(GlobalPoint(p.x(),p.y(),p.z())); }
Global3DPoint GlobalPoint
Definition: GlobalPoint.h:10
double getHcalESumDepth1(const reco::Candidate *c) const
double EgammaHcalIsolation::getHcalESumDepth1 ( const GlobalPoint pclu) const
inline

Definition at line 69 of file EgammaHcalIsolation.h.

References Depth1, getHcalSum(), and scaleToE().

69 { return getHcalSum(pclu,Depth1,&scaleToE); }
double getHcalSum(const GlobalPoint &, const HcalDepth &, double(*)(const double &)) const
double scaleToE(const double &eta)
double EgammaHcalIsolation::getHcalESumDepth2 ( const reco::Candidate c) const
inline

Definition at line 73 of file EgammaHcalIsolation.h.

References reco::Candidate::get(), edm::Ref< C, T, F >::get(), and getHcalESumDepth2().

Referenced by getHcalESumDepth2(), and ElectronHcalHelper::hcalESumDepth2().

73 { return getHcalESumDepth2(c->get<reco::SuperClusterRef>().get()); }
double getHcalESumDepth2(const reco::Candidate *c) const
T get() const
get a component
Definition: Candidate.h:219
T const * get() const
Returns C++ pointer to the item.
Definition: Ref.h:242
double EgammaHcalIsolation::getHcalESumDepth2 ( const reco::SuperCluster sc) const
inline

Definition at line 75 of file EgammaHcalIsolation.h.

References getHcalESumDepth2(), and reco::CaloCluster::position().

Referenced by getHcalESumDepth2().

75 { return getHcalESumDepth2(sc->position()); }
const math::XYZPoint & position() const
cluster centroid position
Definition: CaloCluster.h:123
double getHcalESumDepth2(const reco::Candidate *c) const
double EgammaHcalIsolation::getHcalESumDepth2 ( const math::XYZPoint p) const
inline

Definition at line 77 of file EgammaHcalIsolation.h.

References getHcalESumDepth2().

Referenced by getHcalESumDepth2().

77 { return getHcalESumDepth2(GlobalPoint(p.x(),p.y(),p.z())); }
Global3DPoint GlobalPoint
Definition: GlobalPoint.h:10
double getHcalESumDepth2(const reco::Candidate *c) const
double EgammaHcalIsolation::getHcalESumDepth2 ( const GlobalPoint pclu) const
inline

Definition at line 79 of file EgammaHcalIsolation.h.

References Depth2, getHcalSum(), and scaleToE().

79 { return getHcalSum(pclu,Depth2,&scaleToE); }
double getHcalSum(const GlobalPoint &, const HcalDepth &, double(*)(const double &)) const
double scaleToE(const double &eta)
double EgammaHcalIsolation::getHcalEtSum ( const reco::Candidate c) const
inline

Definition at line 54 of file EgammaHcalIsolation.h.

References reco::Candidate::get(), edm::Ref< C, T, F >::get(), and getHcalEtSum().

Referenced by getHcalEtSum().

54 { return getHcalEtSum(c->get<reco::SuperClusterRef>().get()); }
double getHcalEtSum(const reco::Candidate *c) const
T get() const
get a component
Definition: Candidate.h:219
T const * get() const
Returns C++ pointer to the item.
Definition: Ref.h:242
double EgammaHcalIsolation::getHcalEtSum ( const reco::SuperCluster sc) const
inline

Definition at line 56 of file EgammaHcalIsolation.h.

References getHcalEtSum(), and reco::CaloCluster::position().

Referenced by getHcalEtSum().

56 { return getHcalEtSum(sc->position()); }
const math::XYZPoint & position() const
cluster centroid position
Definition: CaloCluster.h:123
double getHcalEtSum(const reco::Candidate *c) const
double EgammaHcalIsolation::getHcalEtSum ( const math::XYZPoint p) const
inline

Definition at line 58 of file EgammaHcalIsolation.h.

References getHcalEtSum().

Referenced by getHcalEtSum().

58 { return getHcalEtSum(GlobalPoint(p.x(),p.y(),p.z())); }
Global3DPoint GlobalPoint
Definition: GlobalPoint.h:10
double getHcalEtSum(const reco::Candidate *c) const
double EgammaHcalIsolation::getHcalEtSum ( const GlobalPoint pclu) const
inline

Definition at line 60 of file EgammaHcalIsolation.h.

References AllDepths, getHcalSum(), and scaleToEt().

60 { return getHcalSum(pclu,AllDepths,&scaleToEt); }
double getHcalSum(const GlobalPoint &, const HcalDepth &, double(*)(const double &)) const
double scaleToEt(const double &eta)
double EgammaHcalIsolation::getHcalEtSumDepth1 ( const reco::Candidate c) const
inline

Definition at line 64 of file EgammaHcalIsolation.h.

References reco::Candidate::get(), edm::Ref< C, T, F >::get(), and getHcalEtSumDepth1().

Referenced by getHcalEtSumDepth1().

64 { return getHcalEtSumDepth1(c->get<reco::SuperClusterRef>().get()); }
double getHcalEtSumDepth1(const reco::Candidate *c) const
T get() const
get a component
Definition: Candidate.h:219
T const * get() const
Returns C++ pointer to the item.
Definition: Ref.h:242
double EgammaHcalIsolation::getHcalEtSumDepth1 ( const reco::SuperCluster sc) const
inline

Definition at line 66 of file EgammaHcalIsolation.h.

References getHcalEtSumDepth1(), and reco::CaloCluster::position().

Referenced by getHcalEtSumDepth1().

66 { return getHcalEtSumDepth1(sc->position()); }
const math::XYZPoint & position() const
cluster centroid position
Definition: CaloCluster.h:123
double getHcalEtSumDepth1(const reco::Candidate *c) const
double EgammaHcalIsolation::getHcalEtSumDepth1 ( const math::XYZPoint p) const
inline

Definition at line 68 of file EgammaHcalIsolation.h.

References getHcalEtSumDepth1().

Referenced by getHcalEtSumDepth1().

68 { return getHcalEtSumDepth1(GlobalPoint(p.x(),p.y(),p.z())); }
Global3DPoint GlobalPoint
Definition: GlobalPoint.h:10
double getHcalEtSumDepth1(const reco::Candidate *c) const
double EgammaHcalIsolation::getHcalEtSumDepth1 ( const GlobalPoint pclu) const
inline

Definition at line 70 of file EgammaHcalIsolation.h.

References Depth1, getHcalSum(), and scaleToEt().

70 { return getHcalSum(pclu,Depth1,&scaleToEt); }
double getHcalSum(const GlobalPoint &, const HcalDepth &, double(*)(const double &)) const
double scaleToEt(const double &eta)
double EgammaHcalIsolation::getHcalEtSumDepth2 ( const reco::Candidate c) const
inline

Definition at line 74 of file EgammaHcalIsolation.h.

References reco::Candidate::get(), edm::Ref< C, T, F >::get(), and getHcalEtSumDepth2().

Referenced by getHcalEtSumDepth2().

74 { return getHcalEtSumDepth2(c->get<reco::SuperClusterRef>().get()); }
double getHcalEtSumDepth2(const reco::Candidate *c) const
T get() const
get a component
Definition: Candidate.h:219
T const * get() const
Returns C++ pointer to the item.
Definition: Ref.h:242
double EgammaHcalIsolation::getHcalEtSumDepth2 ( const reco::SuperCluster sc) const
inline

Definition at line 76 of file EgammaHcalIsolation.h.

References getHcalEtSumDepth2(), and reco::CaloCluster::position().

Referenced by getHcalEtSumDepth2().

76 { return getHcalEtSumDepth2(sc->position()); }
const math::XYZPoint & position() const
cluster centroid position
Definition: CaloCluster.h:123
double getHcalEtSumDepth2(const reco::Candidate *c) const
double EgammaHcalIsolation::getHcalEtSumDepth2 ( const math::XYZPoint p) const
inline

Definition at line 78 of file EgammaHcalIsolation.h.

References getHcalEtSumDepth2().

Referenced by getHcalEtSumDepth2().

78 { return getHcalEtSumDepth2(GlobalPoint(p.x(),p.y(),p.z())); }
Global3DPoint GlobalPoint
Definition: GlobalPoint.h:10
double getHcalEtSumDepth2(const reco::Candidate *c) const
double EgammaHcalIsolation::getHcalEtSumDepth2 ( const GlobalPoint pclu) const
inline

Definition at line 80 of file EgammaHcalIsolation.h.

References Depth2, getHcalSum(), and scaleToEt().

80 { return getHcalSum(pclu,Depth2,&scaleToEt); }
double getHcalSum(const GlobalPoint &, const HcalDepth &, double(*)(const double &)) const
double scaleToEt(const double &eta)
double EgammaHcalIsolation::getHcalSum ( const GlobalPoint pclu,
const HcalDepth depth,
double(*)(const double &)  scale 
) const
private

Definition at line 57 of file EgammaHcalIsolation.cc.

References AllDepths, Depth1, Depth2, CaloRecHit::detid(), doubleConeSel_, eLowB_, eLowE_, CaloRecHit::energy(), eta(), etLowB_, etLowE_, HcalBarrel, HcalEndcap, i, isDepth2(), mhbhe_, edm::ESHandle< class >::product(), pileupReCalc_HLTpaths::scale, scaleToEt(), CaloDualConeSelector::select(), and theCaloGeom_.

Referenced by getHcalESum(), getHcalESumDepth1(), getHcalESumDepth2(), getHcalEtSum(), getHcalEtSumDepth1(), and getHcalEtSumDepth2().

59 {
60  double sum = 0.;
61  if (mhbhe_)
62  {
63  //Compute the HCAL energy behind ECAL
64  double eta;
65  std::auto_ptr<CaloRecHitMetaCollectionV> chosen = doubleConeSel_->select(pclu,*mhbhe_);
67  for (i = chosen->begin () ; i!= chosen->end () ; ++i)
68  {
69  eta = theCaloGeom_.product()->getPosition(i->detid()).eta();
70  HcalDetId hcalDetId(i->detid());
71  if(hcalDetId.subdet() == HcalBarrel && //Is it in the barrel?
72  i->energy() > eLowB_ && //Does it pass the min energy?
73  i->energy()*scaleToEt(eta) > etLowB_ && //Does it pass the min et?
74  (depth == AllDepths || depth == Depth1)) { //Are we asking for the first depth?
75  sum += i->energy() * scale(eta);
76  }
77  if(hcalDetId.subdet() == HcalEndcap && //Is it in the endcap?
78  i->energy() > eLowE_ && //Does it pass the min energy?
79  i->energy()*scaleToEt(eta) > etLowE_ ) { //Does it pass the min et?
80  switch(depth) { //Which depth?
81  case AllDepths: sum += i->energy() * scale(eta); break;
82  case Depth1: sum += (isDepth2(i->detid())) ? 0 : i->energy() * scale(eta); break;
83  case Depth2: sum += (isDepth2(i->detid())) ? i->energy() * scale(eta) : 0; break;
84  }
85  }
86  }
87  }
88  return sum ;
89 }
bool isDepth2(const DetId &) const
int i
Definition: DBlmapReader.cc:9
const DetId & detid() const
Definition: CaloRecHit.h:22
edm::ESHandle< CaloGeometry > theCaloGeom_
T eta() const
std::auto_ptr< CaloRecHitMetaCollectionV > select(double eta, double phi, const CaloRecHitMetaCollectionV &inputCollection)
float energy() const
Definition: CaloRecHit.h:19
CaloDualConeSelector * doubleConeSel_
HBHERecHitMetaCollection * mhbhe_
T const * product() const
Definition: ESHandle.h:62
double scaleToEt(const double &eta)
bool EgammaHcalIsolation::isDepth2 ( const DetId detId) const
private

Definition at line 91 of file EgammaHcalIsolation.cc.

Referenced by getHcalSum().

91  {
92 
93  if( (HcalDetId(detId).depth()==2 && HcalDetId(detId).ietaAbs()>=18 && HcalDetId(detId).ietaAbs()<27) ||
94  (HcalDetId(detId).depth()==3 && HcalDetId(detId).ietaAbs()==27) ) {
95 
96  return true;
97 
98  } else {
99  return false;
100  }
101 }

Member Data Documentation

CaloDualConeSelector* EgammaHcalIsolation::doubleConeSel_
private

Definition at line 100 of file EgammaHcalIsolation.h.

Referenced by EgammaHcalIsolation(), getHcalSum(), and ~EgammaHcalIsolation().

double EgammaHcalIsolation::eLowB_
private

Definition at line 91 of file EgammaHcalIsolation.h.

Referenced by getHcalSum().

double EgammaHcalIsolation::eLowE_
private

Definition at line 92 of file EgammaHcalIsolation.h.

Referenced by getHcalSum().

double EgammaHcalIsolation::etLowB_
private

Definition at line 93 of file EgammaHcalIsolation.h.

Referenced by getHcalSum().

double EgammaHcalIsolation::etLowE_
private

Definition at line 94 of file EgammaHcalIsolation.h.

Referenced by getHcalSum().

double EgammaHcalIsolation::extRadius_
private

Definition at line 89 of file EgammaHcalIsolation.h.

Referenced by EgammaHcalIsolation().

double EgammaHcalIsolation::intRadius_
private

Definition at line 90 of file EgammaHcalIsolation.h.

Referenced by EgammaHcalIsolation().

HBHERecHitMetaCollection* EgammaHcalIsolation::mhbhe_
private

Definition at line 98 of file EgammaHcalIsolation.h.

Referenced by getHcalSum().

edm::ESHandle<CaloGeometry> EgammaHcalIsolation::theCaloGeom_
private

Definition at line 97 of file EgammaHcalIsolation.h.

Referenced by EgammaHcalIsolation(), and getHcalSum().