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
HGCalEgammaIDHelper::pcaHelper
const hgcal::EGammaPCAHelper * pcaHelper() const
Definition: HGCalEgammaIDHelper.h:68
hgcal::EGammaPCAHelper::clusterDepthCompatibility
float clusterDepthCompatibility(const LongDeps &, float &measuredDepth, float &expectedDepth, float &expectedSigma)
Definition: EgammaPCAHelper.cc:333
hgcal::RecHitTools
Definition: RecHitTools.h:21
HGCalEgammaIDHelper::computeHGCAL
void computeHGCAL(const reco::Photon &thePhoton, float radius)
Definition: HGCalEgammaIDHelper.cc:36
HGCalEgammaIDHelper
Definition: HGCalEgammaIDHelper.h:30
HGCalEgammaIDHelper::eventInit
void eventInit(const edm::Event &iEvent, const edm::EventSetup &iSetup)
Definition: HGCalEgammaIDHelper.cc:21
ESHandle.h
hgcal::EGammaPCAHelper::sigmas
const TVectorD & sigmas() const
Definition: EgammaPCAHelper.h:73
HGCalEgammaIDHelper::axis
const math::XYZVector & axis() const
Definition: HGCalEgammaIDHelper.h:51
edm::EDGetTokenT
Definition: EDGetToken.h:33
HGCalEgammaIDHelper::isoHelper_
HGCalIsoCalculator isoHelper_
Definition: HGCalEgammaIDHelper.h:77
HGCalIsoCalculator::getIso
const float getIso(const unsigned int ring) const
Definition: HGCalIsoCalculator.cc:114
HGCalEgammaIDHelper::printHits
void printHits(float radius) const
Definition: HGCalEgammaIDHelper.h:67
hgcal::EGammaPCAHelper::printHits
void printHits(float radius) const
Definition: EgammaPCAHelper.cc:307
HGCalEgammaIDHelper::recHitTools_
hgcal::RecHitTools recHitTools_
Definition: HGCalEgammaIDHelper.h:81
hgcal::EGammaPCAHelper::sigmaEE
double sigmaEE() const
Definition: EgammaPCAHelper.h:69
LongDeps.h
HGCalEgammaIDHelper::sigmaUU
double sigmaUU() const
Definition: HGCalEgammaIDHelper.h:44
hgcal::EGammaPCAHelper::eigenValues
const TVectorD & eigenValues() const
Definition: EgammaPCAHelper.h:72
HGCalEgammaIDHelper::sigmaPP
double sigmaPP() const
Definition: HGCalEgammaIDHelper.h:47
Photon.h
HGCalIsoCalculator
Definition: HGCalIsoCalculator.h:46
hgcal::EGammaPCAHelper
Definition: EgammaPCAHelper.h:33
HGCalEgammaIDHelper::clusterDepthCompatibility
float clusterDepthCompatibility(const hgcal::LongDeps &ld, float &measDepth, float &expDepth, float &expSigma)
Definition: HGCalEgammaIDHelper.h:59
HGCalEgammaIDHelper::eigenValues
const TVectorD & eigenValues() const
Definition: HGCalEgammaIDHelper.h:48
reco::GsfElectron
Definition: GsfElectron.h:35
HGCalEgammaIDHelper::HGCalEgammaIDHelper
HGCalEgammaIDHelper()
Definition: HGCalEgammaIDHelper.h:32
HGCalEgammaIDHelper::recHitsFH_
edm::EDGetTokenT< HGCRecHitCollection > recHitsFH_
Definition: HGCalEgammaIDHelper.h:79
HGCalEgammaIDHelper::fhRecHitInputTag_
edm::InputTag fhRecHitInputTag_
Definition: HGCalEgammaIDHelper.h:72
GsfElectronFwd.h
HGCRecHitCollections.h
edm::ParameterSet
Definition: ParameterSet.h:36
math::XYZPoint
XYZPointD XYZPoint
point in space with cartesian internal representation
Definition: Point3D.h:12
Event.h
HGCalEgammaIDHelper::debug_
bool debug_
Definition: HGCalEgammaIDHelper.h:82
HGCalEgammaIDHelper::dEdXWeights_
std::vector< double > dEdXWeights_
Definition: HGCalEgammaIDHelper.h:75
hgcal::LongDeps
Definition: LongDeps.h:14
hgcal::EGammaPCAHelper::axis
const math::XYZVector & axis() const
Definition: EgammaPCAHelper.h:63
HGCalEgammaIDHelper::~HGCalEgammaIDHelper
~HGCalEgammaIDHelper()
Definition: HGCalEgammaIDHelper.h:34
math::XYZVector
XYZVectorD XYZVector
spatial vector with cartesian internal representation
Definition: Vector3D.h:31
iEvent
int iEvent
Definition: GenABIO.cc:224
HGCalEgammaIDHelper::eeRecHitInputTag_
edm::InputTag eeRecHitInputTag_
Definition: HGCalEgammaIDHelper.h:71
HGCalEgammaIDHelper::sigmaVV
double sigmaVV() const
Definition: HGCalEgammaIDHelper.h:45
HGCalEgammaIDHelper::recHitsEE_
edm::EDGetTokenT< HGCRecHitCollection > recHitsEE_
Definition: HGCalEgammaIDHelper.h:78
edm::EventSetup
Definition: EventSetup.h:57
HGCalEgammaIDHelper::bhRecHitInputTag_
edm::InputTag bhRecHitInputTag_
Definition: HGCalEgammaIDHelper.h:73
hgcal::EGammaPCAHelper::sigmaPP
double sigmaPP() const
Definition: EgammaPCAHelper.h:70
hgcal::EGammaPCAHelper::sigmaUU
double sigmaUU() const
Definition: EgammaPCAHelper.h:67
InputTag.h
reco::Photon
Definition: Photon.h:21
Frameworkfwd.h
HGCalEgammaIDHelper::pcaHelper_
hgcal::EGammaPCAHelper pcaHelper_
Definition: HGCalEgammaIDHelper.h:76
HGCalEgammaIDHelper::barycenter
const math::XYZPoint & barycenter() const
Definition: HGCalEgammaIDHelper.h:50
relativeConstraints.ring
ring
Definition: relativeConstraints.py:68
CosmicsPD_Skims.radius
radius
Definition: CosmicsPD_Skims.py:135
HGCalIsoCalculator.h
hgcal::EGammaPCAHelper::sigmaVV
double sigmaVV() const
Definition: EgammaPCAHelper.h:68
hgcal::EGammaPCAHelper::energyPerLayer
LongDeps energyPerLayer(float radius, bool withHalo=true)
Definition: EgammaPCAHelper.cc:267
HGCalEgammaIDHelper::recHitsBH_
edm::EDGetTokenT< HGCRecHitCollection > recHitsBH_
Definition: HGCalEgammaIDHelper.h:80
EgammaPCAHelper.h
ConsumesCollector.h
ParameterSet.h
hgcal::EGammaPCAHelper::barycenter
const math::XYZPoint & barycenter() const
Definition: EgammaPCAHelper.h:62
edm::Event
Definition: Event.h:73
HGCalEgammaIDHelper::getIsolationRing
float getIsolationRing(unsigned int ring) const
Definition: HGCalEgammaIDHelper.h:64
HGCalEgammaIDHelper::energyPerLayer
hgcal::LongDeps energyPerLayer(float radius, bool withHalo=true)
Definition: HGCalEgammaIDHelper.h:54
edm::InputTag
Definition: InputTag.h:15
edm::ConsumesCollector
Definition: ConsumesCollector.h:39
HGCalEgammaIDHelper::sigmas
const TVectorD & sigmas() const
Definition: HGCalEgammaIDHelper.h:49
CaloCluster.h
HGCalEgammaIDHelper::sigmaEE
double sigmaEE() const
Definition: HGCalEgammaIDHelper.h:46