|
||||
File indexing completed on 2025-01-18 09:55:23
0001 //========================================================================== 0002 // AIDA Detector description implementation 0003 //-------------------------------------------------------------------------- 0004 // Copyright (C) Organisation europeenne pour la Recherche nucleaire (CERN) 0005 // All rights reserved. 0006 // 0007 // For the licensing terms see $DD4hepINSTALL/LICENSE. 0008 // For the list of contributors see $DD4hepINSTALL/doc/CREDITS. 0009 // 0010 // Author : M.Frank 0011 // 0012 //========================================================================== 0013 0014 #ifndef DDG4_GEANT4FIELD_H 0015 #define DDG4_GEANT4FIELD_H 0016 0017 // Framework include files 0018 #include <DD4hep/Detector.h> 0019 0020 // Geant 4 include files 0021 #include <G4ElectroMagneticField.hh> 0022 #include <G4MagneticField.hh> 0023 0024 /// Namespace for the AIDA detector description toolkit 0025 namespace dd4hep { 0026 0027 /// Namespace for the Geant4 based simulation part of the AIDA detector description toolkit 0028 namespace sim { 0029 0030 // Forward declarations 0031 class Geant4Field; 0032 0033 /// Mediator class to allow Geant4 accessing magnetic fields defined in dd4hep 0034 /** 0035 * \author M.Frank 0036 * \version 1.0 0037 * \ingroup DD4HEP_SIMULATION 0038 */ 0039 class Geant4Field : public G4MagneticField { 0040 protected: 0041 /// Reference to the detector description field 0042 OverlayedField m_field; 0043 0044 public: 0045 /// Constructor. The sensitive detector element is identified by the detector name 0046 Geant4Field(OverlayedField field) : m_field(field) { } 0047 /// Standard destructor 0048 virtual ~Geant4Field() { } 0049 /// Access field values at a given point 0050 virtual void GetFieldValue(const double pos[4], double *arr) const; 0051 /// Does field change energy ? 0052 virtual G4bool DoesFieldChangeEnergy() const; 0053 }; 0054 0055 } // End namespace sim 0056 } // End namespace dd4hep 0057 #endif // DDG4_GEANT4FIELD_H
[ Source navigation ] | [ Diff markup ] | [ Identifier search ] | [ general search ] |
This page was automatically generated by the 2.3.7 LXR engine. The LXR team |