14 for(
size_t iside = 0; iside < array.size(); ++iside )
18 for(
const auto&
value:array[iside] )
20 if( !first ) out <<
", ";
33 out <<
"PHG4TpcCylinderGeom - layer: " << geom.
layer << std::endl;
36 <<
", radius: " << geom.
radius
37 <<
", nzbins: " << geom.
nzbins
38 <<
", zmin: " << geom.
zmin
39 <<
", zstep: " << geom.
zstep
41 <<
", phimin: " << geom.
phimin
42 <<
", phistep: " << geom.
phistep
170 os <<
"PHG4TpcCylinderGeom::identify - layer: " <<
layer
176 os <<
", zbins: " <<
nzbins
177 <<
", zmin: " <<
zmin
178 <<
", zstepsize: " <<
zstep;
181 os <<
", etabins: " <<
nzbins
182 <<
", etamin: " <<
zmin
183 <<
", etastepsize: " <<
zstep;
186 os <<
", etabins: " <<
nzbins
187 <<
", etamin: " <<
zmin
188 <<
", etastepsize: " <<
zstep;
191 os <<
", etabins: " <<
nzbins <<
" for Spacal";
194 os <<
"no valid binning method: " <<
binning << std::endl;
198 os <<
", phimin: " <<
phimin
205 std::pair<double, double>
208 if (ibin < 0 || ibin >
nzbins)
210 std::cout <<
PHWHERE <<
" Asking for invalid bin in z: " << ibin << std::endl;
215 double zhigh = zlow +
zstep;
216 return std::make_pair(zlow, zhigh);
219 std::pair<double, double>
222 if (ibin < 0 || ibin >
nzbins)
224 std::cout <<
PHWHERE <<
" Asking for invalid bin in z: " << ibin << std::endl;
230 double zhigh = zlow +
zstep;
231 return std::make_pair(zlow, zhigh);
234 std::pair<double, double>
239 std::cout <<
PHWHERE <<
"Asking for invalid bin in phi: " << ibin << std::endl;
244 double phihigh = philow +
phistep;
245 return std::make_pair(philow, phihigh);
257 return floor((z -
zmin) / zstep);
268 return floor((eta -
zmin) / zstep);
273 double norm_phi =
phi;
276 int nwraparound = -floor((phi -
phimin) * 0.5 / M_PI);
277 norm_phi += 2 * M_PI * nwraparound;
280 return floor((norm_phi -
phimin) / phistep);
286 double norm_phi =
phi;
289 int nwraparound = -floor((phi -
phimin) * 0.5 / M_PI);
290 norm_phi += 2 * M_PI * nwraparound;
324 double norm_phi =
phi;
327 int nwraparound = -floor((phi -
phimin) * 0.5 / M_PI);
328 norm_phi += 2 * M_PI * nwraparound;
357 return phi_bin - 0.5;
369 return ((z -
zmin) / zstep)-0.5;
374 double new_phi =
phi;
376 new_phi = phi - 2* M_PI;
379 new_phi = phi + 2* M_PI;
399 if (new_phi<=max_phi && new_phi>=min_phi){
400 if(fabs(max_phi - new_phi) > fabs(new_phi - min_phi)){
411 std::cout <<
PHWHERE <<
"Asking for bin for phi outside of phi range: " << phi << std::endl;
423 if (ibin < 0 || ibin >
nzbins)
425 std::cout <<
PHWHERE <<
"Asking for invalid bin in z: " << ibin << std::endl;
435 if (ibin < 0 || ibin >
nzbins)
437 std::cout <<
PHWHERE <<
"Asking for invalid bin in eta: " << ibin << std::endl;
438 std::cout <<
"minbin: 0, maxbin " << nzbins << std::endl;
450 std::cout <<
PHWHERE <<
"Asking for invalid bin in phi: " << ibin << std::endl;
466 std::cout <<
PHWHERE <<
"Asking for invalid bin in phi: " << ibin << std::endl;
473 unsigned int pads_per_sector = nphibins / 12;
474 unsigned int sector = ibin / pads_per_sector;
475 double phi_center = (
sector_max_Phi[side][sector] - (ibin + 0.5 - sector * pads_per_sector) *
phistep);
476 if(phi_center <= -M_PI){
477 phi_center += 2*M_PI;
488 std::cout <<
PHWHERE <<
"Asking for invalid bin in phi: " << ibin << std::endl;
495 unsigned int pads_per_sector = nphibins / 12;
496 unsigned int sector = ibin / pads_per_sector;
513 return "Eta/Phi bins";
516 return "Eta/numslat bins";
519 return "SPACAL Tower bins";
546 std::cout << src <<
" : ";
566 std::cout << src <<
" : ";