k4SimGeant4
Loading...
Searching...
No Matches
DD4hepField.h
Go to the documentation of this file.
1#ifndef SIMG4COMMON_DD4HEPFIELD_H
2#define SIMG4COMMON_DD4HEPFIELD_H
3
4// DD4hep
5#include "DD4hep/Detector.h"
6
7// Geant 4
8#include "G4MagneticField.hh"
9
17namespace k4simgeant4 {
18 class DD4hepField : public G4MagneticField {
19 public:
21 explicit DD4hepField(dd4hep::OverlayedField field);
22 // Destructor
23 virtual ~DD4hepField() {}
24
28 virtual void GetFieldValue(const G4double point[4], double* bField) const final;
29
31 virtual G4bool DoesFieldChangeEnergy() const;
32
33 private:
35 dd4hep::OverlayedField m_field;
36 };
37}
38#endif /* SIMG4COMMON_CONSTANTFIELD_H */
Mediator class between DD4hep overlayed field and Geant4 magnetic field.
Definition DD4hepField.h:18
virtual G4bool DoesFieldChangeEnergy() const
Does field change energy ?
Definition DD4hepField.cpp:23
virtual void GetFieldValue(const G4double point[4], double *bField) const final
Get the value of the magnetic field value at position.
Definition DD4hepField.cpp:8
DD4hepField(dd4hep::OverlayedField field)
Constructor with field required.
Definition DD4hepField.cpp:6
dd4hep::OverlayedField m_field
DD4hep OverlayedField.
Definition DD4hepField.h:35
virtual ~DD4hepField()
Definition DD4hepField.h:23
Definition DD4hepField.h:17