6 #include <phparameter/PHParameters.h>
18 #include <Geant4/G4Box.hh>
19 #include <Geant4/G4LogicalVolume.hh>
20 #include <Geant4/G4Material.hh>
21 #include <Geant4/G4PVPlacement.hh>
22 #include <Geant4/G4PhysicalConstants.hh>
23 #include <Geant4/G4RotationMatrix.hh>
24 #include <Geant4/G4String.hh>
25 #include <Geant4/G4SubtractionSolid.hh>
26 #include <Geant4/G4SystemOfUnits.hh>
27 #include <Geant4/G4ThreeVector.hh>
28 #include <Geant4/G4Transform3D.hh>
29 #include <Geant4/G4Tubs.hh>
30 #include <Geant4/G4Types.hh>
31 #include <Geant4/G4VPhysicalVolume.hh>
46 , m_Params(parameters)
50 , m_HPlate(400.0 *
mm)
51 , m_WPlate(100.0 *
mm)
52 , m_TAbsorber(5.0 *
mm)
53 , m_HAbsorber(150.0 *
mm)
54 , m_WAbsorber(100.0 *
mm)
56 , m_HFiber(400.0 *
mm)
57 , m_WFiber(100.0 *
mm)
58 , m_GFiber(0.0001 *
mm)
66 , m_PlaceHole(122.56 *
mm)
72 , m_ActiveFlag(m_Params->get_int_param(
"active"))
73 , m_AbsorberActiveFlag(m_Params->get_int_param(
"absorberactive"))
74 , m_SupportActiveFlag(m_Params->get_int_param(
"supportactive"))
76 , m_SuperDetector(
"NONE")
119 std::cout <<
"PHG4ZDCDetector: Begin Construction" << std::endl;
122 if (
m_Layer != PHG4ZDCDefs::NORTH &&
125 std::cout <<
"use either PHG4ZDCDefs::NORTH or PHG4ZDCDefs::SOUTH for ZDC Subsystem" << std::endl;
141 G4double First_Pos = -RTT * Det_Length / 2;
163 if (
m_Layer == PHG4ZDCDefs::NORTH)
166 ExitWindow_log,
"Window_North", logicWorld, 0, PHG4ZDCDefs::NORTH,
OverlapCheck());
169 else if (
m_Layer == PHG4ZDCDefs::SOUTH)
172 ExitWindow_log,
"Window_South", logicWorld, 0, PHG4ZDCDefs::SOUTH,
OverlapCheck());
179 G4double Mother_Z = Mother_2Z / 2. + Room;
246 double scint_XPos = -
m_WSMD / 2.;
247 double scint_Xstep = scintx / 2.;
248 double scint_Ystep = scinty / 2.;
252 for (
int i = 0; i < Nx; i++)
254 scint_XPos += scint_Xstep;
255 double scint_YPos = -
m_HSMD / 2.;
256 for (
int j = 0; j < Ny; j++)
258 int copyno = Nx * j + i;
259 scint_YPos += scint_Ystep;
267 scint_YPos += scint_Ystep;
269 scint_XPos += scint_Xstep;
289 for (
int i = 0; i < Nfiber; i++)
291 fiber_XPos += fiber_step;
299 fiber_XPos += fiber_step;
312 G4double ZPos = First_Pos - Plate_Step / 2.;
323 int copyno_plate = 0;
324 for (
int i = 0; i <
m_NMod; i++)
329 ZPos += (SMD_Step / 2.);
335 ZPos += (SMD_Step / 2.);
338 ZPos += (Plate_Step / 2.);
344 ZPos += (Plate_Step / 2.);
346 for (
int j = 0; j <
m_NLay; j++)
349 ZPos += (Absorber_Step / 2.);
355 ZPos += (Absorber_Step / 2.);
358 ZPos += (Gap_Step / 2.);
359 int copyno = 27 * i + j;
360 std::string name_fiber_plate =
"Fiber_Plate_" +
std::to_string(copyno);
366 ZPos += (Gap_Step / 2.);
369 ZPos += (Plate_Step / 2.);
376 ZPos += (Plate_Step / 2.);
381 if (
m_Layer == PHG4ZDCDefs::NORTH)
384 ZDC_envelope_log,
"ZDC_Envelope_North", logicWorld, 0, PHG4ZDCDefs::NORTH,
OverlapCheck());
386 else if (
m_Layer == PHG4ZDCDefs::SOUTH)
390 ZDC_envelope_log,
"ZDC_Envelope_South", logicWorld, 0, PHG4ZDCDefs::SOUTH,
OverlapCheck());