15 #include <Geant4/G4Colour.hh>
16 #include <Geant4/G4Cons.hh>
17 #include <Geant4/G4ExtrudedSolid.hh>
18 #include <Geant4/G4LogicalVolume.hh>
19 #include <Geant4/G4Material.hh>
20 #include <Geant4/G4PVPlacement.hh>
21 #include <Geant4/G4PhysicalConstants.hh>
22 #include <Geant4/G4RotationMatrix.hh>
23 #include <Geant4/G4String.hh>
24 #include <Geant4/G4SubtractionSolid.hh>
25 #include <Geant4/G4SystemOfUnits.hh>
26 #include <Geant4/G4ThreeVector.hh>
27 #include <Geant4/G4Transform3D.hh>
28 #include <Geant4/G4Tubs.hh>
29 #include <Geant4/G4TwoVector.hh>
30 #include <Geant4/G4VisAttributes.hh>
54 , TrackerMaterial(nullptr)
55 , TrackerThickness(100 *
cm)
56 , cylinder_logic(nullptr)
57 , cylinder_physi(nullptr)
81 return box_vol.find(volume)->second;
100 double deltalen = (
length - innerlength) / 2.;
101 double cone_size_multiplier = 1.01;
104 double cone_length = deltalen * cone_size_multiplier;
106 inner_cone_radius, inner_cone_radius,
107 inner_cone_radius, inner_cone_radius + cone_thickness,
108 cone_length / 2.0, 0,
twopi);
110 inner_cone_radius, inner_cone_radius + cone_thickness,
111 inner_cone_radius, inner_cone_radius,
112 cone_length / 2.0, 0,
twopi);
113 double delta_len = cone_length - deltalen;
152 double B = 2 * (x1 * cos(a) + y1 * sin(a));
153 double C = x1 * x1 + y1 * y1 - r2 *
r2;
154 double D = B * B - 4 * A *
C;
157 double u = (-B + sqrt(D)) / 2 * A;
160 double x2 = x1 + u * cos(a);
161 double y2 = y1 + u * sin(a);
165 B = 2 * (x4 * cos(a) + y4 * sin(a));
166 C = x4 * x4 + y4 * y4 - r2 *
r2;
167 D = B * B - 4 * A *
C;
168 u = (-B + sqrt(D)) / 2 * A;
170 double x3 = x4 + u * cos(a);
171 double y3 = y4 + u * sin(a);
179 std::vector<G4TwoVector> vertexes;
180 vertexes.push_back(v1);
181 vertexes.push_back(v2);
182 vertexes.push_back(v3);
183 vertexes.push_back(v4);
189 double blength =
length + 20;
216 double phi_increment = 360. /
_sciNum;
217 ostringstream slatname;
218 for (
int i = 0; i <
_sciNum; i++)
225 slatname <<
"SLAT_" << i;
234 ostringstream geonode;
265 double singamma = sin(phi) * c /
b;
266 double gamma =
M_PI - asin(singamma);
268 double a = c * sin(alpha) / singamma;
274 cout <<
"radius: " <<
radius << endl;