16 #include <Geant4/G4Box.hh>
17 #include <Geant4/G4DisplacedSolid.hh>
18 #include <Geant4/G4Exception.hh>
19 #include <Geant4/G4ExceptionSeverity.hh>
20 #include <Geant4/G4IntersectionSolid.hh>
21 #include <Geant4/G4LogicalVolume.hh>
22 #include <Geant4/G4Material.hh>
23 #include <Geant4/G4MaterialTable.hh>
24 #include <Geant4/G4PVPlacement.hh>
25 #include <Geant4/G4PhysicalConstants.hh>
26 #include <Geant4/G4Sphere.hh>
27 #include <Geant4/G4SystemOfUnits.hh>
28 #include <Geant4/G4ThreeVector.hh>
29 #include <Geant4/G4Transform3D.hh>
30 #include <Geant4/G4Tubs.hh>
31 #include <Geant4/G4Types.hh>
40 using namespace PHG4Sector;
44 : overlapcheck_sector(
false)
57 (
string(
"PHG4SectorConstructor::Construct_Sectors::") + (
name_base)).c_str(),
59 " detector configured with zero thickness!");
65 (
string(
"PHG4SectorConstructor::Construct_Sectors::") + (
name_base)).c_str(),
71 (
string(
"PHG4SectorConstructor::Construct_Sectors::") + (
name_base)).c_str(),
73 "min and max polar angle got reversed. Correcting them.");
82 (
string(
"PHG4SectorConstructor::Construct_Sectors::") + (
name_base)).c_str(),
84 "can NOT use flat edge for single or double sector detector!");
96 const double sph_min_polar_angle =
98 const double sph_max_polar_angle =
104 sph_min_polar_angle, sph_max_polar_angle - sph_min_polar_angle
108 SecConeBoundary_Hall, transform_Hall_to_Det);
110 G4VSolid *Boundary_Det = SecConeBoundary_Det;
116 const double sph_min_polar_size =
118 const double sph_max_polar_size =
122 geom.
get_max_R(), (sph_min_polar_size + sph_max_polar_size) / 2,
125 "BoxBoundary_Det_Place", BoxBoundary_Det, 0,
126 G4ThreeVector(0, (sph_max_polar_size - sph_min_polar_size) / 2, 0));
129 BoxBoundary_Det_Place, SecConeBoundary_Det);
153 for (Sector_Geometry::t_layer_list::const_iterator
it =
157 const Layer &l = (*it);
162 s <<
name_base <<
" have invalid layer ";
166 (
string(
"PHG4SectorConstructor::Construct_Sectors::") + (name_base)).c_str(), __FILE__,
FatalException,
190 s <<
name_base <<
" - accumulated thickness = "
195 (
string(
"PHG4SectorConstructor::Construct_Sectors::") + (
name_base)).c_str(),
202 std::cout <<
"PHG4SectorConstructor::Construct_Sectors::" <<
name_base
205 std::cout <<
"PHG4SectorConstructor::Construct_Sectors::" <<
name_base <<
" - "
206 <<
map_log_vol.size() <<
" logical volume constructed" << std::endl;
207 std::cout <<
"PHG4SectorConstructor::Construct_Sectors::" <<
name_base <<
" - "
208 <<
map_phy_vol.size() <<
" physical volume constructed; "
215 const std::string &
name,
216 const double start_z,
221 assert(SecConeBoundary_Det);
235 SecConeBoundary_Det);
269 <<
"PHG4SectorConstructor::RegisterVolume - Error - invalid volume!"
275 std::cout <<
"PHG4SectorConstructor::RegisterVolume - Warning - replacing "
291 <<
"PHG4SectorConstructor::RegisterPhysicalVolume - Error - invalid volume!"
301 <<
"PHG4SectorConstructor::RegisterPhysicalVolume - Warning - replacing "
317 for (t_layer_list::const_iterator
it =
layer_list.begin();
338 s <<
"Geometry check failed. " << endl;
342 s <<
"cos(min_polar_angle + normal_polar_angle) = "
351 s <<
"Geometry check failed. " << endl;
355 s <<
"cos(max_polar_angle + normal_polar_angle) = "
362 const double max_tan_angle =
std::max(
386 AddLayer(
"EntranceWindow",
"G4_MYLAR", 25 *
um,
false, 100);
387 AddLayer(
"Cathode",
"G4_GRAPHITE", 10 *
um,
false, 100);
408 for (
int gem = 1; gem <= n_GEM_layers; gem++)
415 0.0005 *
cm,
false, 64);
419 0.005 *
cm,
false, 64);
423 0.0005 *
cm,
false, 64);
437 AddLayer(
"Facesheet",
"G10", 0.025 * 2 *
cm,
false, 100);
466 const double expansion_length, std::string radiator)
468 if (radiator ==
"Default")
470 radiator =
"ePHENIX_AeroGel";
474 AddLayer(
"EntranceWindow",
"G10", 0.05 *
cm,
false, 100);
475 AddLayer(
"AeroGel", radiator, radiator_length,
false, 100);
476 AddLayer(
"ExpansionVol",
"G4_AIR", expansion_length,
false, 100);