CMS 3D CMS Logo

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, const HBHERecHitCollection &mhbhe)
 
double getHcalESum (const GlobalPoint &pclu) const
 
double getHcalESum (const math::XYZPoint &p) const
 
double getHcalESum (const reco::Candidate *c) const
 
double getHcalESum (const reco::SuperCluster *sc) const
 
double getHcalESumDepth1 (const GlobalPoint &pclu) const
 
double getHcalESumDepth1 (const math::XYZPoint &p) const
 
double getHcalESumDepth1 (const reco::Candidate *c) const
 
double getHcalESumDepth1 (const reco::SuperCluster *sc) const
 
double getHcalESumDepth2 (const GlobalPoint &pclu) const
 
double getHcalESumDepth2 (const math::XYZPoint &p) const
 
double getHcalESumDepth2 (const reco::Candidate *c) const
 
double getHcalESumDepth2 (const reco::SuperCluster *sc) const
 
double getHcalEtSum (const GlobalPoint &pclu) const
 
double getHcalEtSum (const math::XYZPoint &p) const
 
double getHcalEtSum (const reco::Candidate *c) const
 
double getHcalEtSum (const reco::SuperCluster *sc) const
 
double getHcalEtSumDepth1 (const GlobalPoint &pclu) const
 
double getHcalEtSumDepth1 (const math::XYZPoint &p) const
 
double getHcalEtSumDepth1 (const reco::Candidate *c) const
 
double getHcalEtSumDepth1 (const reco::SuperCluster *sc) const
 
double getHcalEtSumDepth2 (const GlobalPoint &pclu) const
 
double getHcalEtSumDepth2 (const math::XYZPoint &p) const
 
double getHcalEtSumDepth2 (const reco::Candidate *c) const
 
double getHcalEtSumDepth2 (const reco::SuperCluster *sc) const
 
 ~EgammaHcalIsolation ()
 

Private Member Functions

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

Private Attributes

CaloDualConeSelector< HBHERecHit > * doubleConeSel_
 
double eLowB_
 
double eLowE_
 
double etLowB_
 
double etLowE_
 
double extRadius_
 
double intRadius_
 
const HBHERecHitCollectionmhbhe_
 
edm::ESHandle< CaloGeometrytheCaloGeom_
 

Detailed Description

Definition at line 30 of file EgammaHcalIsolation.h.

Member Enumeration Documentation

◆ HcalDepth

Enumerator
AllDepths 
Depth1 
Depth2 

Definition at line 32 of file EgammaHcalIsolation.h.

32 { AllDepths = 0, Depth1 = 1, Depth2 = 2 };

Constructor & Destructor Documentation

◆ EgammaHcalIsolation()

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

Definition at line 27 of file EgammaHcalIsolation.cc.

37  eLowB_(eLowB),
38  eLowE_(eLowE),
39  etLowB_(etLowB),
40  etLowE_(etLowE),
41  theCaloGeom_(theCaloGeom),
42  mhbhe_(mhbhe) {
43  //set up the geometry and selector
44  const CaloGeometry* caloGeom = theCaloGeom_.product();
46 }

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

◆ ~EgammaHcalIsolation()

EgammaHcalIsolation::~EgammaHcalIsolation ( )

Definition at line 48 of file EgammaHcalIsolation.cc.

48 { delete doubleConeSel_; }

References doubleConeSel_.

Member Function Documentation

◆ getHcalESum() [1/4]

double EgammaHcalIsolation::getHcalESum ( const GlobalPoint pclu) const
inline

Definition at line 54 of file EgammaHcalIsolation.h.

54 { return getHcalSum(pclu, AllDepths, &scaleToE); }

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

◆ getHcalESum() [2/4]

double EgammaHcalIsolation::getHcalESum ( const math::XYZPoint p) const
inline

Definition at line 52 of file EgammaHcalIsolation.h.

52 { return getHcalESum(GlobalPoint(p.x(), p.y(), p.z())); }

References getHcalESum(), and AlCaHLTBitMon_ParallelJobs::p.

Referenced by getHcalESum().

◆ getHcalESum() [3/4]

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

◆ getHcalESum() [4/4]

double EgammaHcalIsolation::getHcalESum ( const reco::SuperCluster sc) const
inline

Definition at line 50 of file EgammaHcalIsolation.h.

50 { return getHcalESum(sc->position()); }

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

Referenced by getHcalESum().

◆ getHcalESumDepth1() [1/4]

double EgammaHcalIsolation::getHcalESumDepth1 ( const GlobalPoint pclu) const
inline

Definition at line 72 of file EgammaHcalIsolation.h.

72 { return getHcalSum(pclu, Depth1, &scaleToE); }

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

◆ getHcalESumDepth1() [2/4]

double EgammaHcalIsolation::getHcalESumDepth1 ( const math::XYZPoint p) const
inline

Definition at line 66 of file EgammaHcalIsolation.h.

66  {
67  return getHcalESumDepth1(GlobalPoint(p.x(), p.y(), p.z()));
68  }

References getHcalESumDepth1(), and AlCaHLTBitMon_ParallelJobs::p.

◆ getHcalESumDepth1() [3/4]

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

◆ getHcalESumDepth1() [4/4]

double EgammaHcalIsolation::getHcalESumDepth1 ( const reco::SuperCluster sc) const
inline

Definition at line 64 of file EgammaHcalIsolation.h.

64 { return getHcalESumDepth1(sc->position()); }

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

Referenced by getHcalESumDepth1().

◆ getHcalESumDepth2() [1/4]

double EgammaHcalIsolation::getHcalESumDepth2 ( const GlobalPoint pclu) const
inline

Definition at line 90 of file EgammaHcalIsolation.h.

90 { return getHcalSum(pclu, Depth2, &scaleToE); }

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

◆ getHcalESumDepth2() [2/4]

double EgammaHcalIsolation::getHcalESumDepth2 ( const math::XYZPoint p) const
inline

Definition at line 84 of file EgammaHcalIsolation.h.

84  {
85  return getHcalESumDepth2(GlobalPoint(p.x(), p.y(), p.z()));
86  }

References getHcalESumDepth2(), and AlCaHLTBitMon_ParallelJobs::p.

◆ getHcalESumDepth2() [3/4]

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

◆ getHcalESumDepth2() [4/4]

double EgammaHcalIsolation::getHcalESumDepth2 ( const reco::SuperCluster sc) const
inline

Definition at line 82 of file EgammaHcalIsolation.h.

82 { return getHcalESumDepth2(sc->position()); }

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

Referenced by getHcalESumDepth2().

◆ getHcalEtSum() [1/4]

double EgammaHcalIsolation::getHcalEtSum ( const GlobalPoint pclu) const
inline

Definition at line 55 of file EgammaHcalIsolation.h.

55 { return getHcalSum(pclu, AllDepths, &scaleToEt); }

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

◆ getHcalEtSum() [2/4]

double EgammaHcalIsolation::getHcalEtSum ( const math::XYZPoint p) const
inline

Definition at line 53 of file EgammaHcalIsolation.h.

53 { return getHcalEtSum(GlobalPoint(p.x(), p.y(), p.z())); }

References getHcalEtSum(), and AlCaHLTBitMon_ParallelJobs::p.

Referenced by getHcalEtSum().

◆ getHcalEtSum() [3/4]

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

Definition at line 49 of file EgammaHcalIsolation.h.

49 { return getHcalEtSum(c->get<reco::SuperClusterRef>().get()); }

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

Referenced by getHcalEtSum().

◆ getHcalEtSum() [4/4]

double EgammaHcalIsolation::getHcalEtSum ( const reco::SuperCluster sc) const
inline

Definition at line 51 of file EgammaHcalIsolation.h.

51 { return getHcalEtSum(sc->position()); }

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

Referenced by getHcalEtSum().

◆ getHcalEtSumDepth1() [1/4]

double EgammaHcalIsolation::getHcalEtSumDepth1 ( const GlobalPoint pclu) const
inline

Definition at line 73 of file EgammaHcalIsolation.h.

73 { return getHcalSum(pclu, Depth1, &scaleToEt); }

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

◆ getHcalEtSumDepth1() [2/4]

double EgammaHcalIsolation::getHcalEtSumDepth1 ( const math::XYZPoint p) const
inline

Definition at line 69 of file EgammaHcalIsolation.h.

69  {
70  return getHcalEtSumDepth1(GlobalPoint(p.x(), p.y(), p.z()));
71  }

References getHcalEtSumDepth1(), and AlCaHLTBitMon_ParallelJobs::p.

◆ getHcalEtSumDepth1() [3/4]

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

Definition at line 61 of file EgammaHcalIsolation.h.

61  {
63  }

References HltBtagPostValidation_cff::c, and edm::Ref< C, T, F >::get().

Referenced by getHcalEtSumDepth1().

◆ getHcalEtSumDepth1() [4/4]

double EgammaHcalIsolation::getHcalEtSumDepth1 ( const reco::SuperCluster sc) const
inline

Definition at line 65 of file EgammaHcalIsolation.h.

65 { return getHcalEtSumDepth1(sc->position()); }

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

Referenced by getHcalEtSumDepth1().

◆ getHcalEtSumDepth2() [1/4]

double EgammaHcalIsolation::getHcalEtSumDepth2 ( const GlobalPoint pclu) const
inline

Definition at line 91 of file EgammaHcalIsolation.h.

91 { return getHcalSum(pclu, Depth2, &scaleToEt); }

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

◆ getHcalEtSumDepth2() [2/4]

double EgammaHcalIsolation::getHcalEtSumDepth2 ( const math::XYZPoint p) const
inline

Definition at line 87 of file EgammaHcalIsolation.h.

87  {
88  return getHcalEtSumDepth2(GlobalPoint(p.x(), p.y(), p.z()));
89  }

References getHcalEtSumDepth2(), and AlCaHLTBitMon_ParallelJobs::p.

◆ getHcalEtSumDepth2() [3/4]

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

Definition at line 79 of file EgammaHcalIsolation.h.

79  {
81  }

References HltBtagPostValidation_cff::c, and edm::Ref< C, T, F >::get().

Referenced by getHcalEtSumDepth2().

◆ getHcalEtSumDepth2() [4/4]

double EgammaHcalIsolation::getHcalEtSumDepth2 ( const reco::SuperCluster sc) const
inline

Definition at line 83 of file EgammaHcalIsolation.h.

83 { return getHcalEtSumDepth2(sc->position()); }

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

Referenced by getHcalEtSumDepth2().

◆ getHcalSum()

double EgammaHcalIsolation::getHcalSum ( const GlobalPoint pclu,
const HcalDepth depth,
double(*)(const double &)  scale 
) const
private

Definition at line 50 of file EgammaHcalIsolation.cc.

52  {
53  double sum = 0.;
54  if (!mhbhe_.empty()) {
55  //Compute the HCAL energy behind ECAL
56  doubleConeSel_->selectCallback(pclu, mhbhe_, [this, &sum, &depth, &scale](const HBHERecHit& i) {
57  double eta = theCaloGeom_.product()->getPosition(i.detid()).eta();
58  HcalDetId hcalDetId(i.detid());
59  if (hcalDetId.subdet() == HcalBarrel && //Is it in the barrel?
60  i.energy() > eLowB_ && //Does it pass the min energy?
61  i.energy() * scaleToEt(eta) > etLowB_ && //Does it pass the min et?
62  (depth == AllDepths || depth == Depth1)) { //Are we asking for the first depth?
63  sum += i.energy() * scale(eta);
64  }
65  if (hcalDetId.subdet() == HcalEndcap && //Is it in the endcap?
66  i.energy() > eLowE_ && //Does it pass the min energy?
67  i.energy() * scaleToEt(eta) > etLowE_) { //Does it pass the min et?
68  switch (depth) { //Which depth?
69  case AllDepths:
70  sum += i.energy() * scale(eta);
71  break;
72  case Depth1:
73  sum += (isDepth2(i.detid())) ? 0 : i.energy() * scale(eta);
74  break;
75  case Depth2:
76  sum += (isDepth2(i.detid())) ? i.energy() * scale(eta) : 0;
77  break;
78  }
79  }
80  });
81  }
82 
83  return sum;
84 }

References AllDepths, LEDCalibrationChannels::depth, Depth1, Depth2, doubleConeSel_, eLowB_, eLowE_, edm::SortedCollection< T, SORT >::empty(), PVValHelper::eta, etLowB_, etLowE_, CaloGeometry::getPosition(), HcalBarrel, HcalEndcap, mps_fire::i, isDepth2(), mhbhe_, edm::ESHandle< T >::product(), Scenarios_cff::scale, scaleToEt(), CaloDualConeSelector< T >::selectCallback(), and theCaloGeom_.

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

◆ isDepth2()

bool EgammaHcalIsolation::isDepth2 ( const DetId detId) const
private

Definition at line 86 of file EgammaHcalIsolation.cc.

86  {
87  if ((HcalDetId(detId).depth() == 2 && HcalDetId(detId).ietaAbs() >= 18 && HcalDetId(detId).ietaAbs() < 27) ||
88  (HcalDetId(detId).depth() == 3 && HcalDetId(detId).ietaAbs() == 27)) {
89  return true;
90 
91  } else {
92  return false;
93  }
94 }

References LEDCalibrationChannels::depth.

Referenced by getHcalSum().

Member Data Documentation

◆ doubleConeSel_

CaloDualConeSelector<HBHERecHit>* EgammaHcalIsolation::doubleConeSel_
private

Definition at line 107 of file EgammaHcalIsolation.h.

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

◆ eLowB_

double EgammaHcalIsolation::eLowB_
private

Definition at line 99 of file EgammaHcalIsolation.h.

Referenced by getHcalSum().

◆ eLowE_

double EgammaHcalIsolation::eLowE_
private

Definition at line 100 of file EgammaHcalIsolation.h.

Referenced by getHcalSum().

◆ etLowB_

double EgammaHcalIsolation::etLowB_
private

Definition at line 101 of file EgammaHcalIsolation.h.

Referenced by getHcalSum().

◆ etLowE_

double EgammaHcalIsolation::etLowE_
private

Definition at line 102 of file EgammaHcalIsolation.h.

Referenced by getHcalSum().

◆ extRadius_

double EgammaHcalIsolation::extRadius_
private

Definition at line 97 of file EgammaHcalIsolation.h.

Referenced by EgammaHcalIsolation().

◆ intRadius_

double EgammaHcalIsolation::intRadius_
private

Definition at line 98 of file EgammaHcalIsolation.h.

Referenced by EgammaHcalIsolation().

◆ mhbhe_

const HBHERecHitCollection& EgammaHcalIsolation::mhbhe_
private

Definition at line 105 of file EgammaHcalIsolation.h.

Referenced by getHcalSum().

◆ theCaloGeom_

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

Definition at line 104 of file EgammaHcalIsolation.h.

Referenced by EgammaHcalIsolation(), and getHcalSum().

edm::ESHandle::product
T const * product() const
Definition: ESHandle.h:86
mps_fire.i
i
Definition: mps_fire.py:355
EgammaHcalIsolation::Depth1
Definition: EgammaHcalIsolation.h:32
EgammaHcalIsolation::doubleConeSel_
CaloDualConeSelector< HBHERecHit > * doubleConeSel_
Definition: EgammaHcalIsolation.h:107
EgammaHcalIsolation::getHcalESumDepth2
double getHcalESumDepth2(const reco::Candidate *c) const
Definition: EgammaHcalIsolation.h:76
CaloGeometry::getPosition
GlobalPoint getPosition(const DetId &id) const
Get the position of a given detector id.
Definition: CaloGeometry.cc:50
electronEcalRecHitIsolationLcone_cfi.extRadius
extRadius
Definition: electronEcalRecHitIsolationLcone_cfi.py:18
AlCaHLTBitMon_ParallelJobs.p
p
Definition: AlCaHLTBitMon_ParallelJobs.py:153
HBHERecHit
Definition: HBHERecHit.h:13
DetId::Hcal
Definition: DetId.h:28
EgammaHcalIsolation::getHcalSum
double getHcalSum(const GlobalPoint &, const HcalDepth &, double(*)(const double &)) const
Definition: EgammaHcalIsolation.cc:50
edm::Ref::get
T const * get() const
Returns C++ pointer to the item.
Definition: Ref.h:232
HcalBarrel
Definition: HcalAssistant.h:33
EgammaHcalIsolation::etLowB_
double etLowB_
Definition: EgammaHcalIsolation.h:101
EgammaHcalIsolation::getHcalESum
double getHcalESum(const reco::Candidate *c) const
Definition: EgammaHcalIsolation.h:48
EgammaHcalIsolation::getHcalEtSumDepth2
double getHcalEtSumDepth2(const reco::Candidate *c) const
Definition: EgammaHcalIsolation.h:79
edm::Ref< SuperClusterCollection >
CaloGeometry
Definition: CaloGeometry.h:21
EgammaHcalIsolation::eLowE_
double eLowE_
Definition: EgammaHcalIsolation.h:100
EgammaHcalIsolation::eLowB_
double eLowB_
Definition: EgammaHcalIsolation.h:99
PVValHelper::eta
Definition: PVValidationHelpers.h:69
EgammaHcalIsolation::extRadius_
double extRadius_
Definition: EgammaHcalIsolation.h:97
GlobalPoint
Global3DPoint GlobalPoint
Definition: GlobalPoint.h:10
CaloDualConeSelector::selectCallback
void selectCallback(double eta, double phi, const edm::SortedCollection< T > &inputCollection, std::function< void(const T &)> callback)
Definition: CaloDualConeSelector.h:22
LEDCalibrationChannels.depth
depth
Definition: LEDCalibrationChannels.py:65
EgammaHcalIsolation::Depth2
Definition: EgammaHcalIsolation.h:32
EgammaHcalIsolation::getHcalEtSumDepth1
double getHcalEtSumDepth1(const reco::Candidate *c) const
Definition: EgammaHcalIsolation.h:61
Scenarios_cff.scale
scale
Definition: Scenarios_cff.py:2186
scaleToEt
double scaleToEt(const double &eta)
Definition: EgammaHcalIsolation.cc:25
EgammaHcalIsolation::AllDepths
Definition: EgammaHcalIsolation.h:32
EgammaHcalIsolation::etLowE_
double etLowE_
Definition: EgammaHcalIsolation.h:102
HcalDetId
Definition: HcalDetId.h:12
CaloDualConeSelector< HBHERecHit >
HltBtagPostValidation_cff.c
c
Definition: HltBtagPostValidation_cff.py:31
reco::CaloCluster::position
const math::XYZPoint & position() const
cluster centroid position
Definition: CaloCluster.h:154
EgammaHcalIsolation::intRadius_
double intRadius_
Definition: EgammaHcalIsolation.h:98
scaleToE
double scaleToE(const double &eta)
Definition: EgammaHcalIsolation.cc:24
EgammaHcalIsolation::theCaloGeom_
edm::ESHandle< CaloGeometry > theCaloGeom_
Definition: EgammaHcalIsolation.h:104
EgammaHcalIsolation::getHcalESumDepth1
double getHcalESumDepth1(const reco::Candidate *c) const
Definition: EgammaHcalIsolation.h:58
HcalEndcap
Definition: HcalAssistant.h:34
EgammaHcalIsolation::isDepth2
bool isDepth2(const DetId &) const
Definition: EgammaHcalIsolation.cc:86
scaleToEt
double scaleToEt(const double &eta)
Definition: EgammaHcalIsolation.cc:25
electronHcalTowerIsolationLcone_cfi.intRadius
intRadius
Definition: electronHcalTowerIsolationLcone_cfi.py:5
EgammaHcalIsolation::mhbhe_
const HBHERecHitCollection & mhbhe_
Definition: EgammaHcalIsolation.h:105
EgammaHcalIsolation::getHcalEtSum
double getHcalEtSum(const reco::Candidate *c) const
Definition: EgammaHcalIsolation.h:49
edm::SortedCollection::empty
bool empty() const
Definition: SortedCollection.h:210