DD4hep  1.30.0
Detector Description Toolkit for High Energy Physics
Classes | Public Member Functions | Public Attributes | Private Types | Private Member Functions | Private Attributes | List of all members
dd4hep::DetElementVolumeIDs Class Reference

Actor class to assign volume identifiers to DetElements in a subdetector tree. More...

Classes

struct  Encoding
 Encoding/mask for sensitive volumes. More...
 

Public Member Functions

 DetElementVolumeIDs (const Detector &description)
 Default constructor. More...
 
std::size_t populate (DetElement e)
 Populate the Volume manager. More...
 

Public Attributes

std::size_t numberOfNodes { 0 }
 Node counter. More...
 
std::map< DetElement, std::vector< Encoding > > entries
 Set of already added entries. More...
 

Private Types

using PlacementPath = std::vector< PlacedVolume >
 

Private Member Functions

std::size_t scanPhysicalVolume (DetElement &parent, DetElement e, PlacedVolume pv, Encoding parent_encoding, SensitiveDetector &sd, PlacementPath &chain)
 Scan a single physical volume and look for sensitive elements below. More...
 

Private Attributes

const Detectorm_detDesc
 Reference to the Detector instance. More...
 

Detailed Description

Actor class to assign volume identifiers to DetElements in a subdetector tree.

During the tree traversal the encoding information is also accumulated in a map indexed by the DetElement.

Author
M.Frank
Version
1.0

Definition at line 36 of file DetElementVolumeIDs.cpp.

Member Typedef Documentation

◆ PlacementPath

Definition at line 53 of file DetElementVolumeIDs.cpp.

Constructor & Destructor Documentation

◆ DetElementVolumeIDs()

DetElementVolumeIDs::DetElementVolumeIDs ( const Detector description)

Default constructor.

Definition at line 158 of file DetElementVolumeIDs.cpp.

Member Function Documentation

◆ populate()

std::size_t DetElementVolumeIDs::populate ( DetElement  e)

Populate the Volume manager.

Definition at line 164 of file DetElementVolumeIDs.cpp.

◆ scanPhysicalVolume()

std::size_t DetElementVolumeIDs::scanPhysicalVolume ( DetElement parent,
DetElement  e,
PlacedVolume  pv,
Encoding  parent_encoding,
SensitiveDetector sd,
PlacementPath chain 
)
private

Scan a single physical volume and look for sensitive elements below.

Check if this particular volume is the placement of one of the children of this detector element. If the daughter placement is also a detector child, then we must reset the node chain.

For compounds the upper level sensitive detector does not exist, because there are multiple at lower layers

Definition at line 206 of file DetElementVolumeIDs.cpp.

Member Data Documentation

◆ entries

std::map<DetElement, std::vector<Encoding> > dd4hep::DetElementVolumeIDs::entries

Set of already added entries.

Definition at line 50 of file DetElementVolumeIDs.cpp.

◆ m_detDesc

const Detector& dd4hep::DetElementVolumeIDs::m_detDesc
private

Reference to the Detector instance.

Definition at line 39 of file DetElementVolumeIDs.cpp.

◆ numberOfNodes

std::size_t dd4hep::DetElementVolumeIDs::numberOfNodes { 0 }

Node counter.

Definition at line 43 of file DetElementVolumeIDs.cpp.


The documentation for this class was generated from the following file: