CMS 3D CMS Logo

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
 
float getValue (const reco::SuperCluster &, const int mode) const override
 
float getValue (const reco::BasicCluster &, const EcalRecHitCollection &) const override
 
- Public Member Functions inherited from EcalClusterEnergyCorrectionObjectSpecificBaseClass
void checkInit () const
 
 EcalClusterEnergyCorrectionObjectSpecificBaseClass ()
 
 EcalClusterEnergyCorrectionObjectSpecificBaseClass (const edm::ParameterSet &)
 
const EcalClusterEnergyCorrectionObjectSpecificParametersgetParameters () const
 
void init (const edm::EventSetup &es) override
 
 ~EcalClusterEnergyCorrectionObjectSpecificBaseClass () override
 
- 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< 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 20 of file EcalClusterEnergyCorrectionObjectSpecific.h.

Constructor & Destructor Documentation

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

Member Function Documentation

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

Definition at line 29 of file EcalClusterEnergyCorrectionObjectSpecific.cc.

References Abs(), JetChargeProducer_cfi::exp, RecoTauPiZeroBuilderPlugins_cfi::par0, RecoTauPiZeroBuilderPlugins_cfi::par1, 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()
const EcalClusterEnergyCorrectionObjectSpecificParameters * params_
float EcalClusterEnergyCorrectionObjectSpecific::fEnergy ( float  e,
int  algorithm 
) const

Definition at line 408 of file EcalClusterEnergyCorrectionObjectSpecific.cc.

References JetChargeProducer_cfi::exp, RecoTauPiZeroBuilderPlugins_cfi::par0, RecoTauPiZeroBuilderPlugins_cfi::par1, EcalFunParams::params(), and EcalClusterEnergyCorrectionObjectSpecificBaseClass::params_.

Referenced by getValue().

409 {
410 
411  float par0 = -1;
412  float par1 = -1;
413  float par2 = -1;
414  float par3 = -1;
415  float par4 = -1;
416 
417  if (algorithm==0){ //Electrons EB
418  return 1.;
419  }
420 
421 
422  if (algorithm==1){ //Electrons EE
423 
424  par0 = (params_->params())[198];
425  par1 = (params_->params())[199];
426  par2 = (params_->params())[200];
427  par3 = (params_->params())[201];
428  par4 = (params_->params())[202];
429 
430  if (E > par0) E =par0;
431  if ( E < 0 ) return 1.;
432  if ( 0 <= E && E <= par0 ) return (par1 + E*par2 )*(1- par3*exp(E/par4 ));
433 
434  }
435 
436 
437  if (algorithm==2){ //Photons EB
438  return 1.;
439  }
440 
441 
442  if (algorithm==3){ //Photons EE
443 
444  par0 = (params_->params())[203];
445  par1 = (params_->params())[204];
446  par2 = (params_->params())[205];
447  //assignments to 'par3'&'par4' have been deleted from here as they serve no purpose and cause dead assignment errors
448 
449  if (E > par0 ) E = par0 ;
450  if ( E < 0 ) return 1.;
451  if ( 0 <= E && E <= par0 ) return par1 + E*par2;
452 
453  }
454 
455  return 1.;
456 }
EcalFunctionParameters & params()
const EcalClusterEnergyCorrectionObjectSpecificParameters * params_
float EcalClusterEnergyCorrectionObjectSpecific::fEt ( float  et,
int  algorithm 
) const

Definition at line 320 of file EcalClusterEnergyCorrectionObjectSpecific.cc.

References ET, JetChargeProducer_cfi::exp, RecoTauPiZeroBuilderPlugins_cfi::par0, RecoTauPiZeroBuilderPlugins_cfi::par1, 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  //assignments to 'par5'&'par6' have been deleted from here as they serve no purpose and cause dead assignment errors
339 
340  if (ET > 200) ET =200;
341  if ( ET < 5 ) return 1.;
342  if ( 5 <= ET && ET < 10 ) return par0 ;
343  if ( 10 <= ET && ET <= 200 ) return (par1 + ET*par2)*(1- par3*exp(ET/ par4));
344 
345  }
346 
347 
348  if (algorithm==1){ //Electrons EE
349 
350  par0 = (params_->params())[177];
351  par1 = (params_->params())[178];
352  par2 = (params_->params())[179];
353  par3 = (params_->params())[180];
354  par4 = (params_->params())[181];
355  //assignments to variables 'par5'&'par6' have been deleted from here as they serve no purpose and cause dead assignment errors
356 
357  if (ET > 200) ET =200;
358  if ( ET < 5 ) return 1.;
359  if ( 5 <= ET && ET < 10 ) return par0;
360  if ( 10 <= ET && ET <= 200 ) return ( par1 + ET*par2)*(1-par3*exp(ET/par4));
361 
362  }
363 
364 
365 
366  if (algorithm==2){ //Photons EB
367 
368  par0 = (params_->params())[184];
369  par1 = (params_->params())[185];
370  par2 = (params_->params())[186];
371  par3 = (params_->params())[187];
372  par4 = (params_->params())[188];
373  //assignments to 'par5'&'par6' have been deleted from here as they serve no purpose and cause dead assignment errors
374 
375  if ( ET < 5 ) return 1.;
376  if ( 5 <= ET && ET < 10 ) return par0 ;
377  if ( 10 <= ET && ET < 20 ) return par1 ;
378  if ( 20 <= ET && ET < 140 ) return par2 + par3*ET ;
379  if (140 <= ET ) return par4;
380 
381  }
382 
383 
384  if (algorithm==3){ //Photons EE
385 
386  par0 = (params_->params())[191];
387  par1 = (params_->params())[192];
388  par2 = (params_->params())[193];
389  par3 = (params_->params())[194];
390  par4 = (params_->params())[195];
391  par5 = (params_->params())[196];
392  par6 = (params_->params())[197];
393 
394  if ( ET < 5 ) return 1.;
395  if ( 5 <= ET && ET < 10 ) return par0 ;
396  if ( 10 <= ET && ET < 20 ) return par1 ;
397  if ( 20 <= ET && ET < 30 ) return par2 ;
398  if ( 30 <= ET && ET < 200 ) return par3 + par4 *ET + par5 *ET*ET ;
399  if ( 200 <= ET ) return par6 ;
400 
401  }
402 
403 
404  return 1.;
405 }
EcalFunctionParameters & params()
const EcalClusterEnergyCorrectionObjectSpecificParameters * params_
#define ET
float EcalClusterEnergyCorrectionObjectSpecific::fEta ( float  energy,
float  eta,
int  algorithm 
) const

Definition at line 8 of file EcalClusterEnergyCorrectionObjectSpecific.cc.

References 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
overridevirtual

Implements EcalClusterEnergyCorrectionObjectSpecificBaseClass.

Definition at line 460 of file EcalClusterEnergyCorrectionObjectSpecific.cc.

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

Referenced by EcalClusterEnergyCorrectionObjectSpecific().

461 {
462 
463  float corr = 1.;
464  float corr2 = 1.;
465  float energy = 0;
466 
467  int subdet = superCluster.seed()->hitsAndFractions()[0].first.subdetId();
468  //std::cout << "subdet="<< subdet<< std::endl;
469 
470  //std::cout << "rawEnergy=" << superCluster.rawEnergy() << " SCeta=" << superCluster.eta() << std::endl;
471 
472  if (subdet==EcalBarrel){
473  float cetacorr = fEta(superCluster.rawEnergy(), superCluster.eta(), 0)/superCluster.rawEnergy();
474  //std::cout << "cetacorr=" <<cetacorr<< std::endl;
475 
476  energy = superCluster.rawEnergy()*cetacorr; //previously in CMSSW
477  //energy = superCluster.rawEnergy()*fEta(e5x5, superCluster.seed()->eta(), 0)/e5x5;
478  }
479  else if (subdet==EcalEndcap){
480  energy = superCluster.rawEnergy()+superCluster.preshowerEnergy();
481  }
482 
483  float newEnergy = energy;
484 
485  if (mode==0){ //Electron
486 
487  corr = fBremEta(superCluster.phiWidth()/superCluster.etaWidth(), superCluster.eta(), 0);
488 
489  float et = energy*TMath::Sin(2*TMath::ATan(TMath::Exp(-superCluster.eta())))/corr;
490 
491  if (subdet==EcalBarrel) corr2 = corr * fEt(et, 0);
492  if (subdet==EcalEndcap) corr2 = corr * fEnergy(energy/corr, 1);
493 
494  newEnergy = energy/corr2;
495 
496  }
497 
498  if (mode==1){ //low R9 Photons
499 
500  corr = fBremEta(superCluster.phiWidth()/superCluster.etaWidth(), superCluster.eta(), 1);
501 
502  float et = energy*TMath::Sin(2*TMath::ATan(TMath::Exp(-superCluster.eta())))/corr;
503 
504  if (subdet==EcalBarrel) corr2 = corr * fEt(et, 2);
505  if (subdet==EcalEndcap) corr2 = corr * fEnergy(energy/corr, 3);
506 
507  newEnergy = energy/corr2;
508 
509  }
510 
511 
512 
513  return newEnergy;
514 }
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:168
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
et
define resolution functions of each parameter
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
float EcalClusterEnergyCorrectionObjectSpecific::getValue ( const reco::BasicCluster ,
const EcalRecHitCollection  
) const
inlineoverridevirtual