Mapping for sensitive plane identifiers. More...
#include <GeometryIDmapper.h>
Public Types | |
using | ID_t = typename BaseMapper_t::ID_t |
using | index_type = typename BaseMapper_t::index_type |
Public Types inherited from geo::GeoIDmapper< geo::PlaneID, Index > | |
using | ID_t = geo::PlaneID |
Type used as ID for this mapping. More... | |
using | index_type = Index |
Type of flat index. More... | |
Public Member Functions | |
PlaneIDmapper (unsigned int nCryo, unsigned int nTPCs, unsigned int nPlanes) | |
Prepares the mapping with the specified sizes. More... | |
void | resize (unsigned int nCryo, unsigned int nTPCs, unsigned int nPlanes) |
Prepares the mapping for the specified sizes. More... | |
Mapping status query | |
bool | hasCryostat (geo::CryostatID const &cryoid) const |
Returns whether this mapping covers the specified cryostat. More... | |
bool | hasTPC (geo::TPCID const &tpcid) const |
Returns whether this mapping covers the specified TPC. More... | |
bool | hasPlane (geo::PlaneID const &planeid) const |
Returns whether this mapping covers the specified plane. More... | |
Public Member Functions inherited from geo::GeoIDmapper< geo::PlaneID, Index > | |
GeoIDmapper () | |
Default constructor: all dimensions empty. More... | |
GeoIDmapper (std::initializer_list< unsigned int > dims) | |
Prepares the indexer. More... | |
index_type | index (ID_t const &id) const |
Returns the linear index corresponding to the specified ID. More... | |
ID_t | ID (index_type const index) const |
Returns the ID corresponding to the specified linear index . More... | |
index_type | operator() (ID_t const &id) const |
Returns the linear index corresponding to the specified ID. More... | |
ID_t | operator() (index_type const index) const |
Returns the ID corresponding to the specified linear index . More... | |
void | resize (std::initializer_list< unsigned int > dims) |
Resizes the mapping to accommodate the specified dimension sizes. More... | |
void | resizeAs (geo::GeoIDmapper< OIDType, OIndex > const &other) |
Resizes the mapping to reflect the one from another mapping. More... | |
void | clear () |
Sets all dimension sizes to 0 . More... | |
index_type | size () const |
Returns the number of elements in the mapping. More... | |
bool | empty () const |
Returns whether the mapping has no elements (false by assumptions). More... | |
unsigned int | dimSize () const |
Dimensions of the Level dimension of this mapping. More... | |
bool | hasElement (GeoID const &id) const |
Returns whether this mapping hosts data for the specified ID. More... | |
GeoID | firstID () const |
Returns the ID of the first element with GeoID type. More... | |
GeoID | lastID () const |
Returns the ID of the last covered element with GeoID type. More... | |
Private Types | |
using | BaseMapper_t = geo::GeoIDmapper< geo::PlaneID, Index > |
Base class. More... | |
Mapping for sensitive plane identifiers.
Index | (default: std::size_t ) type of flat index |
geo::GeoIDmapper
A customized version of geo::GeoIDmapper
offering sensitive plane ID-specific interface.
Definition at line 35 of file GeometryIDmapper.h.
|
private |
Base class.
Definition at line 340 of file GeometryIDmapper.h.
using geo::PlaneIDmapper< Index >::ID_t = typename BaseMapper_t::ID_t |
Definition at line 345 of file GeometryIDmapper.h.
using geo::PlaneIDmapper< Index >::index_type = typename BaseMapper_t::index_type |
Definition at line 346 of file GeometryIDmapper.h.
|
inline |
Prepares the mapping with the specified sizes.
nCryo | number of cryostats |
nTPCs | number of TPCs per cryostat |
nPlanes | number of planes per TPC |
The mapping is sized to map nCryo
cryostats, each with nTPCs
TPCs, each one with nPlanes
wire planes.
Definition at line 361 of file GeometryIDmapper.h.
|
inline |
Returns whether this mapping covers the specified cryostat.
Definition at line 394 of file GeometryIDmapper.h.
|
inline |
Returns whether this mapping covers the specified plane.
Definition at line 402 of file GeometryIDmapper.h.
|
inline |
Returns whether this mapping covers the specified TPC.
Definition at line 398 of file GeometryIDmapper.h.
|
inline |
Prepares the mapping for the specified sizes.
nCryo | number of cryostats |
nTPCs | number of TPCs |
nPlanes | number of planes per TPC |
resizeAs()
The mapping is sized to map nCryo
cryostats, each with nTPCs
TPCs, each one with nPlanes
wire planes.
Definition at line 382 of file GeometryIDmapper.h.