37 fFieldComponents[0] = 0.0;
38 fFieldComponents[1] = 0.0;
39 fFieldComponents[2] = 0.0;
40 fFieldComponents[3] = FieldVector.
x();
41 fFieldComponents[4] = FieldVector.
y();
42 fFieldComponents[5] = FieldVector.
z();
49 if ( (vField<0) || (vTheta<0) || (vTheta>pi) || (vPhi<0) || (vPhi>twopi) )
51 G4Exception(
"G4UniformElectricField::G4UniformElectricField()",
55 fFieldComponents[0] = 0.0;
56 fFieldComponents[1] = 0.0;
57 fFieldComponents[2] = 0.0;
58 fFieldComponents[3] = vField*std::sin(vTheta)*std::cos(vPhi) ;
59 fFieldComponents[4] = vField*std::sin(vTheta)*std::sin(vPhi) ;
60 fFieldComponents[5] = vField*std::cos(vTheta) ;
69 for (
auto i=0; i<6; ++i)
71 fFieldComponents[i] = p.fFieldComponents[i];
78 if (&p ==
this) {
return *
this; }
80 for (
auto i=0; i<6; ++i)
82 fFieldComponents[i] = p.fFieldComponents[i];
91 fFieldComponents[5]));
102 fieldBandE[3] = fFieldComponents[3];
103 fieldBandE[4] = fFieldComponents[4];
104 fieldBandE[5] = fFieldComponents[5];
void G4Exception(const char *originOfException, const char *exceptionCode, G4ExceptionSeverity severity, const char *description)
CLHEP::Hep3Vector G4ThreeVector
G4ElectricField & operator=(const G4ElectricField &p)
G4Field(G4bool gravityOn=false)