CMS 3D CMS Logo

ElectronHcalHelper.h
Go to the documentation of this file.
1 #ifndef ElectronHcalHelper_h
2 #define ElectronHcalHelper_h
3 
16 
17 class ConsumesCollector;
18 class EgammaHadTower;
19 class HcalTopology;
20 class HcalChannelQuality;
22 
24 public:
25  struct Configuration {
26  // common parameters
28 
29  // strategy
31 
32  // specific parameters if use towers
34  double hOverEPtMin; // min tower Et for H/E evaluation
35 
36  // specific parameters if use rechits
38  double hOverEHBMinE;
39  double hOverEHFMinE;
40  };
41 
43 
44  void beginEvent(const edm::Event &, const edm::EventSetup &);
45 
46  double hcalESum(const reco::SuperCluster &, const std::vector<CaloTowerDetId> *excludeTowers = nullptr) const;
47  double hcalESumDepth1(const reco::SuperCluster &, const std::vector<CaloTowerDetId> *excludeTowers = nullptr) const;
48  double hcalESumDepth2(const reco::SuperCluster &, const std::vector<CaloTowerDetId> *excludeTowers = nullptr) const;
49  double hOverEConeSize() const { return cfg_.hOverEConeSize; }
50 
51  // Behind clusters
52  inline auto hcalTowersBehindClusters(const reco::SuperCluster &sc) const { return egamma::towersOf(sc, *towerMap_); }
53  inline auto hcalESumDepth1BehindClusters(const std::vector<CaloTowerDetId> &towers) const {
55  }
56  inline auto hcalESumDepth2BehindClusters(const std::vector<CaloTowerDetId> &towers) const {
58  }
59 
60  // forward EgammaHadTower methods, if checkHcalStatus is enabled, using towers and H/E
61  // otherwise, return true
62  bool hasActiveHcal(const reco::SuperCluster &sc) const;
63 
64 private:
66 
71 
72  // event data (rechits strategy)
73  std::unique_ptr<EgammaHcalIsolation> hcalIso_ = nullptr;
74 
75  // event data (towers strategy)
76  std::unique_ptr<EgammaTowerIsolation> towerIso1_ = nullptr;
77  std::unique_ptr<EgammaTowerIsolation> towerIso2_ = nullptr;
80  HcalChannelQuality const *hcalQuality_ = nullptr;
81  HcalTopology const *hcalTopology_ = nullptr;
82 };
83 
84 #endif
ElectronHcalHelper::hcalTowersBehindClusters
auto hcalTowersBehindClusters(const reco::SuperCluster &sc) const
Definition: ElectronHcalHelper.h:52
HLT_FULL_cff.towers
towers
Definition: HLT_FULL_cff.py:36428
ElectronHcalHelper::caloGeometryToken_
edm::ESGetToken< CaloGeometry, CaloGeometryRecord > caloGeometryToken_
Definition: ElectronHcalHelper.h:70
ElectronHcalHelper::cfg_
const Configuration cfg_
Definition: ElectronHcalHelper.h:65
ESHandle.h
ElectronHcalHelper::hcalESumDepth1
double hcalESumDepth1(const reco::SuperCluster &, const std::vector< CaloTowerDetId > *excludeTowers=nullptr) const
Definition: ElectronHcalHelper.cc:62
reco::SuperCluster
Definition: SuperCluster.h:18
edm::EDGetTokenT
Definition: EDGetToken.h:33
HcalTopology
Definition: HcalTopology.h:26
edm::SortedCollection< CaloTower >
ElectronHcalHelper::hcalESumDepth1BehindClusters
auto hcalESumDepth1BehindClusters(const std::vector< CaloTowerDetId > &towers) const
Definition: ElectronHcalHelper.h:53
ElectronHcalHelper::towerIso2_
std::unique_ptr< EgammaTowerIsolation > towerIso2_
Definition: ElectronHcalHelper.h:77
HcalChannelQuality
Definition: HcalChannelQuality.h:17
egamma::depth2HcalESum
double depth2HcalESum(std::vector< CaloTowerDetId > const &towers, CaloTowerCollection const &)
Definition: EgammaHadTower.cc:83
EgammaHadTower.h
ElectronHcalHelper::Configuration::hOverEHFMinE
double hOverEHFMinE
Definition: ElectronHcalHelper.h:39
ElectronHcalHelper::hcalTopology_
const HcalTopology * hcalTopology_
Definition: ElectronHcalHelper.h:81
ElectronHcalHelper::hcalIso_
std::unique_ptr< EgammaHcalIsolation > hcalIso_
Definition: ElectronHcalHelper.h:73
ElectronHcalHelper::towersFromCollection_
const CaloTowerCollection * towersFromCollection_
Definition: ElectronHcalHelper.h:78
ElectronHcalHelper::hcalESumDepth2BehindClusters
auto hcalESumDepth2BehindClusters(const std::vector< CaloTowerDetId > &towers) const
Definition: ElectronHcalHelper.h:56
ElectronHcalHelper::Configuration::hcalTowers
edm::EDGetTokenT< CaloTowerCollection > hcalTowers
Definition: ElectronHcalHelper.h:33
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:86
ElectronHcalHelper::ElectronHcalHelper
ElectronHcalHelper(const Configuration &cfg, edm::ConsumesCollector &&cc)
Definition: ElectronHcalHelper.cc:9
EgammaTowerIsolation.h
ElectronHcalHelper::Configuration::hcalRecHits
edm::EDGetTokenT< HBHERecHitCollection > hcalRecHits
Definition: ElectronHcalHelper.h:37
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
ElectronHcalHelper::Configuration::hOverEHBMinE
double hOverEHBMinE
Definition: ElectronHcalHelper.h:38
Event.h
ElectronHcalHelper::beginEvent
void beginEvent(const edm::Event &, const edm::EventSetup &)
Definition: ElectronHcalHelper.cc:23
ElectronHcalHelper::hOverEConeSize
double hOverEConeSize() const
Definition: ElectronHcalHelper.h:49
edm::EventSetup
Definition: EventSetup.h:57
cc
ElectronHcalHelper::hcalTopologyToken_
edm::ESGetToken< HcalTopology, HcalRecNumberingRecord > hcalTopologyToken_
Definition: ElectronHcalHelper.h:68
ElectronHcalHelper::hcalQuality_
const HcalChannelQuality * hcalQuality_
Definition: ElectronHcalHelper.h:80
edm::ESGetToken< HcalChannelQuality, HcalChannelQualityRcd >
HcalChannelQualityRcd.h
looper.cfg
cfg
Definition: looper.py:297
CaloTowerCollection.h
SuperClusterFwd.h
ElectronHcalHelper::Configuration::hOverEPtMin
double hOverEPtMin
Definition: ElectronHcalHelper.h:34
ElectronHcalHelper::Configuration::checkHcalStatus
bool checkHcalStatus
Definition: ElectronHcalHelper.h:30
CaloGeometry.h
egamma::depth1HcalESum
double depth1HcalESum(std::vector< CaloTowerDetId > const &towers, CaloTowerCollection const &)
Definition: EgammaHadTower.cc:73
ElectronHcalHelper::hcalESum
double hcalESum(const reco::SuperCluster &, const std::vector< CaloTowerDetId > *excludeTowers=nullptr) const
Definition: ElectronHcalHelper.cc:51
ElectronHcalHelper::Configuration::useTowers
bool useTowers
Definition: ElectronHcalHelper.h:30
EventSetup.h
ElectronHcalHelper
Definition: ElectronHcalHelper.h:23
HcalRecHitCollections.h
ElectronHcalHelper::towerMap_
const CaloTowerConstituentsMap * towerMap_
Definition: ElectronHcalHelper.h:79
ElectronHcalHelper::towerIso1_
std::unique_ptr< EgammaTowerIsolation > towerIso1_
Definition: ElectronHcalHelper.h:76
edm::Event
Definition: Event.h:73
edm::ConsumesCollector
Definition: ConsumesCollector.h:45
ElectronHcalHelper::hcalESumDepth2
double hcalESumDepth2(const reco::SuperCluster &, const std::vector< CaloTowerDetId > *excludeTowers=nullptr) const
Definition: ElectronHcalHelper.cc:74
ElectronHcalHelper::towerMapToken_
edm::ESGetToken< CaloTowerConstituentsMap, CaloGeometryRecord > towerMapToken_
Definition: ElectronHcalHelper.h:69
ElectronHcalHelper::hcalChannelQualityToken_
edm::ESGetToken< HcalChannelQuality, HcalChannelQualityRcd > hcalChannelQualityToken_
Definition: ElectronHcalHelper.h:67
EgammaHcalIsolation.h