CMS 3D CMS Logo

 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Groups Pages
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
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
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
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_
edm::EDGetTokenT< std::unordered_map< DetId, const HGCRecHit * > > hitMap_
const TVectorD & sigmas() const
const math::XYZVector & axis() const
const float getIso(const unsigned int ring) const
edm::InputTag eeRecHitInputTag_