ATLAS Offline Software
Loading...
Searching...
No Matches
egammaqweta1c.cxx
Go to the documentation of this file.
1/*
2 Copyright (C) 2002-2024 CERN for the benefit of the ATLAS collaboration
3*/
4
7#include <cmath>
8
9float
10egammaqweta1c::Correct(const float eta, const float etacell, const float width)
11{
12
13 //Make correction to the width of the cluster shower in sampling 1
14 const float aeta = fabs(eta);
15 const float etarel = RelPosition(eta, etacell);
16 if (aeta < 1.0) {
17 return (width - 0.76 * pow(etarel, 2));
18 }
19 if (aeta < 1.45) {
20 return (width - 0.85 * pow(etarel, 2) + 1.9 * pow(etarel, 4));
21 }
22 if (aeta < 1.5) {
23 return width;
24 }
25 if (aeta < 1.8) {
26 return (width - 0.85 * pow(etarel, 2) + 1.9 * pow(etarel, 4));
27 }
28 if (aeta < 2.0) {
29 return (width - 0.84 * pow(etarel, 2));
30 }
31 if (aeta < 2.5) {
32 return (width - 0.40 * pow(etarel, 2) - 2.1 * pow(etarel, 4));
33 }
34 return width;
35}
36
37double
38egammaqweta1c::RelPosition(const float eta, const float etacell)
39{
40 /*
41 * get relative position within cell in eta of the cluster
42 * shower in sampling 1
43 */
44 const float aeta = fabs(eta);
45 if (aeta < 1.8) {
46 const float ngra = 8.;
47 const double dgra = 0.025 / ngra;
48 const double etapos = fabs(eta - etacell - dgra / 2.);
49 return (fmod(etapos, dgra) / dgra - 0.5);
50 }
51 if (aeta < 2.0) {
52 const float ngra = 6.;
53 const float dgra = 0.025 / ngra;
54 const double etapos = fabs(eta - etacell - dgra / 2.);
55 return (fmod(etapos, dgra) / dgra - 0.5);
56 }
57 if (aeta < 2.4) {
58 const float ngra = 4.;
59 const float dgra = 0.025 / ngra;
60 const double etapos = fabs(eta - etacell - dgra / 2.);
61 return (fmod(etapos, dgra) / dgra - 0.5);
62 }
63 if (aeta < 2.5) {
64 const float ngra = 1.;
65 const float dgra = 0.025 / ngra;
66 const double etapos = fabs(eta - etacell - dgra / 2.);
67 return (fmod(etapos, dgra) / dgra - 0.5);
68 }
69
70 return -999.;
71}
72
Scalar eta() const
pseudorapidity method
const double width
constexpr int pow(int base, int exp) noexcept
double RelPosition(const float eta, const float etacell)
returns relative position within the cell
float Correct(const float eta, const float etacell, const float width)
returns corrected width at eta