This class provides a computer convenient numbering scheme for the sectors in the sector map and for the N sectors combinations.
More...
|
| CompactSecIDs () |
| The constructor have just to set the internal counter to 0.
|
|
| ~CompactSecIDs () |
| The destructor is quite trivial: nothing special to delete.
|
|
int | getSize () const |
| Returns the number of sectors defined so far.
|
|
unsigned int | getAvailableSlots () const |
| Returns the available number of sector that can be defined now.
|
|
int | addSectors (const std::vector< double > &normalizedUsup, const std::vector< double > &normalizedVsup, const std::vector< std::vector< FullSecID >> &fullSecIDs) |
| This method defines all the sectors on a given sensor. More...
|
|
sectorID_t | getCompactID (const FullSecID &fullID) const |
| Returns the compact id of the FullSecID. More...
|
|
SectorsOnSensor< sectorID_t > | getSectorsOnSensor (unsigned layer, unsigned ladder, unsigned sensor) const |
| Getter for IDs of all sectors on a sensor. More...
|
|
| BELLE2_DEFINE_EXCEPTION (unboundedNormalizedU, "On layer:%1% ladder:%2% sensor:%3% abnormal U=%4$") |
| Exception for normalized coordinate U out of bound [0,1].
|
|
| BELLE2_DEFINE_EXCEPTION (unboundedNormalizedV, "On layer:%1% ladder:%2% sensor:%3% abnormal V=%4$") |
| Exception for normalized coordinate V out of bound [0,1].
|
|
FullSecID | getFullSecID (VxdID aSensorID, double normalizedU, double normalizedV) const |
| Returns a fullSecID for given sensor and pair of coordinates. More...
|
|
sectorID_t | operator[] (const FullSecID &fullID) const |
| Returns the compact id of the FullSecID. More...
|
|
secPairID_t | getCompactID (const FullSecID &id1, const FullSecID &id2) const |
| Returns the compact id of the pair of FullSecID id1 id2. More...
|
|
secTripletID_t | getCompactID (const FullSecID &id1, const FullSecID &id2, const FullSecID &id3) const |
| Returns the compact id of the triplet of FullSecID id1 id2 id3 If any of the id1, id2 or id3 is undefined 0 is returned.
|
|
secQuadrupletID_t | getCompactID (const FullSecID &id1, const FullSecID &id2, const FullSecID &id3, const FullSecID &id4) const |
| Returns the compact id of the quadruplet of FullSecID id1 id2 id3 id4 If any of the id1, id2, id3 or id4 is undefined 0 is returned.
|
|
sectorID_t | getCompactIDFastAndDangerous (const FullSecID &fullID) const |
| Fast (and potentially dangerous) equivalent of getCompactID. More...
|
|
bool | areCoordinatesValid (VxdID aSensorID, double normalizedU, double normalizedV) const |
| JKL: returns true if operator() will not throw an exception.
|
|
const LayersLookUpTable_t & | getCompactSectorsIDMap () const |
| Get access to the whole map.
|
|
int | nOfLayers (void) const |
| get the number of layers in this CompactSecIDs
|
|
int | nOfLadders (int layer) const |
| get the number of ladders on More...
|
|
int | nOfSensors (int layer, int ladder) const |
| get the number of sensors on More...
|
|
bool | setSubLayerID (FullSecID §or, int sublayer) |
| set the SublayerID of the sector More...
|
|
|
template<class TContainer , class ... Indexes> |
int | privateAddSectors (TContainer &container, const std::vector< double > &normalizedUsup, const std::vector< double > &normalizedVsup, const std::vector< std::vector< FullSecID > > &fullSecIDs, short unsigned int index, Indexes ... indexes) |
| The hidden private method that recursively manage the size of everything. More...
|
|
int | privateAddSectors (SectorsOnSensor< sectorID_t > §ors, const std::vector< double > &normalizedUsup, const std::vector< double > &normalizedVsup, const std::vector< std::vector< FullSecID > > &fullSecIDs) |
| The hidden private method that end the recursion. More...
|
|
template<class TContainer , class ... Indexes> |
sectorID_t | privateGetCompactID (const TContainer &container, short unsigned int index, Indexes ... indexes) const |
| The hidden private method that recursively descend the layer, ladder, sensor stack and returns the compactID of a given fullSecID. More...
|
|
template<class TContainer > |
sectorID_t | privateGetCompactID (const TContainer &container, short unsigned int index) const |
| The hidden private method that close the recursion. More...
|
|
This class provides a computer convenient numbering scheme for the sectors in the sector map and for the N sectors combinations.
Sectors are labeled with consecutives numbers starting from 1. Methods are provided to convert the fullSecIds (human readable) to compactSecIDs (computer convenient) back and forth.
Definition at line 38 of file CompactSecIDs.h.
int addSectors |
( |
const std::vector< double > & |
normalizedUsup, |
|
|
const std::vector< double > & |
normalizedVsup, |
|
|
const std::vector< std::vector< FullSecID >> & |
fullSecIDs |
|
) |
| |
|
inline |
This method defines all the sectors on a given sensor.
The two vectors normalizedUsup and normalizedVsup define the sector boundaries in normalized coordinates. (e.g.: if normalizesUsup = { a, 1} two sectors boundary are defined [0,a) and [a,1). ) The returned value is the number of fullSecIDs actually added to this CompacSecIDs.
Definition at line 79 of file CompactSecIDs.h.
94 if (fullSecIDrow.size() != normalizedVsup.size() + 1)
98 for (
auto fullSecID : fullSecIDrow)
99 if (layer != fullSecID.getLayerID() ||
100 ladder != fullSecID.getLadderID() ||
101 sensor != fullSecID.getVxdID().getSensorNumber())
106 normalizedUsup, normalizedVsup,
108 layer, ladder, sensor);