Back to home page

sPhenix code displayed by LXR

 
 

    


File indexing completed on 2025-08-06 08:17:58

0001 #ifndef PHFIELD_PHFIELDUNIFORM_H
0002 #define PHFIELD_PHFIELDUNIFORM_H
0003 
0004 #include "PHField.h"
0005 
0006 class PHFieldUniform : public PHField
0007 {
0008  public:
0009   //! construct field map in constant in units of Tesla
0010   PHFieldUniform(
0011       double field_mag_x,
0012       double field_mag_y,
0013       double field_mag_z);
0014   ~PHFieldUniform() override {}
0015   //! access field value
0016   //! Follow the convention of G4ElectroMagneticField
0017   //! @param[in]  Point   space time coordinate. x, y, z, t in Geant4/CLHEP units
0018   //! @param[out] Bfield  field value. In the case of magnetic field, the order is Bx, By, Bz in in Geant4/CLHEP units
0019   void GetFieldValue(const double Point[4], double *Bfield) const override;
0020 
0021   double get_field_mag_x() const
0022   {
0023     return field_mag_x_;
0024   }
0025 
0026   void set_field_mag_x(double fieldMagX)
0027   {
0028     field_mag_x_ = fieldMagX;
0029   }
0030 
0031   double get_field_mag_y() const
0032   {
0033     return field_mag_y_;
0034   }
0035 
0036   void set_field_mag_y(double fieldMagY)
0037   {
0038     field_mag_y_ = fieldMagY;
0039   }
0040 
0041   double get_field_mag_z() const
0042   {
0043     return field_mag_z_;
0044   }
0045 
0046   void set_field_mag_z(double fieldMagZ)
0047   {
0048     field_mag_z_ = fieldMagZ;
0049   }
0050 
0051  protected:
0052   double field_mag_x_;
0053   double field_mag_y_;
0054   double field_mag_z_;
0055 
0056  private:
0057 };
0058 
0059 #endif