42{
43 Context myctx = context (Gaudi::Hive::currentContext());
44
46 const double log2 = 0.69314718056;
47 const double inv_log2 = 1. /
log2;
48
50
51
52
53 double ecell = thisCell->
e();
54 double etaa = fabs( thisCell->
eta() );
57
58 int iET=0;
59 if( fabs(ecell) > 0 && vol > 0 ) {
60 iET=
static_cast<int>(
log(fabs(ecell)/fabs(vol)*(mm3/
GeV))*inv_log2+26);
61 if(iET<0) iET=0;
62 if(iET >= dim) iET =
dim-1;
63 } else {
64 iET=-1;
65 }
66
67 double wt = 0;
68
69 switch ( s ) {
70
71
72 case CaloSampling::PreSamplerB:
74 break;
75
76 case CaloSampling::PreSamplerE:
78 break;
79
80
81
82 case CaloSampling::EMB1:
84 break;
85
86 case CaloSampling::EME1:
88 break;
89
90
91
92 case CaloSampling::EMB2:
93 case CaloSampling::EMB3:
94 if(iET >= 0 && etaa < 0.8) wt =
m_wtEMB1(myctx)[iET];
95 if(iET >= 0 && etaa >= 0.8) wt =
m_wtEMB2(myctx)[iET];
96 break;
97
98
99 case CaloSampling::EME2:
100 case CaloSampling::EME3:
101 if(iET >= 0 && etaa < 2.5) wt =
m_wtEME1(myctx)[iET];
102 if(iET >= 0 && etaa >= 2.5) wt =
m_wtEME2(myctx)[iET];
103 break;
104
105
106 case CaloSampling::TileBar0:
107 case CaloSampling::TileBar1:
108 case CaloSampling::TileBar2:
110 break;
111
112 case CaloSampling::TileExt0:
113 case CaloSampling::TileExt1:
114 case CaloSampling::TileExt2:
116 break;
117
118
119 case CaloSampling::HEC0:
120 case CaloSampling::HEC1:
121 case CaloSampling::HEC2:
122 case CaloSampling::HEC3:
123 if(iET>=0 && etaa<2.5) wt =
m_wtHec1(myctx)[iET];
124 if(iET>=0 && etaa>=2.5) wt =
m_wtHec2(myctx)[iET];
125 break;
126
127
128 case CaloSampling::FCAL0:
130 break;
131
132 case CaloSampling::FCAL1:
133 case CaloSampling::FCAL2:
135 break;
136
137
138 case CaloSampling::TileGap3:
140 break;
141
142
143 case CaloSampling::TileGap1:
144 case CaloSampling::TileGap2:
146 break;
147
148 case CaloSampling::MINIFCAL0:
149 case CaloSampling::MINIFCAL1:
150 case CaloSampling::MINIFCAL2:
151 case CaloSampling::MINIFCAL3:
152 case CaloSampling::Unknown:
153 break;
154
155 }
156
157 return wt;
158
159}
virtual double e() const override final
get energy (data member) (synonym to method energy()
const CaloDetDescrElement * caloDDE() const
get pointer to CaloDetDescrElement (data member)
virtual double eta() const override final
get eta (through CaloDetDescrElement)
CaloCell_ID::CaloSample getSampling() const
cell sampling
float volume() const
cell volume
float millimeter
Copyright (C) 2002-2025 CERN for the benefit of the ATLAS collaboration # This software is distribute...