DD4hep
1.31.0
Detector Description Toolkit for High Energy Physics
|
#include <CellIDPositionConverter.h>
Public Member Functions | |
CellIDPositionConverter (const Detector &description) | |
The constructor - takes the main description object. More... | |
virtual | ~CellIDPositionConverter () |
Destructor. More... | |
Position | positionNominal (const CellID &cellID) const |
Position | position (const CellID &cellID) const |
CellID | cellID (const Position &global) const |
const VolumeManagerContext * | findContext (const CellID &cellID) const |
DetElement | findDetElement (const Position &global, const DetElement &det=DetElement()) const |
PlacedVolume | findPlacement (const Position &point, const PlacedVolume &mother, double locPos[3], PlacedVolume::VolIDs &volIDs) const |
Readout | findReadout (const DetElement &det) const |
Readout | findReadout (const PlacedVolume &pv) const |
std::vector< double > | cellDimensions (const CellID &cell) const |
Protected Attributes | |
VolumeManager | _volumeManager {} |
const Detector * | _description |
Private Member Functions | |
CellIDPositionConverter ()=delete | |
CellIDPositionConverter (const CellIDPositionConverter &)=delete | |
void | operator= (const CellIDPositionConverter &)=delete |
Utility for position to cellID and cellID to position conversions. (Correctly re-implements some of the functionality of the deprecated IDDecoder).
Definition at line 39 of file CellIDPositionConverter.h.
|
privatedelete |
|
privatedelete |
|
inline |
The constructor - takes the main description object.
Definition at line 51 of file CellIDPositionConverter.h.
|
inlinevirtual |
Destructor.
Definition at line 56 of file CellIDPositionConverter.h.
std::vector< double > dd4hep::rec::CellIDPositionConverter::cellDimensions | ( | const CellID & | cell | ) | const |
Returns the segmentation.cellDimensions.
Definition at line 342 of file CellIDPositionConverter.cpp.
Return the global cellID for the given global position. Note: this call is rather slow - only use it when really needed !
Definition at line 87 of file CellIDPositionConverter.cpp.
const VolumeManagerContext * dd4hep::rec::CellIDPositionConverter::findContext | ( | const CellID & | cellID | ) | const |
Find the context with DetElement, placements etc for a given cellID of a sensitive volume. Returns NULL if not found (e.g. if the cellID does not correspond to a sensitive volume).
Definition at line 27 of file CellIDPositionConverter.cpp.
DetElement dd4hep::rec::CellIDPositionConverter::findDetElement | ( | const Position & | global, |
const DetElement & | det = DetElement() |
||
) | const |
Find the DetElement that contains the given point - if no DetElement is found, an invalid DetElement is returned. Uses the optionally given DetElement as start for the search.
Definition at line 209 of file CellIDPositionConverter.cpp.
PlacedVolume dd4hep::rec::CellIDPositionConverter::findPlacement | ( | const Position & | point, |
const PlacedVolume & | mother, | ||
double | locPos[3], | ||
PlacedVolume::VolIDs & | volIDs | ||
) | const |
Find the lowest daughter Placement in the given Placement that contains the point (in the coordinate system of the mother placement). Return the local coordinates in this daughter Placement and collect all volIDs on the way.
Definition at line 248 of file CellIDPositionConverter.cpp.
Readout dd4hep::rec::CellIDPositionConverter::findReadout | ( | const DetElement & | det | ) | const |
Find the readout object for the given DetElement. If the DetElement is sensitive the corresondig Readout is returned, else a recursive search in the daughter volumes (nodes) of this DetElement's volume is performed and the first Readout object is returned.
Definition at line 302 of file CellIDPositionConverter.cpp.
Readout dd4hep::rec::CellIDPositionConverter::findReadout | ( | const PlacedVolume & | pv | ) | const |
Return this PlacedVolume's Readout or, if the volume is not sensitive, recursively search for a Readout object in the daughter nodes (volumes).
Definition at line 321 of file CellIDPositionConverter.cpp.
|
privatedelete |
Return the global position for a given cellID of a sensitive volume. Alignment corrections are applied (TO BE DONE). If no sensitive volume is found, (0,0,0) is returned.
Definition at line 32 of file CellIDPositionConverter.cpp.
Return the nominal global position for a given cellID of a sensitive volume. No Alignment corrections are applied. If no sensitive volume is found, (0,0,0) is returned.
Definition at line 39 of file CellIDPositionConverter.cpp.
|
protected |
Definition at line 121 of file CellIDPositionConverter.h.
|
protected |
Definition at line 120 of file CellIDPositionConverter.h.