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 // $Id: PFEnergyCalibration.h,v 1.12 2011/02/24 14:16:30 pjanot Exp $
33 //
34 //
35 
36 #include <iostream>
37 
38 //#include "FWCore/ParameterSet/interface/ParameterSet.h"
39 
41 {
42  public:
44 
46 
47  // ecal calibration for photons
48  double energyEm(const reco::PFCluster& clusterEcal,
49  std::vector<double> &EclustersPS1,
50  std::vector<double> &EclustersPS2,
51  bool crackCorrection = true);
52 
53  double energyEm(const reco::PFCluster& clusterEcal,
54  std::vector<double> &EclustersPS1,
55  std::vector<double> &EclustersPS2,
56  double &ps1,double&ps2,
57  bool crackCorrection=true);
58 
59  // ECAL+HCAL (abc) calibration, with E and eta dependent coefficients, for hadrons
60  void energyEmHad(double t, double& e, double&h, double eta, double phi) const;
61 
62  // Initialize default E- and eta-dependent coefficient functional form
64 
65  // Set the run-dependent calibration functions from the global tag
67  pfCalibrations = thePFCal;
68  }
69 
70  friend std::ostream& operator<<(std::ostream& out,
71  const PFEnergyCalibration& calib);
72 
73  protected:
74 
75  // Calibration functions from global tag
77 
78  // Barrel calibration (eta 0.00 -> 1.48)
79  TF1* faBarrel;
80  TF1* fbBarrel;
81  TF1* fcBarrel;
82  TF1* faEtaBarrel;
83  TF1* fbEtaBarrel;
84 
85  // Endcap calibration (eta 1.48 -> 3.xx)
86  TF1* faEndcap;
87  TF1* fbEndcap;
88  TF1* fcEndcap;
89  TF1* faEtaEndcap;
90  TF1* fbEtaEndcap;
91 
92  private:
93 
94  double minimum(double a,double b);
95  double dCrackPhi(double phi, double eta);
96  double CorrPhi(double phi, double eta);
97  double CorrEta(double eta);
98  double CorrBarrel(double E, double eta);
99  double Alpha(double eta);
100  double Beta(double E, double eta);
101  double Gamma(double etaEcal);
102  double EcorrBarrel(double E, double eta, double phi, bool crackCorrection=true);
103  double EcorrZoneBeforePS(double E, double eta);
104  double EcorrPS(double eEcal,double ePS1,double ePS2,double etaEcal);
105  double EcorrPS(double eEcal,double ePS1,double ePS2,double etaEcal,double&, double&);
106  double EcorrPS_ePSNil(double eEcal,double eta);
107  double EcorrZoneAfterPS(double E, double eta);
108  double Ecorr(double eEcal,double ePS1,double ePS2,double eta,double phi,bool crackCorrection=true);
109  double Ecorr(double eEcal,double ePS1,double ePS2,double eta,double phi,double&,double&,bool crackCorrection=true);
110 
111  // The calibration functions
112  double aBarrel(double x) const;
113  double bBarrel(double x) const;
114  double cBarrel(double x) const;
115  double aEtaBarrel(double x) const;
116  double bEtaBarrel(double x) const;
117  double aEndcap(double x) const;
118  double bEndcap(double x) const;
119  double cEndcap(double x) const;
120  double aEtaEndcap(double x) const;
121  double bEtaEndcap(double x) const;
122 
123  // Threshold correction (offset)
124  double threshE, threshH;
125 
126 };
127 
128 #endif
129 
130 
double Beta(double E, double eta)
double EcorrZoneAfterPS(double E, double eta)
double Alpha(double eta)
const PerformancePayloadFromTFormula * pfCalibrations
double bBarrel(double x) const
Particle flow cluster, see clustering algorithm in PFClusterAlgo.
Definition: PFCluster.h:42
double aEndcap(double x) const
double bEndcap(double x) const
double EcorrBarrel(double E, double eta, double phi, bool crackCorrection=true)
double EcorrZoneBeforePS(double E, double eta)
double EcorrPS_ePSNil(double eEcal, double eta)
double CorrEta(double eta)
T eta() const
void energyEmHad(double t, double &e, double &h, double eta, double phi) const
double Gamma(double etaEcal)
MVATrainerComputer * calib
Definition: MVATrainer.cc:64
double CorrPhi(double phi, double eta)
double CorrBarrel(double E, double eta)
double bEtaEndcap(double x) const
friend std::ostream & operator<<(std::ostream &out, const PFEnergyCalibration &calib)
double cEndcap(double x) const
double dCrackPhi(double phi, double eta)
tuple out
Definition: dbtoconf.py:99
The Signals That Services Can Subscribe To This is based on ActivityRegistry h
Helper function to determine trigger accepts.
Definition: Activities.doc:4
double b
Definition: hdecay.h:120
double EcorrPS(double eEcal, double ePS1, double ePS2, double etaEcal)
double aEtaBarrel(double x) const
double Ecorr(double eEcal, double ePS1, double ePS2, double eta, double phi, bool crackCorrection=true)
double a
Definition: hdecay.h:121
double aEtaEndcap(double x) const
void setCalibrationFunctions(const PerformancePayloadFromTFormula *thePFCal)
double bEtaBarrel(double x) const
double minimum(double a, double b)
x
Definition: VDTMath.h:216
double aBarrel(double x) const
double cBarrel(double x) const
double energyEm(const reco::PFCluster &clusterEcal, std::vector< double > &EclustersPS1, std::vector< double > &EclustersPS2, bool crackCorrection=true)
Definition: DDAxes.h:10