13 #include <phparameter/PHParameters.h>
15 #include <Geant4/G4PhysicalConstants.hh>
32 os <<
"PHG4CylinderGeom_Spacalv1: layer: " <<
layer
36 <<
", zmax: " << zmax <<
37 ", num scint: " << nscint
47 cout <<
"Configuration is #" << get_config() <<
":" << endl;
51 cout <<
"fiber always placed radially" << endl;
53 case kFullProjective_2DTaper:
54 cout <<
"Fully projective spacal with 2D tapered modules" << endl;
56 case kFullProjective_2DTaper_SameLengthFiberPerTower:
58 <<
"Fully projective spacal with 2D tapered modules. To speed up construction, same-length fiber is used cross one tower"
61 case kFullProjective_2DTaper_Tilted:
62 cout <<
"Fully projective spacal with 2D tapered modules and allow azimuthal tilts" << endl;
64 case kFullProjective_2DTaper_Tilted_SameLengthFiberPerTower:
66 <<
"Fully projective spacal with 2D tapered modules and allow azimuthal tilts. To speed up construction, same-length fiber is used cross one tower"
70 cout <<
"PHG4CylinderGeom_Spacalv1::Print - ERROR - unknown configuration #"
71 << get_config() << endl;
76 <<
"get_max_radius() = " << get_max_radius() << endl;
78 <<
"get_half_radius() = " << get_half_radius() << endl;
80 <<
"get_length() = " << get_length() << endl;
82 <<
"get_*pos() = " << get_xpos() <<
", " << get_ypos() <<
", "
83 << get_zpos() << endl;
86 <<
"get_azimuthal_n_sec() = " << get_azimuthal_n_sec() <<
", "
87 << sector_map.size() <<
"/" << get_azimuthal_n_sec()
88 <<
" azimuthal sectors would be filled with SPACAL." << endl;
90 <<
"get_azimuthal_distance() = " << get_azimuthal_distance()
93 <<
"get_z_distance() = " << get_z_distance() << endl;
95 <<
"get_fiber_outer_r() = " << get_fiber_outer_r() << endl;
97 <<
"get_fiber_clading_thickness() = "
98 << get_fiber_clading_thickness() << endl;
100 <<
"get_fiber_core_diameter() = " << get_fiber_core_diameter()
103 <<
"get_fiber_distance() = " << get_fiber_distance() << endl;
106 <<
"get_absorber_mat() = " << get_absorber_mat() << endl;
108 <<
"get_fiber_clading_mat() = " << get_fiber_clading_mat()
111 <<
"get_fiber_core_mat() = " << get_fiber_core_mat() << endl;
116 <<
"get_fiber_core_step_size() = " << get_fiber_core_step_size()
120 <<
"is_virualize_fiber() = " << is_virualize_fiber() << endl;
122 <<
"get_construction_verbose() = " << get_construction_verbose()
125 if (get_construction_verbose() >= 2)
128 <<
"Containing " << sector_map.size()
129 <<
" sector with rotation specified:" << endl;
130 for (sector_map_t::const_iterator
it = sector_map.begin();
131 it != sector_map.end(); ++
it)
135 <<
"sector_map[" <<
it->first <<
"] = " <<
it->second
152 absorber_mat =
"Spacal_W_Epoxy";
153 fiber_clading_mat =
"PMMA";
154 fiber_core_mat =
"G4_POLYSTYRENE";
160 fiber_clading_thickness = 0.003 / 2;
161 fiber_core_diameter = 0.047 - fiber_clading_thickness * 2;
162 fiber_distance = 0.1;
164 virualize_fiber =
false;
165 construction_verbose = 0;
189 fiber_clading_thickness = param.
get_double_param(
"fiber_clading_thickness");
195 virualize_fiber = static_cast<bool>(param.
get_int_param(
"virualize_fiber"));
197 construction_verbose = param.
get_int_param(
"construction_verbose");
204 init_default_sector_map();
215 for (
int i = 0; i <
n; i++)
218 prefix <<
"sector_map";
219 prefix <<
"[" << i <<
"]"
224 prefix.str() +
"rotation");
226 sector_map[id] = rotation;
236 get_half_radius() *
twopi / (get_fiber_distance() * sqrt(3.)));
242 return get_half_radius() *
twopi / (double) (get_azimuthal_n_sec());
248 return get_fiber_distance() / 2.;
256 for (
int sec = 0; sec < get_azimuthal_n_sec(); ++sec)
258 const double rot =
twopi / (double) (get_azimuthal_n_sec()) * ((
double) (sec));
260 sector_map[sec] = rot;