CMS 3D CMS Logo

ElectronHcalHelper.h
Go to the documentation of this file.
1 #ifndef ElectronHcalHelper_h
2 #define ElectronHcalHelper_h
3 
15 
16 class ConsumesCollector;
17 class EgammaHadTower;
18 class HcalTopology;
19 class HcalChannelQuality;
20 class HcalHcalSeverityLevelComputer;
22 
24 public:
25  struct Configuration {
26  // common parameters
28 
29  // strategy
31 
32  // specific parameters if use rechits
34 
39  };
40 
42 
43  void beginEvent(const edm::Event &evt, const edm::EventSetup &eventSetup);
44 
45  inline auto hcalTowersBehindClusters(const reco::SuperCluster &sc) const { return egamma::towersOf(sc, *towerMap_); }
46  double hcalESum(const reco::SuperCluster &, int depth) const;
47  double hOverEConeSize() const { return cfg_.hOverEConeSize; }
48  int maxSeverityHB() const { return cfg_.maxSeverityHB; }
49  int maxSeverityHE() const { return cfg_.maxSeverityHE; }
50 
51  // forward EgammaHadTower methods, if checkHcalStatus is enabled, using towers and H/E
52  bool hasActiveHcal(const reco::SuperCluster &sc) const;
53 
54  // QoL when one needs raw instances of EgammaHcalIsolation in addition to this class
55  const auto hcalTopology() const { return hcalTopology_; }
56  const auto hcalChannelQuality() const { return hcalChannelQuality_; }
57  const auto hcalSevLvlComputer() const { return hcalSevLvlComputer_; }
58  const auto towerMap() const { return towerMap_; }
59 
60 private:
62 
68 
69  // event data (rechits strategy)
70  std::unique_ptr<EgammaHcalIsolation> hcalIso_;
71  HcalTopology const *hcalTopology_ = nullptr;
75 };
76 
77 #endif
ElectronHcalHelper::Configuration::hbheRecHits
edm::EDGetTokenT< HBHERecHitCollection > hbheRecHits
Definition: ElectronHcalHelper.h:33
ElectronHcalHelper::hcalTowersBehindClusters
auto hcalTowersBehindClusters(const reco::SuperCluster &sc) const
Definition: ElectronHcalHelper.h:45
ElectronHcalHelper::caloGeometryToken_
edm::ESGetToken< CaloGeometry, CaloGeometryRecord > caloGeometryToken_
Definition: ElectronHcalHelper.h:63
ElectronHcalHelper::cfg_
const Configuration cfg_
Definition: ElectronHcalHelper.h:61
ElectronHcalHelper::hcalSevLvlComputerToken_
edm::ESGetToken< HcalSeverityLevelComputer, HcalSeverityLevelComputerRcd > hcalSevLvlComputerToken_
Definition: ElectronHcalHelper.h:66
ESHandle.h
ElectronHcalHelper::beginEvent
void beginEvent(const edm::Event &evt, const edm::EventSetup &eventSetup)
Definition: ElectronHcalHelper.cc:20
reco::SuperCluster
Definition: SuperCluster.h:18
EgammaHcalIsolation::arrayHB
std::array< double, 4 > arrayHB
Definition: EgammaHcalIsolation.h:41
CaloTowerConstituentsMap.h
edm::EDGetTokenT
Definition: EDGetToken.h:33
HcalTopology
Definition: HcalTopology.h:26
HcalChannelQuality
Definition: HcalChannelQuality.h:17
EgammaHadTower.h
ElectronHcalHelper::hcalTopology_
const HcalTopology * hcalTopology_
Definition: ElectronHcalHelper.h:71
ElectronHcalHelper::hcalIso_
std::unique_ptr< EgammaHcalIsolation > hcalIso_
Definition: ElectronHcalHelper.h:70
ElectronHcalHelper::Configuration::maxSeverityHB
int maxSeverityHB
Definition: ElectronHcalHelper.h:36
ElectronHcalHelper::Configuration::onlyBehindCluster
bool onlyBehindCluster
Definition: ElectronHcalHelper.h:30
HcalSeverityLevelComputer
Definition: HcalSeverityLevelComputer.h:24
ElectronHcalHelper::hcalSevLvlComputer_
const HcalSeverityLevelComputer * hcalSevLvlComputer_
Definition: ElectronHcalHelper.h:73
CaloTowerConstituentsMap
Definition: CaloTowerConstituentsMap.h:18
ElectronHcalHelper::Configuration::hOverEConeSize
double hOverEConeSize
Definition: ElectronHcalHelper.h:27
ElectronHcalHelper::hasActiveHcal
bool hasActiveHcal(const reco::SuperCluster &sc) const
Definition: ElectronHcalHelper.cc:67
ElectronHcalHelper::hcalChannelQuality_
const HcalChannelQuality * hcalChannelQuality_
Definition: ElectronHcalHelper.h:72
ElectronHcalHelper::ElectronHcalHelper
ElectronHcalHelper(const Configuration &cfg, edm::ConsumesCollector &&cc)
Definition: ElectronHcalHelper.cc:8
ElectronHcalHelper::hcalESum
double hcalESum(const reco::SuperCluster &, int depth) const
Definition: ElectronHcalHelper.cc:73
LEDCalibrationChannels.depth
depth
Definition: LEDCalibrationChannels.py:65
ElectronHcalHelper::Configuration
Definition: ElectronHcalHelper.h:25
CaloGeometryRecord.h
egamma::towersOf
std::vector< CaloTowerDetId > towersOf(reco::SuperCluster const &sc, CaloTowerConstituentsMap const &towerMap, HoeMode mode=HoeMode::SingleTower)
Definition: EgammaHadTower.cc:25
Event.h
ElectronHcalHelper::hcalSevLvlComputer
const auto hcalSevLvlComputer() const
Definition: ElectronHcalHelper.h:57
ElectronHcalHelper::maxSeverityHE
int maxSeverityHE() const
Definition: ElectronHcalHelper.h:49
ElectronHcalHelper::Configuration::maxSeverityHE
int maxSeverityHE
Definition: ElectronHcalHelper.h:38
ElectronHcalHelper::hOverEConeSize
double hOverEConeSize() const
Definition: ElectronHcalHelper.h:47
edm::EventSetup
Definition: EventSetup.h:58
cc
ElectronHcalHelper::hcalTopologyToken_
edm::ESGetToken< HcalTopology, HcalRecNumberingRecord > hcalTopologyToken_
Definition: ElectronHcalHelper.h:64
edm::ESGetToken< CaloGeometry, CaloGeometryRecord >
HcalChannelQualityRcd.h
looper.cfg
cfg
Definition: looper.py:296
ElectronHcalHelper::maxSeverityHB
int maxSeverityHB() const
Definition: ElectronHcalHelper.h:48
ElectronHcalHelper::hcalChannelQuality
const auto hcalChannelQuality() const
Definition: ElectronHcalHelper.h:56
SuperClusterFwd.h
ElectronHcalHelper::Configuration::eThresHB
EgammaHcalIsolation::arrayHB eThresHB
Definition: ElectronHcalHelper.h:35
ElectronHcalHelper::Configuration::checkHcalStatus
bool checkHcalStatus
Definition: ElectronHcalHelper.h:30
CaloGeometry.h
EventSetup.h
ElectronHcalHelper
Definition: ElectronHcalHelper.h:23
HcalRecHitCollections.h
ElectronHcalHelper::towerMap_
const CaloTowerConstituentsMap * towerMap_
Definition: ElectronHcalHelper.h:74
ElectronHcalHelper::towerMap
const auto towerMap() const
Definition: ElectronHcalHelper.h:58
edm::Event
Definition: Event.h:73
ElectronHcalHelper::Configuration::eThresHE
EgammaHcalIsolation::arrayHE eThresHE
Definition: ElectronHcalHelper.h:37
edm::ConsumesCollector
Definition: ConsumesCollector.h:45
EgammaHcalIsolation::arrayHE
std::array< double, 7 > arrayHE
Definition: EgammaHcalIsolation.h:42
ElectronHcalHelper::towerMapToken_
edm::ESGetToken< CaloTowerConstituentsMap, CaloGeometryRecord > towerMapToken_
Definition: ElectronHcalHelper.h:67
ElectronHcalHelper::hcalChannelQualityToken_
edm::ESGetToken< HcalChannelQuality, HcalChannelQualityRcd > hcalChannelQualityToken_
Definition: ElectronHcalHelper.h:65
EgammaHcalIsolation.h
ElectronHcalHelper::hcalTopology
const auto hcalTopology() const
Definition: ElectronHcalHelper.h:55