CMS 3D CMS Logo

HGCalEgammaIDHelper.h
Go to the documentation of this file.
1 //--------------------------------------------------------------------------------------------------
2 //
3 // EGammaID Helper
4 //
5 // Helper Class to compute HGCal Egamma cluster ID observables
6 //
7 // Authors: F. Beaudette, A. Lobanov, N. Smith
8 //--------------------------------------------------------------------------------------------------
9 
10 #ifndef RecoEgamma_EgammaTools_HGCalEgammaIDHelper_h
11 #define RecoEgamma_EgammaTools_HGCalEgammaIDHelper_h
12 
20 
25 
28 #include <vector>
29 #include "HGCalIsoCalculator.h"
30 
32 public:
36 
37  // Use eventInit once per event
38  void eventInit(const edm::Event& iEvent, const edm::EventSetup& iSetup);
39 
40  // Call computeHGCAL before accessing results below
41  void computeHGCAL(const reco::Photon& thePhoton, float radius);
42  void computeHGCAL(const reco::GsfElectron& theElectron, float radius);
43 
44  // PCA results
45  double sigmaUU() const { return pcaHelper_.sigmaUU(); }
46  double sigmaVV() const { return pcaHelper_.sigmaVV(); }
47  double sigmaEE() const { return pcaHelper_.sigmaEE(); }
48  double sigmaPP() const { return pcaHelper_.sigmaPP(); }
49  const TVectorD& eigenValues() const { return pcaHelper_.eigenValues(); }
50  const TVectorD& sigmas() const { return pcaHelper_.sigmas(); }
51  const math::XYZPoint& barycenter() const { return pcaHelper_.barycenter(); }
52  const math::XYZVector& axis() const { return pcaHelper_.axis(); }
53 
54  // longitudinal energy deposits and energy per subdetector as well as layers crossed
55  hgcal::LongDeps energyPerLayer(float radius, bool withHalo = true) {
56  return pcaHelper_.energyPerLayer(radius, withHalo);
57  }
58 
59  // shower depth (distance between start and shower max) from ShowerDepth tool
60  float clusterDepthCompatibility(const hgcal::LongDeps& ld, float& measDepth, float& expDepth, float& expSigma) {
61  return pcaHelper_.clusterDepthCompatibility(ld, measDepth, expDepth, expSigma);
62  }
63 
64  // projective calo isolation
65  inline float getIsolationRing(unsigned int ring) const { return isoHelper_.getIso(ring); };
66 
67  // for debugging purposes
68  void printHits(float radius) const { pcaHelper_.printHits(radius); }
69  const hgcal::EGammaPCAHelper* pcaHelper() const { return &pcaHelper_; }
70 
71 private:
76 
77  std::vector<double> dEdXWeights_;
86  bool debug_;
87 };
88 
89 #endif
const TVectorD & sigmas() const
hgcal::LongDeps energyPerLayer(float radius, bool withHalo=true)
void printHits(float radius) const
const TVectorD & eigenValues() const
float clusterDepthCompatibility(const hgcal::LongDeps &ld, float &measDepth, float &expDepth, float &expSigma)
LongDeps energyPerLayer(float radius, bool withHalo=true)
double sigmaEE() const
edm::EDGetTokenT< HGCRecHitCollection > recHitsBH_
edm::InputTag fhRecHitInputTag_
edm::EDGetTokenT< HGCRecHitCollection > recHitsFH_
double sigmaVV() const
hgcal::RecHitTools recHitTools_
const math::XYZVector & axis() const
const math::XYZPoint & barycenter() const
const math::XYZPoint & barycenter() const
edm::EDGetTokenT< HGCRecHitCollection > recHitsEE_
const float getIso(const unsigned int ring) const
const TVectorD & eigenValues() const
int iEvent
Definition: GenABIO.cc:224
const TVectorD & sigmas() const
void printHits(float radius) const
const hgcal::EGammaPCAHelper * pcaHelper() const
edm::InputTag bhRecHitInputTag_
float getIsolationRing(unsigned int ring) const
double sigmaPP() const
const math::XYZVector & axis() const
edm::EDGetTokenT< std::unordered_map< DetId, const unsigned int > > hitMap_
edm::ESGetToken< CaloGeometry, CaloGeometryRecord > caloGeometry_
edm::InputTag hitMapInputTag_
std::vector< double > dEdXWeights_
hgcal::EGammaPCAHelper pcaHelper_
float clusterDepthCompatibility(const LongDeps &, float &measuredDepth, float &expectedDepth, float &expectedSigma)
XYZVectorD XYZVector
spatial vector with cartesian internal representation
Definition: Vector3D.h:31
XYZPointD XYZPoint
point in space with cartesian internal representation
Definition: Point3D.h:12
void computeHGCAL(const reco::Photon &thePhoton, float radius)
void eventInit(const edm::Event &iEvent, const edm::EventSetup &iSetup)
HGCalIsoCalculator isoHelper_
double sigmaUU() const
edm::InputTag eeRecHitInputTag_