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/G4Material.hh>
12 #include <Geant4/G4PVPlacement.hh>
13 #include <Geant4/G4RotationMatrix.hh>
14 #include <Geant4/G4String.hh>
15 #include <Geant4/G4SystemOfUnits.hh>
16 #include <Geant4/G4ThreeVector.hh>
17 #include <Geant4/G4VisAttributes.hh>
29 , paramscontainer(params)
43 std::map<G4VPhysicalVolume *, int>::const_iterator iter =
active_phys_vols.find(volume);
56 G4Box *pstof_box =
new G4Box(
"pstof_box", 0.8 *
cm, 6 *
cm, 5 *
cm);
58 G4LogicalVolume *pstof_log_vol =
new G4LogicalVolume(pstof_box, Glass, G4String(
"PSTOF_box"), 0, 0, 0);
59 G4VisAttributes *pstofVisAtt =
new G4VisAttributes();
60 pstofVisAtt->SetVisibility(
true);
61 pstofVisAtt->SetForceSolid(
true);
62 pstofVisAtt->SetColour(G4Colour::Blue());
63 pstof_log_vol->SetVisAttributes(pstofVisAtt);
65 for (
int irow = 0; irow <
nrows; irow++)
67 int rowtype = irow % 2;
70 for (
int imod = 0; imod <
nmod; imod++)
88 double theta = atan2(z, r);
90 G4RotationMatrix *rotm =
new G4RotationMatrix();
94 double x = r *
cos(phi);
95 double y = r * sin(phi);
97 int modnum = nmod * irow + imod;
98 G4VPhysicalVolume *vol =
new G4PVPlacement(rotm, G4ThreeVector(x, y, z), pstof_log_vol,
"PSTOF", logicWorld,
false, modnum,
OverlapCheck());
112 cout <<
"PSTOF Detector:" << endl;
113 if (what ==
"ALL" || what ==
"VOLUME")
115 cout <<
"Version 0.1" << endl;