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 
7 class TF1;
8 
9 // -*- C++ -*-
10 //
11 // Package: PFClusterTools
12 // Class: PFEnergyCalibration
13 //
29 //
30 // Original Author: Christian Veelken
31 // Created: Tue Aug 8 16:26:18 CDT 2006
32 //
33 //
34 
35 #include <iostream>
36 
37 //#include "FWCore/ParameterSet/interface/ParameterSet.h"
38 
40 {
41  public:
43 
45 
46  // ecal calibration for photons
47  double energyEm(const reco::PFCluster& clusterEcal,
48  std::vector<double> &EclustersPS1,
49  std::vector<double> &EclustersPS2,
50  bool crackCorrection = true) const;
51  double energyEm(const reco::PFCluster& clusterEcal,
52  double ePS1, double ePS2,
53  bool crackCorrection = true) const;
54 
55  double energyEm(const reco::PFCluster& clusterEcal,
56  std::vector<double> &EclustersPS1,
57  std::vector<double> &EclustersPS2,
58  double &ps1,double&ps2,
59  bool crackCorrection=true) const;
60  double energyEm(const reco::PFCluster& clusterEcal,
61  double ePS1, double ePS2,
62  double &ps1,double&ps2,
63  bool crackCorrection=true) const;
64 
65  // ECAL+HCAL (abc) calibration, with E and eta dependent coefficients, for hadrons
66  void energyEmHad(double t, double& e, double&h, double eta, double phi) const;
67 
68  // Initialize default E- and eta-dependent coefficient functional form
70 
71  // Set the run-dependent calibration functions from the global tag
73  pfCalibrations = thePFCal;
74  }
75 
76  friend std::ostream& operator<<(std::ostream& out,
77  const PFEnergyCalibration& calib);
78 
79  protected:
80 
81  // Calibration functions from global tag
83 
84  // Barrel calibration (eta 0.00 -> 1.48)
85  TF1* faBarrel;
86  TF1* fbBarrel;
87  TF1* fcBarrel;
88  TF1* faEtaBarrel;
89  TF1* fbEtaBarrel;
90 
91  // Endcap calibration (eta 1.48 -> 3.xx)
92  TF1* faEndcap;
93  TF1* fbEndcap;
94  TF1* fcEndcap;
95  TF1* faEtaEndcap;
96  TF1* fbEtaEndcap;
97 
98  private:
99 
100  double minimum(double a,double b) const;
101  double dCrackPhi(double phi, double eta) const;
102  double CorrPhi(double phi, double eta) const;
103  double CorrEta(double eta) const;
104  double CorrBarrel(double E, double eta) const;
105  double Alpha(double eta) const;
106  double Beta(double E, double eta) const;
107  double Gamma(double etaEcal) const;
108  double EcorrBarrel(double E, double eta, double phi, bool crackCorrection=true) const;
109  double EcorrZoneBeforePS(double E, double eta) const;
110  double EcorrPS(double eEcal,double ePS1,double ePS2,double etaEcal) const;
111  double EcorrPS(double eEcal,double ePS1,double ePS2,double etaEcal,double&, double&) const;
112  double EcorrPS_ePSNil(double eEcal,double eta) const;
113  double EcorrZoneAfterPS(double E, double eta) const;
114  double Ecorr(double eEcal,double ePS1,double ePS2,double eta,double phi,bool crackCorrection=true) const;
115  double Ecorr(double eEcal,double ePS1,double ePS2,double eta,double phi,double&,double&,bool crackCorrection=true) const;
116 
117  // The calibration functions
118  double aBarrel(double x) const;
119  double bBarrel(double x) const;
120  double cBarrel(double x) const;
121  double aEtaBarrel(double x) const;
122  double bEtaBarrel(double x) const;
123  double aEndcap(double x) const;
124  double bEndcap(double x) const;
125  double cEndcap(double x) const;
126  double aEtaEndcap(double x) const;
127  double bEtaEndcap(double x) const;
128 
129  // Threshold correction (offset)
130  double threshE, threshH;
131 
132 };
133 
134 #endif
135 
136 
const PerformancePayloadFromTFormula * pfCalibrations
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
double Ecorr(double eEcal, double ePS1, double ePS2, double eta, double phi, bool crackCorrection=true) const
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
The Signals That Services Can Subscribe To This is based on ActivityRegistry h
Helper function to determine trigger accepts.
Definition: Activities.doc:4
tuple out
Definition: dbtoconf.py:99
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