DD4hep  1.30.0
Detector Description Toolkit for High Energy Physics
Geant4Mapping.h
Go to the documentation of this file.
1 //==========================================================================
2 // AIDA Detector description implementation
3 //--------------------------------------------------------------------------
4 // Copyright (C) Organisation europeenne pour la Recherche nucleaire (CERN)
5 // All rights reserved.
6 //
7 // For the licensing terms see $DD4hepINSTALL/LICENSE.
8 // For the list of contributors see $DD4hepINSTALL/doc/CREDITS.
9 //
10 // Author : M.Frank
11 //
12 //==========================================================================
13 #ifndef DDG4_GEANT4MAPPING_H
14 #define DDG4_GEANT4MAPPING_H
15 
16 // Framework include files
17 #include <DD4hep/Detector.h>
18 #include <DD4hep/Volumes.h>
19 #include <DD4hep/GeoHandler.h>
22 
24 namespace dd4hep {
25 
27  namespace sim {
28 
30 
36  protected:
39 
41  void checkValidity() const;
42  public:
44  Geant4Mapping(const Detector& description);
45 
47  virtual ~Geant4Mapping();
48 
50  static Geant4Mapping& instance();
51 
53  const Detector& detectorDescription() const {
54  return m_detDesc;
55  }
56 
59  return *m_dataPtr;
60  }
61 
64  return m_dataPtr;
65  }
66 
69 
72 
75 
78 
80  PlacedVolume placement(const G4VPhysicalVolume* node) const;
81  };
82  } // End namespace sim
83 } // End namespace dd4hep
84 
85 #endif // DDG4_GEANT4MAPPING_H
dd4hep::sim::Geant4Mapping::placement
PlacedVolume placement(const G4VPhysicalVolume *node) const
Accessor to resolve geometry placements.
Definition: Geant4Mapping.cpp:81
dd4hep::sim::Geant4Mapping::init
Geant4GeometryInfo & init()
Create and attach new data block. Delete old data block if present.
Definition: Geant4Mapping.cpp:48
Geant4GeometryInfo.h
Volumes.h
dd4hep::sim::Geant4Mapping::detectorDescription
const Detector & detectorDescription() const
Accesor to the Detector instance.
Definition: Geant4Mapping.h:53
Detector.h
dd4hep::sim::Geant4Mapping::data
Geant4GeometryInfo & data() const
Access to the data pointer.
Definition: Geant4Mapping.h:58
dd4hep::PlacedVolume
Handle class holding a placed volume (also called physical volume)
Definition: Volumes.h:163
Geant4VolumeManager.h
dd4hep::sim::Geant4Mapping::~Geant4Mapping
virtual ~Geant4Mapping()
Standard destructor.
Definition: Geant4Mapping.cpp:28
dd4hep::sim::Geant4Mapping::instance
static Geant4Mapping & instance()
Possibility to define a singleton instance.
Definition: Geant4Mapping.cpp:35
dd4hep::sim::Geant4Mapping::Geant4Mapping
Geant4Mapping(const Detector &description)
Initializing Constructor.
Definition: Geant4Mapping.cpp:23
dd4hep::sim::Geant4Mapping
Geometry mapping from dd4hep to Geant 4.
Definition: Geant4Mapping.h:35
dd4hep::sim::Geant4Mapping::ptr
Geant4GeometryInfo * ptr() const
Access to the data pointer.
Definition: Geant4Mapping.h:63
dd4hep::sim::Geant4VolumeManager
The Geant4VolumeManager to facilitate optimized lookups of cell IDs from touchables.
Definition: Geant4VolumeManager.h:42
dd4hep::sim::Geant4Mapping::volumeManager
Geant4VolumeManager volumeManager() const
Access the volume manager.
Definition: Geant4Mapping.cpp:69
dd4hep::sim::Geant4Mapping::m_detDesc
const Detector & m_detDesc
Definition: Geant4Mapping.h:37
dd4hep::sim::Geant4GeometryInfo
Concreate class holding the relation information between geant4 objects and dd4hep objects.
Definition: Geant4GeometryInfo.h:93
dd4hep::sim::Geant4Mapping::attach
void attach(Geant4GeometryInfo *data)
Set a new data block.
Definition: Geant4Mapping.cpp:64
dd4hep::sim::Geant4Mapping::m_dataPtr
Geant4GeometryInfo * m_dataPtr
Definition: Geant4Mapping.h:38
dd4hep
Namespace for the AIDA detector description toolkit.
Definition: AlignmentsCalib.h:28
dd4hep::Detector
The main interface to the dd4hep detector description package.
Definition: Detector.h:90
dd4hep::sim::Geant4Mapping::checkValidity
void checkValidity() const
When resolving pointers, we must check for the validity of the data block.
Definition: Geant4Mapping.cpp:41
dd4hep::sim::Geant4Mapping::detach
Geant4GeometryInfo * detach()
Release data and pass over the ownership.
Definition: Geant4Mapping.cpp:57
dd4hep::detail::GeoHandlerTypes
Defintion of the object types used by generic geometry handlers.
Definition: GeoHandler.h:52
GeoHandler.h