Belle II Software development
|
Class to identify a sector inside of the VXD. More...
#include <FullSecID.h>
Public Types | |
typedef unsigned int | BaseType |
defines the base type used for FullSecID | |
Public Member Functions | |
bool | operator< (const FullSecID &secID) const |
overloaded '<'-operator for sorting algorithms | |
bool | operator== (const FullSecID &secID) const |
overloaded '=='-operator for sorting algorithms | |
bool | equalIgnoreSubLayerID (const FullSecID &secID) |
comparison which ignores the sublayer ID | |
FullSecID & | operator= (const FullSecID &secID) |
overloaded assignment operator | |
operator unsigned int () const | |
overloaded int cast | |
operator std::string (void) const | |
overloaded string cast | |
FullSecID (const FullSecID &secID) | |
Copy constructor. | |
FullSecID (unsigned int id=0) | |
Constructor taking the encoded full Sec ID (int). | |
FullSecID (std::string sid) | |
Constructor taking the encoded full Sec ID (string). | |
FullSecID (VxdID vxdID, bool subLayerID=false, unsigned int sectorNumber=0) | |
Constructor. | |
FullSecID (unsigned int layerID, bool subLayerID, unsigned int sensorID, unsigned int sectorNumber) | |
Another constructor which does not need a VxdID nor another coded valid FullSecID. | |
~FullSecID () | |
Destructor. | |
short int | getLayerID () const |
returns LayerID compatible with basf2 standards. | |
short int | getLayerNumber () const |
returns LayerID compatible with basf2 standards. | |
int | getLadderID () const |
returns LadderID compatible with basf2 standards | |
int | getLadderNumber () const |
returns LadderID compatible with basf2 standards | |
bool | getSubLayerID () const |
returns SubLayerID which tells you whether it is useful to search for compatible sectors in the same layer as well. | |
VxdID | getVxdID () const |
returns VxdID of sensor. | |
unsigned short int | getUniID () const |
returns uniID of sensor (basically the same as VxdID (can simply converted to vxdID(uniID)) but a trifle faster when only the short int value storing the VxdID information is wanted). | |
short int | getSecID () const |
returns SecID of current FullSecID (only unique for each sensor). | |
unsigned int | getFullSecID () const |
returns the FullSecID coded as integer for further use (can be reconverted to FullSecID by using FullSecID(value)) | |
std::string | getFullSecString () const |
returns the FullSecID coded as string compatible to secIDs stored in the xml-sectormaps | |
Protected Attributes | |
BaseType | m_fullSecID |
contains full info of current SecID. | |
Static Protected Attributes | |
static const int | LayerBits = 4 |
Number of bits available to represent a layer. | |
static const int | SubLayerBits = 1 |
Number of bits available to represent a subLayer (a sublayer is 1 if current sector on sensor is in an overlapping region, where it is possible that an inner hit of the same track could be on the same layer) | |
static const int | VxdIDBits = 16 |
Number of bits available to store a full vxdID. | |
static const int | SectorBits = 11 |
Number of bits available to represent a sector. | |
static const int | Bits = LayerBits + SubLayerBits + VxdIDBits + SectorBits |
Total bit size of the VxdID. | |
static const int | MaxLayer = (1 << LayerBits) - 1 |
Maximum valid Layer ID. | |
static const int | MaxSubLayer = (1 << SubLayerBits) - 1 |
Maximum valid Ladder ID. | |
static const int | MaxVxdID = (1 << VxdIDBits) - 1 |
Maximum valid Sensor ID. | |
static const int | MaxSector = (1 << SectorBits) - 1 |
Maximum valid Segment ID. | |
static const int | MaxID = std::numeric_limits<unsigned int>::max() |
Maximum value for ID. | |
static const int | LayerBitShift = SubLayerBits + VxdIDBits + SectorBits |
Number of bits to shift for storing a LayerID. | |
static const int | SubLayerBitShift = VxdIDBits + SectorBits |
Number of bits to shift for storing a SubLayerID. | |
static const int | VxdIDBitShift = SectorBits |
Number of bits shift for storing a full vxdID. | |
static const int | SubLayerMask = MaxSubLayer << SubLayerBitShift |
mask to get subLayerID from fullSecID | |
static const int | VxdIDMask = MaxVxdID << VxdIDBitShift |
mask to get VxdID from fullSecID | |
static const int | SectorMask = MaxSector |
mask to get SectorID from fullSecID | |
Friends | |
std::ostream & | operator<< (std::ostream &out, const FullSecID &secID) |
overloaded '<<' stream operator. | |
Class to identify a sector inside of the VXD.
It allows to uniquely identify a SecID within the Vxd-SectorMap: The following information is coded into the FullSecID: Layer: bits 0 - 3 (Values 0-15, calculated using shift: 28) SubLayer: bits 4 (Values 0,1, calculated using: 27) VxdID: bits 5 - 21 (Values: whole range of VxdIDs, calculated using: 11) SecID: bits 22 - 32 ( Values: 0 up to 2047)
Definition at line 33 of file FullSecID.h.
typedef unsigned int BaseType |
defines the base type used for FullSecID
Definition at line 38 of file FullSecID.h.
Copy constructor.
Definition at line 73 of file FullSecID.h.
|
inlineexplicit |
Constructor taking the encoded full Sec ID (int).
use this one if you have got an already existing integer storing the FullSecID information and you want the possibility to extract its entries (layer, sublayer, vxdID, secID)
id | Number of the SecID using the encoded format. Careful - SecIDs are not continuously within the encoded number. The default is set to zero which represents the secID of the IP |
Definition at line 82 of file FullSecID.h.
|
explicit |
Constructor taking the encoded full Sec ID (string).
use this one if you want to convert a string-encoded sector into the internal version (e.g. provided by the xml-files storing a sectormap) into the internal version. This constructor should be dispensable after changing from xml-based data storage to sql-storage
sid | global secID encoded in a string file eg "41_12345_3" 41 means layer 4, sublayer 1, 12345 is a dummy for the integer-version of the VxdID and the last digit is the local secID on the sensor |
Definition at line 43 of file FullSecID.cc.
Constructor.
If you want to create a new Full Sec ID using the information which shall be stored there (e.g. layer, sublayer, vxdID, secID)
vxdID | full VxdID of sensor of current sector. |
subLayerID | 0 if not in overlapping area of sensor, 1 if within overlap. |
sectorNumber | number of sector at current sensor/vxdID. |
Definition at line 72 of file FullSecID.cc.
FullSecID | ( | unsigned int | layerID, |
bool | subLayerID, | ||
unsigned int | sensorID, | ||
unsigned int | sectorNumber | ||
) |
Another constructor which does not need a VxdID nor another coded valid FullSecID.
layerID | set here the layer number as an ID... |
subLayerID | 0 if not in overlapping area of sensor, 1 if within overlap. |
sensorID | an ID representing the sensorID (e.g. uniID/vxdID). |
sectorNumber | number of sector at current sensor/vxdID. |
Definition at line 96 of file FullSecID.cc.
|
inline |
|
inline |
comparison which ignores the sublayer ID
Definition at line 50 of file FullSecID.h.
|
inline |
returns the FullSecID coded as integer for further use (can be reconverted to FullSecID by using FullSecID(value))
Definition at line 150 of file FullSecID.h.
std::string getFullSecString | ( | ) | const |
returns the FullSecID coded as string compatible to secIDs stored in the xml-sectormaps
Definition at line 116 of file FullSecID.cc.
|
inline |
returns LadderID compatible with basf2 standards
Definition at line 126 of file FullSecID.h.
|
inline |
returns LadderID compatible with basf2 standards
Definition at line 130 of file FullSecID.h.
|
inline |
returns LayerID compatible with basf2 standards.
Definition at line 118 of file FullSecID.h.
|
inline |
|
inline |
returns SecID of current FullSecID (only unique for each sensor).
Definition at line 146 of file FullSecID.h.
|
inline |
returns SubLayerID which tells you whether it is useful to search for compatible sectors in the same layer as well.
Definition at line 134 of file FullSecID.h.
|
inline |
returns uniID of sensor (basically the same as VxdID (can simply converted to vxdID(uniID)) but a trifle faster when only the short int value storing the VxdID information is wanted).
Definition at line 142 of file FullSecID.h.
|
inline |
|
inline |
overloaded string cast
Definition at line 64 of file FullSecID.h.
|
inline |
|
inline |
|
inline |
|
friend |
overloaded '<<' stream operator.
Print secID to stream by converting it to string
Definition at line 68 of file FullSecID.h.
|
staticprotected |
Total bit size of the VxdID.
Definition at line 174 of file FullSecID.h.
|
staticprotected |
Number of bits available to represent a layer.
Definition at line 158 of file FullSecID.h.
|
staticprotected |
Number of bits to shift for storing a LayerID.
Definition at line 198 of file FullSecID.h.
|
protected |
contains full info of current SecID.
Check class definition for detailed description
Definition at line 221 of file FullSecID.h.
|
staticprotected |
Maximum value for ID.
Definition at line 194 of file FullSecID.h.
|
staticprotected |
Maximum valid Layer ID.
Definition at line 178 of file FullSecID.h.
|
staticprotected |
Maximum valid Segment ID.
Definition at line 190 of file FullSecID.h.
|
staticprotected |
Maximum valid Ladder ID.
Definition at line 182 of file FullSecID.h.
|
staticprotected |
Maximum valid Sensor ID.
Definition at line 186 of file FullSecID.h.
|
staticprotected |
Number of bits available to represent a sector.
Definition at line 170 of file FullSecID.h.
|
staticprotected |
mask to get SectorID from fullSecID
Definition at line 218 of file FullSecID.h.
|
staticprotected |
Number of bits available to represent a subLayer (a sublayer is 1 if current sector on sensor is in an overlapping region, where it is possible that an inner hit of the same track could be on the same layer)
Definition at line 162 of file FullSecID.h.
|
staticprotected |
Number of bits to shift for storing a SubLayerID.
Definition at line 202 of file FullSecID.h.
|
staticprotected |
mask to get subLayerID from fullSecID
Definition at line 210 of file FullSecID.h.
|
staticprotected |
Number of bits available to store a full vxdID.
Definition at line 166 of file FullSecID.h.
|
staticprotected |
Number of bits shift for storing a full vxdID.
Definition at line 206 of file FullSecID.h.
|
staticprotected |
mask to get VxdID from fullSecID
Definition at line 214 of file FullSecID.h.