test
CMS 3D CMS Logo

 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Pages
List of all members | Public Member Functions
EcalClusterEnergyCorrectionObjectSpecific Class Reference

#include <EcalClusterEnergyCorrectionObjectSpecific.h>

Inheritance diagram for EcalClusterEnergyCorrectionObjectSpecific:
EcalClusterEnergyCorrectionObjectSpecificBaseClass EcalClusterFunctionBaseClass

Public Member Functions

 EcalClusterEnergyCorrectionObjectSpecific (const edm::ParameterSet &)
 
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
 
virtual float getValue (const reco::SuperCluster &, const int mode) const
 
virtual float getValue (const reco::BasicCluster &, const EcalRecHitCollection &) const
 
- Public Member Functions inherited from EcalClusterEnergyCorrectionObjectSpecificBaseClass
void checkInit () const
 
 EcalClusterEnergyCorrectionObjectSpecificBaseClass ()
 
 EcalClusterEnergyCorrectionObjectSpecificBaseClass (const edm::ParameterSet &)
 
const
EcalClusterEnergyCorrectionObjectSpecificParameters
getParameters () const
 
virtual void init (const edm::EventSetup &es)
 
virtual ~EcalClusterEnergyCorrectionObjectSpecificBaseClass ()
 
- Public Member Functions inherited from EcalClusterFunctionBaseClass
virtual float getValue (const reco::CaloCluster &) const
 
virtual ~EcalClusterFunctionBaseClass ()
 

Additional Inherited Members

- Protected Attributes inherited from EcalClusterEnergyCorrectionObjectSpecificBaseClass
edm::ESHandle
< EcalClusterEnergyCorrectionObjectSpecificParameters
esParams_
 
const
EcalClusterEnergyCorrectionObjectSpecificParameters
params_
 

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 20 of file EcalClusterEnergyCorrectionObjectSpecific.h.

Constructor & Destructor Documentation

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

Definition at line 22 of file EcalClusterEnergyCorrectionObjectSpecific.h.

22 {};

Member Function Documentation

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

Definition at line 29 of file EcalClusterEnergyCorrectionObjectSpecific.cc.

References Abs(), create_public_lumi_plots::exp, fitWZ::par0, EcalFunParams::params(), and EcalClusterEnergyCorrectionObjectSpecificBaseClass::params_.

Referenced by getValue().

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

Definition at line 411 of file EcalClusterEnergyCorrectionObjectSpecific.cc.

References create_public_lumi_plots::exp, fitWZ::par0, EcalFunParams::params(), and EcalClusterEnergyCorrectionObjectSpecificBaseClass::params_.

Referenced by getValue().

412 {
413 
414  float par0 = -1;
415  float par1 = -1;
416  float par2 = -1;
417  float par3 = -1;
418  float par4 = -1;
419 
420  if (algorithm==0){ //Electrons EB
421  return 1.;
422  }
423 
424 
425  if (algorithm==1){ //Electrons EE
426 
427  par0 = (params_->params())[198];
428  par1 = (params_->params())[199];
429  par2 = (params_->params())[200];
430  par3 = (params_->params())[201];
431  par4 = (params_->params())[202];
432 
433  if (E > par0) E =par0;
434  if ( E < 0 ) return 1.;
435  if ( 0 <= E && E <= par0 ) return (par1 + E*par2 )*(1- par3*exp(E/par4 ));
436 
437  }
438 
439 
440  if (algorithm==2){ //Photons EB
441  return 1.;
442  }
443 
444 
445  if (algorithm==3){ //Photons EE
446 
447  par0 = (params_->params())[203];
448  par1 = (params_->params())[204];
449  par2 = (params_->params())[205];
450  par3 = (params_->params())[206];//should be 0 (not used)
451  par4 = (params_->params())[207];//should be 0 (not used)
452 
453  if (E > par0 ) E = par0 ;
454  if ( E < 0 ) return 1.;
455  if ( 0 <= E && E <= par0 ) return par1 + E*par2;
456 
457  }
458 
459  return 1.;
460 }
EcalFunctionParameters & params()
tuple par0
Definition: fitWZ.py:51
const EcalClusterEnergyCorrectionObjectSpecificParameters * params_
float EcalClusterEnergyCorrectionObjectSpecific::fEt ( float  et,
int  algorithm 
) const

Definition at line 320 of file EcalClusterEnergyCorrectionObjectSpecific.cc.

References ET, create_public_lumi_plots::exp, fitWZ::par0, EcalFunParams::params(), and EcalClusterEnergyCorrectionObjectSpecificBaseClass::params_.

Referenced by getValue().

321 {
322 
323  float par0 = -1;
324  float par1 = -1;
325  float par2 = -1;
326  float par3 = -1;
327  float par4 = -1;
328  float par5 = -1;
329  float par6 = -1;
330 
331  if (algorithm==0){ //Electrons EB
332 
333  par0 = (params_->params())[170];
334  par1 = (params_->params())[171];
335  par2 = (params_->params())[172];
336  par3 = (params_->params())[173];
337  par4 = (params_->params())[174];
338  par5 = (params_->params())[175];//should be 0 (not used)
339  par6 = (params_->params())[176];//should be 0 (not used)
340 
341  if (ET > 200) ET =200;
342  if ( ET < 5 ) return 1.;
343  if ( 5 <= ET && ET < 10 ) return par0 ;
344  if ( 10 <= ET && ET <= 200 ) return (par1 + ET*par2)*(1- par3*exp(ET/ par4));
345 
346  }
347 
348 
349  if (algorithm==1){ //Electrons EE
350 
351  par0 = (params_->params())[177];
352  par1 = (params_->params())[178];
353  par2 = (params_->params())[179];
354  par3 = (params_->params())[180];
355  par4 = (params_->params())[181];
356  par5 = (params_->params())[182];//should be 0 (not used)
357  par6 = (params_->params())[183];//should be 0 (not used)
358 
359  if (ET > 200) ET =200;
360  if ( ET < 5 ) return 1.;
361  if ( 5 <= ET && ET < 10 ) return par0;
362  if ( 10 <= ET && ET <= 200 ) return ( par1 + ET*par2)*(1-par3*exp(ET/par4));
363 
364  }
365 
366 
367 
368  if (algorithm==2){ //Photons EB
369 
370  par0 = (params_->params())[184];
371  par1 = (params_->params())[185];
372  par2 = (params_->params())[186];
373  par3 = (params_->params())[187];
374  par4 = (params_->params())[188];
375  par5 = (params_->params())[189];//should be 0 (not used)
376  par6 = (params_->params())[190];//should be 0 (not used)
377 
378  if ( ET < 5 ) return 1.;
379  if ( 5 <= ET && ET < 10 ) return par0 ;
380  if ( 10 <= ET && ET < 20 ) return par1 ;
381  if ( 20 <= ET && ET < 140 ) return par2 + par3*ET ;
382  if (140 <= ET ) return par4;
383 
384  }
385 
386 
387  if (algorithm==3){ //Photons EE
388 
389  par0 = (params_->params())[191];
390  par1 = (params_->params())[192];
391  par2 = (params_->params())[193];
392  par3 = (params_->params())[194];
393  par4 = (params_->params())[195];
394  par5 = (params_->params())[196];
395  par6 = (params_->params())[197];
396 
397  if ( ET < 5 ) return 1.;
398  if ( 5 <= ET && ET < 10 ) return par0 ;
399  if ( 10 <= ET && ET < 20 ) return par1 ;
400  if ( 20 <= ET && ET < 30 ) return par2 ;
401  if ( 30 <= ET && ET < 200 ) return par3 + par4 *ET + par5 *ET*ET ;
402  if ( 200 <= ET ) return par6 ;
403 
404  }
405 
406 
407  return 1.;
408 }
EcalFunctionParameters & params()
tuple par0
Definition: fitWZ.py:51
const EcalClusterEnergyCorrectionObjectSpecificParameters * params_
#define ET
float EcalClusterEnergyCorrectionObjectSpecific::fEta ( float  energy,
float  eta,
int  algorithm 
) const

Definition at line 8 of file EcalClusterEnergyCorrectionObjectSpecific.cc.

References relval_parameters_module::energy, p1, EcalFunParams::params(), and EcalClusterEnergyCorrectionObjectSpecificBaseClass::params_.

Referenced by getValue().

9 {
10 
11  //std::cout << "fEta function" << std::endl;
12 
13  // this correction is setup only for EB
14  if ( algorithm != 0 ) return energy;
15 
16  float ieta = fabs(eta)*(5/0.087);
17  float p0 = (params_->params())[0]; // should be 40.2198
18  float p1 = (params_->params())[1]; // should be -3.03103e-6
19 
20  //std::cout << "ieta=" << ieta << std::endl;
21 
22  float correctedEnergy = energy;
23  if ( ieta < p0 ) correctedEnergy = energy;
24  else correctedEnergy = energy/(1.0 + p1*(ieta-p0)*(ieta-p0));
25  //std::cout << "ECEC fEta = " << correctedEnergy << std::endl;
26  return correctedEnergy;
27 }
EcalFunctionParameters & params()
const EcalClusterEnergyCorrectionObjectSpecificParameters * params_
double p1[4]
Definition: TauolaWrapper.h:89
float EcalClusterEnergyCorrectionObjectSpecific::getValue ( const reco::SuperCluster superCluster,
const int  mode 
) const
virtual

Implements EcalClusterEnergyCorrectionObjectSpecificBaseClass.

Definition at line 464 of file EcalClusterEnergyCorrectionObjectSpecific.cc.

References corr, EcalBarrel, EcalEndcap, relval_parameters_module::energy, reco::CaloCluster::eta(), reco::SuperCluster::etaWidth(), fBremEta(), fEnergy(), fEt(), fEta(), reco::SuperCluster::phiWidth(), reco::SuperCluster::preshowerEnergy(), reco::SuperCluster::rawEnergy(), and reco::SuperCluster::seed().

465 {
466 
467  float corr = 1.;
468  float corr2 = 1.;
469  float energy = 0;
470 
471  int subdet = superCluster.seed()->hitsAndFractions()[0].first.subdetId();
472  //std::cout << "subdet="<< subdet<< std::endl;
473 
474  //std::cout << "rawEnergy=" << superCluster.rawEnergy() << " SCeta=" << superCluster.eta() << std::endl;
475 
476  if (subdet==EcalBarrel){
477  float cetacorr = fEta(superCluster.rawEnergy(), superCluster.eta(), 0)/superCluster.rawEnergy();
478  //std::cout << "cetacorr=" <<cetacorr<< std::endl;
479 
480  energy = superCluster.rawEnergy()*cetacorr; //previously in CMSSW
481  //energy = superCluster.rawEnergy()*fEta(e5x5, superCluster.seed()->eta(), 0)/e5x5;
482  }
483  else if (subdet==EcalEndcap){
484  energy = superCluster.rawEnergy()+superCluster.preshowerEnergy();
485  }
486 
487  float newEnergy = energy;
488 
489  if (mode==0){ //Electron
490 
491  corr = fBremEta(superCluster.phiWidth()/superCluster.etaWidth(), superCluster.eta(), 0);
492 
493  float et = energy*TMath::Sin(2*TMath::ATan(TMath::Exp(-superCluster.eta())))/corr;
494 
495  if (subdet==EcalBarrel) corr2 = corr * fEt(et, 0);
496  if (subdet==EcalEndcap) corr2 = corr * fEnergy(energy/corr, 1);
497 
498  newEnergy = energy/corr2;
499 
500  }
501 
502  if (mode==1){ //low R9 Photons
503 
504  corr = fBremEta(superCluster.phiWidth()/superCluster.etaWidth(), superCluster.eta(), 1);
505 
506  float et = energy*TMath::Sin(2*TMath::ATan(TMath::Exp(-superCluster.eta())))/corr;
507 
508  if (subdet==EcalBarrel) corr2 = corr * fEt(et, 2);
509  if (subdet==EcalEndcap) corr2 = corr * fEnergy(energy/corr, 3);
510 
511  newEnergy = energy/corr2;
512 
513  }
514 
515 
516 
517  return newEnergy;
518 }
double phiWidth() const
obtain phi and eta width of the Super Cluster
Definition: SuperCluster.h:55
double eta() const
pseudorapidity of cluster centroid
Definition: CaloCluster.h:163
double etaWidth() const
Definition: SuperCluster.h:56
JetCorrectorParameters corr
Definition: classes.h:5
double rawEnergy() const
raw uncorrected energy (sum of energies of component BasicClusters)
Definition: SuperCluster.h:47
float fBremEta(float sigmaPhiSigmaEta, float eta, int algorithm) const
const CaloClusterPtr & seed() const
seed BasicCluster
Definition: SuperCluster.h:66
double preshowerEnergy() const
energy deposited in preshower
Definition: SuperCluster.h:50
float fEta(float energy, float eta, int algorithm) const
virtual float EcalClusterEnergyCorrectionObjectSpecific::getValue ( const reco::BasicCluster ,
const EcalRecHitCollection  
) const
inlinevirtual