48 for (
auto i=0; i<3; ++i)
56 if (&p ==
this)
return *
this;
58 for (
auto i=0; i<3; ++i)
84 if ( (vField<0) || (vTheta<0) || (vTheta>
pi) || (vPhi<0) || (vPhi>
twopi) )
86 std::ostringstream msg;
87 msg <<
"ERROR in G4UniformMagField::G4UniformMagField() : "
88 <<
"Invalid parameter(s). " << std::endl;
89 msg <<
" Expected " << std::endl;
91 msg <<
" - Magnitude vField: Value = " << vField
92 <<
" Expected vField > 0 " ;
93 if ( vField<0) { msg <<
" <------ Erroneous "; }
96 msg <<
" - Theta angle: Value = " << vTheta
97 <<
" Expected between 0 <= theta <= pi = " <<
pi <<
" ";
98 if ( (vTheta<0) || (vTheta>
pi) ) { msg <<
" <------ Erroneous "; }
101 msg <<
" - Phi angle: Value = " << vPhi
102 <<
" Expected between 0 <= phi <= 2*pi = " <<
twopi << std::endl;
103 if ( (vPhi<0) || (vPhi>
twopi) ) { msg <<
" <------ Erroneous "; }
105 G4Exception(
"G4UniformMagField::G4UniformMagField()",
G4double B(G4double temperature)
void G4Exception(const char *originOfException, const char *exceptionCode, G4ExceptionSeverity severity, const char *description)
static constexpr double twopi
static constexpr double pi
CLHEP::Hep3Vector G4ThreeVector
G4MagneticField & operator=(const G4MagneticField &p)