CMS 3D CMS Logo

List of all members | Classes | Public Member Functions | Private Member Functions | Private Attributes | Friends
PFEnergyCalibration Class Reference

#include <PFEnergyCalibration.h>

Classes

struct  CalibratedEndcapPFClusterEnergies
 

Public Member Functions

CalibratedEndcapPFClusterEnergies calibrateEndcapClusterEnergies (reco::PFCluster const &eeCluster, std::vector< reco::PFCluster const * > const &psClusterPointers, ESChannelStatus const &channelStatus, bool applyCrackCorrections) const
 
double energyEm (const reco::PFCluster &clusterEcal, double ePS1, double ePS2, bool crackCorrection=true) const
 
void energyEmHad (double t, double &e, double &h, double eta, double phi) const
 
void initAlphaGamma_ESplanes_fromDB (const ESEEIntercalibConstants *esEEInterCalib)
 
 PFEnergyCalibration ()
 
void setCalibrationFunctions (const PerformancePayloadFromTFormula *thePFCal)
 

Private Member Functions

double aBarrel (double x) const
 
double aEndcap (double x) const
 
double aEtaBarrelEH (double x) const
 
double aEtaBarrelH (double x) const
 
double aEtaEndcapEH (double x) const
 
double aEtaEndcapH (double x) const
 
double Alpha (double eta) const
 
double bBarrel (double x) const
 
double bEndcap (double x) const
 
double Beta (double E, double eta) const
 
double bEtaBarrelEH (double x) const
 
double bEtaBarrelH (double x) const
 
double bEtaEndcapEH (double x) const
 
double bEtaEndcapH (double x) const
 
double cBarrel (double x) const
 
double cEndcap (double x) const
 
double cEtaBarrelEH (double x) const
 
double cEtaBarrelH (double x) const
 
double cEtaEndcapEH (double x) const
 
double cEtaEndcapH (double x) const
 
double CorrBarrel (double E, double eta) const
 
double CorrEta (double eta) const
 
double CorrPhi (double phi, double eta) const
 
double dCrackPhi (double phi, double eta) const
 
double dEtaEndcapEH (double x) const
 
double dEtaEndcapH (double x) const
 
double Ecorr (double eEcal, double ePS1, double ePS2, double eta, double phi, bool crackCorrection=true) const
 
double Ecorr (double eEcal, double ePS1, double ePS2, double eta, double phi, double &, double &, bool crackCorrection=true) 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 EcorrPS (double eEcal, double ePS1, double ePS2, double etaEcal, double &, double &) const
 
double EcorrPS_ePSNil (double eEcal, double eta) const
 
double EcorrZoneAfterPS (double E, double eta) const
 
double EcorrZoneBeforePS (double E, double eta) const
 
double energyEm (const reco::PFCluster &clusterEcal, double ePS1, double ePS2, double &ps1, double &ps2, bool crackCorrection=true) const
 
double Gamma (double etaEcal) const
 
double minimum (double a, double b) const
 

Private Attributes

const ESEEIntercalibConstantsesEEInterCalib_ = nullptr
 
std::unique_ptr< TF1 > faBarrel
 
std::unique_ptr< TF1 > faEndcap
 
std::unique_ptr< TF1 > faEtaBarrelEH
 
std::unique_ptr< TF1 > faEtaBarrelH
 
std::unique_ptr< TF1 > faEtaEndcapEH
 
std::unique_ptr< TF1 > faEtaEndcapH
 
std::unique_ptr< TF1 > fbBarrel
 
std::unique_ptr< TF1 > fbEndcap
 
std::unique_ptr< TF1 > fbEtaBarrelEH
 
std::unique_ptr< TF1 > fbEtaBarrelH
 
std::unique_ptr< TF1 > fbEtaEndcapEH
 
std::unique_ptr< TF1 > fbEtaEndcapH
 
std::unique_ptr< TF1 > fcBarrel
 
std::unique_ptr< TF1 > fcEndcap
 
std::unique_ptr< TF1 > fcEtaBarrelEH
 
std::unique_ptr< TF1 > fcEtaBarrelH
 
std::unique_ptr< TF1 > fcEtaEndcapEH
 
std::unique_ptr< TF1 > fcEtaEndcapH
 
std::unique_ptr< TF1 > fdEtaEndcapEH
 
std::unique_ptr< TF1 > fdEtaEndcapH
 
const PerformancePayloadFromTFormulapfCalibrations = nullptr
 
const double threshE = 3.5
 
const double threshH = 2.5
 

Friends

std::ostream & operator<< (std::ostream &out, const PFEnergyCalibration &calib)
 

Detailed Description

Definition at line 42 of file PFEnergyCalibration.h.

Constructor & Destructor Documentation

◆ PFEnergyCalibration()

PFEnergyCalibration::PFEnergyCalibration ( )

Definition at line 16 of file PFEnergyCalibration.cc.

16  {
17  //calibChrisClean.C calibration parameters bhumika Nov, 2018
18  faBarrel = std::make_unique<TF1>(
19  "faBarrel", "[0]+((([1]+([2]/sqrt(x)))*exp(-(x^[6]/[3])))-([4]*exp(-(x^[7]/[5]))))", 0., 1000.);
20  faBarrel->SetParameter(0, -30.7141);
21  faBarrel->SetParameter(1, 31.7583);
22  faBarrel->SetParameter(2, 4.40594);
23  faBarrel->SetParameter(3, 1.70914);
24  faBarrel->SetParameter(4, 0.0613696);
25  faBarrel->SetParameter(5, 0.000104857);
26  faBarrel->SetParameter(6, -1.38927);
27  faBarrel->SetParameter(7, -0.743082);
28  fbBarrel = std::make_unique<TF1>(
29  "fbBarrel", "[0]+((([1]+([2]/sqrt(x)))*exp(-(x^[6]/[3])))-([4]*exp(-(x^[7]/[5]))))", 0., 1000.);
30  fbBarrel->SetParameter(0, 2.25366);
31  fbBarrel->SetParameter(1, 0.537715);
32  fbBarrel->SetParameter(2, -4.81375);
33  fbBarrel->SetParameter(3, 12.109);
34  fbBarrel->SetParameter(4, 1.80577);
35  fbBarrel->SetParameter(5, 0.187919);
36  fbBarrel->SetParameter(6, -6.26234);
37  fbBarrel->SetParameter(7, -0.607392);
38  fcBarrel = std::make_unique<TF1>(
39  "fcBarrel", "[0]+((([1]+([2]/sqrt(x)))*exp(-(x^[6]/[3])))-([4]*exp(-(x^[7]/[5]))))", 0., 1000.);
40  fcBarrel->SetParameter(0, 1.5125962);
41  fcBarrel->SetParameter(1, 0.855057);
42  fcBarrel->SetParameter(2, -6.04199);
43  fcBarrel->SetParameter(3, 2.08229);
44  fcBarrel->SetParameter(4, 0.592266);
45  fcBarrel->SetParameter(5, 0.0291232);
46  fcBarrel->SetParameter(6, 0.364802);
47  fcBarrel->SetParameter(7, -1.50142);
48  faEtaBarrelEH = std::make_unique<TF1>("faEtaBarrelEH", "[0]+[1]*exp(-x/[2])", 0., 1000.);
49  faEtaBarrelEH->SetParameter(0, 0.0185555);
50  faEtaBarrelEH->SetParameter(1, -0.0470674);
51  faEtaBarrelEH->SetParameter(2, 396.959);
52  fbEtaBarrelEH = std::make_unique<TF1>("fbEtaBarrelEH", "[0]+[1]*exp(-x/[2])", 0., 1000.);
53  fbEtaBarrelEH->SetParameter(0, 0.0396458);
54  fbEtaBarrelEH->SetParameter(1, 0.114128);
55  fbEtaBarrelEH->SetParameter(2, 251.405);
56  faEtaBarrelH = std::make_unique<TF1>("faEtaBarrelH", "[0]+[1]*x", 0., 1000.);
57  faEtaBarrelH->SetParameter(0, 0.00434994);
58  faEtaBarrelH->SetParameter(1, -5.16564e-06);
59  fbEtaBarrelH = std::make_unique<TF1>("fbEtaBarrelH", "[0]+[1]*exp(-x/[2])", 0., 1000.);
60  fbEtaBarrelH->SetParameter(0, -0.0232604);
61  fbEtaBarrelH->SetParameter(1, 0.0937525);
62  fbEtaBarrelH->SetParameter(2, 34.9935);
63 
64  faEndcap = std::make_unique<TF1>(
65  "faEndcap", "[0]+((([1]+([2]/sqrt(x)))*exp(-(x^[6]/[3])))-([4]*exp(-(x^[7]/[5]))))", 0., 1000.);
66  faEndcap->SetParameter(0, 1.17227);
67  faEndcap->SetParameter(1, 13.1489);
68  faEndcap->SetParameter(2, -29.1672);
69  faEndcap->SetParameter(3, 0.604223);
70  faEndcap->SetParameter(4, 0.0426363);
71  faEndcap->SetParameter(5, 3.30898e-15);
72  faEndcap->SetParameter(6, 0.165293);
73  faEndcap->SetParameter(7, -7.56786);
74  fbEndcap = std::make_unique<TF1>(
75  "fbEndcap", "[0]+((([1]+([2]/sqrt(x)))*exp(-(x^[6]/[3])))-([4]*exp(-(x^[7]/[5]))))", 0., 1000.);
76  fbEndcap->SetParameter(0, -0.974251);
77  fbEndcap->SetParameter(1, 1.61733);
78  fbEndcap->SetParameter(2, 0.0629183);
79  fbEndcap->SetParameter(3, 7.78495);
80  fbEndcap->SetParameter(4, -0.774289);
81  fbEndcap->SetParameter(5, 7.81399e-05);
82  fbEndcap->SetParameter(6, 0.139116);
83  fbEndcap->SetParameter(7, -4.25551);
84  fcEndcap = std::make_unique<TF1>(
85  "fcEndcap", "[0]+((([1]+([2]/sqrt(x)))*exp(-(x^[6]/[3])))-([4]*exp(-(x^[7]/[5]))))", 0., 1000.);
86  fcEndcap->SetParameter(0, 1.01863);
87  fcEndcap->SetParameter(1, 1.29787);
88  fcEndcap->SetParameter(2, -3.97293);
89  fcEndcap->SetParameter(3, 21.7805);
90  fcEndcap->SetParameter(4, 0.810195);
91  fcEndcap->SetParameter(5, 0.234134);
92  fcEndcap->SetParameter(6, 1.42226);
93  fcEndcap->SetParameter(7, -0.0997326);
94  faEtaEndcapEH = std::make_unique<TF1>("faEtaEndcapEH", "[0]+[1]*exp(-x/[2])", 0., 1000.);
95  faEtaEndcapEH->SetParameter(0, 0.0112692);
96  faEtaEndcapEH->SetParameter(1, -2.68063);
97  faEtaEndcapEH->SetParameter(2, 2.90973);
98  fbEtaEndcapEH = std::make_unique<TF1>("fbEtaEndcapEH", "[0]+[1]*exp(-x/[2])", 0., 1000.);
99  fbEtaEndcapEH->SetParameter(0, -0.0192991);
100  fbEtaEndcapEH->SetParameter(1, -0.265);
101  fbEtaEndcapEH->SetParameter(2, 80.5502);
102  faEtaEndcapH = std::make_unique<TF1>("faEtaEndcapH", "[0]+[1]*exp(-x/[2])+[3]*[3]*exp(-x*x/([4]*[4]))", 0., 1000.);
103  faEtaEndcapH->SetParameter(0, -0.0106029);
104  faEtaEndcapH->SetParameter(1, -0.692207);
105  faEtaEndcapH->SetParameter(2, 0.0542991);
106  faEtaEndcapH->SetParameter(3, -0.171435);
107  faEtaEndcapH->SetParameter(4, -61.2277);
108  fbEtaEndcapH = std::make_unique<TF1>("fbEtaEndcapH", "[0]+[1]*exp(-x/[2])+[3]*[3]*exp(-x*x/([4]*[4]))", 0., 1000.);
109  fbEtaEndcapH->SetParameter(0, 0.0214894);
110  fbEtaEndcapH->SetParameter(1, -0.266704);
111  fbEtaEndcapH->SetParameter(2, 5.2112);
112  fbEtaEndcapH->SetParameter(3, 0.303578);
113  fbEtaEndcapH->SetParameter(4, -104.367);
114 
115  //added by Bhumika on 2 august 2018
116 
117  fcEtaBarrelH = std::make_unique<TF1>("fcEtaBarrelH", "[3]*((x-[0])^[1])+[2]", 0., 1000.);
118  fcEtaBarrelH->SetParameter(0, 0);
119  fcEtaBarrelH->SetParameter(1, 2);
120  fcEtaBarrelH->SetParameter(2, 0);
121  fcEtaBarrelH->SetParameter(3, 1);
122 
123  fcEtaEndcapH = std::make_unique<TF1>("fcEtaEndcapH", "[3]*((x-[0])^[1])+[2]", 0., 1000.);
124  fcEtaEndcapH->SetParameter(0, 0);
125  fcEtaEndcapH->SetParameter(1, 0);
126  fcEtaEndcapH->SetParameter(2, 0.05);
127  fcEtaEndcapH->SetParameter(3, 0);
128 
129  fdEtaEndcapH = std::make_unique<TF1>("fdEtaEndcapH", "[3]*((x-[0])^[1])+[2]", 0., 1000.);
130  fdEtaEndcapH->SetParameter(0, 1.5);
131  fdEtaEndcapH->SetParameter(1, 4);
132  fdEtaEndcapH->SetParameter(2, -1.1);
133  fdEtaEndcapH->SetParameter(3, 1.0);
134 
135  fcEtaBarrelEH = std::make_unique<TF1>("fcEtaBarrelEH", "[3]*((x-[0])^[1])+[2]", 0., 1000.);
136  fcEtaBarrelEH->SetParameter(0, 0);
137  fcEtaBarrelEH->SetParameter(1, 2);
138  fcEtaBarrelEH->SetParameter(2, 0);
139  fcEtaBarrelEH->SetParameter(3, 1);
140 
141  fcEtaEndcapEH = std::make_unique<TF1>("fcEtaEndcapEH", "[3]*((x-[0])^[1])+[2]", 0., 1000.);
142  fcEtaEndcapEH->SetParameter(0, 0);
143  fcEtaEndcapEH->SetParameter(1, 0);
144  fcEtaEndcapEH->SetParameter(2, 0);
145  fcEtaEndcapEH->SetParameter(3, 0);
146 
147  fdEtaEndcapEH = std::make_unique<TF1>("fdEtaEndcapEH", "[3]*((x-[0])^[1])+[2]", 0., 1000.);
148  fdEtaEndcapEH->SetParameter(0, 1.5);
149  fdEtaEndcapEH->SetParameter(1, 2.0);
150  fdEtaEndcapEH->SetParameter(2, 0.6);
151  fdEtaEndcapEH->SetParameter(3, 1.0);
152 }

References MillePedeFileConverter_cfg::e.

Member Function Documentation

◆ aBarrel()

double PFEnergyCalibration::aBarrel ( double  x) const
private

Definition at line 298 of file PFEnergyCalibration.cc.

298  {
299  if (pfCalibrations) {
303 
304  } else {
305  return faBarrel->Eval(x);
306  }
307 }

References BinningVariables::JetEt, PerformanceResult::PFfa_BARREL, and point.

◆ aEndcap()

double PFEnergyCalibration::aEndcap ( double  x) const
private

Definition at line 375 of file PFEnergyCalibration.cc.

375  {
376  if (pfCalibrations) {
380 
381  } else {
382  return faEndcap->Eval(x);
383  }
384 }

References BinningVariables::JetEt, PerformanceResult::PFfa_ENDCAP, and point.

◆ aEtaBarrelEH()

double PFEnergyCalibration::aEtaBarrelEH ( double  x) const
private

Definition at line 331 of file PFEnergyCalibration.cc.

331  {
332  if (pfCalibrations) {
336 
337  } else {
338  return faEtaBarrelEH->Eval(x);
339  }
340 }

References BinningVariables::JetEt, PerformanceResult::PFfaEta_BARRELEH, and point.

◆ aEtaBarrelH()

double PFEnergyCalibration::aEtaBarrelH ( double  x) const
private

Definition at line 353 of file PFEnergyCalibration.cc.

353  {
354  if (pfCalibrations) {
358 
359  } else {
360  return faEtaBarrelH->Eval(x);
361  }
362 }

References BinningVariables::JetEt, PerformanceResult::PFfaEta_BARRELH, and point.

◆ aEtaEndcapEH()

double PFEnergyCalibration::aEtaEndcapEH ( double  x) const
private

Definition at line 408 of file PFEnergyCalibration.cc.

408  {
409  if (pfCalibrations) {
413 
414  } else {
415  return faEtaEndcapEH->Eval(x);
416  }
417 }

References BinningVariables::JetEt, PerformanceResult::PFfaEta_ENDCAPEH, and point.

◆ aEtaEndcapH()

double PFEnergyCalibration::aEtaEndcapH ( double  x) const
private

Definition at line 430 of file PFEnergyCalibration.cc.

430  {
431  if (pfCalibrations) {
435 
436  } else {
437  return faEtaEndcapH->Eval(x);
438  }
439 }

References BinningVariables::JetEt, PerformanceResult::PFfaEta_ENDCAPH, and point.

◆ Alpha()

double PFEnergyCalibration::Alpha ( double  eta) const
private

Definition at line 763 of file PFEnergyCalibration.cc.

763  {
764  //Energy dependency
765  constexpr double p0 = 5.97621e-01;
766 
767  //Eta dependency
768  constexpr double p1 = -1.86407e-01;
769  constexpr double p2 = 3.85197e-01;
770 
771  //so that <feta()> = 1
772  constexpr double norm = (p1 + p2 * (2.6 + 1.656) / 2);
773 
774  double result = p0 * (p1 + p2 * eta) / norm;
775 
776  return result;
777 }

References PVValHelper::eta, p1, p2, and mps_fire::result.

◆ bBarrel()

double PFEnergyCalibration::bBarrel ( double  x) const
private

Definition at line 309 of file PFEnergyCalibration.cc.

309  {
310  if (pfCalibrations) {
314 
315  } else {
316  return fbBarrel->Eval(x);
317  }
318 }

References BinningVariables::JetEt, PerformanceResult::PFfb_BARREL, and point.

◆ bEndcap()

double PFEnergyCalibration::bEndcap ( double  x) const
private

Definition at line 386 of file PFEnergyCalibration.cc.

386  {
387  if (pfCalibrations) {
391 
392  } else {
393  return fbEndcap->Eval(x);
394  }
395 }

References BinningVariables::JetEt, PerformanceResult::PFfb_ENDCAP, and point.

◆ Beta()

double PFEnergyCalibration::Beta ( double  E,
double  eta 
) const
private

Definition at line 779 of file PFEnergyCalibration.cc.

779  {
780  //Energy dependency
781  constexpr double p0 = 0.032;
782  constexpr double p1 = 9.70394e-02;
783  constexpr double p2 = 2.23072e+01;
784  constexpr double p3 = 100;
785 
786  //Eta dependency
787  constexpr double p4 = 1.02496e+00;
788  constexpr double p5 = -4.40176e-03;
789 
790  //so that <feta()> = 1
791  constexpr double norm = (p4 + p5 * (2.6 + 1.656) / 2);
792 
793  double result = (1.0012 + p0 * TMath::Exp(-E / p3) + p1 * TMath::Exp(-E / p2)) * (p4 + p5 * eta) / norm;
794  return result;
795 }

References PVValHelper::eta, p1, p2, p3, p4, and mps_fire::result.

◆ bEtaBarrelEH()

double PFEnergyCalibration::bEtaBarrelEH ( double  x) const
private

Definition at line 342 of file PFEnergyCalibration.cc.

342  {
343  if (pfCalibrations) {
347 
348  } else {
349  return fbEtaBarrelEH->Eval(x);
350  }
351 }

References BinningVariables::JetEt, PerformanceResult::PFfbEta_BARRELEH, and point.

◆ bEtaBarrelH()

double PFEnergyCalibration::bEtaBarrelH ( double  x) const
private

Definition at line 364 of file PFEnergyCalibration.cc.

364  {
365  if (pfCalibrations) {
369 
370  } else {
371  return fbEtaBarrelH->Eval(x);
372  }
373 }

References BinningVariables::JetEt, PerformanceResult::PFfbEta_BARRELH, and point.

◆ bEtaEndcapEH()

double PFEnergyCalibration::bEtaEndcapEH ( double  x) const
private

Definition at line 419 of file PFEnergyCalibration.cc.

419  {
420  if (pfCalibrations) {
424 
425  } else {
426  return fbEtaEndcapEH->Eval(x);
427  }
428 }

References BinningVariables::JetEt, PerformanceResult::PFfbEta_ENDCAPEH, and point.

◆ bEtaEndcapH()

double PFEnergyCalibration::bEtaEndcapH ( double  x) const
private

Definition at line 441 of file PFEnergyCalibration.cc.

441  {
442  if (pfCalibrations) {
446  } else {
447  return fbEtaEndcapH->Eval(x);
448  }
449 }

References BinningVariables::JetEt, PerformanceResult::PFfbEta_ENDCAPH, and point.

◆ calibrateEndcapClusterEnergies()

PFEnergyCalibration::CalibratedEndcapPFClusterEnergies PFEnergyCalibration::calibrateEndcapClusterEnergies ( reco::PFCluster const &  eeCluster,
std::vector< reco::PFCluster const * > const &  psClusterPointers,
ESChannelStatus const &  channelStatus,
bool  applyCrackCorrections 
) const

Definition at line 154 of file PFEnergyCalibration.cc.

158  {
159  double ps1_energy_sum = 0.;
160  double ps2_energy_sum = 0.;
161  bool condP1 = true;
162  bool condP2 = true;
163 
164  for (auto const& psclus : psClusterPointers) {
165  bool cond = true;
166  for (auto const& recH : psclus->recHitFractions()) {
167  auto strip = recH.recHitRef()->detId();
168  if (strip != ESDetId(0)) {
169  //getStatusCode() == 0 => active channel
170  // apply correction if all recHits are dead
171  if (channelStatus.getMap().find(strip)->getStatusCode() == 0) {
172  cond = false;
173  break;
174  }
175  }
176  }
177 
178  if (psclus->layer() == PFLayer::PS1) {
179  ps1_energy_sum += psclus->energy();
180  condP1 &= cond;
181  } else if (psclus->layer() == PFLayer::PS2) {
182  ps2_energy_sum += psclus->energy();
183  condP2 &= cond;
184  }
185  }
186 
187  double ePS1 = condP1 ? -1. : 0.;
188  double ePS2 = condP2 ? -1. : 0.;
189 
190  double cluscalibe = energyEm(eeCluster, ps1_energy_sum, ps2_energy_sum, ePS1, ePS2, applyCrackCorrections);
191 
192  return {cluscalibe, ePS1, ePS2};
193 }

References HLT_2018_cff::applyCrackCorrections, ESCondObjectContainer< T >::find(), ESCondObjectContainer< T >::getMap(), PFLayer::PS1, PFLayer::PS2, and digitizers_cfi::strip.

Referenced by PFEGammaAlgo::buildRefinedSuperCluster().

◆ cBarrel()

double PFEnergyCalibration::cBarrel ( double  x) const
private

Definition at line 320 of file PFEnergyCalibration.cc.

320  {
321  if (pfCalibrations) {
325 
326  } else {
327  return fcBarrel->Eval(x);
328  }
329 }

References BinningVariables::JetEt, PerformanceResult::PFfc_BARREL, and point.

◆ cEndcap()

double PFEnergyCalibration::cEndcap ( double  x) const
private

Definition at line 397 of file PFEnergyCalibration.cc.

397  {
398  if (pfCalibrations) {
402 
403  } else {
404  return fcEndcap->Eval(x);
405  }
406 }

References BinningVariables::JetEt, PerformanceResult::PFfc_ENDCAP, and point.

◆ cEtaBarrelEH()

double PFEnergyCalibration::cEtaBarrelEH ( double  x) const
private

Definition at line 485 of file PFEnergyCalibration.cc.

485  {
486  if (pfCalibrations) {
490 
491  } else {
492  return fcEtaBarrelEH->Eval(x);
493  }
494 }

References BinningVariables::JetEt, PerformanceResult::PFfcEta_BARRELEH, and point.

◆ cEtaBarrelH()

double PFEnergyCalibration::cEtaBarrelH ( double  x) const
private

Definition at line 453 of file PFEnergyCalibration.cc.

453  {
454  if (pfCalibrations) {
458 
459  } else {
460  return fcEtaBarrelH->Eval(x);
461  }
462 }

References BinningVariables::JetEt, PerformanceResult::PFfcEta_BARRELH, and point.

◆ cEtaEndcapEH()

double PFEnergyCalibration::cEtaEndcapEH ( double  x) const
private

Definition at line 496 of file PFEnergyCalibration.cc.

496  {
497  if (pfCalibrations) {
501 
502  } else {
503  return fcEtaEndcapEH->Eval(x);
504  }
505 }

References BinningVariables::JetEt, PerformanceResult::PFfcEta_ENDCAPEH, and point.

◆ cEtaEndcapH()

double PFEnergyCalibration::cEtaEndcapH ( double  x) const
private

Definition at line 463 of file PFEnergyCalibration.cc.

463  {
464  if (pfCalibrations) {
468 
469  } else {
470  return fcEtaEndcapH->Eval(x);
471  }
472 }

References BinningVariables::JetEt, PerformanceResult::PFfcEta_ENDCAPH, and point.

◆ CorrBarrel()

double PFEnergyCalibration::CorrBarrel ( double  E,
double  eta 
) const
private

Definition at line 720 of file PFEnergyCalibration.cc.

720  {
721  //Energy dependency
722  /*
723  //YM Parameters 52XX:
724  constexpr double p0=1.00000e+00;
725  constexpr double p1=3.27753e+01;
726  constexpr double p2=2.28552e-02;
727  constexpr double p3=3.06139e+00;
728  constexpr double p4=2.25135e-01;
729  constexpr double p5=1.47824e+00;
730  constexpr double p6=1.09e-02;
731  constexpr double p7=4.19343e+01;
732  */
733  constexpr double p0 = 0.9944;
734  constexpr double p1 = 9.827;
735  constexpr double p2 = 1.503;
736  constexpr double p3 = 1.196;
737  constexpr double p4 = 0.3349;
738  constexpr double p5 = 0.89;
739  constexpr double p6 = 0.004361;
740  constexpr double p7 = 51.51;
741  //Eta dependency
742  constexpr double p8 = 2.705593e-03;
743 
744  double result =
745  (p0 + 1 / (p1 + p2 * TMath::Power(E, p3)) + p4 * TMath::Exp(-E / p5) + p6 * TMath::Exp(-E * E / (p7 * p7))) *
746  (1 + p8 * eta * eta);
747 
748  return result;
749 }

References PVValHelper::eta, p1, p2, p3, p4, and mps_fire::result.

◆ CorrEta()

double PFEnergyCalibration::CorrEta ( double  eta) const
private

Definition at line 703 of file PFEnergyCalibration.cc.

703  {
704  // we use a gaussian with a screwness for each of the 5 |eta|-cracks
705  constexpr double a[] = {6.13349e-01, 5.08146e-01, 4.44480e-01, 3.3487e-01, 7.65627e-01}; // amplitude
706  constexpr double m[] = {-1.79514e-02, 4.44747e-01, 7.92824e-01, 1.14090e+00, 1.47464e+00}; // mean
707  constexpr double s[] = {7.92382e-03, 3.06028e-03, 3.36139e-03, 3.94521e-03, 8.63950e-04}; // sigma
708  constexpr double sa[] = {1.27228e+01, 3.81517e-02, 1.63507e-01, -6.56480e-02, 1.87160e-01}; // screwness amplitude
709  constexpr double ss[] = {5.48753e-02, -1.00223e-02, 2.22866e-03, 4.26288e-04, 2.67937e-03}; // screwness sigma
710  double result = 1;
711 
712  for (unsigned i = 0; i <= 4; i++)
713  result += a[i] * TMath::Gaus(eta, m[i], s[i]) *
714  (1 + sa[i] * TMath::Sign(1., eta - m[i]) * TMath::Exp(-std::abs(eta - m[i]) / ss[i]));
715 
716  return result;
717 }

References a, funct::abs(), PVValHelper::eta, mps_fire::i, visualization-live-secondInstance_cfg::m, mps_fire::result, alignCSCRings::s, Sign(), and contentValuesCheck::ss.

◆ CorrPhi()

double PFEnergyCalibration::CorrPhi ( double  phi,
double  eta 
) const
private

Definition at line 680 of file PFEnergyCalibration.cc.

680  {
681  // we use 3 gaussians to correct the phi-cracks effect
682  constexpr double p1 = 5.59379e-01;
683  constexpr double p2 = -1.26607e-03;
684  constexpr double p3 = 9.61133e-04;
685 
686  constexpr double p4 = 1.81691e-01;
687  constexpr double p5 = -4.97535e-03;
688  constexpr double p6 = 1.31006e-03;
689 
690  constexpr double p7 = 1.38498e-01;
691  constexpr double p8 = 1.18599e-04;
692  constexpr double p9 = 2.01858e-03;
693 
694  double dminphi = dCrackPhi(phi, eta);
695 
696  double result =
697  (1 + p1 * TMath::Gaus(dminphi, p2, p3) + p4 * TMath::Gaus(dminphi, p5, p6) + p7 * TMath::Gaus(dminphi, p8, p9));
698 
699  return result;
700 }

References PVValHelper::eta, p1, p2, p3, p4, and mps_fire::result.

◆ dCrackPhi()

double PFEnergyCalibration::dCrackPhi ( double  phi,
double  eta 
) const
private

Definition at line 640 of file PFEnergyCalibration.cc.

640  {
641  //Shift of this location if eta<0
642  constexpr double delta_cPhi = 0.00638;
643 
644  double m; //the result
645 
646  //the location is shifted
647  if (eta < 0)
648  phi += delta_cPhi;
649 
650  if (phi >= -pi && phi <= pi) {
651  //the problem of the extrema
652  if (phi < cPhi[17] || phi >= cPhi[0]) {
653  if (phi < 0)
654  phi += 2 * pi;
655  m = minimum(phi - cPhi[0], phi - cPhi[17] - 2 * pi);
656  }
657 
658  //between these extrema...
659  else {
660  bool OK = false;
661  unsigned i = 16;
662  while (!OK) {
663  if (phi < cPhi[i]) {
664  m = minimum(phi - cPhi[i + 1], phi - cPhi[i]);
665  OK = true;
666  } else
667  i -= 1;
668  }
669  }
670  } else {
671  m = 0.; //if there is a problem, we assum that we are in a crack
672  std::cout << "Problem in dminphi" << std::endl;
673  }
674  if (eta < 0)
675  m = -m; //because of the disymetry
676  return m;
677 }

References gather_cfg::cout, PVValHelper::eta, mps_fire::i, visualization-live-secondInstance_cfg::m, and pi.

◆ dEtaEndcapEH()

double PFEnergyCalibration::dEtaEndcapEH ( double  x) const
private

Definition at line 507 of file PFEnergyCalibration.cc.

507  {
508  if (pfCalibrations) {
512 
513  } else {
514  return fdEtaEndcapEH->Eval(x);
515  }
516 }

References BinningVariables::JetEt, PerformanceResult::PFfdEta_ENDCAPEH, and point.

◆ dEtaEndcapH()

double PFEnergyCalibration::dEtaEndcapH ( double  x) const
private

Definition at line 474 of file PFEnergyCalibration.cc.

474  {
475  if (pfCalibrations) {
479 
480  } else {
481  return fdEtaEndcapH->Eval(x);
482  }
483 }

References BinningVariables::JetEt, PerformanceResult::PFfdEta_ENDCAPH, and point.

◆ Ecorr() [1/2]

double PFEnergyCalibration::Ecorr ( double  eEcal,
double  ePS1,
double  ePS2,
double  eta,
double  phi,
bool  crackCorrection = true 
) const
private

Definition at line 967 of file PFEnergyCalibration.cc.

968  {
969  constexpr double endBarrel = 1.48;
970  constexpr double beginingPS = 1.65;
971  constexpr double endPS = 2.6;
972  constexpr double endEndCap = 2.98;
973 
974  double result = 0;
975 
976  eta = std::abs(eta);
977 
978  if (eEcal > 0) {
979  if (eta <= endBarrel)
980  result = EcorrBarrel(eEcal, eta, phi, crackCorrection);
981  else if (eta <= beginingPS)
982  result = EcorrZoneBeforePS(eEcal, eta);
983  else if ((eta < endPS) && ePS1 == 0 && ePS2 == 0)
984  result = EcorrPS_ePSNil(eEcal, eta);
985  else if (eta < endPS)
986  result = EcorrPS(eEcal, ePS1, ePS2, eta);
987  else if (eta < endEndCap)
988  result = EcorrZoneAfterPS(eEcal, eta);
989  else
990  result = eEcal;
991  } else
992  result = eEcal; // useful if eEcal=0 or eta>2.98
993  //protection
994  if (result < eEcal)
995  result = eEcal;
996  return result;
997 }

References funct::abs(), PVValHelper::eta, and mps_fire::result.

◆ Ecorr() [2/2]

double PFEnergyCalibration::Ecorr ( double  eEcal,
double  ePS1,
double  ePS2,
double  eta,
double  phi,
double &  ps1,
double &  ps2,
bool  crackCorrection = true 
) const
private

Definition at line 1001 of file PFEnergyCalibration.cc.

1008  {
1009  constexpr double endBarrel = 1.48;
1010  constexpr double beginingPS = 1.65;
1011  constexpr double endPS = 2.6;
1012  constexpr double endEndCap = 2.98;
1013 
1014  double result = 0;
1015 
1016  eta = std::abs(eta);
1017 
1018  if (eEcal > 0) {
1019  if (eta <= endBarrel)
1020  result = EcorrBarrel(eEcal, eta, phi, crackCorrection);
1021  else if (eta <= beginingPS)
1022  result = EcorrZoneBeforePS(eEcal, eta);
1023  else if ((eta < endPS) && ePS1 == 0 && ePS2 == 0)
1024  result = EcorrPS_ePSNil(eEcal, eta);
1025  else if (eta < endPS)
1026  result = EcorrPS(eEcal, ePS1, ePS2, eta, ps1, ps2);
1027  else if (eta < endEndCap)
1028  result = EcorrZoneAfterPS(eEcal, eta);
1029  else
1030  result = eEcal;
1031  } else
1032  result = eEcal; // useful if eEcal=0 or eta>2.98
1033  // protection
1034  if (result < eEcal)
1035  result = eEcal;
1036  return result;
1037 }

References funct::abs(), PVValHelper::eta, and mps_fire::result.

◆ EcorrBarrel()

double PFEnergyCalibration::EcorrBarrel ( double  E,
double  eta,
double  phi,
bool  crackCorrection = true 
) const
private

Definition at line 821 of file PFEnergyCalibration.cc.

821  {
822  // double result = E*CorrBarrel(E,eta)*CorrEta(eta)*CorrPhi(phi,eta);
823  double correction = crackCorrection ? std::max(CorrEta(eta), CorrPhi(phi, eta)) : 1.;
824  double result = E * CorrBarrel(E, eta) * correction;
825 
826  return result;
827 }

References pfMETCorrectionType0_cfi::correction, PVValHelper::eta, SiStripPI::max, and mps_fire::result.

◆ EcorrPS() [1/2]

double PFEnergyCalibration::EcorrPS ( double  eEcal,
double  ePS1,
double  ePS2,
double  etaEcal 
) const
private

Definition at line 853 of file PFEnergyCalibration.cc.

853  {
854  // gives the good weights to each subdetector
855  double E = Beta(1.0155 * eEcal + 0.025 * (ePS1 + 0.5976 * ePS2) / 9e-5, etaEcal) * eEcal +
856  Gamma(etaEcal) * (ePS1 + Alpha(etaEcal) * ePS2) / 9e-5;
857 
858  //Correction of the residual energy dependency
859  constexpr double p0 = 1.00;
860  constexpr double p1 = 2.18;
861  constexpr double p2 = 1.94;
862  constexpr double p3 = 4.13;
863  constexpr double p4 = 1.127;
864 
865  double result = E * (p0 + p1 * TMath::Exp(-E / p2) - p3 * TMath::Exp(-E / p4));
866 
867  return result;
868 }

References VtxSmearedParameters_cfi::Alpha, VtxSmearedMatchPbPBoost_cff::Beta, MillePedeFileConverter_cfg::e, p1, p2, p3, p4, and mps_fire::result.

◆ EcorrPS() [2/2]

double PFEnergyCalibration::EcorrPS ( double  eEcal,
double  ePS1,
double  ePS2,
double  etaEcal,
double &  outputPS1,
double &  outputPS2 
) const
private

Definition at line 872 of file PFEnergyCalibration.cc.

873  {
874  // gives the good weights to each subdetector
875  double gammaprime = Gamma(etaEcal) / 9e-5;
876 
877  if (outputPS1 == 0 && outputPS2 == 0 && esEEInterCalib_ != nullptr) {
878  // both ES planes working
879  // scaling factor accounting for data-mc
880  outputPS1 = gammaprime * ePS1 * esEEInterCalib_->getGammaLow0();
881  outputPS2 = gammaprime * Alpha(etaEcal) * ePS2 * esEEInterCalib_->getGammaLow3();
882  } else if (outputPS1 == 0 && outputPS2 == -1 && esEEInterCalib_ != nullptr) {
883  // ESP1 only working
884  double corrTotES = gammaprime * ePS1 * esEEInterCalib_->getGammaLow0() * esEEInterCalib_->getGammaLow1();
885  outputPS1 = gammaprime * ePS1 * esEEInterCalib_->getGammaLow0();
886  outputPS2 = corrTotES - outputPS1;
887  } else if (outputPS1 == -1 && outputPS2 == 0 && esEEInterCalib_ != nullptr) {
888  // ESP2 only working
889  double corrTotES =
890  gammaprime * Alpha(etaEcal) * ePS2 * esEEInterCalib_->getGammaLow3() * esEEInterCalib_->getGammaLow2();
891  outputPS2 = gammaprime * Alpha(etaEcal) * ePS2 * esEEInterCalib_->getGammaLow3();
892  outputPS1 = corrTotES - outputPS2;
893  } else {
894  // none working
895  outputPS1 = gammaprime * ePS1;
896  outputPS2 = gammaprime * Alpha(etaEcal) * ePS2;
897  }
898 
899  double E = Beta(1.0155 * eEcal + 0.025 * (ePS1 + 0.5976 * ePS2) / 9e-5, etaEcal) * eEcal + outputPS1 + outputPS2;
900 
901  //Correction of the residual energy dependency
902  constexpr double p0 = 1.00;
903  constexpr double p1 = 2.18;
904  constexpr double p2 = 1.94;
905  constexpr double p3 = 4.13;
906  constexpr double p4 = 1.127;
907 
908  double corrfac = (p0 + p1 * TMath::Exp(-E / p2) - p3 * TMath::Exp(-E / p4));
909  outputPS1 *= corrfac;
910  outputPS2 *= corrfac;
911  double result = E * corrfac;
912 
913  return result;
914 }

References VtxSmearedParameters_cfi::Alpha, VtxSmearedMatchPbPBoost_cff::Beta, MillePedeFileConverter_cfg::e, p1, p2, p3, p4, and mps_fire::result.

◆ EcorrPS_ePSNil()

double PFEnergyCalibration::EcorrPS_ePSNil ( double  eEcal,
double  eta 
) const
private

Definition at line 918 of file PFEnergyCalibration.cc.

918  {
919  //Energy dependency
920  constexpr double p0 = 1.02;
921  constexpr double p1 = 0.165;
922  constexpr double p2 = 6.5;
923  constexpr double p3 = 2.1;
924 
925  //Eta dependency
926  constexpr double p4 = 1.02496e+00;
927  constexpr double p5 = -4.40176e-03;
928 
929  //so that <feta()> = 1
930  constexpr double norm = (p4 + p5 * (2.6 + 1.656) / 2);
931 
932  double result = eEcal * (p0 + p1 * TMath::Exp(-std::abs(eEcal - p3) / p2)) * (p4 + p5 * eta) / norm;
933 
934  return result;
935 }

References funct::abs(), PVValHelper::eta, p1, p2, p3, p4, and mps_fire::result.

◆ EcorrZoneAfterPS()

double PFEnergyCalibration::EcorrZoneAfterPS ( double  E,
double  eta 
) const
private

Definition at line 938 of file PFEnergyCalibration.cc.

938  {
939  //Energy dependency
940  constexpr double p0 = 1;
941  constexpr double p1 = 0.058;
942  constexpr double p2 = 12.5;
943  constexpr double p3 = -1.05444e+00;
944  constexpr double p4 = -5.39557e+00;
945  constexpr double p5 = 8.38444e+00;
946  constexpr double p6 = 6.10998e-01;
947 
948  //Eta dependency
949  constexpr double p7 = 1.06161e+00;
950  constexpr double p8 = 0.41;
951  constexpr double p9 = 2.918;
952  constexpr double p10 = 0.0181;
953  constexpr double p11 = 2.05;
954  constexpr double p12 = 2.99;
955  constexpr double p13 = 0.0287;
956 
957  //so that <feta()> = 1
958  constexpr double norm = 1.045;
959 
960  double result = E * (p0 + p1 * TMath::Exp(-(E - p3) / p2) + 1 / (p4 + p5 * TMath::Power(E, p6))) *
961  (p7 + p8 * TMath::Gaus(eta, p9, p10) + p11 * TMath::Gaus(eta, p12, p13)) / norm;
962  return result;
963 }

References PVValHelper::eta, p1, p2, p3, p4, and mps_fire::result.

◆ EcorrZoneBeforePS()

double PFEnergyCalibration::EcorrZoneBeforePS ( double  E,
double  eta 
) const
private

Definition at line 830 of file PFEnergyCalibration.cc.

830  {
831  //Energy dependency
832  constexpr double p0 = 1;
833  constexpr double p1 = 0.18;
834  constexpr double p2 = 8.;
835 
836  //Eta dependency
837  constexpr double p3 = 0.3;
838  constexpr double p4 = 1.11;
839  constexpr double p5 = 0.025;
840  constexpr double p6 = 1.49;
841  constexpr double p7 = 0.6;
842 
843  //so that <feta()> = 1
844  constexpr double norm = 1.21;
845 
846  double result = E * (p0 + p1 * TMath::Exp(-E / p2)) * (p3 + p4 * TMath::Gaus(eta, p6, p5) + p7 * eta) / norm;
847 
848  return result;
849 }

References PVValHelper::eta, p1, p2, p3, p4, and mps_fire::result.

◆ energyEm() [1/2]

double PFEnergyCalibration::energyEm ( const reco::PFCluster clusterEcal,
double  ePS1,
double  ePS2,
bool  crackCorrection = true 
) const

Definition at line 518 of file PFEnergyCalibration.cc.

521  {
522  return Ecorr(clusterEcal.energy(), ePS1, ePS2, clusterEcal.eta(), clusterEcal.phi(), crackCorrection);
523 }

References reco::PFCluster::energy(), reco::CaloCluster::eta(), and reco::CaloCluster::phi().

◆ energyEm() [2/2]

double PFEnergyCalibration::energyEm ( const reco::PFCluster clusterEcal,
double  ePS1,
double  ePS2,
double &  ps1,
double &  ps2,
bool  crackCorrection = true 
) const
private

Definition at line 525 of file PFEnergyCalibration.cc.

530  {
531  return Ecorr(clusterEcal.energy(), ePS1, ePS2, clusterEcal.eta(), clusterEcal.phi(), ps1, ps2, crackCorrection);
532 }

References reco::PFCluster::energy(), reco::CaloCluster::eta(), and reco::CaloCluster::phi().

◆ energyEmHad()

void PFEnergyCalibration::energyEmHad ( double  t,
double &  e,
double &  h,
double  eta,
double  phi 
) const

Definition at line 195 of file PFEnergyCalibration.cc.

195  {
196  // Use calorimetric energy as true energy for neutral particles
197  const double tt = t;
198  const double ee = e;
199  const double hh = h;
200  double etaCorrE = 1.;
201  double etaCorrH = 1.;
202  auto absEta = std::abs(eta);
203  t = min(999.9, max(tt, e + h));
204  if (t < 1.)
205  return;
206 
207  // Barrel calibration
208  if (absEta < 1.48) {
209  // The energy correction
210  double a = e > 0. ? aBarrel(t) : 1.;
211  double b = e > 0. ? bBarrel(t) : cBarrel(t);
212  double thresh = e > 0. ? threshE : threshH;
213 
214  // Protection against negative calibration
215  if (a < -0.25 || b < -0.25) {
216  a = 1.;
217  b = 1.;
218  thresh = 0.;
219  }
220 
221  // The new estimate of the true energy
222  t = min(999.9, max(tt, thresh + a * e + b * h));
223 
224  // The angular correction
225  if (e > 0. && thresh > 0.) {
226  etaCorrE = 1.0 + aEtaBarrelEH(t) + 1.3 * bEtaBarrelEH(t) * cEtaBarrelEH(absEta);
227  etaCorrH = 1.0;
228  } else {
229  etaCorrE = 1.0 + aEtaBarrelH(t) + 1.3 * bEtaBarrelH(t) * cEtaBarrelH(absEta);
230  etaCorrH = 1.0 + aEtaBarrelH(t) + bEtaBarrelH(t) * cEtaBarrelH(absEta);
231  }
232  if (e > 0. && thresh > 0.)
233  e = h > 0. ? threshE - threshH + etaCorrE * a * e : threshE + etaCorrE * a * e;
234  if (h > 0. && thresh > 0.) {
235  h = threshH + etaCorrH * b * h;
236  }
237 
238  // Endcap calibration
239  } else {
240  // The energy correction
241  double a = e > 0. ? aEndcap(t) : 1.;
242  double b = e > 0. ? bEndcap(t) : cEndcap(t);
243  double thresh = e > 0. ? threshE : threshH;
244 
245  // Protection against negative calibration
246  if (a < -0.25 || b < -0.25) {
247  a = 1.;
248  b = 1.;
249  thresh = 0.;
250  }
251 
252  // The new estimate of the true energy
253  t = min(999.9, max(tt, thresh + a * e + b * h));
254 
255  // The angular correction
256  const double dEta = std::abs(absEta - 1.5);
257  const double etaPow = dEta * dEta * dEta * dEta;
258 
259  if (e > 0. && thresh > 0.) {
260  if (absEta < 2.5) {
261  etaCorrE = 1. + aEtaEndcapEH(t) + bEtaEndcapEH(t) * cEtaEndcapEH(absEta);
262  } else {
263  etaCorrE = 1. + aEtaEndcapEH(t) + 1.3 * bEtaEndcapEH(t) * dEtaEndcapEH(absEta);
264  }
265 
266  etaCorrH = 1. + aEtaEndcapEH(t) + bEtaEndcapEH(t) * (0.04 + etaPow);
267  } else {
268  etaCorrE = 1.;
269  if (absEta < 2.5) {
270  etaCorrH = 1. + aEtaEndcapH(t) + bEtaEndcapH(t) * cEtaEndcapH(absEta);
271  } else {
272  etaCorrH = 1. + aEtaEndcapH(t) + bEtaEndcapH(t) * dEtaEndcapH(absEta);
273  }
274  }
275 
276  //t = min(999.9,max(tt, thresh + etaCorrE*a*e + etaCorrH*b*h));
277 
278  if (e > 0. && thresh > 0.)
279  e = h > 0. ? threshE - threshH + etaCorrE * a * e : threshE + etaCorrE * a * e;
280  if (h > 0. && thresh > 0.) {
281  h = threshH + etaCorrH * b * h;
282  }
283  }
284 
285  // Protection
286  if (e < 0. || h < 0.) {
287  // Some protection against crazy calibration
288  if (e < 0.)
289  e = ee;
290  if (h < 0.)
291  h = hh;
292  }
293 
294  // And that's it !
295 }

References a, funct::abs(), b, HLT_2018_cff::dEta, MillePedeFileConverter_cfg::e, PVValHelper::eta, h, SiStripPI::max, min(), OrderedSet::t, GOODCOLL_filter_cfg::thresh, and groupFilesInBlocks::tt.

Referenced by PFAlgo::createCandidatesHCAL(), PFAlgo::createCandidatesHCALUnlinked(), and PFAlgo::recoTracksNotHCAL().

◆ Gamma()

double PFEnergyCalibration::Gamma ( double  etaEcal) const
private

Definition at line 797 of file PFEnergyCalibration.cc.

797  {
798  //Energy dependency
799  constexpr double p0 = 2.49752e-02;
800 
801  //Eta dependency
802  constexpr double p1 = 6.48816e-02;
803  constexpr double p2 = -1.59517e-02;
804 
805  //so that <feta()> = 1
806  constexpr double norm = (p1 + p2 * (2.6 + 1.656) / 2);
807 
808  double result = p0 * (p1 + p2 * etaEcal) / norm;
809 
810  return result;
811 }

References p1, p2, and mps_fire::result.

◆ initAlphaGamma_ESplanes_fromDB()

void PFEnergyCalibration::initAlphaGamma_ESplanes_fromDB ( const ESEEIntercalibConstants esEEInterCalib)
inline

Definition at line 67 of file PFEnergyCalibration.h.

67  {
68  esEEInterCalib_ = esEEInterCalib;
69  }

References esEEInterCalib_.

Referenced by PFEGammaAlgo::PFEGammaAlgo().

◆ minimum()

double PFEnergyCalibration::minimum ( double  a,
double  b 
) const
private

Definition at line 616 of file PFEnergyCalibration.cc.

616  {
617  if (std::abs(b) < std::abs(a))
618  a = b;
619  return a;
620 }

References a, funct::abs(), and b.

◆ setCalibrationFunctions()

void PFEnergyCalibration::setCalibrationFunctions ( const PerformancePayloadFromTFormula thePFCal)
inline

Definition at line 65 of file PFEnergyCalibration.h.

65 { pfCalibrations = thePFCal; }

References pfCalibrations.

Referenced by PFProducer::beginRun().

Friends And Related Function Documentation

◆ operator<<

std::ostream& operator<< ( std::ostream &  out,
const PFEnergyCalibration calib 
)
friend

Definition at line 534 of file PFEnergyCalibration.cc.

534  {
535  if (!out)
536  return out;
537 
538  out << "PFEnergyCalibration -- " << endl;
539 
540  if (calib.pfCalibrations) {
541  static const std::map<std::string, PerformanceResult::ResultType> functType = {
542  {"PFfa_BARREL", PerformanceResult::PFfa_BARREL},
543  {"PFfa_ENDCAP", PerformanceResult::PFfa_ENDCAP},
544  {"PFfb_BARREL", PerformanceResult::PFfb_BARREL},
545  {"PFfb_ENDCAP", PerformanceResult::PFfb_ENDCAP},
546  {"PFfc_BARREL", PerformanceResult::PFfc_BARREL},
547  {"PFfc_ENDCAP", PerformanceResult::PFfc_ENDCAP},
548  {"PFfaEta_BARRELH", PerformanceResult::PFfaEta_BARRELH},
549  {"PFfaEta_ENDCAPH", PerformanceResult::PFfaEta_ENDCAPH},
550  {"PFfbEta_BARRELH", PerformanceResult::PFfbEta_BARRELH},
551  {"PFfbEta_ENDCAPH", PerformanceResult::PFfbEta_ENDCAPH},
552  {"PFfaEta_BARRELEH", PerformanceResult::PFfaEta_BARRELEH},
553  {"PFfaEta_ENDCAPEH", PerformanceResult::PFfaEta_ENDCAPEH},
554  {"PFfbEta_BARRELEH", PerformanceResult::PFfbEta_BARRELEH},
555  {"PFfbEta_ENDCAPEH", PerformanceResult::PFfbEta_ENDCAPEH},
556  {"PFfcEta_BARRELH", PerformanceResult::PFfcEta_BARRELH},
557  {"PFfcEta_ENDCAPH", PerformanceResult::PFfcEta_ENDCAPH},
558  {"PFfdEta_ENDCAPH", PerformanceResult::PFfdEta_ENDCAPH},
559  {"PFfcEta_BARRELEH", PerformanceResult::PFfcEta_BARRELEH},
560  {"PFfcEta_ENDCAPEH", PerformanceResult::PFfcEta_ENDCAPEH},
561  {"PFfdEta_ENDCAPEH", PerformanceResult::PFfdEta_ENDCAPEH}
562 
563  };
564 
565  for (std::map<std::string, PerformanceResult::ResultType>::const_iterator func = functType.begin();
566  func != functType.end();
567  ++func) {
568  cout << "Function: " << func->first << endl;
569  PerformanceResult::ResultType fType = func->second;
570  calib.pfCalibrations->printFormula(fType);
571  }
572 
573  } else {
574  std::cout << "Default calibration functions : " << std::endl;
575 
576  calib.faBarrel->Print();
577  calib.fbBarrel->Print();
578  calib.fcBarrel->Print();
579  calib.faEtaBarrelEH->Print();
580  calib.fbEtaBarrelEH->Print();
581  calib.faEtaBarrelH->Print();
582  calib.fbEtaBarrelH->Print();
583  calib.faEndcap->Print();
584  calib.fbEndcap->Print();
585  calib.fcEndcap->Print();
586  calib.faEtaEndcapEH->Print();
587  calib.fbEtaEndcapEH->Print();
588  calib.faEtaEndcapH->Print();
589  calib.fbEtaEndcapH->Print();
590  //
591  }
592 
593  return out;
594 }

Member Data Documentation

◆ esEEInterCalib_

const ESEEIntercalibConstants* PFEnergyCalibration::esEEInterCalib_ = nullptr
private

Definition at line 84 of file PFEnergyCalibration.h.

Referenced by initAlphaGamma_ESplanes_fromDB().

◆ faBarrel

std::unique_ptr<TF1> PFEnergyCalibration::faBarrel
private

Definition at line 87 of file PFEnergyCalibration.h.

◆ faEndcap

std::unique_ptr<TF1> PFEnergyCalibration::faEndcap
private

Definition at line 96 of file PFEnergyCalibration.h.

◆ faEtaBarrelEH

std::unique_ptr<TF1> PFEnergyCalibration::faEtaBarrelEH
private

Definition at line 90 of file PFEnergyCalibration.h.

◆ faEtaBarrelH

std::unique_ptr<TF1> PFEnergyCalibration::faEtaBarrelH
private

Definition at line 92 of file PFEnergyCalibration.h.

◆ faEtaEndcapEH

std::unique_ptr<TF1> PFEnergyCalibration::faEtaEndcapEH
private

Definition at line 99 of file PFEnergyCalibration.h.

◆ faEtaEndcapH

std::unique_ptr<TF1> PFEnergyCalibration::faEtaEndcapH
private

Definition at line 101 of file PFEnergyCalibration.h.

◆ fbBarrel

std::unique_ptr<TF1> PFEnergyCalibration::fbBarrel
private

Definition at line 88 of file PFEnergyCalibration.h.

◆ fbEndcap

std::unique_ptr<TF1> PFEnergyCalibration::fbEndcap
private

Definition at line 97 of file PFEnergyCalibration.h.

◆ fbEtaBarrelEH

std::unique_ptr<TF1> PFEnergyCalibration::fbEtaBarrelEH
private

Definition at line 91 of file PFEnergyCalibration.h.

◆ fbEtaBarrelH

std::unique_ptr<TF1> PFEnergyCalibration::fbEtaBarrelH
private

Definition at line 93 of file PFEnergyCalibration.h.

◆ fbEtaEndcapEH

std::unique_ptr<TF1> PFEnergyCalibration::fbEtaEndcapEH
private

Definition at line 100 of file PFEnergyCalibration.h.

◆ fbEtaEndcapH

std::unique_ptr<TF1> PFEnergyCalibration::fbEtaEndcapH
private

Definition at line 102 of file PFEnergyCalibration.h.

◆ fcBarrel

std::unique_ptr<TF1> PFEnergyCalibration::fcBarrel
private

Definition at line 89 of file PFEnergyCalibration.h.

◆ fcEndcap

std::unique_ptr<TF1> PFEnergyCalibration::fcEndcap
private

Definition at line 98 of file PFEnergyCalibration.h.

◆ fcEtaBarrelEH

std::unique_ptr<TF1> PFEnergyCalibration::fcEtaBarrelEH
private

Definition at line 105 of file PFEnergyCalibration.h.

◆ fcEtaBarrelH

std::unique_ptr<TF1> PFEnergyCalibration::fcEtaBarrelH
private

Definition at line 108 of file PFEnergyCalibration.h.

◆ fcEtaEndcapEH

std::unique_ptr<TF1> PFEnergyCalibration::fcEtaEndcapEH
private

Definition at line 106 of file PFEnergyCalibration.h.

◆ fcEtaEndcapH

std::unique_ptr<TF1> PFEnergyCalibration::fcEtaEndcapH
private

Definition at line 109 of file PFEnergyCalibration.h.

◆ fdEtaEndcapEH

std::unique_ptr<TF1> PFEnergyCalibration::fdEtaEndcapEH
private

Definition at line 107 of file PFEnergyCalibration.h.

◆ fdEtaEndcapH

std::unique_ptr<TF1> PFEnergyCalibration::fdEtaEndcapH
private

Definition at line 110 of file PFEnergyCalibration.h.

◆ pfCalibrations

const PerformancePayloadFromTFormula* PFEnergyCalibration::pfCalibrations = nullptr
private

Definition at line 83 of file PFEnergyCalibration.h.

Referenced by setCalibrationFunctions().

◆ threshE

const double PFEnergyCalibration::threshE = 3.5
private

Definition at line 160 of file PFEnergyCalibration.h.

◆ threshH

const double PFEnergyCalibration::threshH = 2.5
private

Definition at line 161 of file PFEnergyCalibration.h.

reco::CaloCluster::phi
double phi() const
azimuthal angle of cluster centroid
Definition: CaloCluster.h:184
PFEnergyCalibration::fbEtaBarrelH
std::unique_ptr< TF1 > fbEtaBarrelH
Definition: PFEnergyCalibration.h:93
PFEnergyCalibration::cBarrel
double cBarrel(double x) const
Definition: PFEnergyCalibration.cc:320
PFEnergyCalibration::aEtaBarrelH
double aEtaBarrelH(double x) const
Definition: PFEnergyCalibration.cc:353
mps_fire.i
i
Definition: mps_fire.py:355
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::fdEtaEndcapH
std::unique_ptr< TF1 > fdEtaEndcapH
Definition: PFEnergyCalibration.h:110
PFEnergyCalibration::aBarrel
double aBarrel(double x) const
Definition: PFEnergyCalibration.cc:298
groupFilesInBlocks.tt
int tt
Definition: groupFilesInBlocks.py:144
PFEnergyCalibration::EcorrZoneBeforePS
double EcorrZoneBeforePS(double E, double eta) const
Definition: PFEnergyCalibration.cc:830
PerformanceResult::PFfbEta_ENDCAPEH
Definition: PerformanceResult.h:58
ESEEIntercalibConstants::getGammaLow2
float getGammaLow2() const
Definition: ESEEIntercalibConstants.h:39
PerformanceResult::PFfaEta_ENDCAPEH
Definition: PerformanceResult.h:56
PFEnergyCalibration::fbEtaEndcapH
std::unique_ptr< TF1 > fbEtaEndcapH
Definition: PFEnergyCalibration.h:102
min
T min(T a, T b)
Definition: MathUtil.h:58
PFEnergyCalibration::Alpha
double Alpha(double eta) const
Definition: PFEnergyCalibration.cc:763
PFEnergyCalibration::fcEtaBarrelEH
std::unique_ptr< TF1 > fcEtaBarrelEH
Definition: PFEnergyCalibration.h:105
digitizers_cfi.strip
strip
Definition: digitizers_cfi.py:19
h
FWCore Framework interface EventSetupRecordImplementation h
Helper function to determine trigger accepts.
Definition: L1TUtmAlgorithmRcd.h:4
gather_cfg.cout
cout
Definition: gather_cfg.py:144
PerformanceResult::PFfcEta_BARRELH
Definition: PerformanceResult.h:60
PFEnergyCalibration::CorrPhi
double CorrPhi(double phi, double eta) const
Definition: PFEnergyCalibration.cc:680
PFEnergyCalibration::dEtaEndcapH
double dEtaEndcapH(double x) const
Definition: PFEnergyCalibration.cc:474
Sign
T Sign(T A, T B)
Definition: MathUtil.h:54
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
PerformanceResult::PFfa_ENDCAP
Definition: PerformanceResult.h:42
PerformanceResult::PFfa_BARREL
Definition: PerformanceResult.h:41
ESDetId
Definition: ESDetId.h:15
DDAxes::x
PFEnergyCalibration::bEtaEndcapH
double bEtaEndcapH(double x) const
Definition: PFEnergyCalibration.cc:441
ESEEIntercalibConstants::getGammaLow1
float getGammaLow1() const
Definition: ESEEIntercalibConstants.h:34
PerformanceResult::PFfcEta_BARRELEH
Definition: PerformanceResult.h:61
PerformanceResult::PFfb_ENDCAP
Definition: PerformanceResult.h:44
ESEEIntercalibConstants::getGammaLow0
float getGammaLow0() const
Definition: ESEEIntercalibConstants.h:29
PFEnergyCalibration::cEtaBarrelH
double cEtaBarrelH(double x) const
Definition: PFEnergyCalibration.cc:453
PFEnergyCalibration::Beta
double Beta(double E, double eta) const
Definition: PFEnergyCalibration.cc:779
PFEnergyCalibration::threshE
const double threshE
Definition: PFEnergyCalibration.h:160
reco::OK
std::pair< int, edm::FunctionWithDict > OK
Definition: findMethod.cc:126
PFEnergyCalibration::EcorrPS
double EcorrPS(double eEcal, double ePS1, double ePS2, double etaEcal) const
Definition: PFEnergyCalibration.cc:853
HLT_2018_cff.dEta
dEta
Definition: HLT_2018_cff.py:12289
PerformanceResult::PFfc_BARREL
Definition: PerformanceResult.h:45
PFEnergyCalibration::fbBarrel
std::unique_ptr< TF1 > fbBarrel
Definition: PFEnergyCalibration.h:88
contentValuesCheck.ss
ss
Definition: contentValuesCheck.py:33
PFEnergyCalibration::fcBarrel
std::unique_ptr< TF1 > fcBarrel
Definition: PFEnergyCalibration.h:89
PFEnergyCalibration::cEtaEndcapEH
double cEtaEndcapEH(double x) const
Definition: PFEnergyCalibration.cc:496
alignCSCRings.s
s
Definition: alignCSCRings.py:92
reco::PFCluster::energy
double energy() const
cluster energy
Definition: PFCluster.h:78
PFEnergyCalibration::aEtaEndcapEH
double aEtaEndcapEH(double x) const
Definition: PFEnergyCalibration.cc:408
h
PFEnergyCalibration::faBarrel
std::unique_ptr< TF1 > faBarrel
Definition: PFEnergyCalibration.h:87
PFLayer::PS1
Definition: PFLayer.h:31
PFEnergyCalibration::minimum
double minimum(double a, double b) const
Definition: PFEnergyCalibration.cc:616
PVValHelper::eta
Definition: PVValidationHelpers.h:69
visualization-live-secondInstance_cfg.m
m
Definition: visualization-live-secondInstance_cfg.py:72
PerformanceResult::PFfaEta_BARRELH
Definition: PerformanceResult.h:51
p2
double p2[4]
Definition: TauolaWrapper.h:90
PFEnergyCalibration::fbEndcap
std::unique_ptr< TF1 > fbEndcap
Definition: PFEnergyCalibration.h:97
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::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
PerformanceResult::PFfbEta_BARRELEH
Definition: PerformanceResult.h:57
PerformanceResult::PFfc_ENDCAP
Definition: PerformanceResult.h:46
cond
Definition: plugin.cc:23
PerformanceResult::ResultType
ResultType
Definition: PerformanceResult.h:8
PFEnergyCalibration::threshH
const double threshH
Definition: PFEnergyCalibration.h:161
a
double a
Definition: hdecay.h:119
PerformanceResult::PFfdEta_ENDCAPH
Definition: PerformanceResult.h:64
reco::CaloCluster::eta
double eta() const
pseudorapidity of cluster centroid
Definition: CaloCluster.h:181
PerformancePayloadFromTFormula::getResult
float getResult(PerformanceResult::ResultType, const BinningPointByMap &) const override
Definition: PerformancePayloadFromTFormula.cc:21
SiStripPI::max
Definition: SiStripPayloadInspectorHelper.h:169
pfMETCorrectionType0_cfi.correction
correction
Definition: pfMETCorrectionType0_cfi.py:39
PFEnergyCalibration::faEtaEndcapH
std::unique_ptr< TF1 > faEtaEndcapH
Definition: PFEnergyCalibration.h:101
PerformanceResult::PFfbEta_BARRELH
Definition: PerformanceResult.h:53
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
p4
double p4[4]
Definition: TauolaWrapper.h:92
p1
double p1[4]
Definition: TauolaWrapper.h:89
PerformanceResult::PFfcEta_ENDCAPEH
Definition: PerformanceResult.h:63
PFEnergyCalibration::fcEtaEndcapEH
std::unique_ptr< TF1 > fcEtaEndcapEH
Definition: PFEnergyCalibration.h:106
PerformanceResult::PFfaEta_BARRELEH
Definition: PerformanceResult.h:55
PFEnergyCalibration::pfCalibrations
const PerformancePayloadFromTFormula * pfCalibrations
Definition: PFEnergyCalibration.h:83
PFEnergyCalibration::cEtaBarrelEH
double cEtaBarrelEH(double x) const
Definition: PFEnergyCalibration.cc:485
TrackCollections2monitor_cff.func
func
Definition: TrackCollections2monitor_cff.py:359
PFEnergyCalibration::faEtaBarrelH
std::unique_ptr< TF1 > faEtaBarrelH
Definition: PFEnergyCalibration.h:92
PerformanceResult::PFfdEta_ENDCAPEH
Definition: PerformanceResult.h:65
PFEnergyCalibration::EcorrZoneAfterPS
double EcorrZoneAfterPS(double E, double eta) const
Definition: PFEnergyCalibration.cc:938
PerformanceResult::PFfaEta_ENDCAPH
Definition: PerformanceResult.h:52
PerformanceResult::PFfcEta_ENDCAPH
Definition: PerformanceResult.h:62
GOODCOLL_filter_cfg.thresh
thresh
Definition: GOODCOLL_filter_cfg.py:74
BinningPointByMap
Definition: BinningPointByMap.h:8
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
PerformanceResult::PFfb_BARREL
Definition: PerformanceResult.h:43
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
p3
double p3[4]
Definition: TauolaWrapper.h:91
BinningVariables::JetEt
Definition: BinningVariables.h:13
PFEnergyCalibration::aEtaEndcapH
double aEtaEndcapH(double x) const
Definition: PFEnergyCalibration.cc:430
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
mps_fire.result
result
Definition: mps_fire.py:303
pi
const Double_t pi
Definition: trackSplitPlot.h:36
funct::abs
Abs< T >::type abs(const T &t)
Definition: Abs.h:22
point
*vegas h *****************************************************used in the default bin number in original ***version of VEGAS is ***a higher bin number might help to derive a more precise ***grade subtle point
Definition: invegas.h:5
PFLayer::PS2
Definition: PFLayer.h:30
PFEnergyCalibration::faEndcap
std::unique_ptr< TF1 > faEndcap
Definition: PFEnergyCalibration.h:96
ESEEIntercalibConstants::getGammaLow3
float getGammaLow3() const
Definition: ESEEIntercalibConstants.h:44
PFEnergyCalibration::bEtaEndcapEH
double bEtaEndcapEH(double x) const
Definition: PFEnergyCalibration.cc:419
PFEnergyCalibration::dCrackPhi
double dCrackPhi(double phi, double eta) const
Definition: PFEnergyCalibration.cc:640
PerformanceResult::PFfbEta_ENDCAPH
Definition: PerformanceResult.h:54
PFEnergyCalibration::fcEtaBarrelH
std::unique_ptr< TF1 > fcEtaBarrelH
Definition: PFEnergyCalibration.h:108
MillePedeFileConverter_cfg.e
e
Definition: MillePedeFileConverter_cfg.py:37