126 const double tile_radius[13] = { 2300.,
133 const double M_PI_32 =
M_PI/32.;
134 const double M_PI_64 =
M_PI/64.;
135 const double TAN_PI_64 = tan(
M_PI/64.);
138 const double size_correction = 2.75 + 1.5/2.;
141 std::unique_ptr<TileHitVector> FCS_hits = std::make_unique<TileHitVector>();
152 double ene = stepInfo->energy();
153 double time = stepInfo->time();
156 m_tileID->get_hash(hit_id, hit_idhash, &pmt_context);
165 "Iterating over Steps: new hit with id " <<
m_tileID->to_string(hit_id,-1)
166 <<
" nHit=" << nHit <<
" energy=" << ene <<
" time=" << time);
171 "Iterating over Steps: extra hit with id " <<
m_tileID->to_string(hit_id,-1)
172 <<
" nHit=" << nHit <<
" energy=" << ene <<
" time=" << time);
179 int module =
m_tileID->module(hit_id);
180 int sample =
m_tileID->sample(hit_id);
182 bool Ecell = (sample == 3);
183 bool spC10 = (
section == 3 && sample == 1 &&
184 ((
module >= 38 && module <= 41) || (module >= 54 && module <= 57)));
186 if ( Ecell || spC10 ) {
191 "Iterating over Steps: new E/C10 hit with id " <<
m_tileID->to_string(hit_id,-1)
192 <<
" nHit=" << nHit <<
" energy=" << ene );
198 "Iterating over Steps: extra E/C10 hit with id " <<
m_tileID->to_string(hit_id,-1)
199 <<
" nHit=" << nHit <<
" energy=" << ene );
204 double x = stepInfo->x();
205 double y = stepInfo->y();
210 double phi_module=(
module + 0.5) * M_PI_32;
211 double phi_hit = atan2(
y,
x);
212 if (phi_hit<0) phi_hit += 2*
M_PI;
213 double dphi = phi_hit - phi_module;
214 if (dphi < -M_PI_64 || dphi > M_PI_64) {
216 <<
" x " <<
x <<
" y " <<
y
217 <<
" phi_module " << phi_module <<
" phi_hit " << phi_hit
218 <<
" dphi " << dphi );
220 dphi -= trunc(dphi/M_PI_64) * M_PI_64;
223 double radius = sqrt(
x*
x+
y*
y);
224 double radius_corrected = radius * cos(dphi);
225 double yLocal = radius * sin(dphi);
226 double zLocal = radius * cos(dphi);
227 double halfYLocal = radius_corrected * TAN_PI_64 - size_correction;
228 if (fabs(yLocal) > halfYLocal) {
230 <<
" x " <<
x <<
" y " <<
y
231 <<
" radius_corr " << radius_corrected
232 <<
" yLocal " << yLocal <<
" halfYlocal_corr " << halfYLocal
233 <<
" delta " << fabs(yLocal) - halfYLocal );
235 yLocal = copysign(halfYLocal,yLocal);
239 int tile_ind = std::lower_bound (tile_radius, tile_radius+12,radius_corrected)-tile_radius-1;
240 if (tile_ind < 0 || tile_ind > 10 ) {
242 <<
" x " <<
x <<
" y " <<
y
243 <<
" radius " << radius <<
" corrected " << radius_corrected
244 <<
" tile_index " << tile_ind );
246 if (tile_ind<0) tile_ind = 0;
247 if (tile_ind>10) tile_ind = 10;
252 hitData.
nSide = side;
253 m_calc->pmtEdepFromFCS_StepInfo(hitData, ene, yLocal, halfYLocal, zLocal,
m_uShape);
257 for (
int pm=0; pm<2; ++pm) {
259 hit_id =
m_tileID->pmt_id(cell_id,pm);
260 m_tileID->get_hash(hit_id, hit_idhash, &pmt_context);
264 const double ref_ind_tile = 1.59;
265 const double inv_speed = ref_ind_tile / CLHEP::c_light;
266 if (pmt) tim -= 2 * yLocal * inv_speed;
267 else tim += 2 * yLocal * inv_speed;
275 "Iterating over Steps: new hit with id " <<
m_tileID->to_string(hit_id,-1)
276 <<
" nHit=" << nHit <<
" pmt " << pmt <<
" energy=" << edep[pm] <<
" time="
277 << time <<
" + " << tim-time <<
" = " << tim);
282 "Iterating over Steps: extra hit with id " <<
m_tileID->to_string(hit_id,-1)
283 <<
" nHit=" << nHit <<
" pmt " << pmt <<
" energy=" << edep[pm] <<
" time="
284 << time <<
" + " << tim-time <<
" = " << tim);
298 ATH_MSG_DEBUG(
"End of Iterating over Steps: nHit=" << nHit <<
" newHits=" << newHits <<
" Etot=" << Etot );
304 std::vector<TileHit*>::const_iterator curr =
m_allHits.begin();
305 std::vector<TileHit*>::const_iterator iend =
m_allHits.end();
306 for ( ; curr != iend; ++curr) {
312 "Iterating over Hits: nHit=" << nHit <<
" size="
313 << pHit->
size() <<
" energy=" << pHit->
energy() );
314 FCS_hits->push_back(*pHit);
316 for (
int ii=0; ii<pHit->
size(); ++ii ) Etot += pHit->
energy(ii);
317 sum_size += pHit->
size();
324 ATH_MSG_DEBUG(
"Execution completed, nHit=" << nHit <<
" sum_size=" << sum_size <<
" Etot=" << Etot );
327 return StatusCode::SUCCESS;
This class saves the "context" of an expanded identifier (ExpandedIdentifier) for compact or hash ver...