|
| float | calc0 (float, float, const CaloRec::Array< 2 > &) const |
| float | calc3 (float, float, const CaloRec::Array< 2 > &) const |
| float | calc4 (float, float, const CaloRec::Array< 2 > &) const |
| float | calc5 (float, float, const CaloRec::Array< 2 > &) const |
| float | calc10 (float, float, const CaloRec::Array< 2 > &) const |
| float | calc11 (float, float, const CaloRec::Array< 2 > &) const |
Definition at line 50 of file EgammaSshapeCalibration.h.
◆ Builder()
| EgammaSshapeCalibration::Builder::Builder |
( |
const EgammaSshapeCalibration & | corr, |
|
|
double | aeta, |
|
|
double | u, |
|
|
int | region_ndx ) |
Constructor.
Gets the parent correction object, the abs(eta) at which the correction is being evaluated (in cal-local coordinates), the fractional cell offset u, and the index of the region for this correction.
Definition at line 234 of file EgammaSshapeCalibration.cxx.
243{ }
const EgammaSshapeCalibration & m_corr
◆ calc0()
| float EgammaSshapeCalibration::Builder::calc0 |
( |
float | aeta, |
|
|
float | u, |
|
|
const CaloRec::Array< 2 > & | coef ) const |
|
private |
Definition at line 301 of file EgammaSshapeCalibration.cxx.
304{
305 const unsigned int NPAR = 5;
307
309 for (
unsigned int i=0;
i < NPAR;
i++) {
310 CaloRec::Array<1> xcoef =
coef[
i];
311 double out = xcoef[0];
312 for (
unsigned int j=1; j<
degree; j++)
313 out = out * aeta + xcoef[j];
315 }
316
317 double c = (
u>=0) ? pars[2] :
pars[3];
318 return pars[0] * (std::atan (pars[1] * u) +
c*
u +
pars[4]);
319}
@ u
Enums for curvilinear frames.
◆ calc10()
| float EgammaSshapeCalibration::Builder::calc10 |
( |
float | aeta, |
|
|
float | u, |
|
|
const CaloRec::Array< 2 > & | coef ) const |
|
private |
Definition at line 399 of file EgammaSshapeCalibration.cxx.
402{
403 const unsigned int NPAR = 7;
405
407 for (
unsigned int i=0;
i < NPAR;
i++) {
408 CaloRec::Array<1> xcoef =
coef[
i];
409 double out = xcoef[0];
410 for (
unsigned int j=1; j<
degree; j++)
411 out = out * aeta + xcoef[j];
413 }
414
416 if (u < 0)
417 c = -
c - 2*std::atan(pars[1]);
418
420 pars[4] * std::cos (u * pars[5] *
M_PI + pars[6]);
421 if (u > 0.9 || u < -0.9) {
422 double xdiff =
pars[4] * (std::cos (pars[5] *
M_PI + pars[6]) -
423 std::cos (- pars[5] *
M_PI + pars[6]));
424 if (u > 0.9)
425 offs -= (
u-0.9)/0.1 * xdiff/2;
426 else
427 offs += (-0.9-
u)/0.1 * xdiff/2;
428 }
429 return offs;
430}
◆ calc11()
| float EgammaSshapeCalibration::Builder::calc11 |
( |
float | aeta, |
|
|
float | u, |
|
|
const CaloRec::Array< 2 > & | coef ) const |
|
private |
Definition at line 435 of file EgammaSshapeCalibration.cxx.
438{
439 const unsigned int NPAR = 8;
441
443 for (
unsigned int i=0;
i < NPAR;
i++) {
444 CaloRec::Array<1> xcoef =
coef[
i];
445 double out = xcoef[0];
446 for (
unsigned int j=1; j<
degree; j++)
447 out = out * aeta + xcoef[j];
449 }
450
451 double c = (
u>=0) ? pars[2] :
pars[3];
452 return pars[0] * (std::atan (pars[1] * u) +
c*
u +
pars[4])
453 + pars[5] * std::cos (u * pars[6] *
M_PI + pars[7]);
454}
◆ calc3()
| float EgammaSshapeCalibration::Builder::calc3 |
( |
float | aeta, |
|
|
float | u, |
|
|
const CaloRec::Array< 2 > & | coef ) const |
|
private |
Definition at line 324 of file EgammaSshapeCalibration.cxx.
327{
328 const unsigned int NPAR = 4;
330
332 for (
unsigned int i=0;
i < NPAR;
i++) {
333 CaloRec::Array<1> xcoef =
coef[
i];
334 double out = xcoef[0];
335 for (
unsigned int j=1; j<
degree; j++)
336 out = out * aeta + xcoef[j];
338 }
339
341 if (u < 0)
342 c = -
c - 2*std::atan(pars[1]);
343 return pars[0] * (std::atan (pars[1] * u) +
c*
u +
pars[3]);
344}
◆ calc4()
| float EgammaSshapeCalibration::Builder::calc4 |
( |
float | aeta, |
|
|
float | u, |
|
|
const CaloRec::Array< 2 > & | coef ) const |
|
private |
Definition at line 349 of file EgammaSshapeCalibration.cxx.
352{
353 const unsigned int NPAR = 3;
355
357 for (
unsigned int i=0;
i < NPAR;
i++) {
358 CaloRec::Array<1> xcoef =
coef[
i];
359 double out = xcoef[0];
360 for (
unsigned int j=1; j<
degree; j++)
361 out = out * aeta + xcoef[j];
363 }
364
365 double b = std::max ((
double)pars[1], 1e-5);
366 double atanb = std::atan(b);
367 double sq = std::sqrt (b/atanb - 1);
368 double den = (
sq/
b*atanb - std::atan(
sq));
369 return pars[0]* ((- std::atan (b*u) +
u*atanb) / den +
370 pars[2]*(1-std::abs(u)));
371}
◆ calc5()
| float EgammaSshapeCalibration::Builder::calc5 |
( |
float | aeta, |
|
|
float | , |
|
|
const CaloRec::Array< 2 > & | coef ) const |
|
private |
Definition at line 376 of file EgammaSshapeCalibration.cxx.
379{
380 const unsigned int NPAR = 1;
382
383
385 for (
unsigned int i=0;
i < NPAR;
i++) {
386 CaloRec::Array<1> xcoef =
coef[
i];
387 double out = xcoef[0];
388 for (
unsigned int j=1; j<
degree; j++)
389 out = out * aeta + xcoef[j];
391 }
392
394}
◆ calculate()
| float EgammaSshapeCalibration::Builder::calculate |
( |
int | energy_ndx, |
|
|
bool & | good ) const |
|
virtual |
Calculate the correction for tabulated energy ENERGY_NDX.
Implements CaloClusterCorrectionCommon::TableBuilder.
Definition at line 248 of file EgammaSshapeCalibration.cxx.
249 {
250
251
253
254
255 if(coef[0].
end()[-1]==0) {
257 return 0;
258 }
259
260
261 int form;
262 CxxUtils::Array<2> forms =
m_corr.m_forms();
263 if (forms.
size(0) != 0 && forms.
size(1) != 0)
265 else
267
268
269
271 float ret = 0;
272 switch (form) {
273 case 0:
275 break;
276 case 3:
278 break;
279 case 4:
281 break;
282 case 5:
284 break;
285 case 10:
287 break;
288 case 11:
290 break;
291 default:
292 abort();
293 }
294
295 return ret;
296}
unsigned int size(unsigned int dim=0) const
Return the size of the array along one dimension.
float calc4(float, float, const CaloRec::Array< 2 > &) const
float calc0(float, float, const CaloRec::Array< 2 > &) const
float calc11(float, float, const CaloRec::Array< 2 > &) const
float calc10(float, float, const CaloRec::Array< 2 > &) const
float calc5(float, float, const CaloRec::Array< 2 > &) const
float calc3(float, float, const CaloRec::Array< 2 > &) const
◆ m_aeta
| double EgammaSshapeCalibration::Builder::m_aeta |
|
private |
◆ m_corr
◆ m_form
| int EgammaSshapeCalibration::Builder::m_form |
|
private |
◆ m_region_ndx
| int EgammaSshapeCalibration::Builder::m_region_ndx |
|
private |
◆ m_u
| double EgammaSshapeCalibration::Builder::m_u |
|
private |
The documentation for this class was generated from the following files: