EIC Software
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
PHG4MagneticField.h
Go to the documentation of this file. Or view the newest version in sPHENIX GitHub for file PHG4MagneticField.h
1 // Tell emacs that this is a C++ source
2 // -*- C++ -*-.
3 // $Id: $
4 
13 #ifndef G4MAIN_PHG4MAGNETICFIELD_H
14 #define G4MAIN_PHG4MAGNETICFIELD_H
15 
16 #include <Geant4/G4MagneticField.hh>
17 
18 class PHField;
19 
23 class PHG4MagneticField : public G4MagneticField
24 {
25  public:
26  PHG4MagneticField(const PHField* field);
27  ~PHG4MagneticField() override;
28 
29  const PHField* get_field() const
30  {
31  return field_;
32  }
33 
34  void set_field(const PHField* field)
35  {
36  field_ = field;
37  }
38 
39  void GetFieldValue( const double Point[4], double *Bfield ) const override;
40 
41  protected:
42  const PHField* field_;
43 };
44 
45 #endif /* SIMULATION_CORESOFTWARE_SIMULATION_G4SIMULATION_G4MAIN_PHG4MAGNETICFIELD_H_ */