13 #include <phparameter/PHParameters.h>
15 #include <Geant4/G4PhysicalConstants.hh>
34 os <<
"PHG4CylinderGeom_Spacalv2: layer: " <<
layer
38 <<
", zmax: " << zmax <<
39 ", num scint: " << nscint
50 cout <<
"\t" <<
"is_azimuthal_seg_visible() = " << is_azimuthal_seg_visible()
52 cout <<
"\t" <<
"azimuthal_tilt() = " << get_azimuthal_tilt() << endl;
53 cout <<
"\t" <<
"get_polar_taper_ratio() = " << get_polar_taper_ratio()
55 cout <<
"\t" <<
"get_sec_azimuthal_width() = " << get_sec_azimuthal_width()
57 cout <<
"\t" <<
"get_sec_depth() = " << get_sec_depth() << endl;
58 cout <<
"\t" <<
"get_block_width() = " << get_block_width() << endl;
59 cout <<
"\t" <<
"get_block_depth() = " << get_block_depth() << endl;
60 cout <<
"\t" <<
"get_assembly_spacing() = " << get_assembly_spacing() << endl;
61 cout <<
"\t" <<
"get_reg_fiber_grid_distance_taper() = "
62 << get_reg_fiber_grid_distance_taper() <<
" = sqrt(3)*"
63 << get_reg_fiber_grid_distance_taper() / sqrt(3.) << endl;
64 cout <<
"\t" <<
"get_reg_fiber_grid_distance_nontaper() = "
65 << get_reg_fiber_grid_distance_nontaper() << endl;
74 azimuthal_n_sec = 256;
76 azimuthal_seg_visible =
false;
77 polar_taper_ratio = 1 + 1.1 / 42.;
78 assembly_spacing = 0.0001;
94 azimuthal_seg_visible = static_cast<bool>(param.
get_int_param(
95 "azimuthal_seg_visible"));
107 const double azimuthal_width_base = get_radius() *
twopi
108 / (double) (get_azimuthal_n_sec()) - get_assembly_spacing();
112 const double theta1 = get_azimuthal_tilt();
113 const double theta2 =
pi + (
twopi / get_azimuthal_n_sec()) -
halfpi
114 - get_azimuthal_tilt();
116 return azimuthal_width_base * sin(theta2) / sin(theta1 + theta2);
122 return atan2(get_block_width() * 0.5 * (get_polar_taper_ratio() - 1),
133 return azimuthal_n_sec;
139 if (
config == kNonProjective)
142 <<
"PHG4CylinderGeom_Spacalv2::set_azimuthal_n_sec - Fatal Error - "
143 "Spacal is configured as NonProjective geometry. In this case azimuthal_n_sec is calculated, and can not be set externally."
148 azimuthal_n_sec = azimuthalNSec;
155 return azimuthal_seg_visible;
161 if (
config == kNonProjective)
164 <<
"PHG4CylinderGeom_Spacalv2::set_azimuthal_seg_visible - Fatal Error - "
165 "Spacal is configured as NonProjective geometry. In this case azimuthal_seg_visible is false, and can not be set externally."
170 azimuthal_seg_visible =
b;
178 const double mid_plane_width = get_block_width()
179 * ((get_polar_taper_ratio() - 1) * 0.5 + 1) - get_assembly_spacing();
181 const int n_grid = floor(mid_plane_width / (get_fiber_distance() * sqrt(3.)));
183 return mid_plane_width / n_grid;
190 const double mid_plane_width = get_block_width() - get_assembly_spacing();
191 const int n_grid = floor(mid_plane_width / (get_fiber_distance()));
192 return mid_plane_width / n_grid;