DD4hep  1.30.0
Detector Description Toolkit for High Energy Physics
Typedefs | Functions
dd4hep::detail::tools Namespace Reference

Helper namespace used to answer detector element specific questons. More...

Typedefs

typedef std::vector< DetElementElementPath
 
typedef std::vector< PlacedVolumePlacementPath
 

Functions

void copy (Alignment from, Alignment to)
 Copy alignment object from source object. More...
 
void computeIdeal (Alignment alignment)
 Compute the ideal/nominal to-world transformation from the detector element placement. More...
 
void computeSurvey (Alignment alignment)
 Compute the ideal/nominal to-world transformation from the detector element placement. More...
 
DetElement topElement (DetElement child)
 Determine top level element (=world) for any element walking up the detector element tree. More...
 
std::string elementPath (DetElement element)
 Assemble the path of a particular detector element. More...
 
std::string elementPath (const ElementPath &nodes, bool reverse=true)
 Assemble the path of the PlacedVolume selection. More...
 
void elementPath (DetElement elt, ElementPath &detectors)
 Collect detector elements to the top detector element (world) More...
 
DetElement findElement (const Detector &description, const std::string &path)
 Find DetElement as child of the top level volume by its absolute path. More...
 
DetElement findDaughterElement (DetElement parent, const std::string &subpath)
 Find DetElement as child of a parent by its relative or absolute path. More...
 
bool isParentElement (DetElement parent, DetElement child)
 Find path between the child element and the parent element. More...
 
std::string placementPath (DetElement element)
 Assemble the placement path from a given detector element to the world volume. More...
 
std::string placementPath (const PlacementPath &nodes, bool reverse=true)
 Assemble the path of the PlacedVolume selection. More...
 
std::string placementPath (const std::vector< const TGeoNode * > &nodes, bool reverse=true)
 Assemble the path of the PlacedVolume selection. More...
 
void placementPath (DetElement elt, PlacementPath &nodes)
 Collect detector elements placements to the top detector element (world) [no holes!]. More...
 
void placementPath (DetElement parent, DetElement child, PlacementPath &nodes)
 Collect detector elements placements to the parent detector element [no holes!]. More...
 
PlacedVolume findNode (PlacedVolume top_place, const std::string &place)
 Find a given node in the hierarchy starting from the top node (absolute placement!) More...
 
void placementTrafo (const PlacementPath &nodes, bool inverse, TGeoHMatrix *&mat)
 Update cached matrix to transform to positions to an upper level Placement. More...
 
void placementTrafo (const PlacementPath &nodes, bool inverse, TGeoHMatrix &mat)
 Update cached matrix to transform to positions to an upper level Placement. More...
 
std::string toString (const PlacedVolume::VolIDs &ids)
 Convert VolumeID to string. More...
 
std::string toString (const IDDescriptor &dsc, const PlacedVolume::VolIDs &ids, VolumeID code)
 Convert VolumeID to string. More...
 
std::vector< std::string > pathElements (const std::string &path)
 Extract all the path elements from a path. More...
 
std::string elementPath (const PlacementPath &nodes, bool reverse)
 Assemble the path of the PlacedVolume selection. More...
 
void elementPath (DetElement parent, DetElement elt, ElementPath &detectors)
 Collect detector elements to any parent detector element. More...
 
void elementPath (DetElement elt, PlacementPath &nodes)
 Collect detector elements placements to the top detector element (world) [fast, but may have holes!]. More...
 
void elementPath (DetElement parent, DetElement element, PlacementPath &nodes)
 Collect detector elements placements to the parent detector element [no holes!]. More...
 
bool findChild (PlacedVolume parent, PlacedVolume child, PlacementPath &path)
 Find Child of PlacedVolume and assemble on the fly the path of PlacedVolumes. More...
 

Detailed Description

Helper namespace used to answer detector element specific questons.

Author
M.Frank
Version
1.0

Typedef Documentation

◆ ElementPath

Definition at line 38 of file DetectorTools.h.

◆ PlacementPath

Definition at line 39 of file DetectorTools.h.

Function Documentation

◆ computeIdeal()

void dd4hep::detail::tools::computeIdeal ( Alignment  alignment)

Compute the ideal/nominal to-world transformation from the detector element placement.

Note: Detector information of the alignment data is filled by the caller!

Definition at line 60 of file AlignmentTools.cpp.

◆ computeSurvey()

void dd4hep::detail::tools::computeSurvey ( Alignment  alignment)

Compute the ideal/nominal to-world transformation from the detector element placement.

Compute the survey to-world transformation from the detector element placement with respect to the survey constants.

Note: Detector information of the alignment data is filled by the caller! Compute the survey to-world transformation. Compute the survey to-world transformation from the detector element placement with respect to the survey constants

Note: Detector information of the alignment data is filled by the caller!

Definition at line 117 of file AlignmentTools.cpp.

◆ copy()

void dd4hep::detail::tools::copy ( Alignment  from,
Alignment  to 
)

Copy alignment object from source object.

Definition at line 43 of file AlignmentTools.cpp.

◆ elementPath() [1/7]

std::string dd4hep::detail::tools::elementPath ( const ElementPath nodes,
bool  reverse = true 
)

Assemble the path of the PlacedVolume selection.

Definition at line 193 of file DetectorTools.cpp.

◆ elementPath() [2/7]

std::string dd4hep::detail::tools::elementPath ( const PlacementPath nodes,
bool  reverse 
)

Assemble the path of the PlacedVolume selection.

Definition at line 179 of file DetectorTools.cpp.

◆ elementPath() [3/7]

std::string dd4hep::detail::tools::elementPath ( DetElement  element)

Assemble the path of a particular detector element.

Definition at line 207 of file DetectorTools.cpp.

◆ elementPath() [4/7]

void dd4hep::detail::tools::elementPath ( DetElement  elt,
ElementPath detectors 
)

Collect detector elements to the top detector element (world)

Definition at line 130 of file DetectorTools.cpp.

◆ elementPath() [5/7]

void dd4hep::detail::tools::elementPath ( DetElement  elt,
PlacementPath nodes 
)

Collect detector elements placements to the top detector element (world) [fast, but may have holes!].

Definition at line 169 of file DetectorTools.cpp.

◆ elementPath() [6/7]

void dd4hep::detail::tools::elementPath ( DetElement  parent,
DetElement  element,
PlacementPath nodes 
)

Collect detector elements placements to the parent detector element [no holes!].

Collect detector elements placements to the top detector element (world) [fast, but may have holes!].

Definition at line 157 of file DetectorTools.cpp.

◆ elementPath() [7/7]

void dd4hep::detail::tools::elementPath ( DetElement  parent,
DetElement  elt,
ElementPath detectors 
)

Collect detector elements to any parent detector element.

Definition at line 136 of file DetectorTools.cpp.

◆ findChild()

bool dd4hep::detail::tools::findChild ( PlacedVolume  parent,
PlacedVolume  child,
PlacementPath path 
)

Find Child of PlacedVolume and assemble on the fly the path of PlacedVolumes.

Definition at line 68 of file DetectorTools.cpp.

◆ findDaughterElement()

DetElement dd4hep::detail::tools::findDaughterElement ( DetElement  parent,
const std::string &  subpath 
)

Find DetElement as child of a parent by its relative or absolute path.

Definition at line 219 of file DetectorTools.cpp.

◆ findElement()

DetElement dd4hep::detail::tools::findElement ( const Detector description,
const std::string &  path 
)

Find DetElement as child of the top level volume by its absolute path.

Definition at line 214 of file DetectorTools.cpp.

◆ findNode()

PlacedVolume dd4hep::detail::tools::findNode ( PlacedVolume  top_place,
const std::string &  place 
)

Find a given node in the hierarchy starting from the top node (absolute placement!)

Definition at line 328 of file DetectorTools.cpp.

◆ isParentElement()

bool dd4hep::detail::tools::isParentElement ( DetElement  parent,
DetElement  child 
)

Find path between the child element and the parent element.

Definition at line 57 of file DetectorTools.cpp.

◆ pathElements()

std::vector< std::string > dd4hep::detail::tools::pathElements ( const std::string &  path)

Extract all the path elements from a path.

Definition at line 397 of file DetectorTools.cpp.

◆ placementPath() [1/5]

std::string dd4hep::detail::tools::placementPath ( const PlacementPath nodes,
bool  reverse = true 
)

Assemble the path of the PlacedVolume selection.

Definition at line 283 of file DetectorTools.cpp.

◆ placementPath() [2/5]

std::string dd4hep::detail::tools::placementPath ( const std::vector< const TGeoNode * > &  nodes,
bool  reverse = true 
)

Assemble the path of the PlacedVolume selection.

Definition at line 297 of file DetectorTools.cpp.

◆ placementPath() [3/5]

std::string dd4hep::detail::tools::placementPath ( DetElement  element)

Assemble the placement path from a given detector element to the world volume.

Assemble the path of the PlacedVolume selection.

Definition at line 276 of file DetectorTools.cpp.

◆ placementPath() [4/5]

void dd4hep::detail::tools::placementPath ( DetElement  elt,
PlacementPath nodes 
)

Collect detector elements placements to the top detector element (world) [no holes!].

Definition at line 262 of file DetectorTools.cpp.

◆ placementPath() [5/5]

void dd4hep::detail::tools::placementPath ( DetElement  parent,
DetElement  child,
PlacementPath nodes 
)

Collect detector elements placements to the parent detector element [no holes!].

Definition at line 269 of file DetectorTools.cpp.

◆ placementTrafo() [1/2]

void dd4hep::detail::tools::placementTrafo ( const PlacementPath nodes,
bool  inverse,
TGeoHMatrix &  mat 
)

Update cached matrix to transform to positions to an upper level Placement.

Definition at line 316 of file DetectorTools.cpp.

◆ placementTrafo() [2/2]

void dd4hep::detail::tools::placementTrafo ( const PlacementPath nodes,
bool  inverse,
TGeoHMatrix *&  mat 
)

Update cached matrix to transform to positions to an upper level Placement.

Definition at line 310 of file DetectorTools.cpp.

◆ topElement()

DetElement dd4hep::detail::tools::topElement ( DetElement  child)

Determine top level element (=world) for any element walking up the detector element tree.

Definition at line 240 of file DetectorTools.cpp.

◆ toString() [1/2]

std::string dd4hep::detail::tools::toString ( const IDDescriptor dsc,
const PlacedVolume::VolIDs ids,
VolumeID  code 
)

Convert VolumeID to string.

Definition at line 386 of file DetectorTools.cpp.

◆ toString() [2/2]

std::string dd4hep::detail::tools::toString ( const PlacedVolume::VolIDs ids)

Convert VolumeID to string.

Definition at line 378 of file DetectorTools.cpp.