7 const int absorberactive = 1,
14 double ir_magnet_outer_radius = 50;
20 string irfile =
"../input_ir/proton-magnets-250GeV-opt2.dat";
23 ifstream irstream(irfile.c_str());
25 while(!irstream.eof()){
27 getline(irstream, str);
28 if(str[0] ==
'#')
continue;
32 double center_z, center_x, center_y, aperture_radius,
length, angle, B, gradient;
34 ss >> name >> center_z >> center_x >> center_y >> aperture_radius >> length >> angle >> B >> gradient;
36 if ( name ==
"" )
continue;
42 aperture_radius *= 100;
46 angle = (angle / 1000.) * (180./TMath::Pi());
49 cout <<
"New IR component: " << name <<
" at x = " << center_x <<
", y = " << center_y <<
", z = " << center_z <<
", angle = " << angle << endl;
51 string volname =
"IRMAGNET_";
58 ir_magnet_i->
set_double_param(
"thickness", ir_magnet_outer_radius - aperture_radius);
66 if ( B != 0 && gradient == 0.0 )
71 else if ( B == 0 && gradient != 0.0 )
76 else if ( B == 0 && gradient == 0.0 )
84 cout <<
"Error in G4_IR_EIC: Could not identify magnet type. Abort." << endl;