Helper to calculate the shower depth as used in the calib hits SW cluster correction.
More...
#include <CaloSwCalibHitsShowerDepth.h>
|
| static double | depth (const float aeta, const float start_crack, const float end_crack, const CaloRec::Array< 2 > &sampling_depth, const float etamax, const xAOD::CaloCluster *cluster, MsgStream &log) |
| | Calculate the depth of the cluster.
|
|
| static void | barrelCoefs (const float aeta, float R[4]) |
| | Calculate the sampling depth coefficients for the barrel.
|
| static bool | endcapCoefs (const float aeta, const CaloRec::Array< 2 > &sampling_depth, const float etamax, float R[4]) |
| | Calculate the sampling depth coefficients for the endcap.
|
Helper to calculate the shower depth as used in the calib hits SW cluster correction.
Broken out into a separate class so that it can be used by other components.
Definition at line 32 of file CaloSwCalibHitsShowerDepth.h.
◆ barrelCoefs()
| void CaloClusterCorr::CaloSwCalibHitsShowerDepth::barrelCoefs |
( |
const float | aeta, |
|
|
float | R[4] ) |
|
staticprivate |
Calculate the sampling depth coefficients for the barrel.
- Parameters
-
| aeta | abs(eta) of the cluster. |
| R[out] | The set of coefficients per layer. |
Definition at line 94 of file CaloSwCalibHitsShowerDepth.cxx.
96{
97
98
99
100
101
102
103
104 static const float
105 X0IN = 1.6,
106 X0S1 = 6.0,
107
108
109
110
111
112
113
114
115 ETASTEP = 0.8,
116
117
118 X0THI = 23.74,
119 X0TLO = 19.177;
120
121 float X0T;
122 float R12, R23;
123
124 if ( aeta < ETASTEP ) {
125
126 X0T = X0THI;
127
128
129 }else{
130
131 X0T = X0TLO;
132
133
134 }
135
136 R[0] = (X0IN) * cosh(aeta);
137
138
139
140
141 R12 = X0S1;
142
143
144
145 float RADLTOT = X0T*cosh(aeta);
146
147
148
149 if (aeta < 0.5){
150 R23 = 22 * cosh(aeta) ;
151 }else{
152 R23 = 25;
153 }
154
155 R[1] =
R[0] + (R12 -
R[0])/2 ;
156 R[2] = R12 + (R23 - R12)/2;
157 R[3] = R23 + (RADLTOT - R23)/2;
158}
double R(const INavigable4Momentum *p1, const double v_eta, const double v_phi)
◆ depth()
| double CaloClusterCorr::CaloSwCalibHitsShowerDepth::depth |
( |
const float | aeta, |
|
|
const float | start_crack, |
|
|
const float | end_crack, |
|
|
const CaloRec::Array< 2 > & | sampling_depth, |
|
|
const float | etamax, |
|
|
const xAOD::CaloCluster * | cluster, |
|
|
MsgStream & | log ) |
|
static |
Calculate the depth of the cluster.
- Parameters
-
| aeta | abs(eta) of the cluster. |
| start_crack | Eta of the start of the crack. |
| end_crack | Eta of the end of the crack. |
| sampling_depth | Array of sampling depths per bin/sampling in the EC. |
| etamax | Maximum eta value in sampling_depth. |
| cluster | Cluster for which to calculate the depth. |
| log | Stream for debug messages. |
Note that the sampling depth is used only in the endcap. Parameters for the barrel are hardcoded. (FIXME!) Parameters are passed by reference to allow them to be changed.
Definition at line 36 of file CaloSwCalibHitsShowerDepth.cxx.
43{
45 int si;
46
47 if (aeta < start_crack) {
49 si = 0;
50 }
51 else if (aeta > end_crack) {
53 return 0;
54 si = 1;
55 }
56 else
57 return 0;
58
60 { CaloSampling::PreSamplerB,
61 CaloSampling::EMB1,
62 CaloSampling::EMB2,
63 CaloSampling::EMB3 },
64 { CaloSampling::PreSamplerE,
65 CaloSampling::EME1,
66 CaloSampling::EME2,
67 CaloSampling::EME3 }
68 };
69
70 double rsum = 0;
71 double esum = 0;
72 for (
int i=0;
i < 4;
i++) {
73 float e = cluster->
eSample (samps[si][i]);
76 }
77
78 if (esum == 0)
79 return 0;
80
81 double depth = rsum / esum;
82
83 if (
log.level() <= MSG::DEBUG)
log << MSG::DEBUG <<
"Shower barycenter ---->> " <<
depth <<
endmsg;
84
86}
static bool endcapCoefs(const float aeta, const CaloRec::Array< 2 > &sampling_depth, const float etamax, float R[4])
Calculate the sampling depth coefficients for the endcap.
static void barrelCoefs(const float aeta, float R[4])
Calculate the sampling depth coefficients for the barrel.
static double depth(const float aeta, const float start_crack, const float end_crack, const CaloRec::Array< 2 > &sampling_depth, const float etamax, const xAOD::CaloCluster *cluster, MsgStream &log)
Calculate the depth of the cluster.
float eSample(const CaloSample sampling) const
◆ endcapCoefs()
| bool CaloClusterCorr::CaloSwCalibHitsShowerDepth::endcapCoefs |
( |
const float | aeta, |
|
|
const CaloRec::Array< 2 > & | sampling_depth, |
|
|
const float | etamax, |
|
|
float | R[4] ) |
|
staticprivate |
Calculate the sampling depth coefficients for the endcap.
- Parameters
-
| aeta | abs(eta) of the cluster. |
| sampling_depth | Array of sampling depths per bin/sampling in the EC. |
| etamax | Maximum eta value in sampling_depth. |
| R[out] | The set of coefficients per layer. |
| aeta | abs(eta) of the cluster. |
| etamax | Maximum eta value in sampling_depth. |
| etamax | Maximum eta value in sampling_depth. |
| R[out] | The set of coefficients per layer. |
Definition at line 168 of file CaloSwCalibHitsShowerDepth.cxx.
172{
173 unsigned int ibin = (static_cast<unsigned int> (aeta / etamax * 100)) ;
174 if (ibin >= sampling_depth.
size())
175 return false;
176
177 for (
int i=0;
i < 4;
i++)
178 R[i] = sampling_depth[ibin][i+1];
179 return true;
180}
unsigned int size(unsigned int dim=0) const
Return the size of the array along one dimension.
The documentation for this class was generated from the following files: