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
edm::ESGetToken< HcalTopology, HcalRecNumberingRecord > hcalTopologyToken_
bool hasActiveHcal(const reco::SuperCluster &sc) const
const auto towerMap() const
edm::ESGetToken< HcalSeverityLevelComputer, HcalSeverityLevelComputerRcd > hcalSevLvlComputerToken_
uint32_t cc[maxCellsPerHit]
Definition: gpuFishbone.h:49
HcalChannelQuality const * hcalChannelQuality_
const Configuration cfg_
ElectronHcalHelper(const Configuration &cfg, edm::ConsumesCollector &&cc)
edm::EDGetTokenT< HBHERecHitCollection > hbheRecHits
std::unique_ptr< EgammaHcalIsolation > hcalIso_
HcalSeverityLevelComputer const * hcalSevLvlComputer_
double hcalESum(const reco::SuperCluster &, int depth) const
void beginEvent(const edm::Event &evt, const edm::EventSetup &eventSetup)
edm::ESGetToken< CaloTowerConstituentsMap, CaloGeometryRecord > towerMapToken_
edm::ESGetToken< HcalChannelQuality, HcalChannelQualityRcd > hcalChannelQualityToken_
auto hcalTowersBehindClusters(const reco::SuperCluster &sc) const
HcalTopology const * hcalTopology_
const auto hcalTopology() const
EgammaHcalIsolation::arrayHB eThresHB
double hOverEConeSize() const
EgammaHcalIsolation::arrayHE eThresHE
const auto hcalChannelQuality() const
std::array< double, 4 > arrayHB
CaloTowerConstituentsMap const * towerMap_
edm::ESGetToken< CaloGeometry, CaloGeometryRecord > caloGeometryToken_
std::vector< CaloTowerDetId > towersOf(reco::SuperCluster const &sc, CaloTowerConstituentsMap const &towerMap, HoeMode mode=HoeMode::SingleTower)
const auto hcalSevLvlComputer() const
std::array< double, 7 > arrayHE