ATLAS Offline Software
Functions
egammaMVALayerDepth.cxx File Reference
#include <egammaMVACalib/egammaMVALayerDepth.h>
#include <cmath>
Include dependency graph for egammaMVALayerDepth.cxx:

Go to the source code of this file.

Functions

std::array< float, 4 > get_MVAradius (float eta)
 helper function to compute shower depth More...
 

Function Documentation

◆ get_MVAradius()

std::array<float, 4> get_MVAradius ( float  eta)

helper function to compute shower depth

Definition at line 10 of file egammaMVALayerDepth.cxx.

11 {
12  eta = std::abs(eta);
13  std::array<float, 4> radius{};
14  if (eta / 0.025 < 57)
15  {
16  static const float
17  X0IN = 1.6;
18  static const float
19  // 1.7 X0 before strips
20  X0S1 = 6.0;
21  static const float
22  // 6 X0 till end of strips
23  // BEND1 = 152.1000, // first 3 bends radii (cm)
24  // BEND2 = 155.9659,
25  // BEND3 = 159.7202,
26  ETASTEP = 0.8;
27  static const float
28  // where lead changes
29  // DENSHI = 2.137, // cm/X0 high density
30  // DENSLO = 2.695, // cm/X0 low density
31  X0THI = 23.74;
32  static const float
33  // total depth high density part (not indep?)
34  X0TLO = 19.177; // total depth low density part (not indep?)
35 
36  float X0T;
37  // float DENS, X0T, RLO, RHI;
38  float R12;
39  float R23;
40  float R0;
41  float R1;
42  float R2;
43  float R3;
44 
45  if (eta < ETASTEP) {
46  // DENS = DENSHI;
47  X0T = X0THI;
48  // RLO = BEND2; // break strips betw bends 2 and 3
49  // RHI = BEND3;
50  }
51  else {
52  // DENS = DENSLO;
53  X0T = X0TLO;
54  // RLO = BEND1; // break strips betw bends 1 and 2
55  // RHI = BEND2;
56  }
57 
58  R0 = (X0IN) * std::cosh(eta);
59 
60  //.. actual radius where S1 should end
61 
62  R12 = X0S1;
63 
64  //.. total depth of calo at given eta
65 
66  float RADLTOT = X0T*std::cosh(eta);
67 
68 
69  if (eta < 0.5) {
70  R23 = 22 * std::cosh(eta);
71  } else {
72  R23 = 25;
73  }
74 
75  R1 = R0 + (R12 - R0)/2;
76  R2 = R12 + (R23 - R12)/2;
77  R3 = R23 + (RADLTOT - R23)/2;
78 
79  radius[0] = R0;
80  radius[1] = R1;
81  radius[2] = R2;
82  radius[3] = R3;
83  }
84  else
85  {
86  double x0=0.;
87  double x1=0.;
88  double x2=0.;
89  double x3=0.;
90 
91  float abs_ETA = std::abs(eta);
92 
93  // TODO: find a better solution from cell 60, 61 (first two)
94  if (abs_ETA>1.500 && abs_ETA<=1.525) {x0=0.; x1=8.85762; x2=19.5168; x3=30.0369;} // COPIED FROM 62 !!!
95  else if (abs_ETA>1.525 && abs_ETA<=1.550) {x0=0.; x1=8.85762; x2=19.5168; x3=30.0369;} // COPIED FROM 62 !!!
96  else if (abs_ETA>1.550 && abs_ETA<=1.575) {x0=0.; x1=8.85762; x2=19.5168; x3=30.0369;}
97  else if (abs_ETA>1.575 && abs_ETA<=1.600) {x0=0.; x1=7.24613; x2=17.9683; x3=28.5757;}
98  else if (abs_ETA>1.600 && abs_ETA<=1.625) {x0=0.; x1=7.11249; x2=17.9466; x3=28.6607;}
99  else if (abs_ETA>1.625 && abs_ETA<=1.650) {x0=0.; x1=7.03737; x2=17.7263; x3=28.4004;}
100  else if (abs_ETA>1.650 && abs_ETA<=1.675) {x0=0.; x1=7.44517; x2=18.1864; x3=28.9547;}
101  else if (abs_ETA>1.675 && abs_ETA<=1.700) {x0=0.; x1=7.74611; x2=18.5419; x3=29.3555;}
102  else if (abs_ETA>1.700 && abs_ETA<=1.725) {x0=0.; x1=8.06184; x2=18.8982; x3=29.8214;}
103  else if (abs_ETA>1.725 && abs_ETA<=1.750) {x0=0.; x1=6.90503; x2=17.8396; x3=28.7947;}
104  else if (abs_ETA>1.750 && abs_ETA<=1.775) {x0=0.; x1=6.53893; x2=17.5996; x3=28.7122;}
105  else if (abs_ETA>1.775 && abs_ETA<=1.800) {x0=0.; x1=6.42897; x2=17.1062; x3=28.3578;}
106  else if (abs_ETA>1.800 && abs_ETA<=1.825) {x0=0.; x1=6.41139; x2=17.1382; x3=28.4191;}
107  else if (abs_ETA>1.825 && abs_ETA<=1.850) {x0=0.; x1=5.72471; x2=16.4543; x3=27.8796;}
108  else if (abs_ETA>1.850 && abs_ETA<=1.875) {x0=0.; x1=5.19018; x2=16.1606; x3=27.7097;}
109  else if (abs_ETA>1.875 && abs_ETA<=1.900) {x0=0.; x1=5.04008; x2=16.1174; x3=27.7649;}
110  else if (abs_ETA>1.900 && abs_ETA<=1.925) {x0=0.; x1=5.01225; x2=16.184; x3=27.9175;}
111  else if (abs_ETA>1.925 && abs_ETA<=1.950) {x0=0.; x1=4.95996; x2=16.2482; x3=28.1358;}
112  else if (abs_ETA>1.950 && abs_ETA<=1.975) {x0=0.; x1=4.98242; x2=16.3591; x3=28.3336;}
113  else if (abs_ETA>1.975 && abs_ETA<=2.000) {x0=0.; x1=5.04856; x2=16.4194; x3=28.5289;}
114  else if (abs_ETA>2.000 && abs_ETA<=2.025) {x0=0.; x1=5.32584; x2=16.8194; x3=29.0619;}
115  else if (abs_ETA>2.025 && abs_ETA<=2.050) {x0=0.; x1=5.2971; x2=16.8203; x3=29.1545;}
116  else if (abs_ETA>2.050 && abs_ETA<=2.075) {x0=0.; x1=5.41049; x2=17.0891; x3=29.5856;}
117  else if (abs_ETA>2.075 && abs_ETA<=2.100) {x0=0.; x1=5.48954; x2=17.2965; x3=29.9571;}
118  else if (abs_ETA>2.100 && abs_ETA<=2.125) {x0=0.; x1=5.50876; x2=16.8573; x3=29.6199;}
119  else if (abs_ETA>2.125 && abs_ETA<=2.150) {x0=0.; x1=5.45123; x2=16.885; x3=29.8321;}
120  else if (abs_ETA>2.150 && abs_ETA<=2.175) {x0=0.; x1=5.54906; x2=17.1228; x3=30.2044;}
121  else if (abs_ETA>2.175 && abs_ETA<=2.200) {x0=0.; x1=5.53662; x2=17.1833; x3=30.4852;}
122  else if (abs_ETA>2.200 && abs_ETA<=2.225) {x0=0.; x1=5.46801; x2=17.1857; x3=30.5842;}
123  else if (abs_ETA>2.225 && abs_ETA<=2.250) {x0=0.; x1=5.45581; x2=16.6621; x3=30.2958;}
124  else if (abs_ETA>2.250 && abs_ETA<=2.275) {x0=0.; x1=5.46682; x2=16.7899; x3=30.5222;}
125  else if (abs_ETA>2.275 && abs_ETA<=2.300) {x0=0.; x1=5.52693; x2=16.9916; x3=30.9557;}
126  else if (abs_ETA>2.300 && abs_ETA<=2.325) {x0=0.; x1=5.53211; x2=17.0801; x3=31.1637;}
127  else if (abs_ETA>2.325 && abs_ETA<=2.350) {x0=0.; x1=4.79919; x2=16.4387; x3=31.5318;}
128  else if (abs_ETA>2.350 && abs_ETA<=2.375) {x0=0.; x1=4.80101; x2=16.5808; x3=31.8533;}
129  else if (abs_ETA>2.375 && abs_ETA<=2.400) {x0=0.; x1=4.77726; x2=15.9355; x3=31.4454;}
130  else if (abs_ETA>2.400 && abs_ETA<=2.425) {x0=0.; x1=4.76845; x2=16.0665; x3=31.8002;}
131  else if (abs_ETA>2.425 && abs_ETA<=2.450) {x0=0.; x1=4.5959; x2=15.9977; x3=32.1175;}
132  else if (abs_ETA>2.450 && abs_ETA<=2.475) {x0=0.; x1=4.68513; x2=16.2385; x3=32.5042;}
133  else if (abs_ETA>2.475 && abs_ETA<=2.500) {x0=0.; x1=4.7232; x2=16.4144; x3=33.028;}
134 
135  radius[0] = x0;
136  radius[1] = x1;
137  radius[2] = x2;
138  radius[3] = x3;
139  }
140  return radius;
141 }
plotBeamSpotCompare.x1
x1
Definition: plotBeamSpotCompare.py:216
eta
Scalar eta() const
pseudorapidity method
Definition: AmgMatrixBasePlugin.h:83
plotBeamSpotCompare.x2
x2
Definition: plotBeamSpotCompare.py:218
MuonR4::SegmentFit::ParamDefs::x0
@ x0
ParticleGun_SamplingFraction.radius
radius
Definition: ParticleGun_SamplingFraction.py:96