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.16564
e-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);
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.30898
e-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.81399
e-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);
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);
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);
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);
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);
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);
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);
156 std::vector<reco::PFCluster const*>
const& psClusterPointers,
159 double ps1_energy_sum = 0.;
160 double ps2_energy_sum = 0.;
164 for (
auto const& psclus : psClusterPointers) {
166 for (
auto const& recH : psclus->recHitFractions()) {
167 auto strip = recH.recHitRef()->detId();
179 ps1_energy_sum += psclus->energy();
182 ps2_energy_sum += psclus->energy();
187 double ePS1 = condP1 ? -1. : 0.;
188 double ePS2 = condP2 ? -1. : 0.;
190 double cluscalibe = energyEm(eeCluster, ps1_energy_sum, ps2_energy_sum, ePS1, ePS2,
applyCrackCorrections);
192 return {cluscalibe, ePS1, ePS2};
200 double etaCorrE = 1.;
201 double etaCorrH = 1.;
210 double a =
e > 0. ? aBarrel(
t) : 1.;
211 double b =
e > 0. ? bBarrel(
t) : cBarrel(
t);
212 double thresh =
e > 0. ? threshE : threshH;
215 if (
a < -0.25 ||
b < -0.25) {
226 etaCorrE = 1.0 + aEtaBarrelEH(
t) + 1.3 * bEtaBarrelEH(
t) * cEtaBarrelEH(absEta);
229 etaCorrE = 1.0 + aEtaBarrelH(
t) + 1.3 * bEtaBarrelH(
t) * cEtaBarrelH(absEta);
230 etaCorrH = 1.0 + aEtaBarrelH(
t) + bEtaBarrelH(
t) * cEtaBarrelH(absEta);
233 e =
h > 0. ? threshE - threshH + etaCorrE *
a *
e : threshE + etaCorrE *
a *
e;
235 h = threshH + etaCorrH *
b *
h;
241 double a =
e > 0. ? aEndcap(
t) : 1.;
242 double b =
e > 0. ? bEndcap(
t) : cEndcap(
t);
243 double thresh =
e > 0. ? threshE : threshH;
246 if (
a < -0.25 ||
b < -0.25) {
261 etaCorrE = 1. + aEtaEndcapEH(
t) + bEtaEndcapEH(
t) * cEtaEndcapEH(absEta);
263 etaCorrE = 1. + aEtaEndcapEH(
t) + 1.3 * bEtaEndcapEH(
t) * dEtaEndcapEH(absEta);
266 etaCorrH = 1. + aEtaEndcapEH(
t) + bEtaEndcapEH(
t) * (0.04 + etaPow);
270 etaCorrH = 1. + aEtaEndcapH(
t) + bEtaEndcapH(
t) * cEtaEndcapH(absEta);
272 etaCorrH = 1. + aEtaEndcapH(
t) + bEtaEndcapH(
t) * dEtaEndcapH(absEta);
279 e =
h > 0. ? threshE - threshH + etaCorrE *
a *
e : threshE + etaCorrE *
a *
e;
281 h = threshH + etaCorrH *
b *
h;
286 if (
e < 0. ||
h < 0.) {
299 if (pfCalibrations) {
305 return faBarrel->Eval(
x);
310 if (pfCalibrations) {
316 return fbBarrel->Eval(
x);
321 if (pfCalibrations) {
327 return fcBarrel->Eval(
x);
332 if (pfCalibrations) {
338 return faEtaBarrelEH->Eval(
x);
343 if (pfCalibrations) {
349 return fbEtaBarrelEH->Eval(
x);
354 if (pfCalibrations) {
360 return faEtaBarrelH->Eval(
x);
365 if (pfCalibrations) {
371 return fbEtaBarrelH->Eval(
x);
376 if (pfCalibrations) {
382 return faEndcap->Eval(
x);
387 if (pfCalibrations) {
393 return fbEndcap->Eval(
x);
398 if (pfCalibrations) {
404 return fcEndcap->Eval(
x);
409 if (pfCalibrations) {
415 return faEtaEndcapEH->Eval(
x);
420 if (pfCalibrations) {
426 return fbEtaEndcapEH->Eval(
x);
431 if (pfCalibrations) {
437 return faEtaEndcapH->Eval(
x);
442 if (pfCalibrations) {
447 return fbEtaEndcapH->Eval(
x);
454 if (pfCalibrations) {
460 return fcEtaBarrelH->Eval(
x);
464 if (pfCalibrations) {
470 return fcEtaEndcapH->Eval(
x);
475 if (pfCalibrations) {
481 return fdEtaEndcapH->Eval(
x);
486 if (pfCalibrations) {
492 return fcEtaBarrelEH->Eval(
x);
497 if (pfCalibrations) {
503 return fcEtaEndcapEH->Eval(
x);
508 if (pfCalibrations) {
514 return fdEtaEndcapEH->Eval(
x);
521 bool crackCorrection)
const {
522 return Ecorr(clusterEcal.
energy(), ePS1, ePS2, clusterEcal.
eta(), clusterEcal.
phi(), crackCorrection);
530 bool crackCorrection)
const {
531 return Ecorr(clusterEcal.
energy(), ePS1, ePS2, clusterEcal.
eta(), clusterEcal.
phi(), ps1, ps2, crackCorrection);
538 out <<
"PFEnergyCalibration -- " << endl;
540 if (
calib.pfCalibrations) {
541 static const std::map<std::string, PerformanceResult::ResultType> functType = {
565 for (std::map<std::string, PerformanceResult::ResultType>::const_iterator
func = functType.begin();
566 func != functType.end();
568 cout <<
"Function: " <<
func->first << endl;
570 calib.pfCalibrations->printFormula(fType);
574 std::cout <<
"Default calibration functions : " << std::endl;
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();
623 constexpr
double pi =
M_PI;
625 std::vector<double> fillcPhi() {
626 std::vector<double> retValue;
627 retValue.resize(18, 0);
628 retValue[0] = 2.97025;
629 for (
unsigned i = 1;
i <= 17; ++
i)
630 retValue[
i] = retValue[0] - 2 *
i *
pi / 18;
636 const std::vector<double> cPhi = fillcPhi();
642 constexpr
double delta_cPhi = 0.00638;
650 if (phi >= -
pi && phi <=
pi) {
652 if (phi < cPhi[17] || phi >= cPhi[0]) {
655 m = minimum(phi - cPhi[0], phi - cPhi[17] - 2 *
pi);
664 m = minimum(phi - cPhi[
i + 1], phi - cPhi[
i]);
672 std::cout <<
"Problem in dminphi" << std::endl;
682 constexpr
double p1 = 5.59379e-01;
683 constexpr
double p2 = -1.26607e-03;
684 constexpr
double p3 = 9.61133e-04;
686 constexpr
double p4 = 1.81691e-01;
687 constexpr
double p5 = -4.97535e-03;
688 constexpr
double p6 = 1.31006e-03;
690 constexpr
double p7 = 1.38498e-01;
691 constexpr
double p8 = 1.18599e-04;
692 constexpr
double p9 = 2.01858e-03;
694 double dminphi = dCrackPhi(phi,
eta);
697 (1 +
p1 * TMath::Gaus(dminphi,
p2,
p3) + p4 * TMath::Gaus(dminphi, p5, p6) + p7 * TMath::Gaus(dminphi, p8, p9));
705 constexpr
double a[] = {6.13349e-01, 5.08146e-01, 4.44480e-01, 3.3487e-01, 7.65627e-01};
706 constexpr
double m[] = {-1.79514e-02, 4.44747e-01, 7.92824e-01, 1.14090e+00, 1.47464e+00};
707 constexpr
double s[] = {7.92382e-03, 3.06028e-03, 3.36139e-03, 3.94521e-03, 8.63950e-04};
708 constexpr
double sa[] = {1.27228e+01, 3.81517e-02, 1.63507e-01, -6.56480e-02, 1.87160e-01};
709 constexpr
double ss[] = {5.48753e-02, -1.00223e-02, 2.22866e-03, 4.26288e-04, 2.67937e-03};
712 for (
unsigned i = 0;
i <= 4;
i++)
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;
742 constexpr
double p8 = 2.705593e-03;
745 (p0 + 1 / (
p1 +
p2 * TMath::Power(E,
p3)) + p4 * TMath::Exp(-E / p5) + p6 * TMath::Exp(-E * E / (p7 * p7))) *
765 constexpr
double p0 = 5.97621e-01;
768 constexpr
double p1 = -1.86407e-01;
769 constexpr
double p2 = 3.85197e-01;
772 constexpr
double norm = (
p1 +
p2 * (2.6 + 1.656) / 2);
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;
787 constexpr
double p4 = 1.02496e+00;
788 constexpr
double p5 = -4.40176e-03;
791 constexpr
double norm = (p4 + p5 * (2.6 + 1.656) / 2);
793 double result = (1.0012 + p0 * TMath::Exp(-E /
p3) +
p1 * TMath::Exp(-E /
p2)) * (p4 + p5 *
eta) / norm;
799 constexpr
double p0 = 2.49752e-02;
802 constexpr
double p1 = 6.48816e-02;
803 constexpr
double p2 = -1.59517e-02;
806 constexpr
double norm = (
p1 +
p2 * (2.6 + 1.656) / 2);
808 double result = p0 * (
p1 +
p2 * etaEcal) / norm;
832 constexpr
double p0 = 1;
833 constexpr
double p1 = 0.18;
834 constexpr
double p2 = 8.;
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;
844 constexpr
double norm = 1.21;
846 double result = E * (p0 +
p1 * TMath::Exp(-E /
p2)) * (
p3 + p4 * TMath::Gaus(
eta, p6, p5) + p7 *
eta) / norm;
855 double E =
Beta(1.0155 * eEcal + 0.025 * (ePS1 + 0.5976 * ePS2) / 9
e-5, etaEcal) * eEcal +
856 Gamma(etaEcal) * (ePS1 +
Alpha(etaEcal) * ePS2) / 9
e-5;
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;
865 double result = E * (p0 +
p1 * TMath::Exp(-E /
p2) -
p3 * TMath::Exp(-E / p4));
873 double eEcal,
double ePS1,
double ePS2,
double etaEcal,
double& outputPS1,
double& outputPS2)
const {
875 double gammaprime = Gamma(etaEcal) / 9
e-5;
877 if (outputPS1 == 0 && outputPS2 == 0 && esEEInterCalib_ !=
nullptr) {
880 outputPS1 = gammaprime * ePS1 * esEEInterCalib_->getGammaLow0();
881 outputPS2 = gammaprime *
Alpha(etaEcal) * ePS2 * esEEInterCalib_->getGammaLow3();
882 }
else if (outputPS1 == 0 && outputPS2 == -1 && esEEInterCalib_ !=
nullptr) {
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) {
890 gammaprime *
Alpha(etaEcal) * ePS2 * esEEInterCalib_->getGammaLow3() * esEEInterCalib_->getGammaLow2();
891 outputPS2 = gammaprime *
Alpha(etaEcal) * ePS2 * esEEInterCalib_->getGammaLow3();
892 outputPS1 = corrTotES - outputPS2;
895 outputPS1 = gammaprime * ePS1;
896 outputPS2 = gammaprime *
Alpha(etaEcal) * ePS2;
899 double E =
Beta(1.0155 * eEcal + 0.025 * (ePS1 + 0.5976 * ePS2) / 9
e-5, etaEcal) * eEcal + outputPS1 + outputPS2;
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;
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;
920 constexpr
double p0 = 1.02;
921 constexpr
double p1 = 0.165;
922 constexpr
double p2 = 6.5;
923 constexpr
double p3 = 2.1;
926 constexpr
double p4 = 1.02496e+00;
927 constexpr
double p5 = -4.40176e-03;
930 constexpr
double norm = (p4 + p5 * (2.6 + 1.656) / 2);
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;
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;
958 constexpr
double norm = 1.045;
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;
968 double eEcal,
double ePS1,
double ePS2,
double eta,
double phi,
bool crackCorrection)
const {
969 constexpr
double endBarrel = 1.48;
970 constexpr
double beginingPS = 1.65;
971 constexpr
double endPS = 2.6;
972 constexpr
double endEndCap = 2.98;
979 if (
eta <= endBarrel)
980 result = EcorrBarrel(eEcal,
eta, phi, crackCorrection);
981 else if (
eta <= beginingPS)
983 else if ((
eta < endPS) && ePS1 == 0 && ePS2 == 0)
985 else if (
eta < endPS)
986 result = EcorrPS(eEcal, ePS1, ePS2,
eta);
987 else if (
eta < endEndCap)
1008 bool crackCorrection)
const {
1009 constexpr
double endBarrel = 1.48;
1010 constexpr
double beginingPS = 1.65;
1011 constexpr
double endPS = 2.6;
1012 constexpr
double endEndCap = 2.98;
1019 if (
eta <= endBarrel)
1020 result = EcorrBarrel(eEcal,
eta, phi, crackCorrection);
1021 else if (
eta <= beginingPS)
1023 else if ((
eta < endPS) && ePS1 == 0 && ePS2 == 0)
1025 else if (
eta < endPS)
1026 result = EcorrPS(eEcal, ePS1, ePS2,
eta, ps1, ps2);
1027 else if (
eta < endEndCap)
double dEtaEndcapH(double x) const
double Beta(double E, double eta) const
double EcorrZoneBeforePS(double E, double eta) const
double Gamma(double etaEcal) const
double cEtaBarrelEH(double x) const
double aEtaBarrelH(double x) const
Particle flow cluster, see clustering algorithm in PFClusterAlgo.
double bEtaBarrelH(double x) const
double cEtaEndcapH(double x) const
double bEtaEndcapH(double x) const
double cEtaEndcapEH(double x) const
CalibratedEndcapPFClusterEnergies calibrateEndcapClusterEnergies(reco::PFCluster const &eeCluster, std::vector< reco::PFCluster const *> const &psClusterPointers, ESChannelStatus const &channelStatus, bool applyCrackCorrections) const
const_iterator find(uint32_t rawId) const
double phi() const
azimuthal angle of cluster centroid
double cBarrel(double x) const
double EcorrPS(double eEcal, double ePS1, double ePS2, double etaEcal) const
double cEndcap(double x) const
double EcorrZoneAfterPS(double E, double eta) const
double energy() const
cluster energy
double cEtaBarrelH(double x) const
double EcorrBarrel(double E, double eta, double phi, bool crackCorrection=true) const
Abs< T >::type abs(const T &t)
double aEtaBarrelEH(double x) const
double dCrackPhi(double phi, double eta) const
double bEtaEndcapEH(double x) const
double Ecorr(double eEcal, double ePS1, double ePS2, double eta, double phi, bool crackCorrection=true) const
void energyEmHad(double t, double &e, double &h, double eta, double phi) const
double aEndcap(double x) const
std::ostream & operator<<(std::ostream &out, const std::tuple< Types... > &value)
double CorrPhi(double phi, double eta) const
std::pair< int, edm::FunctionWithDict > OK
double aEtaEndcapEH(double x) const
double minimum(double a, double b) const
double bEndcap(double x) const
double bBarrel(double x) const
double Alpha(double eta) const
double CorrEta(double eta) const
double aBarrel(double x) const
double EcorrPS_ePSNil(double eEcal, double eta) const
double aEtaEndcapH(double x) const
double CorrBarrel(double E, double eta) const
double eta() const
pseudorapidity of cluster centroid
TupleMultiplicity< TrackerTraits > const *__restrict__ TrackingRecHitSoAConstView< TrackerTraits > hh
const self & getMap() const
double dEtaEndcapEH(double x) const
The Signals That Services Can Subscribe To This is based on ActivityRegistry h
Helper function to determine trigger accepts.
double energyEm(const reco::PFCluster &clusterEcal, double ePS1, double ePS2, bool crackCorrection=true) const
double bEtaBarrelEH(double x) const
*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