File indexing completed on 2024-04-06 12:25:02
0001
0002
0003
0004
0005
0006
0007
0008 #ifndef RecoEgamma_EgammaTools_HGCalIsoCalculator_h
0009 #define RecoEgamma_EgammaTools_HGCalIsoCalculator_h
0010
0011 #include "DataFormats/HGCRecHit/interface/HGCRecHitCollections.h"
0012 #include "RecoLocalCalo/HGCalRecAlgos/interface/RecHitTools.h"
0013 #include "DataFormats/CaloRecHit/interface/CaloClusterFwd.h"
0014
0015
0016
0017
0018
0019
0020
0021
0022
0023
0024
0025
0026
0027
0028
0029
0030
0031
0032
0033
0034
0035
0036
0037
0038
0039
0040
0041
0042
0043
0044
0045
0046 class HGCalIsoCalculator {
0047 public:
0048 HGCalIsoCalculator();
0049
0050 ~HGCalIsoCalculator();
0051
0052 void setDeltaR(const float dr) { dr2_ = dr * dr; }
0053
0054 void setMinDeltaR(const float dr) { mindr2_ = dr * dr; }
0055
0056 void setRecHitTools(const hgcal::RecHitTools* recHitTools) { rechittools_ = recHitTools; }
0057
0058 void setNRings(const size_t nrings);
0059
0060 void setNLayers(unsigned int nLayers) { nlayers_ = nLayers; }
0061
0062
0063 void setRecHits(edm::Handle<HGCRecHitCollection> hitsEE,
0064 edm::Handle<HGCRecHitCollection> hitsFH,
0065 edm::Handle<HGCRecHitCollection> hitsBH);
0066
0067 void produceHGCalIso(const reco::CaloClusterPtr& seedCluster);
0068
0069 const float getIso(const unsigned int ring) const;
0070
0071 private:
0072 std::vector<float> isoringdeposits_;
0073 std::vector<unsigned int> ringasso_;
0074
0075 float dr2_, mindr2_;
0076
0077 const hgcal::RecHitTools* rechittools_;
0078 edm::Handle<HGCRecHitCollection> recHitsEE_;
0079 edm::Handle<HGCRecHitCollection> recHitsFH_;
0080 edm::Handle<HGCRecHitCollection> recHitsBH_;
0081 std::vector<std::pair<float, float>> hitEtaPhiCache_;
0082 bool debug_;
0083 unsigned int nlayers_;
0084 };
0085
0086 #endif