DD4hep - The AIDA detector description toolkit for high energy physics experiments
DD4hep  Rev:Unversioneddirectory
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
Geant4Field.h
Go to the documentation of this file.
1 // $Id$
2 //==========================================================================
3 // AIDA Detector description implementation for LCD
4 //--------------------------------------------------------------------------
5 // Copyright (C) Organisation europeenne pour la Recherche nucleaire (CERN)
6 // All rights reserved.
7 //
8 // For the licensing terms see $DD4hepINSTALL/LICENSE.
9 // For the list of contributors see $DD4hepINSTALL/doc/CREDITS.
10 //
11 // Author : M.Frank
12 //
13 //==========================================================================
14 
15 #ifndef DD4HEP_DDG4_GEANT4FIELD_H
16 #define DD4HEP_DDG4_GEANT4FIELD_H
17 
18 // Framework include files
19 #include "DD4hep/LCDD.h"
20 
21 // Geant 4 include files
22 #include "G4ElectroMagneticField.hh"
23 #include "G4MagneticField.hh"
24 
26 namespace DD4hep {
27 
29  namespace Simulation {
30 
31  // Forward declarations
32  class Geant4Field;
33 
35 
40  class Geant4Field : public G4MagneticField {
41  protected:
44 
45  public:
48  : m_field(field) {
49  }
51  virtual ~Geant4Field() {
52  }
54  virtual void GetFieldValue(const double pos[4], double *arr) const;
56  virtual G4bool DoesFieldChangeEnergy() const;
57  };
58 
59  } // End namespace Simulation
60 } // End namespace DD4hep
61 #endif // DD4HEP_DDG4_GEANT4FIELD_H
virtual G4bool DoesFieldChangeEnergy() const
Does field change energy ?
Definition: Geant4Field.cpp:22
Mediator class to allow Geant4 accessing magnetic fields defined in DD4hep.
Definition: Geant4Field.h:40
virtual ~Geant4Field()
Standard destructor.
Definition: Geant4Field.h:51
Class describing a field overlay with several sources.
Definition: Fields.h:130
virtual void GetFieldValue(const double pos[4], double *arr) const
Access field values at a given point.
Definition: Geant4Field.cpp:26
Geant4Field(Geometry::OverlayedField field)
Constructor. The sensitive detector element is identified by the detector name.
Definition: Geant4Field.h:47
Geometry::OverlayedField m_field
Reference to the detector description field.
Definition: Geant4Field.h:43
Class of the Geant4 toolkit. See http://www-geant4.kek.jp/Reference.
Definition: Geant4Classes.h:8