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 
19 
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  // projective calo isolation
64  inline float getIsolationRing(unsigned int ring) const { return isoHelper_.getIso(ring); };
65 
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:
75 
76  std::vector<double> dEdXWeights_;
83  bool debug_;
84 };
85 
86 #endif
hgcal::LongDeps energyPerLayer(float radius, bool withHalo=true)
float clusterDepthCompatibility(const hgcal::LongDeps &ld, float &measDepth, float &expDepth, float &expSigma)
LongDeps energyPerLayer(float radius, bool withHalo=true)
const math::XYZPoint & barycenter() const
edm::EDGetTokenT< HGCRecHitCollection > recHitsBH_
const TVectorD & eigenValues() const
edm::InputTag fhRecHitInputTag_
edm::EDGetTokenT< HGCRecHitCollection > recHitsFH_
const TVectorD & eigenValues() const
hgcal::RecHitTools recHitTools_
double sigmaVV() const
const math::XYZVector & axis() const
edm::EDGetTokenT< HGCRecHitCollection > recHitsEE_
const math::XYZPoint & barycenter() const
const TVectorD & sigmas() const
double sigmaPP() const
int iEvent
Definition: GenABIO.cc:224
float getIsolationRing(unsigned int ring) const
const hgcal::EGammaPCAHelper * pcaHelper() const
edm::InputTag bhRecHitInputTag_
double sigmaUU() const
double sigmaPP() const
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:30
XYZPointD XYZPoint
point in space with cartesian internal representation
Definition: Point3D.h:12
double sigmaUU() const
void printHits(float radius) const
void computeHGCAL(const reco::Photon &thePhoton, float radius)
double sigmaEE() const
double sigmaEE() const
double sigmaVV() const
void eventInit(const edm::Event &iEvent, const edm::EventSetup &iSetup)
void printHits(float radius) const
HGCalIsoCalculator isoHelper_
const TVectorD & sigmas() const
const math::XYZVector & axis() const
const float getIso(const unsigned int ring) const
edm::InputTag eeRecHitInputTag_