test
CMS 3D CMS Logo

 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Pages
PFEnergyCalibration.h
Go to the documentation of this file.
1 #ifndef RecoParticleFlow_PFClusterTools_PFEnergyCalibration_h
2 #define RecoParticleFlow_PFClusterTools_PFEnergyCalibration_h
3 
6 
8 
9 class TF1;
10 
11 // -*- C++ -*-
12 //
13 // Package: PFClusterTools
14 // Class: PFEnergyCalibration
15 //
31 //
32 // Original Author: Christian Veelken
33 // Created: Tue Aug 8 16:26:18 CDT 2006
34 //
35 //
36 
37 #include <iostream>
38 
39 //#include "FWCore/ParameterSet/interface/ParameterSet.h"
40 
42 {
43  public:
45 
47 
48  // ecal calibration for photons
49  double energyEm(const reco::PFCluster& clusterEcal,
50  std::vector<double> &EclustersPS1,
51  std::vector<double> &EclustersPS2,
52  bool crackCorrection = true) const;
53  double energyEm(const reco::PFCluster& clusterEcal,
54  double ePS1, double ePS2,
55  bool crackCorrection = true) const;
56 
57  double energyEm(const reco::PFCluster& clusterEcal,
58  std::vector<double> &EclustersPS1,
59  std::vector<double> &EclustersPS2,
60  double &ps1,double&ps2,
61  bool crackCorrection=true) const;
62  double energyEm(const reco::PFCluster& clusterEcal,
63  double ePS1, double ePS2,
64  double &ps1,double&ps2,
65  bool crackCorrection=true) const;
66 
67  // ECAL+HCAL (abc) calibration, with E and eta dependent coefficients, for hadrons
68  void energyEmHad(double t, double& e, double&h, double eta, double phi) const;
69 
70  // Initialize default E- and eta-dependent coefficient functional form
72 
73  // Set the run-dependent calibration functions from the global tag
75  pfCalibrations = thePFCal;
76  }
77 
79  esEEInterCalib_ = esEEInterCalib;
80  }
81 
82 
83  friend std::ostream& operator<<(std::ostream& out,
84  const PFEnergyCalibration& calib);
85 
86  protected:
87 
88  // Calibration functions from global tag
91 
92  // Barrel calibration (eta 0.00 -> 1.48)
93  TF1* faBarrel;
94  TF1* fbBarrel;
95  TF1* fcBarrel;
96  TF1* faEtaBarrel;
97  TF1* fbEtaBarrel;
98 
99  // Endcap calibration (eta 1.48 -> 3.xx)
100  TF1* faEndcap;
101  TF1* fbEndcap;
102  TF1* fcEndcap;
103  TF1* faEtaEndcap;
104  TF1* fbEtaEndcap;
105 
106  private:
107 
108  double minimum(double a,double b) const;
109  double dCrackPhi(double phi, double eta) const;
110  double CorrPhi(double phi, double eta) const;
111  double CorrEta(double eta) const;
112  double CorrBarrel(double E, double eta) const;
113  double Alpha(double eta) const;
114  double Beta(double E, double eta) const;
115  double Gamma(double etaEcal) const;
116  double EcorrBarrel(double E, double eta, double phi, bool crackCorrection=true) const;
117  double EcorrZoneBeforePS(double E, double eta) const;
118  double EcorrPS(double eEcal,double ePS1,double ePS2,double etaEcal) const;
119  double EcorrPS(double eEcal,double ePS1,double ePS2,double etaEcal,double&, double&) const;
120  double EcorrPS_ePSNil(double eEcal,double eta) const;
121  double EcorrZoneAfterPS(double E, double eta) const;
122  double Ecorr(double eEcal,double ePS1,double ePS2,double eta,double phi,bool crackCorrection=true) const;
123  double Ecorr(double eEcal,double ePS1,double ePS2,double eta,double phi,double&,double&,bool crackCorrection=true) const;
124 
125  // The calibration functions
126  double aBarrel(double x) const;
127  double bBarrel(double x) const;
128  double cBarrel(double x) const;
129  double aEtaBarrel(double x) const;
130  double bEtaBarrel(double x) const;
131  double aEndcap(double x) const;
132  double bEndcap(double x) const;
133  double cEndcap(double x) const;
134  double aEtaEndcap(double x) const;
135  double bEtaEndcap(double x) const;
136 
137  // Threshold correction (offset)
138  double threshE, threshH;
139 
140 };
141 
142 #endif
143 
144 
const PerformancePayloadFromTFormula * pfCalibrations
FWCore Framework interface EventSetupRecordImplementation h
Helper function to determine trigger accepts.
double bBarrel(double x) const
Particle flow cluster, see clustering algorithm in PFClusterAlgo.
Definition: PFCluster.h:47
double aEndcap(double x) const
double bEndcap(double x) const
const ESEEIntercalibConstants * esEEInterCalib_
double Ecorr(double eEcal, double ePS1, double ePS2, double eta, double phi, bool crackCorrection=true) const
void initAlphaGamma_ESplanes_fromDB(const ESEEIntercalibConstants *esEEInterCalib)
double EcorrZoneBeforePS(double E, double eta) const
double Alpha(double eta) const
void energyEmHad(double t, double &e, double &h, double eta, double phi) const
MVATrainerComputer * calib
Definition: MVATrainer.cc:64
double bEtaEndcap(double x) const
friend std::ostream & operator<<(std::ostream &out, const PFEnergyCalibration &calib)
double cEndcap(double x) const
double Beta(double E, double eta) const
double EcorrZoneAfterPS(double E, double eta) const
double b
Definition: hdecay.h:120
double CorrBarrel(double E, double eta) const
double Gamma(double etaEcal) const
double energyEm(const reco::PFCluster &clusterEcal, std::vector< double > &EclustersPS1, std::vector< double > &EclustersPS2, bool crackCorrection=true) const
double dCrackPhi(double phi, double eta) const
double aEtaBarrel(double x) const
double a
Definition: hdecay.h:121
double aEtaEndcap(double x) const
void setCalibrationFunctions(const PerformancePayloadFromTFormula *thePFCal)
double bEtaBarrel(double x) const
double CorrEta(double eta) const
double aBarrel(double x) const
double CorrPhi(double phi, double eta) const
double EcorrPS_ePSNil(double eEcal, double eta) const
double cBarrel(double x) const
double EcorrBarrel(double E, double eta, double phi, bool crackCorrection=true) const
double EcorrPS(double eEcal, double ePS1, double ePS2, double etaEcal) const
double minimum(double a, double b) const