CMS 3D CMS Logo

PFEnergyCalibration.h
Go to the documentation of this file.
1 #ifndef RecoParticleFlow_PFClusterTools_PFEnergyCalibration_h
2 #define RecoParticleFlow_PFClusterTools_PFEnergyCalibration_h
3 
6 
9 
10 #include <TF1.h>
11 
12 // -*- C++ -*-
13 //
14 // Package: PFClusterTools
15 // Class: PFEnergyCalibration
16 //
32 //
33 // Original Author: Christian Veelken
34 // Created: Tue Aug 8 16:26:18 CDT 2006
35 //
36 //
37 
38 #include <iostream>
39 
40 //#include "FWCore/ParameterSet/interface/ParameterSet.h"
41 
43 public:
45 
46  // ecal calibration for photons
47  double energyEm(const reco::PFCluster& clusterEcal, double ePS1, double ePS2, bool crackCorrection = true) const;
48 
50  double clusterEnergy = 0.;
51  double ps1Energy = 0.;
52  double ps2Energy = 0.;
53  };
54 
56  reco::PFCluster const& eeCluster,
57  std::vector<reco::PFCluster const*> const& psClusterPointers,
58  ESChannelStatus const& channelStatus,
59  bool applyCrackCorrections) const;
60 
61  // ECAL+HCAL (abc) calibration, with E and eta dependent coefficients, for hadrons
62  void energyEmHad(double t, double& e, double& h, double eta, double phi) const;
63 
64  // Set the run-dependent calibration functions from the global tag
66 
68  esEEInterCalib_ = esEEInterCalib;
69  }
70 
71  friend std::ostream& operator<<(std::ostream& out, const PFEnergyCalibration& calib);
72 
73 private:
74  // ecal calibration for photons
75  double energyEm(const reco::PFCluster& clusterEcal,
76  double ePS1,
77  double ePS2,
78  double& ps1,
79  double& ps2,
80  bool crackCorrection = true) const;
81 
82  // Calibration functions from global tag
85 
86  // Barrel calibration (eta 0.00 -> 1.48)
87  std::unique_ptr<TF1> faBarrel;
88  std::unique_ptr<TF1> fbBarrel;
89  std::unique_ptr<TF1> fcBarrel;
90  std::unique_ptr<TF1> faEtaBarrelEH;
91  std::unique_ptr<TF1> fbEtaBarrelEH;
92  std::unique_ptr<TF1> faEtaBarrelH;
93  std::unique_ptr<TF1> fbEtaBarrelH;
94 
95  // Endcap calibration (eta 1.48 -> 3.xx)
96  std::unique_ptr<TF1> faEndcap;
97  std::unique_ptr<TF1> fbEndcap;
98  std::unique_ptr<TF1> fcEndcap;
99  std::unique_ptr<TF1> faEtaEndcapEH;
100  std::unique_ptr<TF1> fbEtaEndcapEH;
101  std::unique_ptr<TF1> faEtaEndcapH;
102  std::unique_ptr<TF1> fbEtaEndcapH;
103 
104  //added by Bhumika on 2 august 2018
105  std::unique_ptr<TF1> fcEtaBarrelEH;
106  std::unique_ptr<TF1> fcEtaEndcapEH;
107  std::unique_ptr<TF1> fdEtaEndcapEH;
108  std::unique_ptr<TF1> fcEtaBarrelH;
109  std::unique_ptr<TF1> fcEtaEndcapH;
110  std::unique_ptr<TF1> fdEtaEndcapH;
111 
112  double minimum(double a, double b) const;
113  double dCrackPhi(double phi, double eta) const;
114  double CorrPhi(double phi, double eta) const;
115  double CorrEta(double eta) const;
116  double CorrBarrel(double E, double eta) const;
117  double Alpha(double eta) const;
118  double Beta(double E, double eta) const;
119  double Gamma(double etaEcal) const;
120  double EcorrBarrel(double E, double eta, double phi, bool crackCorrection = true) const;
121  double EcorrZoneBeforePS(double E, double eta) const;
122  double EcorrPS(double eEcal, double ePS1, double ePS2, double etaEcal) const;
123  double EcorrPS(double eEcal, double ePS1, double ePS2, double etaEcal, double&, double&) const;
124  double EcorrPS_ePSNil(double eEcal, double eta) const;
125  double EcorrZoneAfterPS(double E, double eta) const;
126  double Ecorr(double eEcal, double ePS1, double ePS2, double eta, double phi, bool crackCorrection = true) const;
127  double Ecorr(double eEcal,
128  double ePS1,
129  double ePS2,
130  double eta,
131  double phi,
132  double&,
133  double&,
134  bool crackCorrection = true) const;
135 
136  // The calibration functions
137  double aBarrel(double x) const;
138  double bBarrel(double x) const;
139  double cBarrel(double x) const;
140  double aEtaBarrelEH(double x) const;
141  double bEtaBarrelEH(double x) const;
142  double aEtaBarrelH(double x) const;
143  double bEtaBarrelH(double x) const;
144  double aEndcap(double x) const;
145  double bEndcap(double x) const;
146  double cEndcap(double x) const;
147  double aEtaEndcapEH(double x) const;
148  double bEtaEndcapEH(double x) const;
149  double aEtaEndcapH(double x) const;
150  double bEtaEndcapH(double x) const;
151  //added by Bhumika on 3 august 2018
152  double cEtaBarrelEH(double x) const;
153  double cEtaEndcapEH(double x) const;
154  double dEtaEndcapEH(double x) const;
155  double cEtaBarrelH(double x) const;
156  double cEtaEndcapH(double x) const;
157  double dEtaEndcapH(double x) const;
158 
159  // Threshold correction (offset)
160  const double threshE = 3.5;
161  const double threshH = 2.5;
162 };
163 
164 #endif
PerformancePayloadFromTFormula
Definition: PerformancePayloadFromTFormula.h:17
PFEnergyCalibration::fbEtaBarrelH
std::unique_ptr< TF1 > fbEtaBarrelH
Definition: PFEnergyCalibration.h:93
PFEnergyCalibration::cBarrel
double cBarrel(double x) const
Definition: PFEnergyCalibration.cc:320
PFEnergyCalibration::CalibratedEndcapPFClusterEnergies
Definition: PFEnergyCalibration.h:49
PFEnergyCalibration::aEtaBarrelH
double aEtaBarrelH(double x) const
Definition: PFEnergyCalibration.cc:353
PFEnergyCalibration::CorrBarrel
double CorrBarrel(double E, double eta) const
Definition: PFEnergyCalibration.cc:720
HLT_2018_cff.applyCrackCorrections
applyCrackCorrections
Definition: HLT_2018_cff.py:12007
PFEnergyCalibration::CalibratedEndcapPFClusterEnergies::ps2Energy
double ps2Energy
Definition: PFEnergyCalibration.h:52
PFEnergyCalibration::fdEtaEndcapH
std::unique_ptr< TF1 > fdEtaEndcapH
Definition: PFEnergyCalibration.h:110
PFEnergyCalibration::aBarrel
double aBarrel(double x) const
Definition: PFEnergyCalibration.cc:298
PFEnergyCalibration::EcorrZoneBeforePS
double EcorrZoneBeforePS(double E, double eta) const
Definition: PFEnergyCalibration.cc:830
PFEnergyCalibration::fbEtaEndcapH
std::unique_ptr< TF1 > fbEtaEndcapH
Definition: PFEnergyCalibration.h:102
PFEnergyCalibration::Alpha
double Alpha(double eta) const
Definition: PFEnergyCalibration.cc:763
PFEnergyCalibration::fcEtaBarrelEH
std::unique_ptr< TF1 > fcEtaBarrelEH
Definition: PFEnergyCalibration.h:105
PFEnergyCalibration::energyEmHad
void energyEmHad(double t, double &e, double &h, double eta, double phi) const
Definition: PFEnergyCalibration.cc:195
PFEnergyCalibration::CorrPhi
double CorrPhi(double phi, double eta) const
Definition: PFEnergyCalibration.cc:680
PFEnergyCalibration::PFEnergyCalibration
PFEnergyCalibration()
Definition: PFEnergyCalibration.cc:16
PFEnergyCalibration::dEtaEndcapH
double dEtaEndcapH(double x) const
Definition: PFEnergyCalibration.cc:474
PFEnergyCalibration::EcorrPS_ePSNil
double EcorrPS_ePSNil(double eEcal, double eta) const
Definition: PFEnergyCalibration.cc:918
PFEnergyCalibration::bEtaBarrelH
double bEtaBarrelH(double x) const
Definition: PFEnergyCalibration.cc:364
DDAxes::x
PFEnergyCalibration::bEtaEndcapH
double bEtaEndcapH(double x) const
Definition: PFEnergyCalibration.cc:441
PFEnergyCalibration::cEtaBarrelH
double cEtaBarrelH(double x) const
Definition: PFEnergyCalibration.cc:453
PFEnergyCalibration::operator<<
friend std::ostream & operator<<(std::ostream &out, const PFEnergyCalibration &calib)
Definition: PFEnergyCalibration.cc:534
PFEnergyCalibration::Beta
double Beta(double E, double eta) const
Definition: PFEnergyCalibration.cc:779
PFEnergyCalibration::threshE
const double threshE
Definition: PFEnergyCalibration.h:160
PFEnergyCalibration::EcorrPS
double EcorrPS(double eEcal, double ePS1, double ePS2, double etaEcal) const
Definition: PFEnergyCalibration.cc:853
PFEnergyCalibration::fbBarrel
std::unique_ptr< TF1 > fbBarrel
Definition: PFEnergyCalibration.h:88
PFEnergyCalibration::fcBarrel
std::unique_ptr< TF1 > fcBarrel
Definition: PFEnergyCalibration.h:89
PFEnergyCalibration::cEtaEndcapEH
double cEtaEndcapEH(double x) const
Definition: PFEnergyCalibration.cc:496
PFEnergyCalibration::aEtaEndcapEH
double aEtaEndcapEH(double x) const
Definition: PFEnergyCalibration.cc:408
PFEnergyCalibration::faBarrel
std::unique_ptr< TF1 > faBarrel
Definition: PFEnergyCalibration.h:87
PFEnergyCalibration::minimum
double minimum(double a, double b) const
Definition: PFEnergyCalibration.cc:616
PFEnergyCalibration
Definition: PFEnergyCalibration.h:42
PVValHelper::eta
Definition: PVValidationHelpers.h:69
PFCluster.h
PFEnergyCalibration::fbEndcap
std::unique_ptr< TF1 > fbEndcap
Definition: PFEnergyCalibration.h:97
h
PFEnergyCalibration::esEEInterCalib_
const ESEEIntercalibConstants * esEEInterCalib_
Definition: PFEnergyCalibration.h:84
PFEnergyCalibration::bEndcap
double bEndcap(double x) const
Definition: PFEnergyCalibration.cc:386
OrderedSet.t
t
Definition: OrderedSet.py:90
b
double b
Definition: hdecay.h:118
PFEnergyCalibration::energyEm
double energyEm(const reco::PFCluster &clusterEcal, double ePS1, double ePS2, bool crackCorrection=true) const
Definition: PFEnergyCalibration.cc:518
PFEnergyCalibration::fdEtaEndcapEH
std::unique_ptr< TF1 > fdEtaEndcapEH
Definition: PFEnergyCalibration.h:107
PFEnergyCalibration::initAlphaGamma_ESplanes_fromDB
void initAlphaGamma_ESplanes_fromDB(const ESEEIntercalibConstants *esEEInterCalib)
Definition: PFEnergyCalibration.h:67
PFEnergyCalibration::fbEtaEndcapEH
std::unique_ptr< TF1 > fbEtaEndcapEH
Definition: PFEnergyCalibration.h:100
PFEnergyCalibration::cEtaEndcapH
double cEtaEndcapH(double x) const
Definition: PFEnergyCalibration.cc:463
calib
Definition: CalibElectron.h:12
PFEnergyCalibration::Gamma
double Gamma(double etaEcal) const
Definition: PFEnergyCalibration.cc:797
PFEnergyCalibration::fbEtaBarrelEH
std::unique_ptr< TF1 > fbEtaBarrelEH
Definition: PFEnergyCalibration.h:91
PFEnergyCalibration::threshH
const double threshH
Definition: PFEnergyCalibration.h:161
a
double a
Definition: hdecay.h:119
PFEnergyCalibration::faEtaEndcapH
std::unique_ptr< TF1 > faEtaEndcapH
Definition: PFEnergyCalibration.h:101
PFEnergyCalibration::fcEndcap
std::unique_ptr< TF1 > fcEndcap
Definition: PFEnergyCalibration.h:98
PFEnergyCalibration::aEndcap
double aEndcap(double x) const
Definition: PFEnergyCalibration.cc:375
PFEnergyCalibration::Ecorr
double Ecorr(double eEcal, double ePS1, double ePS2, double eta, double phi, bool crackCorrection=true) const
Definition: PFEnergyCalibration.cc:967
ESChannelStatus.h
PFEnergyCalibration::setCalibrationFunctions
void setCalibrationFunctions(const PerformancePayloadFromTFormula *thePFCal)
Definition: PFEnergyCalibration.h:65
PFEnergyCalibration::fcEtaEndcapEH
std::unique_ptr< TF1 > fcEtaEndcapEH
Definition: PFEnergyCalibration.h:106
PFEnergyCalibration::pfCalibrations
const PerformancePayloadFromTFormula * pfCalibrations
Definition: PFEnergyCalibration.h:83
PFEnergyCalibration::cEtaBarrelEH
double cEtaBarrelEH(double x) const
Definition: PFEnergyCalibration.cc:485
PFEnergyCalibration::faEtaBarrelH
std::unique_ptr< TF1 > faEtaBarrelH
Definition: PFEnergyCalibration.h:92
ESEEIntercalibConstants.h
ESCondObjectContainer
Definition: ESCondObjectContainer.h:11
PFEnergyCalibration::EcorrZoneAfterPS
double EcorrZoneAfterPS(double E, double eta) const
Definition: PFEnergyCalibration.cc:938
PerformancePayloadFromTFormula.h
PFEnergyCalibration::EcorrBarrel
double EcorrBarrel(double E, double eta, double phi, bool crackCorrection=true) const
Definition: PFEnergyCalibration.cc:821
PFEnergyCalibration::faEtaBarrelEH
std::unique_ptr< TF1 > faEtaBarrelEH
Definition: PFEnergyCalibration.h:90
DDAxes::phi
PFEnergyCalibration::bEtaBarrelEH
double bEtaBarrelEH(double x) const
Definition: PFEnergyCalibration.cc:342
PFEnergyCalibration::dEtaEndcapEH
double dEtaEndcapEH(double x) const
Definition: PFEnergyCalibration.cc:507
PFEnergyCalibration::aEtaBarrelEH
double aEtaBarrelEH(double x) const
Definition: PFEnergyCalibration.cc:331
PFEnergyCalibration::cEndcap
double cEndcap(double x) const
Definition: PFEnergyCalibration.cc:397
PFEnergyCalibration::CorrEta
double CorrEta(double eta) const
Definition: PFEnergyCalibration.cc:703
PFEnergyCalibration::faEtaEndcapEH
std::unique_ptr< TF1 > faEtaEndcapEH
Definition: PFEnergyCalibration.h:99
reco::PFCluster
Particle flow cluster, see clustering algorithm in PFClusterAlgo.
Definition: PFCluster.h:46
PFEnergyCalibration::aEtaEndcapH
double aEtaEndcapH(double x) const
Definition: PFEnergyCalibration.cc:430
PFEnergyCalibration::CalibratedEndcapPFClusterEnergies::clusterEnergy
double clusterEnergy
Definition: PFEnergyCalibration.h:50
PFEnergyCalibration::bBarrel
double bBarrel(double x) const
Definition: PFEnergyCalibration.cc:309
PFEnergyCalibration::fcEtaEndcapH
std::unique_ptr< TF1 > fcEtaEndcapH
Definition: PFEnergyCalibration.h:109
MillePedeFileConverter_cfg.out
out
Definition: MillePedeFileConverter_cfg.py:31
ESEEIntercalibConstants
Definition: ESEEIntercalibConstants.h:7
PFEnergyCalibration::calibrateEndcapClusterEnergies
CalibratedEndcapPFClusterEnergies calibrateEndcapClusterEnergies(reco::PFCluster const &eeCluster, std::vector< reco::PFCluster const * > const &psClusterPointers, ESChannelStatus const &channelStatus, bool applyCrackCorrections) const
Definition: PFEnergyCalibration.cc:154
PFEnergyCalibration::faEndcap
std::unique_ptr< TF1 > faEndcap
Definition: PFEnergyCalibration.h:96
PFEnergyCalibration::bEtaEndcapEH
double bEtaEndcapEH(double x) const
Definition: PFEnergyCalibration.cc:419
PFEnergyCalibration::dCrackPhi
double dCrackPhi(double phi, double eta) const
Definition: PFEnergyCalibration.cc:640
PFEnergyCalibration::fcEtaBarrelH
std::unique_ptr< TF1 > fcEtaBarrelH
Definition: PFEnergyCalibration.h:108
PFEnergyCalibration::CalibratedEndcapPFClusterEnergies::ps1Energy
double ps1Energy
Definition: PFEnergyCalibration.h:51
MillePedeFileConverter_cfg.e
e
Definition: MillePedeFileConverter_cfg.py:37