1 #ifndef MACRO_G4PISTON_C
2 #define MACRO_G4PISTON_C
4 #include <GlobalVariables.C>
26 double zpos2 = 335.9 - 10.2 / 2.;
37 const int absorberactive = 0)
43 string name =
"magpiston";
49 const double number_of_wteeth = 100;
50 const double teeth_thickness = 0.3504 * 2;
51 const double eta_inner = -log(tan(atan((beampipe_radius + 0.1) / zpos0) / 2));
52 const double eta_outter = 4.2;
53 const double eta_teeth_outter = 4.05;
61 magpiston->SetR1(beampipe_radius,
63 magpiston->SetR2(beampipe_radius,
65 magpiston->SetMaterial(
"G4_Fe");
66 magpiston->OverlapCheck(OverlapCheck);
78 pos = zpos0 + 1.0 + teeth_thickness / 2;
79 for (
int i = 0; i < number_of_wteeth; i++)
88 magpiston->SetZlength(teeth_thickness / 2);
89 magpiston->SetPlaceZ(pos);
100 magpiston->SetMaterial(
"G4_W");
101 magpiston->SuperDetector(name);
102 if (AbsorberActive) magpiston->SetActive();
103 magpiston->OverlapCheck(OverlapCheck);
105 pos += ((G4PISTON::zpos1 - zpos0 - 10) / number_of_wteeth);
116 if (AbsorberActive) magpiston2->
SetActive();