27 const double rad = 76.5;
41 double tof_rad = 82.0,
43 double tof_length = 400.0)
48 gSystem->Load(
"libfun4all");
49 gSystem->Load(
"libg4detectors.so");
50 gSystem->Load(
"libg4trackfastsim.so");
56 double mrpc_in_thick = 0.04;
57 double mrpc_out_thick = 0.07;
58 double pcb_thickness = 0.06;
59 double cu_thickness = 0.003;
60 double carbon_thickness = 0.01;
61 double mylar_thickness = 0.04;
62 double honeycomb_thickness = 0.75;
87 if (verbosity > 1) cout <<
" bottom HC :" << tof_rad << endl;
90 rsum = tof_rad + honeycomb_thickness;
104 if (verbosity > 1) cout <<
" bototm PCB " << rsum << endl;
107 rsum += pcb_thickness;
121 if (verbosity > 1) cout <<
" PCB Cu :" << rsum << endl;
124 rsum += cu_thickness;
138 if (verbosity > 1) cout <<
" Mylar : " << rsum << endl;
141 rsum += mylar_thickness;
153 if (verbosity > 1) cout <<
" Carbon :" << rsum << endl;
156 rsum += carbon_thickness;
171 if (verbosity > 1) cout <<
" Glass outside :" << rsum << endl;
174 double rsum_gasin_begin = rsum + mrpc_out_thick;
175 double rsum_innglass_begin = rsum_gasin_begin +
gas_gap;
177 double rsum_innglass;
180 rsum_gasin = rsum_gasin_begin +
layer * gas_gap +
layer * mrpc_in_thick;
194 if (verbosity > 1) cout <<
" gas inner" <<
layer <<
" : " << rsum_gasin << endl;
198 rsum_innglass = rsum_gasin_begin +
layer * mrpc_in_thick + (
layer + 1) * gas_gap;
200 tof_cyl->Verbosity(verbosity);
201 tof_cyl->set_double_param(
"radius", rsum_innglass);
202 tof_cyl->set_string_param(
"material",
"G4_Si");
203 tof_cyl->set_double_param(
"thickness", mrpc_in_thick);
204 tof_cyl->set_int_param(
"lengthviarapidity", 0);
205 tof_cyl->set_double_param(
"place_z",
zpos);
206 tof_cyl->set_double_param(
"length", tof_length);
207 tof_cyl->SuperDetector(
"bTOF");
208 tof_cyl->SetActive(0);
209 tof_cyl->OverlapCheck(OverlapCheck);
212 if (verbosity > 1) cout <<
" inner mrpc" <<
layer <<
" : " << rsum_innglass << endl;
232 if (verbosity > 1) cout <<
" mid bottom glass :" << rsum << endl;
235 rsum += mrpc_out_thick;
249 if (verbosity > 1) cout <<
" mid bottom Carbon :" << rsum << endl;
253 rsum += carbon_thickness;
267 if (verbosity > 1) cout <<
" Mid bottom Mylar : " << rsum << endl;
270 rsum += mylar_thickness ;
281 if (verbosity > 1) cout <<
" mid PCB bottom cu :" << rsum << endl;
284 rsum += cu_thickness ;
296 if (verbosity > 1) cout <<
" mid PCB " << rsum << endl;
299 rsum += pcb_thickness;
313 if (verbosity > 1) cout <<
" mid PCB top cu :" << rsum << endl;
317 rsum += cu_thickness;
331 if (verbosity > 1) cout <<
" Mid top Mylar : " << rsum << endl;
334 rsum += mylar_thickness;
348 if (verbosity > 1) cout <<
" mid top Carbon :" << rsum << endl;
351 rsum += carbon_thickness;
365 if (verbosity > 1) cout <<
" mid top glass :" << rsum << endl;
369 double rsum_gasin_begin_uphalf = (rsum + mrpc_out_thick);
370 double rsum_innglass_begin_uphalf = (rsum_gasin_begin_uphalf +
gas_gap);
371 double rsum_gasin_uphalf;
372 double rsum_innglass_uphalf;
375 rsum_gasin_uphalf = rsum_gasin_begin_uphalf +
layer * gas_gap +
layer * mrpc_in_thick;
389 if (verbosity > 1) cout <<
" gas inner" <<
layer <<
" : " << rsum_gasin_uphalf << endl;
393 rsum_innglass_uphalf = rsum_gasin_begin_uphalf +
layer * mrpc_in_thick + (
layer + 1) * gas_gap;
395 tof_cyl->Verbosity(verbosity);
396 tof_cyl->set_double_param(
"radius", rsum_innglass_uphalf);
397 tof_cyl->set_string_param(
"material",
"G4_Si");
398 tof_cyl->set_double_param(
"thickness", mrpc_in_thick);
399 tof_cyl->set_int_param(
"lengthviarapidity", 0);
400 tof_cyl->set_double_param(
"place_z",
zpos);
401 tof_cyl->set_double_param(
"length", tof_length);
402 tof_cyl->SuperDetector(
"bTOF");
403 tof_cyl->SetActive(0);
404 tof_cyl->OverlapCheck(OverlapCheck);
407 if (verbosity > 1) cout <<
" inner mrpc" <<
layer <<
" : " << rsum_innglass_uphalf << endl;
410 rsum = rsum_gasin_uphalf;
427 if (verbosity > 1) cout <<
" top glass :" << rsum << endl;
430 rsum += mrpc_out_thick;
444 if (verbosity > 1) cout <<
" Carbon :" << rsum << endl;
447 rsum += carbon_thickness;
461 if (verbosity > 1) cout <<
"Mylar :" << rsum << endl;
464 rsum += mylar_thickness;
478 if (verbosity > 1) cout <<
" PCB cu :" << rsum << endl;
481 rsum += cu_thickness;
495 if (verbosity > 1) cout <<
" top PCB " << rsum << endl;
498 rsum += pcb_thickness;
513 if (verbosity > 1) cout <<
" Top honeycomb :" << rsum << endl;
515 if (verbosity > 1) cout <<
" tof thickness :" << tof_rad << endl;
555 gSystem->Load(
"libfun4all.so");
556 gSystem->Load(
"libg4detectors.so");