3 #include <phparameter/PHParameters.h>
4 #include <phparameter/PHParametersContainer.h>
8 #include <Geant4/G4Box.hh>
9 #include <Geant4/G4Colour.hh>
10 #include <Geant4/G4LogicalVolume.hh>
11 #include <Geant4/G4PVPlacement.hh>
12 #include <Geant4/G4RotationMatrix.hh>
13 #include <Geant4/G4String.hh>
14 #include <Geant4/G4SystemOfUnits.hh>
15 #include <Geant4/G4ThreeVector.hh>
16 #include <Geant4/G4VisAttributes.hh>
27 , paramscontainer(params)
41 std::map<G4VPhysicalVolume *, int>::const_iterator iter =
active_phys_vols.find(volume);
54 G4Box *pstof_box =
new G4Box(
"pstof_box", 0.8 *
cm, 6 *
cm, 5 *
cm);
56 G4LogicalVolume *pstof_log_vol =
new G4LogicalVolume(pstof_box, Glass, G4String(
"PSTOF_box"),
nullptr,
nullptr,
nullptr);
57 G4VisAttributes *pstofVisAtt =
new G4VisAttributes();
58 pstofVisAtt->SetVisibility(
true);
59 pstofVisAtt->SetForceSolid(
true);
60 pstofVisAtt->SetColour(G4Colour::Blue());
61 pstof_log_vol->SetVisAttributes(pstofVisAtt);
63 for (
int irow = 0; irow <
nrows; irow++)
65 int rowtype = irow % 2;
66 double phi = irow * (2.0 * M_PI /
nrows);
68 for (
int imod = 0; imod <
nmod; imod++)
86 double theta = atan2(z, r);
88 G4RotationMatrix *rotm =
new G4RotationMatrix();
92 double x = r * cos(phi);
93 double y = r * sin(phi);
95 int modnum = nmod * irow + imod;
110 std::cout <<
"PSTOF Detector:" << std::endl;
111 if (what ==
"ALL" || what ==
"VOLUME")
113 std::cout <<
"Version 0.1" << std::endl;