43 fval(0),
pos(0), slope(0), intercept(0)
52 G4cout <<
" ==> Opening file " << filename <<
" to read magnetic field..."
54 G4String pathName = getenv(
"CCAL_GLOBALPATH");
75 G4cout <<
tab <<
"Position " << i <<
" " <<
pos[i] <<
" Slope "
76 <<
slope[i] <<
" Intercept " << intercept[i] <<
G4endl;
103 for (i=0; i<2; i++) {
111 for (i=0; i<
npts; i++) {
112 if (xnew >
pos[i]*
mm) {
119 if (scor < 0.) scor = 0.;
120 if (scor > 1.) scor = 1.0;
126 G4cout <<
"Field at x: " << x[0]/
mm <<
"mm (" << xnew <<
") = " <<
128 <<
"T (m = " << m1 <<
", c = " <<
129 c1 <<
", scale = " << scor <<
")"
void MagneticField(const double Point[3], double Bfield[3]) const
static const G4double pos
static constexpr double kilogauss
static constexpr double mm
virtual void GetFieldValue(const double Point[3], double *Bfield) const
static constexpr double m
CCalMagneticField(const G4String &name)
bool openGeomFile(std::ifstream &is, const G4String &pathname, const G4String &filename)
std::ifstream & findDO(std::ifstream &, const G4String &)
std::ostream & tab(std::ostream &)
G4GLOB_DLL std::ostream G4cout
double B(double temperature)
static constexpr double tesla