8 #ifndef DDSegmentation_TILEDLAYERSEGMENTATION_H_
9 #define DDSegmentation_TILEDLAYERSEGMENTATION_H_
18 namespace DDSegmentation {
std::string _identifierY
encoding field used for X
std::vector< double > _layerDimensionsX
list of valid layer identifiers
Helper class to store x and y dimensions of a layer.
long long int CellID
Useful typedefs to differentiate cell IDs and volume IDs.
std::vector< int > _layerIndices
encoding field used for the layer
static double calculateOptimalCellSize(double nominalCellSize, double totalSize)
list of layer y dimensions
virtual VolumeID volumeID(const CellID &cellID) const
Determine the volume ID from the full cell ID by removing all local fields.
void setIdentifierY(const std::string &fieldName)
set the encoding field name used for Y
double gridSizeY() const
access the default grid size in Y
virtual BitField64 * decoder() const
Access the underlying decoder.
void setIdentifierX(const std::string &fieldName)
set the encoding field name used for X
LayerDimensions layerDimensions(int layerIndex) const
access to the dimensions of the given layer
std::string _identifierX
default grid size in Y
std::vector< double > _layerDimensionsY
list of layer x dimensions
double _gridSizeY
default grid size in X
const std::string & identifierLayer() const
access the encoding field name used for Y
void setGridSizeX(double cellSize)
set the default grid size in X
void setGridSizeY(double cellSize)
set the default grid size in Y
const std::string & identifierY() const
access the encoding field name used for Y
static double calculateOffset(double cellSize, double totalSize)
helper method to calculate offset of bin 0 based on the total size
double layerGridSizeX(int layerIndex) const
access the actual grid size in X for a given layer
Simple container for a physics vector.
TiledLayerSegmentation(const std::string &cellEncoding="")
Default constructor passing the encoding string.
Base class for all segmentations.
LayerDimensions(double _x=1., double _y=1.)
void setIdentifierLayer(const std::string &fieldName)
set the encoding field name used for layer
virtual Vector3D position(const CellID &cellID) const
determine the position based on the cell ID
double layerGridSizeY(int layerIndex) const
access the actual grid size in Y for a given layer
void setLayerDimensions(int layerIndex, double x, double y)
set the dimensions of the given layer
virtual CellID cellID(const Vector3D &localPosition, const Vector3D &globalPosition, const VolumeID &volumeID) const
determine the cell ID based on the position
const std::string & identifierX() const
access the encoding field name used for X
std::string _identifierLayer
encoding field used for Y
virtual ~TiledLayerSegmentation()
destructor
double gridSizeX() const
access the default grid size in X