CMS 3D CMS Logo

List of all members | Public Member Functions | Private Member Functions | Private Attributes
EcalClusterEnergyCorrectionObjectSpecific Class Reference
Inheritance diagram for EcalClusterEnergyCorrectionObjectSpecific:
EcalClusterFunctionBaseClass

Public Member Functions

void checkInit () const
 
 EcalClusterEnergyCorrectionObjectSpecific (const edm::ParameterSet &)
 
const EcalClusterEnergyCorrectionObjectSpecificParametersgetParameters () const
 
float getValue (const reco::BasicCluster &, const EcalRecHitCollection &) const override
 
float getValue (const reco::SuperCluster &, const int mode) const override
 
void init (const edm::EventSetup &es) override
 
- Public Member Functions inherited from EcalClusterFunctionBaseClass
virtual float getValue (const reco::CaloCluster &) const
 
virtual ~EcalClusterFunctionBaseClass ()
 

Private Member Functions

float fBremEta (float sigmaPhiSigmaEta, float eta, int algorithm) const
 
float fEnergy (float e, int algorithm) const
 
float fEt (float et, int algorithm) const
 
float fEta (float energy, float eta, int algorithm) const
 

Private Attributes

edm::ESHandle< EcalClusterEnergyCorrectionObjectSpecificParametersesParams_
 
const EcalClusterEnergyCorrectionObjectSpecificParametersparams_
 

Detailed Description

Function that provides supercluster energy correction due to Bremsstrahlung loss

$Id: EcalClusterEnergyCorrectionObjectSpecific.h $Date: $Revision:

Author
Nicolas Chanon, October 2011

Definition at line 16 of file EcalClusterEnergyCorrectionObjectSpecific.cc.

Constructor & Destructor Documentation

◆ EcalClusterEnergyCorrectionObjectSpecific()

EcalClusterEnergyCorrectionObjectSpecific::EcalClusterEnergyCorrectionObjectSpecific ( const edm::ParameterSet )
inline

Definition at line 18 of file EcalClusterEnergyCorrectionObjectSpecific.cc.

18 {};

Member Function Documentation

◆ checkInit()

void EcalClusterEnergyCorrectionObjectSpecific::checkInit ( ) const

Definition at line 47 of file EcalClusterEnergyCorrectionObjectSpecific.cc.

47  {
48  if (!params_) {
49  // non-initialized function parameters: throw exception
50  throw cms::Exception("EcalClusterEnergyCorrectionObjectSpecific::checkInit()")
51  << "Trying to access an uninitialized correction function.\n"
52  "Please call `init( edm::EventSetup &)' before any use of the function.\n";
53  }
54 }

References Exception, and params_.

◆ fBremEta()

float EcalClusterEnergyCorrectionObjectSpecific::fBremEta ( float  sigmaPhiSigmaEta,
float  eta,
int  algorithm 
) const
private

Definition at line 80 of file EcalClusterEnergyCorrectionObjectSpecific.cc.

80  {
81  const float etaCrackMin = 1.44;
82  const float etaCrackMax = 1.56;
83 
84  //STD
85  const int nBinsEta = 14;
86  float leftEta[nBinsEta] = {0.02, 0.25, 0.46, 0.81, 0.91, 1.01, 1.16, etaCrackMax, 1.653, 1.8, 2.0, 2.2, 2.3, 2.4};
87  float rightEta[nBinsEta] = {0.25, 0.42, 0.77, 0.91, 1.01, 1.13, etaCrackMin, 1.653, 1.8, 2.0, 2.2, 2.3, 2.4, 2.5};
88 
89  float xcorr[nBinsEta];
90 
91  float par0[nBinsEta];
92  float par1[nBinsEta];
93  float par2[nBinsEta];
94  float par3[nBinsEta];
95  float par4[nBinsEta];
96 
97  float sigmaPhiSigmaEtaMin = 0.8;
98  float sigmaPhiSigmaEtaMax = 5.;
99 
100  float sigmaPhiSigmaEtaFit = -1;
101 
102  // extra protections
103  // fix sigmaPhiSigmaEta boundaries
104  if (sigmaPhiSigmaEta < sigmaPhiSigmaEtaMin)
105  sigmaPhiSigmaEta = sigmaPhiSigmaEtaMin;
106  if (sigmaPhiSigmaEta > sigmaPhiSigmaEtaMax)
107  sigmaPhiSigmaEta = sigmaPhiSigmaEtaMax;
108 
109  // eta = 0
110  if (std::abs(eta) < leftEta[0]) {
111  eta = 0.02;
112  }
113  // outside acceptance
114  if (std::abs(eta) >= rightEta[nBinsEta - 1]) {
115  eta = 2.49;
116  } //if (DBG) std::cout << " WARNING [applyScCorrections]: std::abs(eta) >= rightEta[nBinsEta-1] " << std::endl;}
117 
118  int tmpEta = -1;
119  for (int iEta = 0; iEta < nBinsEta; ++iEta) {
120  if (leftEta[iEta] <= std::abs(eta) && std::abs(eta) < rightEta[iEta]) {
121  tmpEta = iEta;
122  }
123  }
124 
125  if (algorithm == 0) { //Electrons
126 
127  xcorr[0] = (params_->params())[2];
128  xcorr[1] = (params_->params())[3];
129  xcorr[2] = (params_->params())[4];
130  xcorr[3] = (params_->params())[5];
131  xcorr[4] = (params_->params())[6];
132  xcorr[5] = (params_->params())[7];
133  xcorr[6] = (params_->params())[8];
134  xcorr[7] = (params_->params())[9];
135  xcorr[8] = (params_->params())[10];
136  xcorr[9] = (params_->params())[11];
137  xcorr[10] = (params_->params())[12];
138  xcorr[11] = (params_->params())[13];
139  xcorr[12] = (params_->params())[14];
140  xcorr[13] = (params_->params())[15];
141 
142  par0[0] = (params_->params())[16];
143  par1[0] = (params_->params())[17];
144  par2[0] = (params_->params())[18];
145  par3[0] = (params_->params())[19]; //should be 0 (not used)
146  par4[0] = (params_->params())[20]; //should be 0 (not used)
147 
148  par0[1] = (params_->params())[21];
149  par1[1] = (params_->params())[22];
150  par2[1] = (params_->params())[23];
151  par3[1] = (params_->params())[24];
152  par4[1] = (params_->params())[25];
153 
154  par0[2] = (params_->params())[26];
155  par1[2] = (params_->params())[27];
156  par2[2] = (params_->params())[28];
157  par3[2] = (params_->params())[29]; //should be 0 (not used)
158  par4[2] = (params_->params())[30]; //should be 0 (not used)
159 
160  par0[3] = (params_->params())[31];
161  par1[3] = (params_->params())[32];
162  par2[3] = (params_->params())[33];
163  par2[4] = (params_->params())[34]; //should be 0 (not used)
164  par2[5] = (params_->params())[35]; //should be 0 (not used)
165 
166  par0[4] = (params_->params())[36];
167  par1[4] = (params_->params())[37];
168  par2[4] = (params_->params())[38];
169  par3[4] = (params_->params())[39]; //should be 0 (not used)
170  par4[4] = (params_->params())[40]; //should be 0 (not used)
171 
172  par0[5] = (params_->params())[41];
173  par1[5] = (params_->params())[42];
174  par2[5] = (params_->params())[43];
175  par3[5] = (params_->params())[44]; //should be 0 (not used)
176  par4[5] = (params_->params())[45]; //should be 0 (not used)
177 
178  par0[6] = (params_->params())[46];
179  par1[6] = (params_->params())[47];
180  par2[6] = (params_->params())[48];
181  par3[6] = (params_->params())[49]; //should be 0 (not used)
182  par4[6] = (params_->params())[50]; //should be 0 (not used)
183 
184  par0[7] = (params_->params())[51];
185  par1[7] = (params_->params())[52];
186  par2[7] = (params_->params())[53];
187  par3[7] = (params_->params())[54]; //should be 0 (not used)
188  par4[7] = (params_->params())[55]; //should be 0 (not used)
189 
190  par0[8] = (params_->params())[56];
191  par1[8] = (params_->params())[57];
192  par2[8] = (params_->params())[58];
193  par3[8] = (params_->params())[59]; //should be 0 (not used)
194  par4[8] = (params_->params())[60]; //should be 0 (not used)
195 
196  par0[9] = (params_->params())[61];
197  par1[9] = (params_->params())[62];
198  par2[9] = (params_->params())[63];
199  par3[9] = (params_->params())[64]; //should be 0 (not used)
200  par4[9] = (params_->params())[65]; //should be 0 (not used)
201 
202  par0[10] = (params_->params())[66];
203  par1[10] = (params_->params())[67];
204  par2[10] = (params_->params())[68];
205  par3[10] = (params_->params())[69]; //should be 0 (not used)
206  par4[10] = (params_->params())[70]; //should be 0 (not used)
207 
208  par0[11] = (params_->params())[71];
209  par1[11] = (params_->params())[72];
210  par2[11] = (params_->params())[73];
211  par3[11] = (params_->params())[74]; //should be 0 (not used)
212  par4[11] = (params_->params())[75]; //should be 0 (not used)
213 
214  par0[12] = (params_->params())[76];
215  par1[12] = (params_->params())[77];
216  par2[12] = (params_->params())[78];
217  par3[12] = (params_->params())[79]; //should be 0 (not used)
218  par4[12] = (params_->params())[80]; //should be 0 (not used)
219 
220  par0[13] = (params_->params())[81];
221  par1[13] = (params_->params())[82];
222  par2[13] = (params_->params())[83];
223  par3[13] = (params_->params())[84]; //should be 0 (not used)
224  par4[13] = (params_->params())[85]; //should be 0 (not used)
225 
226  sigmaPhiSigmaEtaFit = 1.2;
227  }
228 
229  if (algorithm == 1) { //Photons
230 
231  xcorr[0] = (params_->params())[86];
232  xcorr[1] = (params_->params())[87];
233  xcorr[2] = (params_->params())[88];
234  xcorr[3] = (params_->params())[89];
235  xcorr[4] = (params_->params())[90];
236  xcorr[5] = (params_->params())[91];
237  xcorr[6] = (params_->params())[92];
238  xcorr[7] = (params_->params())[93];
239  xcorr[8] = (params_->params())[94];
240  xcorr[9] = (params_->params())[95];
241  xcorr[10] = (params_->params())[96];
242  xcorr[11] = (params_->params())[97];
243  xcorr[12] = (params_->params())[98];
244  xcorr[13] = (params_->params())[99];
245 
246  par0[0] = (params_->params())[100];
247  par1[0] = (params_->params())[101];
248  par2[0] = (params_->params())[102];
249  par3[0] = (params_->params())[103];
250  par4[0] = (params_->params())[104];
251 
252  par0[1] = (params_->params())[105];
253  par1[1] = (params_->params())[106];
254  par2[1] = (params_->params())[107];
255  par3[1] = (params_->params())[108];
256  par4[1] = (params_->params())[109];
257 
258  par0[2] = (params_->params())[110];
259  par1[2] = (params_->params())[111];
260  par2[2] = (params_->params())[112];
261  par3[2] = (params_->params())[113];
262  par4[2] = (params_->params())[114];
263 
264  par0[3] = (params_->params())[115];
265  par1[3] = (params_->params())[116];
266  par2[3] = (params_->params())[117];
267  par3[3] = (params_->params())[118];
268  par4[3] = (params_->params())[119];
269 
270  par0[4] = (params_->params())[120];
271  par1[4] = (params_->params())[121];
272  par2[4] = (params_->params())[122];
273  par3[4] = (params_->params())[123];
274  par4[4] = (params_->params())[124];
275 
276  par0[5] = (params_->params())[125];
277  par1[5] = (params_->params())[126];
278  par2[5] = (params_->params())[127];
279  par3[5] = (params_->params())[128];
280  par4[5] = (params_->params())[129];
281 
282  par0[6] = (params_->params())[130];
283  par1[6] = (params_->params())[131];
284  par2[6] = (params_->params())[132];
285  par3[6] = (params_->params())[133];
286  par4[6] = (params_->params())[134];
287 
288  par0[7] = (params_->params())[135];
289  par1[7] = (params_->params())[136];
290  par2[7] = (params_->params())[137];
291  par3[7] = (params_->params())[138];
292  par4[7] = (params_->params())[139];
293 
294  par0[8] = (params_->params())[140];
295  par1[8] = (params_->params())[141];
296  par2[8] = (params_->params())[142];
297  par3[8] = (params_->params())[143];
298  par4[8] = (params_->params())[144];
299 
300  par0[9] = (params_->params())[145];
301  par1[9] = (params_->params())[146];
302  par2[9] = (params_->params())[147];
303  par3[9] = (params_->params())[148];
304  par4[9] = (params_->params())[149];
305 
306  par0[10] = (params_->params())[150];
307  par1[10] = (params_->params())[151];
308  par2[10] = (params_->params())[152];
309  par3[10] = (params_->params())[153];
310  par4[10] = (params_->params())[154];
311 
312  par0[11] = (params_->params())[155];
313  par1[11] = (params_->params())[156];
314  par2[11] = (params_->params())[157];
315  par3[11] = (params_->params())[158];
316  par4[11] = (params_->params())[159];
317 
318  par0[12] = (params_->params())[160];
319  par1[12] = (params_->params())[161];
320  par2[12] = (params_->params())[162];
321  par3[12] = (params_->params())[163];
322  par4[12] = (params_->params())[164];
323 
324  par0[13] = (params_->params())[165];
325  par1[13] = (params_->params())[166];
326  par2[13] = (params_->params())[167];
327  par3[13] = (params_->params())[168];
328  par4[13] = (params_->params())[169];
329 
330  sigmaPhiSigmaEtaFit = 1.;
331  }
332 
333  // Interpolation
334  float tmpInter = 1;
335  // In eta cracks/gaps
336  if (tmpEta == -1) { // need to interpolate
337  for (int iEta = 0; iEta < nBinsEta - 1; ++iEta) {
338  if (rightEta[iEta] <= std::abs(eta) && std::abs(eta) < leftEta[iEta + 1]) {
339  if (sigmaPhiSigmaEta >= sigmaPhiSigmaEtaFit) {
340  if (algorithm == 0) { //electron
341  tmpInter = (par0[iEta] + sigmaPhiSigmaEta * par1[iEta] + sigmaPhiSigmaEta * sigmaPhiSigmaEta * par2[iEta] +
342  par0[iEta + 1] + sigmaPhiSigmaEta * par1[iEta + 1] +
343  sigmaPhiSigmaEta * sigmaPhiSigmaEta * par2[iEta + 1]) /
344  2.;
345  }
346  if (algorithm == 1) { //photon
347  tmpInter = (par0[iEta] * (1. - exp(-(sigmaPhiSigmaEta - par4[iEta]) / par1[iEta])) * par2[iEta] *
348  sigmaPhiSigmaEta +
349  par3[iEta] +
350  par0[iEta + 1] * (1. - exp(-(sigmaPhiSigmaEta - par4[iEta + 1]) / par1[iEta + 1])) *
351  par2[iEta + 1] * sigmaPhiSigmaEta +
352  par3[iEta + 1]) /
353  2.;
354  }
355  } else
356  tmpInter = (xcorr[iEta] + xcorr[iEta + 1]) / 2.;
357  }
358  }
359  return tmpInter;
360  }
361 
362  if (sigmaPhiSigmaEta >= sigmaPhiSigmaEtaFit) {
363  if (algorithm == 0)
364  return par0[tmpEta] + sigmaPhiSigmaEta * par1[tmpEta] + sigmaPhiSigmaEta * sigmaPhiSigmaEta * par2[tmpEta];
365  if (algorithm == 1)
366  return par0[tmpEta] * (1. - exp(-(sigmaPhiSigmaEta - par4[tmpEta]) / par1[tmpEta])) * par2[tmpEta] *
367  sigmaPhiSigmaEta +
368  par3[tmpEta];
369  } else
370  return xcorr[tmpEta];
371 
372  return 1.;
373 }

References funct::abs(), qcdUeDQM_cfi::algorithm, PVValHelper::eta, JetChargeProducer_cfi::exp, L1TowerCalibrationProducer_cfi::iEta, hgcalTowerMapProducer_cfi::nBinsEta, pfMETCorrectionType0_cfi::par0, pfMETCorrectionType0_cfi::par1, pfMETCorrectionType0_cfi::par2, pfMETCorrectionType0_cfi::par3, EcalFunParams::params(), and params_.

Referenced by getValue().

◆ fEnergy()

float EcalClusterEnergyCorrectionObjectSpecific::fEnergy ( float  e,
int  algorithm 
) const
private

Definition at line 470 of file EcalClusterEnergyCorrectionObjectSpecific.cc.

470  {
471  float par0 = -1;
472  float par1 = -1;
473  float par2 = -1;
474  float par3 = -1;
475  float par4 = -1;
476 
477  if (algorithm == 0) { //Electrons EB
478  return 1.;
479  }
480 
481  if (algorithm == 1) { //Electrons EE
482 
483  par0 = (params_->params())[198];
484  par1 = (params_->params())[199];
485  par2 = (params_->params())[200];
486  par3 = (params_->params())[201];
487  par4 = (params_->params())[202];
488 
489  if (E > par0)
490  E = par0;
491  if (E < 0)
492  return 1.;
493  if (0 <= E && E <= par0)
494  return (par1 + E * par2) * (1 - par3 * exp(E / par4));
495  }
496 
497  if (algorithm == 2) { //Photons EB
498  return 1.;
499  }
500 
501  if (algorithm == 3) { //Photons EE
502 
503  par0 = (params_->params())[203];
504  par1 = (params_->params())[204];
505  par2 = (params_->params())[205];
506  //assignments to 'par3'&'par4' have been deleted from here as they serve no purpose and cause dead assignment errors
507 
508  if (E > par0)
509  E = par0;
510  if (E < 0)
511  return 1.;
512  if (0 <= E && E <= par0)
513  return par1 + E * par2;
514  }
515 
516  return 1.;
517 }

References qcdUeDQM_cfi::algorithm, JetChargeProducer_cfi::exp, pfMETCorrectionType0_cfi::par0, pfMETCorrectionType0_cfi::par1, pfMETCorrectionType0_cfi::par2, pfMETCorrectionType0_cfi::par3, EcalFunParams::params(), and params_.

Referenced by getValue().

◆ fEt()

float EcalClusterEnergyCorrectionObjectSpecific::fEt ( float  et,
int  algorithm 
) const
private

Definition at line 375 of file EcalClusterEnergyCorrectionObjectSpecific.cc.

375  {
376  float par0 = -1;
377  float par1 = -1;
378  float par2 = -1;
379  float par3 = -1;
380  float par4 = -1;
381  float par5 = -1;
382  float par6 = -1;
383 
384  if (algorithm == 0) { //Electrons EB
385 
386  par0 = (params_->params())[170];
387  par1 = (params_->params())[171];
388  par2 = (params_->params())[172];
389  par3 = (params_->params())[173];
390  par4 = (params_->params())[174];
391  //assignments to 'par5'&'par6' have been deleted from here as they serve no purpose and cause dead assignment errors
392 
393  if (ET > 200)
394  ET = 200;
395  if (ET < 5)
396  return 1.;
397  if (5 <= ET && ET < 10)
398  return par0;
399  if (10 <= ET && ET <= 200)
400  return (par1 + ET * par2) * (1 - par3 * exp(ET / par4));
401  }
402 
403  if (algorithm == 1) { //Electrons EE
404 
405  par0 = (params_->params())[177];
406  par1 = (params_->params())[178];
407  par2 = (params_->params())[179];
408  par3 = (params_->params())[180];
409  par4 = (params_->params())[181];
410  //assignments to variables 'par5'&'par6' have been deleted from here as they serve no purpose and cause dead assignment errors
411 
412  if (ET > 200)
413  ET = 200;
414  if (ET < 5)
415  return 1.;
416  if (5 <= ET && ET < 10)
417  return par0;
418  if (10 <= ET && ET <= 200)
419  return (par1 + ET * par2) * (1 - par3 * exp(ET / par4));
420  }
421 
422  if (algorithm == 2) { //Photons EB
423 
424  par0 = (params_->params())[184];
425  par1 = (params_->params())[185];
426  par2 = (params_->params())[186];
427  par3 = (params_->params())[187];
428  par4 = (params_->params())[188];
429  //assignments to 'par5'&'par6' have been deleted from here as they serve no purpose and cause dead assignment errors
430 
431  if (ET < 5)
432  return 1.;
433  if (5 <= ET && ET < 10)
434  return par0;
435  if (10 <= ET && ET < 20)
436  return par1;
437  if (20 <= ET && ET < 140)
438  return par2 + par3 * ET;
439  if (140 <= ET)
440  return par4;
441  }
442 
443  if (algorithm == 3) { //Photons EE
444 
445  par0 = (params_->params())[191];
446  par1 = (params_->params())[192];
447  par2 = (params_->params())[193];
448  par3 = (params_->params())[194];
449  par4 = (params_->params())[195];
450  par5 = (params_->params())[196];
451  par6 = (params_->params())[197];
452 
453  if (ET < 5)
454  return 1.;
455  if (5 <= ET && ET < 10)
456  return par0;
457  if (10 <= ET && ET < 20)
458  return par1;
459  if (20 <= ET && ET < 30)
460  return par2;
461  if (30 <= ET && ET < 200)
462  return par3 + par4 * ET + par5 * ET * ET;
463  if (200 <= ET)
464  return par6;
465  }
466 
467  return 1.;
468 }

References qcdUeDQM_cfi::algorithm, ET, JetChargeProducer_cfi::exp, pfMETCorrectionType0_cfi::par0, pfMETCorrectionType0_cfi::par1, pfMETCorrectionType0_cfi::par2, pfMETCorrectionType0_cfi::par3, EcalFunParams::params(), and params_.

Referenced by getValue().

◆ fEta()

float EcalClusterEnergyCorrectionObjectSpecific::fEta ( float  energy,
float  eta,
int  algorithm 
) const
private

Definition at line 58 of file EcalClusterEnergyCorrectionObjectSpecific.cc.

58  {
59  //std::cout << "fEta function" << std::endl;
60 
61  // this correction is setup only for EB
62  if (algorithm != 0)
63  return energy;
64 
65  float ieta = fabs(eta) * (5 / 0.087);
66  float p0 = (params_->params())[0]; // should be 40.2198
67  float p1 = (params_->params())[1]; // should be -3.03103e-6
68 
69  //std::cout << "ieta=" << ieta << std::endl;
70 
71  float correctedEnergy = energy;
72  if (ieta < p0)
73  correctedEnergy = energy;
74  else
75  correctedEnergy = energy / (1.0 + p1 * (ieta - p0) * (ieta - p0));
76  //std::cout << "ECEC fEta = " << correctedEnergy << std::endl;
77  return correctedEnergy;
78 }

References qcdUeDQM_cfi::algorithm, HCALHighEnergyHPDFilter_cfi::energy, PVValHelper::eta, LEDCalibrationChannels::ieta, p1, EcalFunParams::params(), and params_.

Referenced by getValue().

◆ getParameters()

const EcalClusterEnergyCorrectionObjectSpecificParameters* EcalClusterEnergyCorrectionObjectSpecific::getParameters ( ) const
inline

Definition at line 21 of file EcalClusterEnergyCorrectionObjectSpecific.cc.

21 { return params_; }

References params_.

◆ getValue() [1/2]

float EcalClusterEnergyCorrectionObjectSpecific::getValue ( const reco::BasicCluster ,
const EcalRecHitCollection  
) const
inlineoverridevirtual

Implements EcalClusterFunctionBaseClass.

Definition at line 27 of file EcalClusterEnergyCorrectionObjectSpecific.cc.

27 { return 0.; };

◆ getValue() [2/2]

float EcalClusterEnergyCorrectionObjectSpecific::getValue ( const reco::SuperCluster superCluster,
const int  mode 
) const
overridevirtual

Implements EcalClusterFunctionBaseClass.

Definition at line 519 of file EcalClusterEnergyCorrectionObjectSpecific.cc.

520  {
521  float corr = 1.;
522  float corr2 = 1.;
523  float energy = 0;
524 
525  int subdet = superCluster.seed()->hitsAndFractions()[0].first.subdetId();
526  //std::cout << "subdet="<< subdet<< std::endl;
527 
528  //std::cout << "rawEnergy=" << superCluster.rawEnergy() << " SCeta=" << superCluster.eta() << std::endl;
529 
530  if (subdet == EcalBarrel) {
531  float cetacorr = fEta(superCluster.rawEnergy(), superCluster.eta(), 0) / superCluster.rawEnergy();
532  //std::cout << "cetacorr=" <<cetacorr<< std::endl;
533 
534  energy = superCluster.rawEnergy() * cetacorr; //previously in CMSSW
535  //energy = superCluster.rawEnergy()*fEta(e5x5, superCluster.seed()->eta(), 0)/e5x5;
536  } else if (subdet == EcalEndcap) {
537  energy = superCluster.rawEnergy() + superCluster.preshowerEnergy();
538  }
539 
540  float newEnergy = energy;
541 
542  if (mode == 0) { //Electron
543 
544  corr = fBremEta(superCluster.phiWidth() / superCluster.etaWidth(), superCluster.eta(), 0);
545 
546  float et = energy * std::sin(2 * std::atan(std::exp(-superCluster.eta()))) / corr;
547 
548  if (subdet == EcalBarrel)
549  corr2 = corr * fEt(et, 0);
550  if (subdet == EcalEndcap)
551  corr2 = corr * fEnergy(energy / corr, 1);
552 
553  newEnergy = energy / corr2;
554  }
555 
556  if (mode == 1) { //low R9 Photons
557 
558  corr = fBremEta(superCluster.phiWidth() / superCluster.etaWidth(), superCluster.eta(), 1);
559 
560  float et = energy * std::sin(2 * std::atan(std::exp(-superCluster.eta()))) / corr;
561 
562  if (subdet == EcalBarrel)
563  corr2 = corr * fEt(et, 2);
564  if (subdet == EcalEndcap)
565  corr2 = corr * fEnergy(energy / corr, 3);
566 
567  newEnergy = energy / corr2;
568  }
569 
570  return newEnergy;
571 }

References alignCSCRings::corr, EcalBarrel, EcalEndcap, HCALHighEnergyHPDFilter_cfi::energy, EgHLTOffHistBins_cfi::et, reco::CaloCluster::eta(), reco::SuperCluster::etaWidth(), JetChargeProducer_cfi::exp, fBremEta(), fEnergy(), fEt(), fEta(), ALCARECOPromptCalibProdSiPixelAli0T_cff::mode, reco::SuperCluster::phiWidth(), reco::SuperCluster::preshowerEnergy(), reco::SuperCluster::rawEnergy(), reco::SuperCluster::seed(), and funct::sin().

◆ init()

void EcalClusterEnergyCorrectionObjectSpecific::init ( const edm::EventSetup es)
overridevirtual

Member Data Documentation

◆ esParams_

edm::ESHandle<EcalClusterEnergyCorrectionObjectSpecificParameters> EcalClusterEnergyCorrectionObjectSpecific::esParams_
private

Definition at line 38 of file EcalClusterEnergyCorrectionObjectSpecific.cc.

Referenced by init().

◆ params_

const EcalClusterEnergyCorrectionObjectSpecificParameters* EcalClusterEnergyCorrectionObjectSpecific::params_
private
EcalClusterEnergyCorrectionObjectSpecific::params_
const EcalClusterEnergyCorrectionObjectSpecificParameters * params_
Definition: EcalClusterEnergyCorrectionObjectSpecific.cc:39
EcalClusterEnergyCorrectionObjectSpecific::fEt
float fEt(float et, int algorithm) const
Definition: EcalClusterEnergyCorrectionObjectSpecific.cc:375
EcalClusterEnergyCorrectionObjectSpecific::fEta
float fEta(float energy, float eta, int algorithm) const
Definition: EcalClusterEnergyCorrectionObjectSpecific.cc:58
ALCARECOPromptCalibProdSiPixelAli0T_cff.mode
mode
Definition: ALCARECOPromptCalibProdSiPixelAli0T_cff.py:96
pfMETCorrectionType0_cfi.par1
par1
Definition: pfMETCorrectionType0_cfi.py:48
EcalBarrel
Definition: EcalSubdetector.h:10
funct::sin
Sin< T >::type sin(const T &t)
Definition: Sin.h:22
EcalClusterEnergyCorrectionObjectSpecific::esParams_
edm::ESHandle< EcalClusterEnergyCorrectionObjectSpecificParameters > esParams_
Definition: EcalClusterEnergyCorrectionObjectSpecific.cc:38
edm::EventSetup::get
T get() const
Definition: EventSetup.h:87
reco::SuperCluster::phiWidth
double phiWidth() const
obtain phi and eta width of the Super Cluster
Definition: SuperCluster.h:66
pfMETCorrectionType0_cfi.par3
par3
Definition: pfMETCorrectionType0_cfi.py:50
EcalClusterEnergyCorrectionObjectSpecific::fBremEta
float fBremEta(float sigmaPhiSigmaEta, float eta, int algorithm) const
Definition: EcalClusterEnergyCorrectionObjectSpecific.cc:80
alignCSCRings.corr
dictionary corr
Definition: alignCSCRings.py:124
PVValHelper::eta
Definition: PVValidationHelpers.h:70
hgcalTowerMapProducer_cfi.nBinsEta
nBinsEta
Definition: hgcalTowerMapProducer_cfi.py:10
EcalClusterEnergyCorrectionObjectSpecificParametersRcd
Definition: EcalClusterEnergyCorrectionObjectSpecificParametersRcd.h:5
HCALHighEnergyHPDFilter_cfi.energy
energy
Definition: HCALHighEnergyHPDFilter_cfi.py:5
EcalClusterEnergyCorrectionObjectSpecific::fEnergy
float fEnergy(float e, int algorithm) const
Definition: EcalClusterEnergyCorrectionObjectSpecific.cc:470
ET
#define ET
Definition: GenericBenchmark.cc:27
EcalEndcap
Definition: EcalSubdetector.h:10
LEDCalibrationChannels.ieta
ieta
Definition: LEDCalibrationChannels.py:63
reco::SuperCluster::seed
const CaloClusterPtr & seed() const
seed BasicCluster
Definition: SuperCluster.h:77
reco::CaloCluster::eta
double eta() const
pseudorapidity of cluster centroid
Definition: CaloCluster.h:181
pfMETCorrectionType0_cfi.par0
par0
Definition: pfMETCorrectionType0_cfi.py:47
pfMETCorrectionType0_cfi.par2
par2
Definition: pfMETCorrectionType0_cfi.py:49
qcdUeDQM_cfi.algorithm
algorithm
Definition: qcdUeDQM_cfi.py:32
p1
double p1[4]
Definition: TauolaWrapper.h:89
EgHLTOffHistBins_cfi.et
et
Definition: EgHLTOffHistBins_cfi.py:8
get
#define get
EcalFunParams::params
EcalFunctionParameters & params()
Definition: EcalFunctionParameters.h:13
reco::SuperCluster::preshowerEnergy
double preshowerEnergy() const
energy deposited in preshower
Definition: SuperCluster.h:61
reco::SuperCluster::rawEnergy
double rawEnergy() const
raw uncorrected energy (sum of energies of component BasicClusters)
Definition: SuperCluster.h:58
Exception
Definition: hltDiff.cc:245
reco::SuperCluster::etaWidth
double etaWidth() const
Definition: SuperCluster.h:67
L1TowerCalibrationProducer_cfi.iEta
iEta
Definition: L1TowerCalibrationProducer_cfi.py:60
funct::abs
Abs< T >::type abs(const T &t)
Definition: Abs.h:22
JetChargeProducer_cfi.exp
exp
Definition: JetChargeProducer_cfi.py:6