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.13 2012/11/14 06:53:53 slava77 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  double energyEm(const reco::PFCluster& clusterEcal,
53  double ePS1, double ePS2,
54  bool crackCorrection = true);
55 
56  double energyEm(const reco::PFCluster& clusterEcal,
57  std::vector<double> &EclustersPS1,
58  std::vector<double> &EclustersPS2,
59  double &ps1,double&ps2,
60  bool crackCorrection=true);
61  double energyEm(const reco::PFCluster& clusterEcal,
62  double ePS1, double ePS2,
63  double &ps1,double&ps2,
64  bool crackCorrection=true);
65 
66  // ECAL+HCAL (abc) calibration, with E and eta dependent coefficients, for hadrons
67  void energyEmHad(double t, double& e, double&h, double eta, double phi) const;
68 
69  // Initialize default E- and eta-dependent coefficient functional form
71 
72  // Set the run-dependent calibration functions from the global tag
74  pfCalibrations = thePFCal;
75  }
76 
77  friend std::ostream& operator<<(std::ostream& out,
78  const PFEnergyCalibration& calib);
79 
80  protected:
81 
82  // Calibration functions from global tag
84 
85  // Barrel calibration (eta 0.00 -> 1.48)
86  TF1* faBarrel;
87  TF1* fbBarrel;
88  TF1* fcBarrel;
89  TF1* faEtaBarrel;
90  TF1* fbEtaBarrel;
91 
92  // Endcap calibration (eta 1.48 -> 3.xx)
93  TF1* faEndcap;
94  TF1* fbEndcap;
95  TF1* fcEndcap;
96  TF1* faEtaEndcap;
97  TF1* fbEtaEndcap;
98 
99  private:
100 
101  double minimum(double a,double b);
102  double dCrackPhi(double phi, double eta);
103  double CorrPhi(double phi, double eta);
104  double CorrEta(double eta);
105  double CorrBarrel(double E, double eta);
106  double Alpha(double eta);
107  double Beta(double E, double eta);
108  double Gamma(double etaEcal);
109  double EcorrBarrel(double E, double eta, double phi, bool crackCorrection=true);
110  double EcorrZoneBeforePS(double E, double eta);
111  double EcorrPS(double eEcal,double ePS1,double ePS2,double etaEcal);
112  double EcorrPS(double eEcal,double ePS1,double ePS2,double etaEcal,double&, double&);
113  double EcorrPS_ePSNil(double eEcal,double eta);
114  double EcorrZoneAfterPS(double E, double eta);
115  double Ecorr(double eEcal,double ePS1,double ePS2,double eta,double phi,bool crackCorrection=true);
116  double Ecorr(double eEcal,double ePS1,double ePS2,double eta,double phi,double&,double&,bool crackCorrection=true);
117 
118  // The calibration functions
119  double aBarrel(double x) const;
120  double bBarrel(double x) const;
121  double cBarrel(double x) const;
122  double aEtaBarrel(double x) const;
123  double bEtaBarrel(double x) const;
124  double aEndcap(double x) const;
125  double bEndcap(double x) const;
126  double cEndcap(double x) const;
127  double aEtaEndcap(double x) const;
128  double bEtaEndcap(double x) const;
129 
130  // Threshold correction (offset)
131  double threshE, threshH;
132 
133 };
134 
135 #endif
136 
137 
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
Definition: DDAxes.h:10
double minimum(double a, double b)
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