108 const double tile_radius[13] = { 2300.,
115 const double M_PI_32 =
M_PI/32.;
116 const double M_PI_64 =
M_PI/64.;
117 const double TAN_PI_64 = tan(
M_PI/64.);
120 const double size_correction = 2.75 + 1.5/2.;
123 std::unique_ptr<TileHitVector> FCS_hits = std::make_unique<TileHitVector>();
134 double ene = stepInfo->energy();
135 double time = stepInfo->time();
138 m_tileID->get_hash(hit_id, hit_idhash, &pmt_context);
147 "Iterating over Steps: new hit with id " <<
m_tileID->to_string(hit_id,-1)
148 <<
" nHit=" << nHit <<
" energy=" << ene <<
" time=" << time);
153 "Iterating over Steps: extra hit with id " <<
m_tileID->to_string(hit_id,-1)
154 <<
" nHit=" << nHit <<
" energy=" << ene <<
" time=" << time);
161 int module =
m_tileID->module(hit_id);
162 int sample =
m_tileID->sample(hit_id);
164 bool Ecell = (sample == 3);
165 bool spC10 = (
section == 3 && sample == 1 &&
166 ((
module >= 38 && module <= 41) || (module >= 54 && module <= 57)));
168 if ( Ecell || spC10 ) {
173 "Iterating over Steps: new E/C10 hit with id " <<
m_tileID->to_string(hit_id,-1)
174 <<
" nHit=" << nHit <<
" energy=" << ene );
180 "Iterating over Steps: extra E/C10 hit with id " <<
m_tileID->to_string(hit_id,-1)
181 <<
" nHit=" << nHit <<
" energy=" << ene );
186 double x = stepInfo->x();
187 double y = stepInfo->y();
192 double phi_module=(
module + 0.5) * M_PI_32;
193 double phi_hit = atan2(
y,
x);
194 if (phi_hit<0) phi_hit += 2*
M_PI;
195 double dphi = phi_hit - phi_module;
196 if (dphi < -M_PI_64 || dphi > M_PI_64) {
198 <<
" x " <<
x <<
" y " <<
y
199 <<
" phi_module " << phi_module <<
" phi_hit " << phi_hit
200 <<
" dphi " << dphi );
202 dphi -= trunc(dphi/M_PI_64) * M_PI_64;
205 double radius = sqrt(
x*
x+
y*
y);
206 double radius_corrected = radius * cos(dphi);
207 double yLocal = radius * sin(dphi);
208 double zLocal = radius * cos(dphi);
209 double halfYLocal = radius_corrected * TAN_PI_64 - size_correction;
210 if (fabs(yLocal) > halfYLocal) {
212 <<
" x " <<
x <<
" y " <<
y
213 <<
" radius_corr " << radius_corrected
214 <<
" yLocal " << yLocal <<
" halfYlocal_corr " << halfYLocal
215 <<
" delta " << fabs(yLocal) - halfYLocal );
217 yLocal = copysign(halfYLocal,yLocal);
221 int tile_ind = std::lower_bound (tile_radius, tile_radius+12,radius_corrected)-tile_radius-1;
222 if (tile_ind < 0 || tile_ind > 10 ) {
224 <<
" x " <<
x <<
" y " <<
y
225 <<
" radius " << radius <<
" corrected " << radius_corrected
226 <<
" tile_index " << tile_ind );
228 if (tile_ind<0) tile_ind = 0;
229 if (tile_ind>10) tile_ind = 10;
234 hitData.
nSide = side;
235 m_calc->pmtEdepFromFCS_StepInfo(hitData, ene, yLocal, halfYLocal, zLocal,
m_uShape);
239 for (
int pm=0; pm<2; ++pm) {
241 hit_id =
m_tileID->pmt_id(cell_id,pm);
242 m_tileID->get_hash(hit_id, hit_idhash, &pmt_context);
246 const double ref_ind_tile = 1.59;
247 const double inv_speed = ref_ind_tile / CLHEP::c_light;
248 if (pmt) tim -= 2 * yLocal * inv_speed;
249 else tim += 2 * yLocal * inv_speed;
257 "Iterating over Steps: new hit with id " <<
m_tileID->to_string(hit_id,-1)
258 <<
" nHit=" << nHit <<
" pmt " << pmt <<
" energy=" << edep[pm] <<
" time="
259 << time <<
" + " << tim-time <<
" = " << tim);
264 "Iterating over Steps: extra hit with id " <<
m_tileID->to_string(hit_id,-1)
265 <<
" nHit=" << nHit <<
" pmt " << pmt <<
" energy=" << edep[pm] <<
" time="
266 << time <<
" + " << tim-time <<
" = " << tim);
280 ATH_MSG_DEBUG(
"End of Iterating over Steps: nHit=" << nHit <<
" newHits=" << newHits <<
" Etot=" << Etot );
286 std::vector<TileHit*>::const_iterator curr =
m_allHits.begin();
287 std::vector<TileHit*>::const_iterator iend =
m_allHits.end();
288 for ( ; curr != iend; ++curr) {
294 "Iterating over Hits: nHit=" << nHit <<
" size="
295 << pHit->
size() <<
" energy=" << pHit->
energy() );
296 FCS_hits->push_back(*pHit);
298 for (
int ii=0; ii<pHit->
size(); ++ii ) Etot += pHit->
energy(ii);
299 sum_size += pHit->
size();
306 ATH_MSG_DEBUG(
"Execution completed, nHit=" << nHit <<
" sum_size=" << sum_size <<
" Etot=" << Etot );
309 return StatusCode::SUCCESS;
This class saves the "context" of an expanded identifier (ExpandedIdentifier) for compact or hash ver...