** Warning **
Issuing rollback() due to DESTROY without explicit disconnect() of DBD::mysql::db handle dbname=lxr_eic at /usr/local/share/lxr/lxr-2.3.7/lib/LXR/Common.pm line 1161, <GEN625> line 1.
Last-Modified: Mon, 20 Sep 2026 09:34:38 GMT
Content-Type: text/html; charset=utf-8
/master/include/DDG4/Geant4VolumeManager.h
File indexing completed on 2026-09-20 09:08:10
0001
0002
0003
0004
0005
0006
0007
0008
0009
0010
0011
0012
0013 #ifndef DDG4_GEANT4VOLUMEMANAGER_H
0014 #define DDG4_GEANT4VOLUMEMANAGER_H
0015
0016
0017 #include <DD4hep/Detector.h >
0018 #include <DD4hep/IDDescriptor.h >
0019 #include <DDG4/Geant4Primitives.h >
0020
0021
0022 #include <G4VTouchable.hh >
0023
0024 #include <utility>
0025 #include <vector>
0026
0027
0028 class G4VPhysicalVolume ;
0029
0030
0031
0032 namespace dd4hep {
0033
0034
0035 namespace sim {
0036
0037
0038 class Geant4VolumeManager ;
0039 class Geant4GeometryInfo ;
0040
0041
0042
0043
0044
0045
0046
0047 class Geant4VolumeManager : public Handle <Geant4GeometryInfo > {
0048 protected :
0049
0050 bool checkValidity () const ;
0051 protected :
0052 friend class Geant4Mapping ;
0053
0054
0055 Geant4VolumeManager () = default ;
0056
0057 Geant4VolumeManager (const Handle <Geant4GeometryInfo >& e )
0058 : Handle <Geant4GeometryInfo >(e ) { }
0059
0060 Geant4VolumeManager (const Geant4VolumeManager & e ) = default ;
0061
0062 template <typename Q > Geant4VolumeManager (const Handle <Q >& e )
0063 : Handle <Geant4GeometryInfo >(e ) {
0064 }
0065
0066 Geant4VolumeManager & operator =(const Geant4VolumeManager & c ) = default ;
0067
0068 public :
0069 constexpr static const VolumeID InvalidPath = VolumeID (-1LL );
0070 constexpr static const VolumeID Insensitive = VolumeID (-2LL );
0071 constexpr static const VolumeID NonExisting = 0ULL ;
0072 enum debug_flags {
0073 PRINT_LEVEL = 1<<0,
0074 PRINT_ACTION = 1<<1,
0075 PRINT_CHAIN = 1<<2,
0076 PRINT_RESULT = 1<<3,
0077 PRINT_NODES = 1<<4,
0078 PRINT_VOLIDS = 1<<5,
0079 PRINT_ENTRIES = 1<<6,
0080 };
0081
0082 public :
0083
0084 Geant4VolumeManager (const Detector & description , Geant4GeometryInfo * info , long debug );
0085
0086
0087 std ::vector <const G4VPhysicalVolume *>
0088 placementPath (const G4VTouchable * touchable , bool exception = true ) const ;
0089
0090 VolumeID volumeID (const G4VTouchable * touchable ) const ;
0091
0092 void volumeDescriptor (const std ::vector <const G4VPhysicalVolume *>& path ,
0093 std ::pair <VolumeID ,std ::vector <std ::pair <const BitFieldElement *, VolumeID > > >& volume_desc) const ;
0094
0095 void volumeDescriptor (const G4VTouchable * touchable ,
0096 std ::pair <VolumeID ,std ::vector <std ::pair <const BitFieldElement *, VolumeID > > >& volume_desc) const ;
0097 };
0098 }
0099 }
0100 #endif