DD4hep
1.30.0
Detector Description Toolkit for High Energy Physics
|
The Geant4VolumeManager to facilitate optimized lookups of cell IDs from touchables. More...
#include <DDG4/Geant4VolumeManager.h>
Public Member Functions | |
Geant4VolumeManager (const Detector &description, Geant4GeometryInfo *info) | |
Initializing constructor. The tree will automatically be built if possible. More... | |
Geant4VolumeManager ()=default | |
Default constructor. More... | |
Geant4VolumeManager (const Handle< Geant4GeometryInfo > &e) | |
Constructor to be used when reading the already parsed object. More... | |
Geant4VolumeManager (const Geant4VolumeManager &e)=default | |
Constructor to be used when reading the already parsed object. More... | |
template<typename Q > | |
Geant4VolumeManager (const Handle< Q > &e) | |
Constructor to be used when reading the already parsed object. More... | |
Geant4VolumeManager & | operator= (const Geant4VolumeManager &c)=default |
Assignment operator. More... | |
std::vector< const G4VPhysicalVolume * > | placementPath (const G4VTouchable *touchable, bool exception=true) const |
Helper: Generate placement path from touchable object. More... | |
VolumeID | volumeID (const G4VTouchable *touchable) const |
Access CELLID by placement path. More... | |
void | volumeDescriptor (const std::vector< const G4VPhysicalVolume * > &path, std::pair< VolumeID, std::vector< std::pair< const BitFieldElement *, VolumeID > > > &volume_desc) const |
Accessfully decoded volume fields by placement path. More... | |
void | volumeDescriptor (const G4VTouchable *touchable, std::pair< VolumeID, std::vector< std::pair< const BitFieldElement *, VolumeID > > > &volume_desc) const |
Access fully decoded volume fields by Geant4 touchable object. More... | |
Public Member Functions inherited from dd4hep::Handle< T > | |
Handle ()=default | |
Default constructor. More... | |
Handle (Handle< T > &&element)=default | |
Copy constructor. More... | |
Handle (const Handle< T > &element)=default | |
Copy constructor. More... | |
Handle (T *element) | |
Initializing constructor from pointer. More... | |
template<typename Q > | |
Handle (Q *element) | |
Initializing constructor from unrelated pointer with type checking. More... | |
template<typename Q > | |
Handle (const Handle< Q > &element) | |
Initializing constructor from unrelated handle with type checking. More... | |
Handle< T > & | operator= (Handle< T > &&element)=default |
Assignment move operator. More... | |
Handle< T > & | operator= (const Handle< T > &element)=default |
Assignment copy operator. More... | |
bool | operator== (const Handle< T > &element) const |
Boolean operator == used for RB tree insertions. More... | |
bool | operator< (const Handle< T > &element) const |
Boolean operator < used for RB tree insertions. More... | |
bool | operator> (const Handle< T > &element) const |
Boolean operator > used for RB tree insertions. More... | |
bool | isValid () const |
Check the validity of the object held by the handle. More... | |
bool | operator! () const |
Check the validity of the object held by the handle. More... | |
Handle< T > & | clear () |
Release the object held by the handle. More... | |
T * | operator-> () const |
Access the held object using the -> operator. More... | |
operator T& () const | |
Automatic type conversion to an object references. More... | |
T & | operator* () const |
Access the held object using the * operator. More... | |
T * | ptr () const |
Access to the held object. More... | |
template<typename Q > | |
Q * | _ptr () const |
Access to an unrelated object type. More... | |
template<typename Q > | |
Q * | data () const |
Access to an unrelated object type. More... | |
template<typename Q > | |
Q & | object () const |
Access to an unrelated object type. More... | |
T * | access () const |
Checked object access. Throws invalid handle runtime exception if invalid handle. More... | |
const char * | name () const |
Access the object name (or "" if not supported by the object) More... | |
void | assign (Object *n, const std::string &nam, const std::string &title) |
Assign a new named object. Note: object references must be managed by the user. More... | |
void | destroy () |
Destroy the underlying object (be careful here: things are not reference counted)! More... | |
void | assign (_Segmentation *s, const std::string &n, const std::string &) |
const char * | name () const |
const char * | name () const |
void | assign (NamedObject *p, const std::string &n, const std::string &t) |
Static Public Attributes | |
static const VolumeID | InvalidPath = VolumeID(-1LL) |
static const VolumeID | Insensitive = VolumeID(-2LL) |
static const VolumeID | NonExisting = 0ULL |
Protected Member Functions | |
bool | checkValidity () const |
Check the validity of the information before accessing it. More... | |
Additional Inherited Members | |
Public Types inherited from dd4hep::Handle< T > | |
typedef T | Object |
Extern accessible definition of the contained element type. More... | |
typedef Handle< T > | Base |
Self type: used by sub-classes. More... | |
Static Public Member Functions inherited from dd4hep::Handle< T > | |
static void | bad_assignment (const std::type_info &from, const std::type_info &to) |
Helper routine called when unrelated types are assigned. More... | |
Public Attributes inherited from dd4hep::Handle< T > | |
T * | m_element {nullptr} |
Single and only data member: Reference to the actual element. More... | |
The Geant4VolumeManager to facilitate optimized lookups of cell IDs from touchables.
Definition at line 42 of file Geant4VolumeManager.h.
Geant4VolumeManager::Geant4VolumeManager | ( | const Detector & | description, |
Geant4GeometryInfo * | info | ||
) |
Initializing constructor. The tree will automatically be built if possible.
Definition at line 219 of file Geant4VolumeManager.cpp.
|
default |
Default constructor.
|
inline |
Constructor to be used when reading the already parsed object.
Definition at line 57 of file Geant4VolumeManager.h.
|
default |
Constructor to be used when reading the already parsed object.
|
inline |
Constructor to be used when reading the already parsed object.
Definition at line 62 of file Geant4VolumeManager.h.
|
protected |
Check the validity of the information before accessing it.
Definition at line 237 of file Geant4VolumeManager.cpp.
|
default |
Assignment operator.
std::vector< const G4VPhysicalVolume * > Geant4VolumeManager::placementPath | ( | const G4VTouchable * | touchable, |
bool | exception = true |
||
) | const |
Helper: Generate placement path from touchable object.
Definition at line 231 of file Geant4VolumeManager.cpp.
void dd4hep::sim::Geant4VolumeManager::volumeDescriptor | ( | const G4VTouchable * | touchable, |
std::pair< VolumeID, std::vector< std::pair< const BitFieldElement *, VolumeID > > > & | volume_desc | ||
) | const |
Access fully decoded volume fields by Geant4 touchable object.
void dd4hep::sim::Geant4VolumeManager::volumeDescriptor | ( | const std::vector< const G4VPhysicalVolume * > & | path, |
std::pair< VolumeID, std::vector< std::pair< const BitFieldElement *, VolumeID > > > & | volume_desc | ||
) | const |
Accessfully decoded volume fields by placement path.
VolumeID Geant4VolumeManager::volumeID | ( | const G4VTouchable * | touchable | ) | const |
Access CELLID by placement path.
Access CELLID by Geant4 touchable object.
Access CELLID by Geant4 touchable object
No parametrization or replication.
This is incredibly slow .... but what can I do ? Need a better idea.
Definition at line 268 of file Geant4VolumeManager.cpp.
Definition at line 49 of file Geant4VolumeManager.h.
Definition at line 48 of file Geant4VolumeManager.h.
|
static |
Definition at line 50 of file Geant4VolumeManager.h.