DD4hep  1.28.0
Detector Description Toolkit for High Energy Physics
Public Member Functions | Protected Attributes | Private Member Functions | List of all members
dd4hep::rec::CellIDPositionConverter Class Reference

#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 VolumeManagerContextfindContext (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
 

Detailed Description

Utility for position to cellID and cellID to position conversions. (Correctly re-implements some of the functionality of the deprecated IDDecoder).

Author
F.Gaede, DESY
Date
May 2017

Definition at line 39 of file CellIDPositionConverter.h.

Constructor & Destructor Documentation

◆ CellIDPositionConverter() [1/3]

dd4hep::rec::CellIDPositionConverter::CellIDPositionConverter ( )
privatedelete

◆ CellIDPositionConverter() [2/3]

dd4hep::rec::CellIDPositionConverter::CellIDPositionConverter ( const CellIDPositionConverter )
privatedelete

◆ CellIDPositionConverter() [3/3]

dd4hep::rec::CellIDPositionConverter::CellIDPositionConverter ( const Detector description)
inline

The constructor - takes the main description object.

Definition at line 51 of file CellIDPositionConverter.h.

◆ ~CellIDPositionConverter()

virtual dd4hep::rec::CellIDPositionConverter::~CellIDPositionConverter ( )
inlinevirtual

Destructor.

Definition at line 56 of file CellIDPositionConverter.h.

Member Function Documentation

◆ cellDimensions()

std::vector< double > dd4hep::rec::CellIDPositionConverter::cellDimensions ( const CellID cell) const

Returns the segmentation.cellDimensions.

Definition at line 342 of file CellIDPositionConverter.cpp.

◆ cellID()

CellID dd4hep::rec::CellIDPositionConverter::cellID ( const Position global) const

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.

◆ findContext()

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.

◆ findDetElement()

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.

◆ findPlacement()

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.

◆ findReadout() [1/2]

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.

◆ findReadout() [2/2]

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.

◆ operator=()

void dd4hep::rec::CellIDPositionConverter::operator= ( const CellIDPositionConverter )
privatedelete

◆ position()

Position dd4hep::rec::CellIDPositionConverter::position ( const CellID cellID) const

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.

◆ positionNominal()

Position dd4hep::rec::CellIDPositionConverter::positionNominal ( const CellID cellID) const

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.

Member Data Documentation

◆ _description

const Detector* dd4hep::rec::CellIDPositionConverter::_description
protected

Definition at line 121 of file CellIDPositionConverter.h.

◆ _volumeManager

VolumeManager dd4hep::rec::CellIDPositionConverter::_volumeManager {}
protected

Definition at line 120 of file CellIDPositionConverter.h.


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