1 #ifndef MACRO_G4TrackingService_C
2 #define MACRO_G4TrackingService_C
11 #include <qa_modules/QAG4SimulationMvtx.h>
15 #include <boost/format.hpp>
31 const float &thickness_copper,
32 const float &thickness_water,
33 const float &thickness_plastic,
34 const float &thickness_carbon,
42 const string get_name();
43 const float get_thickness_copper();
44 const float get_thickness_water();
45 const float get_thickness_plastic();
46 const float get_thickness_carbon();
47 const float get_zSouth();
48 const float get_zNorth();
49 const float get_rSouth();
50 const float get_rNorth();
54 const float m_thickness_copper = 0.0;
55 const float m_thickness_water = 0.0;
56 const float m_thickness_plastic = 0.0;
57 const float m_thickness_carbon = 0.0;
58 const float m_zSouth = 0.0;
59 const float m_zNorth = 0.0;
60 const float m_rSouth = 0.0;
61 const float m_rNorth = 0.0;
65 const float &thickness_copper,
66 const float &thickness_water,
67 const float &thickness_plastic,
68 const float &thickness_carbon,
74 , m_thickness_copper(thickness_copper)
75 , m_thickness_water(thickness_water)
76 , m_thickness_plastic(thickness_plastic)
77 , m_thickness_carbon(thickness_carbon)
104 namespace G4TrackingService
106 string materials[] = {
"G4_Cu",
"G4_WATER",
"G4_POLYETHYLENE",
"PEEK"};
118 std::vector<float>
grey = {0.4, 0.4, 0.4};
121 using namespace G4TrackingService;
125 vector<float>
thickness = {
object->get_thickness_copper()
126 ,
object->get_thickness_water()
127 ,
object->get_thickness_plastic()
128 ,
object->get_thickness_carbon()};
150 float innerRadiusSouth =
object->get_rSouth();
151 float innerRadiusNorth =
object->get_rNorth();
157 if (thickness[i] == 0)
continue;
160 cone->
SetR1(innerRadiusSouth, innerRadiusSouth + thickness[i]);
161 cone->
SetR2(innerRadiusNorth, innerRadiusNorth + thickness[i]);
171 innerRadiusSouth += thickness[i] + 5
e-7;
172 innerRadiusNorth += thickness[i] + 5e-7;
174 radius =
max(innerRadiusSouth, innerRadiusNorth);
187 float innerRadius =
object->get_rSouth();
193 if (thickness[i] == 0)
continue;
207 innerRadius += thickness[i] + 5
e-7;
209 radius = innerRadius;
216 vector<ServiceStructure *> cylinders, cones;
222 cones.push_back(
new ServiceStructure(
"connectL0", 0.005, 0., 0.066, 0, -26.9, -18.680, 10.10, 5.050));
223 cones.push_back(
new ServiceStructure(
"connectL1", 0.004, 0., 0.061, 0, -26.9, -18.000, 10.20, 7.338));
224 cones.push_back(
new ServiceStructure(
"connectL2", 0.004, 0., 0.058, 0, -26.9, -22.300, 10.30, 9.580));
250 cylinders.push_back(
new ServiceStructure(
"CYSS_Cylinder", 0, 0, 0, 0.112, -8.619, 36.153, 5.15, 0));