File indexing completed on 2025-08-06 08:17:58
0001 #include "PHFieldUniform.h"
0002
0003 #include <Geant4/G4SystemOfUnits.hh>
0004
0005 PHFieldUniform::PHFieldUniform(
0006 double field_mag_x,
0007 double field_mag_y,
0008 double field_mag_z)
0009 : field_mag_x_(field_mag_x * tesla)
0010 , field_mag_y_(field_mag_y * tesla)
0011 , field_mag_z_(field_mag_z * tesla)
0012 {
0013 }
0014
0015 void PHFieldUniform::GetFieldValue(const double [4], double *Bfield) const
0016 {
0017 Bfield[0] = field_mag_x_;
0018 Bfield[1] = field_mag_y_;
0019 Bfield[2] = field_mag_z_;
0020
0021 return;
0022 }