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 
24 
27 #include <vector>
28 #include "HGCalIsoCalculator.h"
29 
31 public:
35 
36  // Use eventInit once per event
37  void eventInit(const edm::Event& iEvent, const edm::EventSetup& iSetup);
38 
39  // Call computeHGCAL before accessing results below
40  void computeHGCAL(const reco::Photon& thePhoton, float radius);
41  void computeHGCAL(const reco::GsfElectron& theElectron, float radius);
42 
43  // PCA results
44  double sigmaUU() const { return pcaHelper_.sigmaUU(); }
45  double sigmaVV() const { return pcaHelper_.sigmaVV(); }
46  double sigmaEE() const { return pcaHelper_.sigmaEE(); }
47  double sigmaPP() const { return pcaHelper_.sigmaPP(); }
48  const TVectorD& eigenValues() const { return pcaHelper_.eigenValues(); }
49  const TVectorD& sigmas() const { return pcaHelper_.sigmas(); }
50  const math::XYZPoint& barycenter() const { return pcaHelper_.barycenter(); }
51  const math::XYZVector& axis() const { return pcaHelper_.axis(); }
52 
53  // longitudinal energy deposits and energy per subdetector as well as layers crossed
54  hgcal::LongDeps energyPerLayer(float radius, bool withHalo = true) {
55  return pcaHelper_.energyPerLayer(radius, withHalo);
56  }
57 
58  // shower depth (distance between start and shower max) from ShowerDepth tool
59  float clusterDepthCompatibility(const hgcal::LongDeps& ld, float& measDepth, float& expDepth, float& expSigma) {
60  return pcaHelper_.clusterDepthCompatibility(ld, measDepth, expDepth, expSigma);
61  }
62 
63  // projective calo isolation
64  inline float getIsolationRing(unsigned int ring) const { return isoHelper_.getIso(ring); };
65 
66  // for debugging purposes
67  void printHits(float radius) const { pcaHelper_.printHits(radius); }
68  const hgcal::EGammaPCAHelper* pcaHelper() const { return &pcaHelper_; }
69 
70 private:
74 
75  std::vector<double> dEdXWeights_;
82  bool debug_;
83 };
84 
85 #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:31
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_