2 #include <phparameter/PHParameters.h>
4 #include <Geant4/G4Box.hh>
5 #include <Geant4/G4Polycone.hh>
6 #include <Geant4/G4Color.hh>
7 #include <Geant4/G4LogicalVolume.hh>
8 #include <Geant4/G4Material.hh>
9 #include <Geant4/G4PVPlacement.hh>
10 #include <Geant4/G4SystemOfUnits.hh>
11 #include <Geant4/G4VisAttributes.hh>
22 const std::string &dnam)
24 , m_Params(parameters)
50 cout <<
"AllSi_Al_support_ Detector:" << endl;
51 if (what ==
"ALL" || what ==
"VOLUME")
53 cout <<
"Version 0.1" << endl;
54 cout <<
"Parameters:" << endl;
62 double z_det[3] = {20.,43.23*25./18.5, 121.};
63 double rin [3] = {18.5 * 20.0 / 25.0,43.23,43.23};
64 double rout [3] = {0};
65 const int nzplanes =
sizeof(z_det)/
sizeof(*z_det);
66 for(
int i = 0 ; i < nzplanes ; i++){
67 rout[i] = rin[i] + 0.5;
68 z_det[i] *= 10.*sign/
abs(sign);
75 G4RotationMatrix *rotm =
new G4RotationMatrix();
80 G4Color G4_color = G4Color(G4Colour::Yellow());
82 G4VSolid *G4_polycone =
new G4Polycone(name,0,360*
degree,nzplanes,z_det,rin,rout);
83 G4LogicalVolume *logical =
new G4LogicalVolume(G4_polycone,G4_mat,
"AllSi_Al_support_Logical");
84 G4VisAttributes *vis_1 =
new G4VisAttributes(G4_color);
85 vis_1->SetForceSolid(
true);
86 logical->SetVisAttributes(vis_1);
88 G4VPhysicalVolume *phy_1 =
new G4PVPlacement(rotm, G4ThreeVector(0,0,0), logical ,
"AllSi_Al_support_", logicWorld, 0,
false,
OverlapCheck());