Belle II Software development
|
Hit pattern of the VXD within a track. More...
#include <HitPatternVXD.h>
Public Types | |
enum class | PXDMode : unsigned short { normal = static_cast<unsigned short>(0) , gated = 1 } |
PXD modes. More... | |
Public Member Functions | |
HitPatternVXD () | |
Create empty pattern. | |
HitPatternVXD (const unsigned int initValue) | |
Initialize the pattern with an integer. | |
unsigned int | getInteger () const |
Getter for the underlying integer. | |
unsigned short | getNdf () const |
Get degrees of freedom in PXD and SVD. | |
unsigned short | getNVXDLayers (const PXDMode &pxdmode=PXDMode::normal) const |
Return the total number of activated layers in the VXD depending on the mode of the PXD. | |
void | setSVDLayer (const unsigned short layerId, unsigned short uHits, unsigned short vHits) |
Set the number of hits in a specific layer of the SVD. | |
std::pair< const unsigned short, const unsigned short > | getSVDLayer (const unsigned short layerId) const |
Get the number of hits in a specific layer of the SVD. | |
void | resetSVDLayer (const unsigned short layerId) |
Reset the number of hits in a specific layer of the SVD. | |
unsigned short | getNSVDHits () const |
Get total number of hits in the SVD. | |
unsigned short | getNSVDLayers () const |
Returns the total number of activated layers of the SVD. | |
short | getFirstSVDLayer () const |
Get the first activated SVD layer index. | |
short | getLastSVDLayer () const |
Get the last activated SVD layer index. | |
void | setPXDLayer (const unsigned short layerId, unsigned short nHits, const PXDMode &mode=PXDMode::normal) |
Set the number of hits in a specific layer of the PXD. | |
unsigned short | getPXDLayer (const unsigned short layerId, const PXDMode &mode=PXDMode::normal) const |
Get the number of hits in a specific layer of the PXD. | |
void | resetPXDLayer (const unsigned short layerId, const PXDMode &mode=PXDMode::normal) |
Reset the number of hits in a specific layer of the PXD. | |
unsigned short | getNPXDHits () const |
Get total number of hits in the PXD. | |
unsigned short | getNPXDLayers (const PXDMode &mode=PXDMode::normal) const |
Returns the total number of activated layers of the PXD. | |
short | getFirstPXDLayer (const PXDMode &mode=PXDMode::normal) const |
Returns the first activated layer of the PXD depending on the mode. | |
short | getLastPXDLayer (const PXDMode &mode=PXDMode::normal) const |
Returns the last activated layer of the PXD depending on the mode. | |
void | setInnermostHitShareStatus (const unsigned short innermostHitShareStatus) |
Set the innermost hit share flags for V0 daughters. | |
unsigned short | getInnermostHitShareStatus () const |
Get the innermost hit share flags for V0 daughters. | |
void | resetInnermostHitShareStatus () |
Reset the innermost hit share flags for V0 daughters. | |
std::string | __str__ () const |
String for printing in python. | |
Private Member Functions | |
std::bitset< 32 > | getBitset () const |
Getter for underlying bitset. | |
std::bitset< 32 > | getLayerMask (const unsigned short layerId) const |
Getter for the proper layer masks. | |
Private Attributes | |
std::bitset< 32 > | m_pattern |
Storing of actual hit pattern. | |
Static Private Attributes | |
static const std::bitset< 32 > | s_LayerMasks [6] |
Masks to zero out all bits from other layers. | |
static const std::bitset< 32 > | s_PXDModeMasks [2] |
Mask to zero out all bits from other layers. | |
static const std::bitset< 32 > | s_SVDuvMasks [2] |
Mask to zero out all bits from other layers. | |
static const std::bitset< 32 > | s_V0DaughterMask |
Mask to zero out all bits from other layers. | |
static const std::bitset< 32 > | s_infoLayerMask |
Mask to zero out all bits from other layers. | |
static const std::list< unsigned short > | s_PXDLayerNumbers = {1, 2} |
For iterating through layers. | |
static const std::list< unsigned short > | s_SVDLayerNumbers = {3, 4, 5, 6} |
For iterating through layers. | |
static const unsigned int | s_svdUshift = 8 |
for internal shifting to the SVD bits. | |
static const unsigned int | s_svdVshift = 10 |
for internal shifting to the SVD bits. | |
Friends | |
class | HitPatternVXDTest_General_Test |
class | HitPatternVXDTest_NumberingScheme_Test |
class | HitPatternVXDTest_SVDSetterAndGetter_Test |
class | HitPatternVXDTest_PXDSetterAndGetter_Test |
Hit pattern of the VXD within a track.
The pattern is stored using a std::bitset. This allows to use the STL, which is very efficiently programmed.
Only hits from the outgoing arm are stored. For each layer there are two bits. The layer counting is:
The numbering scheme in this class is equivalent to the one defined in the note BELLE2-NOTE-TE-2015-010: https://docs.belle2.org/record/243
32 Bits are reserved. 4 Bits for each layer: 2 Bits for each PXD normal/gated-mode, 2 Bits for each SVD U/V-side. In total 24 Bits are used to represent hit patterns. Remaining upper 8 Bits are resevered for information. Lowest 2 Bits for V0 daughters (innermost hit share status), assigned in V0Finder. 0x1(0x2) bit represents V/z(U/r-phi)-hit share.
Definition at line 37 of file HitPatternVXD.h.
|
strong |
PXD modes.
Definition at line 46 of file HitPatternVXD.h.
|
inline |
Create empty pattern.
Definition at line 49 of file HitPatternVXD.h.
|
inlineexplicit |
Initialize the pattern with an integer.
Definition at line 52 of file HitPatternVXD.h.
std::string __str__ | ( | ) | const |
String for printing in python.
Definition at line 205 of file HitPatternVXD.cc.
|
inlineprivate |
short getFirstPXDLayer | ( | const PXDMode & | mode = PXDMode::normal | ) | const |
Returns the first activated layer of the PXD depending on the mode.
If there is no hit in the PXD pattern, -1 is returned.
mode | normal or gated |
Definition at line 166 of file HitPatternVXD.cc.
short getFirstSVDLayer | ( | ) | const |
Get the first activated SVD layer index.
If there is no hit in the SVD pattern, -1 is returned.
Definition at line 103 of file HitPatternVXD.cc.
unsigned short getInnermostHitShareStatus | ( | ) | const |
Get the innermost hit share flags for V0 daughters.
Definition at line 194 of file HitPatternVXD.cc.
|
inline |
Getter for the underlying integer.
Definition at line 58 of file HitPatternVXD.h.
short getLastPXDLayer | ( | const PXDMode & | mode = PXDMode::normal | ) | const |
Returns the last activated layer of the PXD depending on the mode.
If there is no hit in the PXD pattern, -1 is returned.
mode | normal or gated |
Definition at line 174 of file HitPatternVXD.cc.
short getLastSVDLayer | ( | ) | const |
Get the last activated SVD layer index.
If there is no hit in the SVD pattern, -1 is returned.
Definition at line 112 of file HitPatternVXD.cc.
|
inlineprivate |
Getter for the proper layer masks.
Makes index handling more easy.
Definition at line 236 of file HitPatternVXD.h.
unsigned short getNdf | ( | ) | const |
Get degrees of freedom in PXD and SVD.
Nota Bene: Only for the outgoing arm.
Definition at line 41 of file HitPatternVXD.cc.
unsigned short getNPXDHits | ( | ) | const |
Get total number of hits in the PXD.
Definition at line 147 of file HitPatternVXD.cc.
unsigned short getNPXDLayers | ( | const PXDMode & | mode = PXDMode::normal | ) | const |
Returns the total number of activated layers of the PXD.
mode | normal or gated |
Definition at line 157 of file HitPatternVXD.cc.
unsigned short getNSVDHits | ( | ) | const |
Get total number of hits in the SVD.
Definition at line 83 of file HitPatternVXD.cc.
unsigned short getNSVDLayers | ( | ) | const |
Returns the total number of activated layers of the SVD.
Definition at line 93 of file HitPatternVXD.cc.
unsigned short getNVXDLayers | ( | const PXDMode & | pxdmode = PXDMode::normal | ) | const |
Return the total number of activated layers in the VXD depending on the mode of the PXD.
pxdmode | normal or gated |
Definition at line 46 of file HitPatternVXD.cc.
unsigned short getPXDLayer | ( | const unsigned short | layerId, |
const PXDMode & | mode = PXDMode::normal |
||
) | const |
Get the number of hits in a specific layer of the PXD.
layerId | PXD layer index. |
mode | normal or gated |
Definition at line 133 of file HitPatternVXD.cc.
std::pair< const unsigned short, const unsigned short > getSVDLayer | ( | const unsigned short | layerId | ) | const |
Get the number of hits in a specific layer of the SVD.
layerId | SVD layer index. |
Definition at line 65 of file HitPatternVXD.cc.
void resetInnermostHitShareStatus | ( | ) |
Reset the innermost hit share flags for V0 daughters.
Definition at line 200 of file HitPatternVXD.cc.
void resetPXDLayer | ( | const unsigned short | layerId, |
const PXDMode & | mode = PXDMode::normal |
||
) |
Reset the number of hits in a specific layer of the PXD.
layerId | PXD layer index. |
mode | normal or gated |
Definition at line 141 of file HitPatternVXD.cc.
void resetSVDLayer | ( | const unsigned short | layerId | ) |
Reset the number of hits in a specific layer of the SVD.
layerId | SVD layer index. |
Definition at line 76 of file HitPatternVXD.cc.
void setInnermostHitShareStatus | ( | const unsigned short | innermostHitShareStatus | ) |
Set the innermost hit share flags for V0 daughters.
innermostHitShareStatus | Innermost hit share status flags. |
Definition at line 183 of file HitPatternVXD.cc.
void setPXDLayer | ( | const unsigned short | layerId, |
unsigned short | nHits, | ||
const PXDMode & | mode = PXDMode::normal |
||
) |
Set the number of hits in a specific layer of the PXD.
layerId | PXD layer index. |
nHits | 0-3 hits possible |
mode | normal or gated |
Definition at line 122 of file HitPatternVXD.cc.
void setSVDLayer | ( | const unsigned short | layerId, |
unsigned short | uHits, | ||
unsigned short | vHits | ||
) |
Set the number of hits in a specific layer of the SVD.
layerId | SVD layer index. |
uHits | |
vHits |
Definition at line 51 of file HitPatternVXD.cc.
|
friend |
Definition at line 38 of file HitPatternVXD.h.
|
friend |
Definition at line 39 of file HitPatternVXD.h.
|
friend |
Definition at line 41 of file HitPatternVXD.h.
|
friend |
Definition at line 40 of file HitPatternVXD.h.
|
private |
Storing of actual hit pattern.
PXD and SVD layer get 4 bits each. PXD has in each layer 4 bits where respectively two bits are used to store normal and gated mode hits separately. SVD has in each layer 4 bits where respectively two bits are used to store hits in u and v layer separately.
Definition at line 218 of file HitPatternVXD.h.
|
staticprivate |
Mask to zero out all bits from other layers.
Definition at line 224 of file HitPatternVXD.h.
|
staticprivate |
Masks to zero out all bits from other layers.
Definition at line 220 of file HitPatternVXD.h.
|
staticprivate |
For iterating through layers.
Definition at line 226 of file HitPatternVXD.h.
|
staticprivate |
Mask to zero out all bits from other layers.
Definition at line 221 of file HitPatternVXD.h.
|
staticprivate |
For iterating through layers.
Definition at line 227 of file HitPatternVXD.h.
|
staticprivate |
for internal shifting to the SVD bits.
Definition at line 229 of file HitPatternVXD.h.
|
staticprivate |
Mask to zero out all bits from other layers.
Definition at line 222 of file HitPatternVXD.h.
|
staticprivate |
for internal shifting to the SVD bits.
Definition at line 230 of file HitPatternVXD.h.
|
staticprivate |
Mask to zero out all bits from other layers.
Definition at line 223 of file HitPatternVXD.h.