DD4hep  1.30.0
Detector Description Toolkit for High Energy Physics
Public Member Functions | Protected Attributes | List of all members
dd4hep::sim::Geant4Field Class Reference

Mediator class to allow Geant4 accessing magnetic fields defined in dd4hep. More...

#include <Geant4Field.h>

Inheritance diagram for dd4hep::sim::Geant4Field:
G4MagneticField

Public Member Functions

 Geant4Field (OverlayedField field)
 Constructor. The sensitive detector element is identified by the detector name. More...
 
virtual ~Geant4Field ()
 Standard destructor. More...
 
virtual void GetFieldValue (const double pos[4], double *arr) const override
 Access field values at a given point. More...
 
virtual G4bool DoesFieldChangeEnergy () const override
 Does field change energy ? More...
 

Protected Attributes

OverlayedField m_field
 Reference to the detector description field. More...
 

Detailed Description

Mediator class to allow Geant4 accessing magnetic fields defined in dd4hep.

Author
M.Frank
Version
1.0

Definition at line 39 of file Geant4Field.h.

Constructor & Destructor Documentation

◆ Geant4Field()

dd4hep::sim::Geant4Field::Geant4Field ( OverlayedField  field)
inline

Constructor. The sensitive detector element is identified by the detector name.

Definition at line 46 of file Geant4Field.h.

◆ ~Geant4Field()

virtual dd4hep::sim::Geant4Field::~Geant4Field ( )
inlinevirtual

Standard destructor.

Definition at line 48 of file Geant4Field.h.

Member Function Documentation

◆ DoesFieldChangeEnergy()

G4bool Geant4Field::DoesFieldChangeEnergy ( ) const
overridevirtual

Does field change energy ?

Definition at line 22 of file Geant4Field.cpp.

◆ GetFieldValue()

void Geant4Field::GetFieldValue ( const double  pos[4],
double *  arr 
) const
overridevirtual

Access field values at a given point.

Definition at line 26 of file Geant4Field.cpp.

Member Data Documentation

◆ m_field

OverlayedField dd4hep::sim::Geant4Field::m_field
protected

Reference to the detector description field.

Definition at line 42 of file Geant4Field.h.


The documentation for this class was generated from the following files: