33 cout <<
"PHG4CylinderCellGeom_Spacalv1::identify - Tower mapping:" << endl;
35 get_tower_z_ID_eta_bin_map())
38 <<
"Tower Z ID[" << tower_z_ID_eta_bin.first
39 <<
"] \t-> Eta Bin " << tower_z_ID_eta_bin.second << endl;
42 cout <<
"PHG4CylinderCellGeom_Spacalv1::identify - Bin -> z range:" << endl;
46 <<
"bin[" <<
b.first <<
"] \t-> z = " <<
b.second.first
47 <<
" - " <<
b.second.second << endl;
50 cout <<
"PHG4CylinderCellGeom_Spacalv1::identify - Bin -> eta range:" << endl;
54 <<
"bin[" <<
b.first <<
"] \t-> eta = " <<
b.second.first
55 <<
" - " <<
b.second.second << endl;
62 if ((
size_t) nzbins != z_bound_map.size())
64 cout <<
"PHG4CylinderCellGeom_Spacalv1::map_consistency_check - "
65 <<
"z_bound_map.size() of " << z_bound_map.size()
66 <<
" in inconsistent with nzbins of " << nzbins << endl;
69 if ((
size_t) nzbins != eta_bound_map.size())
71 cout <<
"PHG4CylinderCellGeom_Spacalv1::map_consistency_check - "
72 <<
"eta_bound_map.size() of " << eta_bound_map.size()
73 <<
" in inconsistent with nzbins of " << nzbins << endl;
76 if ((
size_t) nzbins < tower_z_ID_eta_bin_map.size())
78 cout <<
"PHG4CylinderCellGeom_Spacalv1::map_consistency_check - "
79 <<
"tower_z_ID_eta_bin_map.size() of " << tower_z_ID_eta_bin_map.size()
80 <<
" in inconsistent with nzbins of " << nzbins << endl;
86 const std::pair<double, double>&
bounds)
93 const std::pair<double, double>&
bounds)
102 map_consistency_check();
104 bound_map_t ::const_iterator iter =
105 z_bound_map.find(ibin);
107 if (iter == z_bound_map.end())
110 <<
"PHG4CylinderCellGeom_Spacalv1::get_zbounds - Fatal Error - Asking for invalid bin in z: "
111 << ibin <<
". Print of content:" << endl;
121 map_consistency_check();
124 bound_map_t ::const_iterator iter =
125 eta_bound_map.find(ibin);
127 if (iter == eta_bound_map.end())
130 <<
"PHG4CylinderCellGeom_Spacalv1::get_etabounds - Fatal Error - Asking for invalid bin in z: "
131 << ibin <<
". Print of content:" << endl;
140 cout <<
"PHG4CylinderCellGeom_Spacalv1::get_zbin is invalid" << endl;
147 cout <<
"PHG4CylinderCellGeom_Spacalv1::get_etabin is invalid" << endl;
155 pair<double, double> bound = get_zbounds(ibin);
156 return 0.5 * (bound.first + bound.second);
162 pair<double, double> bound = get_etabounds(ibin);
163 return 0.5 * (bound.first + bound.second);
168 map_consistency_check();
170 tower_z_ID_eta_bin_map_t::const_iterator iter = tower_z_ID_eta_bin_map.find(tower_z_ID);
172 if (iter == tower_z_ID_eta_bin_map.end())
176 o <<
"PHG4CylinderCellGeom_Spacalv1::get_etabin - Fatal Error - can not find tower_z_ID of " << tower_z_ID <<
".";
178 throw range_error(o.str());