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

using arrayHB = std::array< double, 4 >
 
using arrayHE = std::array< double, 7 >
 
enum  InclusionRule : int { InclusionRule::withinConeAroundCluster = 0, InclusionRule::isBehindClusterSeed = 1 }
 

Public Member Functions

 EgammaHcalIsolation (InclusionRule extIncRule, double extRadius, InclusionRule intIncRule, double intRadius, const arrayHB &eThresHB, const arrayHB &etThresHB, int maxSeverityHB, const arrayHE &eThresHE, const arrayHE &etThresHE, int maxSeverityHE, const HBHERecHitCollection &mhbhe, edm::ESHandle< CaloGeometry > caloGeometry, edm::ESHandle< HcalTopology > hcalTopology, edm::ESHandle< HcalChannelQuality > hcalChStatus, edm::ESHandle< HcalSeverityLevelComputer > hcalSevLvlComputer, edm::ESHandle< CaloTowerConstituentsMap > towerMap)
 
 EgammaHcalIsolation (InclusionRule extIncRule, double extRadius, InclusionRule intIncRule, double intRadius, const arrayHB &eThresHB, const arrayHB &etThresHB, int maxSeverityHB, const arrayHE &eThresHE, const arrayHE &etThresHE, int maxSeverityHE, const HBHERecHitCollection &mhbhe, const CaloGeometry &caloGeometry, const HcalTopology &hcalTopology, const HcalChannelQuality &hcalChStatus, const HcalSeverityLevelComputer &hcalSevLvlComputer, const CaloTowerConstituentsMap &towerMap)
 
double getHcalESum (const reco::Candidate *c, int depth, const HcalPFCuts *hcalCuts) const
 
double getHcalESum (const reco::SuperCluster *sc, int depth, const HcalPFCuts *hcalCuts) const
 
double getHcalESum (const math::XYZPoint &p, int depth, const HcalPFCuts *hcalCuts) const
 
double getHcalESum (const GlobalPoint &pclu, int depth, const HcalPFCuts *hcalCuts) const
 
double getHcalESumBc (const reco::Candidate *c, int depth, const HcalPFCuts *hcalCuts) const
 
double getHcalESumBc (const reco::SuperCluster *sc, int depth, const HcalPFCuts *hcalCuts) const
 
double getHcalESumBc (const math::XYZPoint &p, int depth, int ieta, int iphi, int include_or_exclude, const HcalPFCuts *hcalCuts) const
 
double getHcalESumBc (const GlobalPoint &pclu, int depth, int ieta, int iphi, int include_or_exclude, const HcalPFCuts *hcalCuts) const
 
double getHcalEtSum (const reco::Candidate *c, int depth, const HcalPFCuts *hcalCuts) const
 
double getHcalEtSum (const reco::SuperCluster *sc, int depth, const HcalPFCuts *hcalCuts) const
 
double getHcalEtSum (const math::XYZPoint &p, int depth, const HcalPFCuts *hcalCuts) const
 
double getHcalEtSum (const GlobalPoint &pclu, int depth, const HcalPFCuts *hcalCuts) const
 
double getHcalEtSumBc (const reco::Candidate *c, int depth, const HcalPFCuts *hcalCuts) const
 
double getHcalEtSumBc (const reco::SuperCluster *sc, int depth, const HcalPFCuts *hcalCuts) const
 
double getHcalEtSumBc (const math::XYZPoint &p, int depth, int ieta, int iphi, int include_or_exclude, const HcalPFCuts *hcalCuts) const
 
double getHcalEtSumBc (const GlobalPoint &pclu, int depth, int ieta, int iphi, int include_or_exclude, const HcalPFCuts *hcalCuts) const
 

Private Member Functions

double getHcalSum (const GlobalPoint &pclu, int depth, int ieta, int iphi, int include_or_exclude, double(*scale)(const double &), const HcalPFCuts *hcalCuts) const
 
double goodHitEnergy (float pcluEta, float pcluPhi, const HBHERecHit &hit, int depth, int ieta, int iphi, int include_or_exclude, double(*scale)(const double &), const HcalPFCuts *hcalCuts) const
 

Private Attributes

const CaloGeometrycaloGeometry_
 
arrayHB eThresHB_
 
arrayHE eThresHE_
 
arrayHB etThresHB_
 
arrayHE etThresHE_
 
InclusionRule extIncRule_
 
double extRadius_
 
const HcalChannelQualityhcalChStatus_
 
const HcalSeverityLevelComputerhcalSevLvlComputer_
 
const HcalTopologyhcalTopology_
 
InclusionRule intIncRule_
 
double intRadius_
 
int maxSeverityHB_
 
int maxSeverityHE_
 
const HBHERecHitCollectionmhbhe_
 
const CaloTowerConstituentsMaptowerMap_
 

Detailed Description

Definition at line 40 of file EgammaHcalIsolation.h.

Member Typedef Documentation

◆ arrayHB

using EgammaHcalIsolation::arrayHB = std::array<double, 4>

Definition at line 43 of file EgammaHcalIsolation.h.

◆ arrayHE

using EgammaHcalIsolation::arrayHE = std::array<double, 7>

Definition at line 44 of file EgammaHcalIsolation.h.

Member Enumeration Documentation

◆ InclusionRule

Enumerator
withinConeAroundCluster 
isBehindClusterSeed 

Definition at line 42 of file EgammaHcalIsolation.h.

42 : int { withinConeAroundCluster = 0, isBehindClusterSeed = 1 };

Constructor & Destructor Documentation

◆ EgammaHcalIsolation() [1/2]

EgammaHcalIsolation::EgammaHcalIsolation ( InclusionRule  extIncRule,
double  extRadius,
InclusionRule  intIncRule,
double  intRadius,
const arrayHB eThresHB,
const arrayHB etThresHB,
int  maxSeverityHB,
const arrayHE eThresHE,
const arrayHE etThresHE,
int  maxSeverityHE,
const HBHERecHitCollection mhbhe,
edm::ESHandle< CaloGeometry caloGeometry,
edm::ESHandle< HcalTopology hcalTopology,
edm::ESHandle< HcalChannelQuality hcalChStatus,
edm::ESHandle< HcalSeverityLevelComputer hcalSevLvlComputer,
edm::ESHandle< CaloTowerConstituentsMap towerMap 
)

◆ EgammaHcalIsolation() [2/2]

EgammaHcalIsolation::EgammaHcalIsolation ( InclusionRule  extIncRule,
double  extRadius,
InclusionRule  intIncRule,
double  intRadius,
const arrayHB eThresHB,
const arrayHB etThresHB,
int  maxSeverityHB,
const arrayHE eThresHE,
const arrayHE etThresHE,
int  maxSeverityHE,
const HBHERecHitCollection mhbhe,
const CaloGeometry caloGeometry,
const HcalTopology hcalTopology,
const HcalChannelQuality hcalChStatus,
const HcalSeverityLevelComputer hcalSevLvlComputer,
const CaloTowerConstituentsMap towerMap 
)

Member Function Documentation

◆ getHcalESum() [1/4]

double EgammaHcalIsolation::getHcalESum ( const reco::Candidate c,
int  depth,
const HcalPFCuts hcalCuts 
) const
inline

Definition at line 81 of file EgammaHcalIsolation.h.

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

Referenced by getHcalESum(), and EgammaHLTHcalVarProducerFromRecHit::produce().

81  {
82  return getHcalESum(c->get<reco::SuperClusterRef>().get(), depth, hcalCuts);
83  }
double getHcalESum(const reco::Candidate *c, int depth, const HcalPFCuts *hcalCuts) const
T const * get() const
Returns C++ pointer to the item.
Definition: Ref.h:232

◆ getHcalESum() [2/4]

double EgammaHcalIsolation::getHcalESum ( const reco::SuperCluster sc,
int  depth,
const HcalPFCuts hcalCuts 
) const
inline

Definition at line 87 of file EgammaHcalIsolation.h.

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

87  {
88  return getHcalESum(sc->position(), depth, hcalCuts);
89  }
const math::XYZPoint & position() const
cluster centroid position
Definition: CaloCluster.h:154
double getHcalESum(const reco::Candidate *c, int depth, const HcalPFCuts *hcalCuts) const

◆ getHcalESum() [3/4]

double EgammaHcalIsolation::getHcalESum ( const math::XYZPoint p,
int  depth,
const HcalPFCuts hcalCuts 
) const
inline

Definition at line 93 of file EgammaHcalIsolation.h.

References hcalRecHitTable_cff::depth, getHcalESum(), and AlCaHLTBitMon_ParallelJobs::p.

93  {
94  return getHcalESum(GlobalPoint(p.x(), p.y(), p.z()), depth, hcalCuts);
95  }
Global3DPoint GlobalPoint
Definition: GlobalPoint.h:10
double getHcalESum(const reco::Candidate *c, int depth, const HcalPFCuts *hcalCuts) const

◆ getHcalESum() [4/4]

double EgammaHcalIsolation::getHcalESum ( const GlobalPoint pclu,
int  depth,
const HcalPFCuts hcalCuts 
) const
inline

Definition at line 99 of file EgammaHcalIsolation.h.

References hcalRecHitTable_cff::depth, getHcalSum(), and scaleToE().

99  {
100  return getHcalSum(pclu, depth, 0, 0, 0, &scaleToE, hcalCuts);
101  }
double scaleToE(const double &eta)
double getHcalSum(const GlobalPoint &pclu, int depth, int ieta, int iphi, int include_or_exclude, double(*scale)(const double &), const HcalPFCuts *hcalCuts) const

◆ getHcalESumBc() [1/4]

double EgammaHcalIsolation::getHcalESumBc ( const reco::Candidate c,
int  depth,
const HcalPFCuts hcalCuts 
) const
inline

Definition at line 106 of file EgammaHcalIsolation.h.

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

Referenced by getHcalESumBc(), SuperClusterImporter::importToBlock(), and EgammaHLTHcalVarProducerFromRecHit::produce().

106  {
107  return getHcalESumBc(c->get<reco::SuperClusterRef>().get(), depth, hcalCuts);
108  }
double getHcalESumBc(const reco::Candidate *c, int depth, const HcalPFCuts *hcalCuts) const
T const * get() const
Returns C++ pointer to the item.
Definition: Ref.h:232

◆ getHcalESumBc() [2/4]

double EgammaHcalIsolation::getHcalESumBc ( const reco::SuperCluster sc,
int  depth,
const HcalPFCuts hcalCuts 
) const
inline

Definition at line 112 of file EgammaHcalIsolation.h.

References hcalRecHitTable_cff::depth, extIncRule_, getHcalESumBc(), intIncRule_, isBehindClusterSeed, reco::CaloCluster::position(), reco::SuperCluster::seed(), l1tHGCalTowerProducer_cfi::tower, towerMap_, egamma::towerOf(), and withinConeAroundCluster.

112  {
113  const auto tower = egamma::towerOf(*(sc->seed()), towerMap_);
114 
116  return getHcalESumBc(sc->position(), depth, tower.ieta(), tower.iphi(), -1, hcalCuts);
119  return getHcalESumBc(sc->position(), depth, tower.ieta(), tower.iphi(), 1, hcalCuts);
120 
121  return getHcalESumBc(sc->position(), depth, tower.ieta(), tower.iphi(), 0, hcalCuts);
122  }
const math::XYZPoint & position() const
cluster centroid position
Definition: CaloCluster.h:154
double getHcalESumBc(const reco::Candidate *c, int depth, const HcalPFCuts *hcalCuts) const
CaloTowerDetId towerOf(reco::CaloCluster const &cluster, CaloTowerConstituentsMap const &towerMap)
const CaloTowerConstituentsMap & towerMap_
const CaloClusterPtr & seed() const
seed BasicCluster
Definition: SuperCluster.h:79

◆ getHcalESumBc() [3/4]

double EgammaHcalIsolation::getHcalESumBc ( const math::XYZPoint p,
int  depth,
int  ieta,
int  iphi,
int  include_or_exclude,
const HcalPFCuts hcalCuts 
) const
inline

Definition at line 134 of file EgammaHcalIsolation.h.

References hcalRecHitTable_cff::depth, getHcalESumBc(), hcalRecHitTable_cff::ieta, hcalRecHitTable_cff::iphi, and AlCaHLTBitMon_ParallelJobs::p.

139  {
140  return getHcalESumBc(GlobalPoint(p.x(), p.y(), p.z()), depth, ieta, iphi, include_or_exclude, hcalCuts);
141  }
Global3DPoint GlobalPoint
Definition: GlobalPoint.h:10
double getHcalESumBc(const reco::Candidate *c, int depth, const HcalPFCuts *hcalCuts) const

◆ getHcalESumBc() [4/4]

double EgammaHcalIsolation::getHcalESumBc ( const GlobalPoint pclu,
int  depth,
int  ieta,
int  iphi,
int  include_or_exclude,
const HcalPFCuts hcalCuts 
) const
inline

Definition at line 150 of file EgammaHcalIsolation.h.

References hcalRecHitTable_cff::depth, getHcalSum(), hcalRecHitTable_cff::ieta, hcalRecHitTable_cff::iphi, and scaleToE().

155  {
156  return getHcalSum(pclu, depth, ieta, iphi, include_or_exclude, &scaleToE, hcalCuts);
157  }
double scaleToE(const double &eta)
double getHcalSum(const GlobalPoint &pclu, int depth, int ieta, int iphi, int include_or_exclude, double(*scale)(const double &), const HcalPFCuts *hcalCuts) const

◆ getHcalEtSum() [1/4]

double EgammaHcalIsolation::getHcalEtSum ( const reco::Candidate c,
int  depth,
const HcalPFCuts hcalCuts 
) const
inline

Definition at line 84 of file EgammaHcalIsolation.h.

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

Referenced by GsfElectronAlgo::createElectron(), getHcalEtSum(), and EgammaHLTHcalVarProducerFromRecHit::produce().

84  {
85  return getHcalEtSum(c->get<reco::SuperClusterRef>().get(), depth, hcalCuts);
86  }
double getHcalEtSum(const reco::Candidate *c, int depth, const HcalPFCuts *hcalCuts) const
T const * get() const
Returns C++ pointer to the item.
Definition: Ref.h:232

◆ getHcalEtSum() [2/4]

double EgammaHcalIsolation::getHcalEtSum ( const reco::SuperCluster sc,
int  depth,
const HcalPFCuts hcalCuts 
) const
inline

Definition at line 90 of file EgammaHcalIsolation.h.

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

90  {
91  return getHcalEtSum(sc->position(), depth, hcalCuts);
92  }
const math::XYZPoint & position() const
cluster centroid position
Definition: CaloCluster.h:154
double getHcalEtSum(const reco::Candidate *c, int depth, const HcalPFCuts *hcalCuts) const

◆ getHcalEtSum() [3/4]

double EgammaHcalIsolation::getHcalEtSum ( const math::XYZPoint p,
int  depth,
const HcalPFCuts hcalCuts 
) const
inline

Definition at line 96 of file EgammaHcalIsolation.h.

References hcalRecHitTable_cff::depth, getHcalEtSum(), and AlCaHLTBitMon_ParallelJobs::p.

96  {
97  return getHcalEtSum(GlobalPoint(p.x(), p.y(), p.z()), depth, hcalCuts);
98  }
Global3DPoint GlobalPoint
Definition: GlobalPoint.h:10
double getHcalEtSum(const reco::Candidate *c, int depth, const HcalPFCuts *hcalCuts) const

◆ getHcalEtSum() [4/4]

double EgammaHcalIsolation::getHcalEtSum ( const GlobalPoint pclu,
int  depth,
const HcalPFCuts hcalCuts 
) const
inline

Definition at line 102 of file EgammaHcalIsolation.h.

References hcalRecHitTable_cff::depth, getHcalSum(), and scaleToEt().

102  {
103  return getHcalSum(pclu, depth, 0, 0, 0, &scaleToEt, hcalCuts);
104  }
double scaleToEt(const double &eta)
double getHcalSum(const GlobalPoint &pclu, int depth, int ieta, int iphi, int include_or_exclude, double(*scale)(const double &), const HcalPFCuts *hcalCuts) const

◆ getHcalEtSumBc() [1/4]

double EgammaHcalIsolation::getHcalEtSumBc ( const reco::Candidate c,
int  depth,
const HcalPFCuts hcalCuts 
) const
inline

Definition at line 109 of file EgammaHcalIsolation.h.

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

Referenced by GsfElectronAlgo::createElectron(), getHcalEtSumBc(), and EgammaHLTHcalVarProducerFromRecHit::produce().

109  {
110  return getHcalEtSumBc(c->get<reco::SuperClusterRef>().get(), depth, hcalCuts);
111  }
double getHcalEtSumBc(const reco::Candidate *c, int depth, const HcalPFCuts *hcalCuts) const
T const * get() const
Returns C++ pointer to the item.
Definition: Ref.h:232

◆ getHcalEtSumBc() [2/4]

double EgammaHcalIsolation::getHcalEtSumBc ( const reco::SuperCluster sc,
int  depth,
const HcalPFCuts hcalCuts 
) const
inline

Definition at line 123 of file EgammaHcalIsolation.h.

References hcalRecHitTable_cff::depth, extIncRule_, getHcalEtSumBc(), intIncRule_, isBehindClusterSeed, reco::CaloCluster::position(), reco::SuperCluster::seed(), l1tHGCalTowerProducer_cfi::tower, towerMap_, egamma::towerOf(), and withinConeAroundCluster.

123  {
124  const auto tower = egamma::towerOf(*(sc->seed()), towerMap_);
125 
127  return getHcalEtSumBc(sc->position(), depth, tower.ieta(), tower.iphi(), -1, hcalCuts);
130  return getHcalEtSumBc(sc->position(), depth, tower.ieta(), tower.iphi(), 1, hcalCuts);
131 
132  return getHcalEtSumBc(sc->position(), depth, tower.ieta(), tower.iphi(), 0, hcalCuts);
133  }
const math::XYZPoint & position() const
cluster centroid position
Definition: CaloCluster.h:154
double getHcalEtSumBc(const reco::Candidate *c, int depth, const HcalPFCuts *hcalCuts) const
CaloTowerDetId towerOf(reco::CaloCluster const &cluster, CaloTowerConstituentsMap const &towerMap)
const CaloTowerConstituentsMap & towerMap_
const CaloClusterPtr & seed() const
seed BasicCluster
Definition: SuperCluster.h:79

◆ getHcalEtSumBc() [3/4]

double EgammaHcalIsolation::getHcalEtSumBc ( const math::XYZPoint p,
int  depth,
int  ieta,
int  iphi,
int  include_or_exclude,
const HcalPFCuts hcalCuts 
) const
inline

Definition at line 142 of file EgammaHcalIsolation.h.

References hcalRecHitTable_cff::depth, getHcalEtSumBc(), hcalRecHitTable_cff::ieta, hcalRecHitTable_cff::iphi, and AlCaHLTBitMon_ParallelJobs::p.

147  {
148  return getHcalEtSumBc(GlobalPoint(p.x(), p.y(), p.z()), depth, ieta, iphi, include_or_exclude, hcalCuts);
149  }
Global3DPoint GlobalPoint
Definition: GlobalPoint.h:10
double getHcalEtSumBc(const reco::Candidate *c, int depth, const HcalPFCuts *hcalCuts) const

◆ getHcalEtSumBc() [4/4]

double EgammaHcalIsolation::getHcalEtSumBc ( const GlobalPoint pclu,
int  depth,
int  ieta,
int  iphi,
int  include_or_exclude,
const HcalPFCuts hcalCuts 
) const
inline

Definition at line 158 of file EgammaHcalIsolation.h.

References hcalRecHitTable_cff::depth, getHcalSum(), hcalRecHitTable_cff::ieta, hcalRecHitTable_cff::iphi, and scaleToEt().

163  {
164  return getHcalSum(pclu, depth, ieta, iphi, include_or_exclude, &scaleToEt, hcalCuts);
165  }
double scaleToEt(const double &eta)
double getHcalSum(const GlobalPoint &pclu, int depth, int ieta, int iphi, int include_or_exclude, double(*scale)(const double &), const HcalPFCuts *hcalCuts) const

◆ getHcalSum()

double EgammaHcalIsolation::getHcalSum ( const GlobalPoint pclu,
int  depth,
int  ieta,
int  iphi,
int  include_or_exclude,
double(*)(const double &)  scale,
const HcalPFCuts hcalCuts 
) const
private

Definition at line 190 of file EgammaHcalIsolation.cc.

References hcalRecHitTable_cff::depth, PV3DBase< T, PVType, FrameType >::eta(), goodHitEnergy(), hcalRecHitTable_cff::ieta, hcalRecHitTable_cff::iphi, mhbhe_, PV3DBase< T, PVType, FrameType >::phi(), and l1tEGammaCrystalsEmulatorProducer_cfi::scale.

Referenced by getHcalESum(), getHcalESumBc(), getHcalEtSum(), and getHcalEtSumBc().

196  {
197  double sum = 0.;
198  const float pcluEta = pclu.eta();
199  const float pcluPhi = pclu.phi();
200  for (const auto &hit : mhbhe_)
201  sum += goodHitEnergy(pcluEta, pcluPhi, hit, depth, ieta, iphi, include_or_exclude, scale, hcalCuts);
202 
203  return sum;
204 }
double goodHitEnergy(float pcluEta, float pcluPhi, const HBHERecHit &hit, int depth, int ieta, int iphi, int include_or_exclude, double(*scale)(const double &), const HcalPFCuts *hcalCuts) const
Geom::Phi< T > phi() const
Definition: PV3DBase.h:66
T eta() const
Definition: PV3DBase.h:73
const HBHERecHitCollection & mhbhe_

◆ goodHitEnergy()

double EgammaHcalIsolation::goodHitEnergy ( float  pcluEta,
float  pcluPhi,
const HBHERecHit hit,
int  depth,
int  ieta,
int  iphi,
int  include_or_exclude,
double(*)(const double &)  scale,
const HcalPFCuts hcalCuts 
) const
private

Definition at line 122 of file EgammaHcalIsolation.cc.

References caloGeometry_, HLTMuonOfflineAnalyzer_cfi::deltaR2, hcalRecHitTable_cff::depth, HcalDetId::depth(), ALPAKA_ACCELERATOR_NAMESPACE::dR2(), eThresHB_, eThresHE_, etThresHB_, etThresHE_, extIncRule_, extRadius_, RemoveAddSevLevel::flag, CaloGeometry::getGeometry(), HcalSeverityLevelComputer::getSeverityLevel(), HcalChannelStatus::getValue(), HcalCondObjectContainer< Item >::getValues(), HcalBarrel, hcalChStatus_, HcalEndcap, hcalSevLvlComputer_, hcalTopology_, hcalSimParameters_cfi::he, trackingPlots::hp, HcalTopology::idFront(), hcalRecHitTable_cff::ieta, intIncRule_, intRadius_, hcalRecHitTable_cff::iphi, maxSeverityHB_, maxSeverityHE_, HcalPFCut::noiseThreshold(), or, HcalSeverityLevelComputer::recoveredRecHit(), l1tEGammaCrystalsEmulatorProducer_cfi::scale, scaleToEt(), ErrorSummaryFilter_cfi::severity, and withinConeAroundCluster.

Referenced by getHcalSum().

130  {
131  const HcalDetId hid(hit.detid());
132  const int hd = hid.depth(), he = hid.ieta(), hp = hid.iphi();
133  const int h1 = hd - 1;
134  double thresholdE = 0.;
135 
136  if (include_or_exclude == -1 and (he != ieta or hp != iphi))
137  return 0.;
138 
139  if (include_or_exclude == 1 and (he == ieta and hp == iphi))
140  return 0.;
141 
142  if ((hid.subdet() == HcalBarrel and (hd < 1 or hd > int(eThresHB_.size()))) or
143  (hid.subdet() == HcalEndcap and (hd < 1 or hd > int(eThresHE_.size()))))
144  edm::LogWarning("EgammaHcalIsolation")
145  << " hit in subdet " << hid.subdet() << " has an unaccounted for depth of " << hd << "!!";
146 
147  const bool right_depth = (depth == 0 or hd == depth);
148  if (!right_depth)
149  return 0.;
150 
151  bool goodHBe = hid.subdet() == HcalBarrel and hit.energy() > eThresHB_[h1];
152  bool goodHEe = hid.subdet() == HcalEndcap and hit.energy() > eThresHE_[h1];
153 
154  if (hcalCuts != nullptr) {
155  const HcalPFCut *cutValue = hcalCuts->getValues(hid.rawId());
156  thresholdE = cutValue->noiseThreshold();
157  goodHBe = hid.subdet() == HcalBarrel and hit.energy() > thresholdE;
158  goodHEe = hid.subdet() == HcalEndcap and hit.energy() > thresholdE;
159  }
160 
161  if (!(goodHBe or goodHEe))
162  return 0.;
163 
164  const auto phit = caloGeometry_.getGeometry(hit.detid())->repPos();
165  const float phitEta = phit.eta();
166 
168  auto const dR2 = deltaR2(pcluEta, pcluPhi, phitEta, phit.phi());
171  return 0.;
172  }
173 
174  DetId did = hcalTopology_.idFront(hid);
175  const uint32_t flag = hit.flags();
176  const uint32_t dbflag = hcalChStatus_.getValues(did)->getValue();
178  bool recovered = hcalSevLvlComputer_.recoveredRecHit(did, flag);
179 
180  const double het = hit.energy() * scaleToEt(phitEta);
181  const bool goodHB = goodHBe and (severity <= maxSeverityHB_ or recovered) and het > etThresHB_[h1];
182  const bool goodHE = goodHEe and (severity <= maxSeverityHE_ or recovered) and het > etThresHE_[h1];
183 
184  if (goodHB or goodHE)
185  return hit.energy() * scale(phitEta);
186 
187  return 0.;
188 }
double scaleToEt(const double &eta)
const CaloGeometry & caloGeometry_
bool recoveredRecHit(const DetId &myid, const uint32_t &myflag) const
const HcalChannelQuality & hcalChStatus_
const Item * getValues(DetId fId, bool throwOnFail=true) const
float noiseThreshold() const
Definition: HcalPFCut.h:16
ALPAKA_FN_ACC static ALPAKA_FN_INLINE float dR2(Position4 pos1, Position4 pos2)
HcalDetId idFront(const HcalDetId &id) const
Definition: HcalTopology.h:167
The Signals That Services Can Subscribe To This is based on ActivityRegistry and is current per Services can connect to the signals distributed by the ActivityRegistry in order to monitor the activity of the application Each possible callback has some defined which we here list in angle e< void, edm::EventID const &, edm::Timestamp const & > We also list in braces which AR_WATCH_USING_METHOD_ is used for those or
Definition: Activities.doc:12
std::shared_ptr< const CaloCellGeometry > getGeometry(const DetId &id) const
Get the cell geometry of a given detector id.
Definition: CaloGeometry.cc:60
uint32_t getValue() const
Definition: DetId.h:17
int getSeverityLevel(const DetId &myid, const uint32_t &myflag, const uint32_t &mystatus) const
const HcalTopology & hcalTopology_
const HcalSeverityLevelComputer & hcalSevLvlComputer_
Log< level::Warning, false > LogWarning
constexpr int depth() const
get the tower depth
Definition: HcalDetId.h:164

Member Data Documentation

◆ caloGeometry_

const CaloGeometry& EgammaHcalIsolation::caloGeometry_
private

Definition at line 200 of file EgammaHcalIsolation.h.

Referenced by goodHitEnergy().

◆ eThresHB_

arrayHB EgammaHcalIsolation::eThresHB_
private

Definition at line 191 of file EgammaHcalIsolation.h.

Referenced by goodHitEnergy().

◆ eThresHE_

arrayHE EgammaHcalIsolation::eThresHE_
private

Definition at line 195 of file EgammaHcalIsolation.h.

Referenced by goodHitEnergy().

◆ etThresHB_

arrayHB EgammaHcalIsolation::etThresHB_
private

Definition at line 192 of file EgammaHcalIsolation.h.

Referenced by goodHitEnergy().

◆ etThresHE_

arrayHE EgammaHcalIsolation::etThresHE_
private

Definition at line 196 of file EgammaHcalIsolation.h.

Referenced by goodHitEnergy().

◆ extIncRule_

InclusionRule EgammaHcalIsolation::extIncRule_
private

Definition at line 186 of file EgammaHcalIsolation.h.

Referenced by getHcalESumBc(), getHcalEtSumBc(), and goodHitEnergy().

◆ extRadius_

double EgammaHcalIsolation::extRadius_
private

Definition at line 187 of file EgammaHcalIsolation.h.

Referenced by goodHitEnergy().

◆ hcalChStatus_

const HcalChannelQuality& EgammaHcalIsolation::hcalChStatus_
private

Definition at line 202 of file EgammaHcalIsolation.h.

Referenced by goodHitEnergy().

◆ hcalSevLvlComputer_

const HcalSeverityLevelComputer& EgammaHcalIsolation::hcalSevLvlComputer_
private

Definition at line 203 of file EgammaHcalIsolation.h.

Referenced by goodHitEnergy().

◆ hcalTopology_

const HcalTopology& EgammaHcalIsolation::hcalTopology_
private

Definition at line 201 of file EgammaHcalIsolation.h.

Referenced by goodHitEnergy().

◆ intIncRule_

InclusionRule EgammaHcalIsolation::intIncRule_
private

Definition at line 188 of file EgammaHcalIsolation.h.

Referenced by getHcalESumBc(), getHcalEtSumBc(), and goodHitEnergy().

◆ intRadius_

double EgammaHcalIsolation::intRadius_
private

Definition at line 189 of file EgammaHcalIsolation.h.

Referenced by goodHitEnergy().

◆ maxSeverityHB_

int EgammaHcalIsolation::maxSeverityHB_
private

Definition at line 193 of file EgammaHcalIsolation.h.

Referenced by goodHitEnergy().

◆ maxSeverityHE_

int EgammaHcalIsolation::maxSeverityHE_
private

Definition at line 197 of file EgammaHcalIsolation.h.

Referenced by goodHitEnergy().

◆ mhbhe_

const HBHERecHitCollection& EgammaHcalIsolation::mhbhe_
private

Definition at line 199 of file EgammaHcalIsolation.h.

Referenced by getHcalSum().

◆ towerMap_

const CaloTowerConstituentsMap& EgammaHcalIsolation::towerMap_
private

Definition at line 204 of file EgammaHcalIsolation.h.

Referenced by getHcalESumBc(), and getHcalEtSumBc().