3 #include <phparameter/PHParameters.h>
5 #include <Geant4/G4Colour.hh>
6 #include <Geant4/G4Element.hh>
7 #include <Geant4/G4LogicalVolume.hh>
8 #include <Geant4/G4Material.hh>
9 #include <Geant4/G4PVDivision.hh>
10 #include <Geant4/G4PVPlacement.hh>
11 #include <Geant4/G4RotationMatrix.hh>
12 #include <Geant4/G4SystemOfUnits.hh>
13 #include <Geant4/G4ThreeVector.hh>
14 #include <Geant4/G4Tubs.hh>
15 #include <Geant4/G4VPhysicalVolume.hh>
16 #include <Geant4/G4VisAttributes.hh>
28 , m_Params(parameters)
30 , fPhysicsRadiator(nullptr)
31 , TRD_det_Phys(nullptr)
32 , MPGD_win_Phys(nullptr)
33 , Cathode_Phys(nullptr)
35 , GEM_top_Phys(nullptr)
36 , GEM_diel_Phys(nullptr)
37 , GEM_bottom_Phys(nullptr)
38 , MMG_mesh_Phys(nullptr)
39 , Res_lay_Phys(nullptr)
40 , MMG_strips_Phys(nullptr)
42 , m_Active(m_Params->get_int_param(
"active"))
43 , m_AbsorberActive(m_Params->get_int_param(
"absorberactive"))
82 cout <<
"Mother CENTER Pos ( z ) :"
83 <<
" " << PosZ <<
" Mother length " << ThicknessZ << endl;
85 G4Tubs *Solid =
new G4Tubs(
"TRD_GVol_Solid", RIn, ROut, ThicknessZ / 2., 0., 360 *
deg);
97 double fGasGap = 0.0600 *
cm;
98 double fDetGap = 0.001 *
cm;
99 double fRadThickness = 0.0020 *
cm;
101 double fRadThick = 10. *
cm - fGasGap + fDetGap;
107 fRadZ = (-ThicknessZ / 2. + fRadThick / 2.);
109 double foilGasRatio = fRadThickness / (fRadThickness + fGasGap);
119 double a_c = 12.0107 *
g /
mole;
121 double a_h = 1.01 *
g /
mole;
124 double density_ch2 = 0.935 *
g /
cm3;
129 double foilDensity = 0.91 *
g /
cm3;
130 double gasDensity = 1.2928 *
mg /
cm3;
131 double totDensity = foilDensity * foilGasRatio + gasDensity * (1.0 - foilGasRatio);
132 double fractionFoil = foilDensity * foilGasRatio / totDensity;
133 double fractionGas = gasDensity * (1.0 - foilGasRatio) / totDensity;
136 radiatorMat0->AddMaterial(CH2, fractionFoil);
137 radiatorMat0->AddMaterial(Air, fractionGas);
138 double NewDensity = 0.083 * (
g /
cm3);
145 G4Tubs *fSolidRadiator =
new G4Tubs(
"TRD_Radiator_Solid", det_RIn, det_ROut, 0.5 * fRadThick, 0., 360 *
deg);
164 double window_th = 0.002 *
cm;
167 double window_pos_Z = fRadZ + fRadThick / 2. + window_th / 2.;
170 G4Tubs *MPGD_win_Solid =
new G4Tubs(
"MPGD_win_Solid", det_RIn, det_ROut, window_th / 2., 0., 360 *
deg);
181 double det_ThicknessZ = 2.5 *
cm;
183 double det_Pos_Z = window_pos_Z + window_th / 2. + det_ThicknessZ / 2.;
187 G4Tubs *TRD_det_Solid =
new G4Tubs(
"TRD_det_Solid", det_RIn, det_ROut, det_ThicknessZ / 2., 0., 360 *
deg);
198 cout <<
" det RIN :" << det_RIn <<
" det ROUT :" << det_ROut << endl;
204 double cat_th = 0.005 *
cm;
205 double dead_ar = 0.01 *
cm;
209 G4Tubs *Cathode =
new G4Tubs(
"Cathode", det_RIn, det_ROut, cat_th / 2., 0., 360 *
deg);
216 double cat_pos = -1.0 * det_ThicknessZ / 2. + dead_ar + cat_th / 2.;
221 double gas_thick = 2.0 *
cm;
223 G4Tubs *drift_gas =
new G4Tubs(
"drift_gas", det_RIn, det_ROut, gas_thick / 2., 0., 360 *
deg);
230 double gas_pos = cat_pos + cat_th / 2. + gas_thick / 2.;
236 double cu_th = 0.0005 *
cm;
238 double tr_gap = 0.2 *
cm;
239 double kap_th = 0.005 *
cm;
244 double av_gap = 0.014 *
cm;
245 double mesh_th = 0.0012 *
cm;
263 double res_th = 0.0020 *
cm;
264 double pcb_th = 0.01 *
cm;
265 double cu_st_th = 0.0012 *
cm;
279 G4Tubs *GEM_top_Solid =
new G4Tubs(
"GEM_top_Solid", det_RIn, det_ROut, cu_th / 2., 0., 360 *
deg);
288 double gem_top_z = gas_pos + gas_thick / 2. + cu_th / 2;
291 G4Tubs *GEM_diel_Solid =
new G4Tubs(
"GEM_diel_Solid", det_RIn, det_ROut, kap_th / 2., 0., 360 *
deg);
299 double diel_z = gem_top_z + cu_th / 2. + kap_th / 2.;
303 G4Tubs *GEM_bottom_Solid =
new G4Tubs(
"GEM_bottom_Solid", det_RIn, det_ROut, cu_th / 2., 0., 360 *
deg);
311 double gem_bot_z = diel_z + kap_th / 2. + cu_th / 2.;
314 G4Tubs *MMG_mesh_Solid =
new G4Tubs(
"MMG_mesh_Solid", det_RIn, det_ROut, cu_th / 2., 0., 360 *
deg);
322 double mmg_mesh_z = gem_bot_z + cu_th / 2. + tr_gap + mesh_th / 2.;
325 G4Tubs *Res_lay_Solid =
new G4Tubs(
"Res_lay_Solid", det_RIn, det_ROut, res_th / 2., 0., 360 *
deg);
333 double res_lay_z = mmg_mesh_z + mesh_th / 2. + av_gap + res_th / 2.;
336 G4Tubs *MMG_strips_Solid =
new G4Tubs(
"MMG_strips_Solid", det_RIn, det_ROut, cu_st_th / 2., 0., 360. *
deg);
344 double mmg_str_z = res_lay_z + res_th / 2. + cu_st_th / 2.;
347 G4Tubs *PCB_Solid =
new G4Tubs(
"PCB_Solid", det_RIn, det_ROut, pcb_th / 2., 0., 360. *
deg);
355 double pcb_z = mmg_str_z + cu_st_th / 2. + pcb_th / 2.;