9 #include <mdst/dataobjects/HitPatternVXD.h> 
   10 #include <framework/logging/Logger.h> 
   19   std::bitset<32>(
static_cast<std::string
>(
"00000000000000000000000000001111")),  
 
   20   std::bitset<32>(
static_cast<std::string
>(
"00000000000000000000000011110000")),  
 
   21   std::bitset<32>(
static_cast<std::string
>(
"00000000000000000000111100000000")),  
 
   22   std::bitset<32>(
static_cast<std::string
>(
"00000000000000001111000000000000")),  
 
   23   std::bitset<32>(
static_cast<std::string
>(
"00000000000011110000000000000000")),  
 
   24   std::bitset<32>(
static_cast<std::string
>(
"00000000111100000000000000000000"))   
 
   28   std::bitset<32>(
static_cast<std::string
>(
"00000000000000000000000000110011")),  
 
   29   std::bitset<32>(
static_cast<std::string
>(
"00000000000000000000000011001100"))   
 
   33   std::bitset<32>(
static_cast<std::string
>(
"00000000001100110011001100000000")),  
 
   34   std::bitset<32>(
static_cast<std::string
>(
"00000000110011001100110000000000"))   
 
   53   B2ASSERT(
"SVD layer is out of range.", 3 <= layerId and layerId <= 6);
 
   55   if (uHits > 3) uHits = 3;
 
   56   if (vHits > 3) vHits = 3;
 
   57   const unsigned short arrayId = layerId - 3;
 
   58   std::bitset<32> uHitPattern(uHits);
 
   60   std::bitset<32> vHitPattern(vHits);
 
   67   B2ASSERT(
"SVD layer is out of range.", 3 <= layerId and layerId <= 6);
 
   70   const unsigned short arrayId = layerId - 3;
 
   71   const unsigned short uHits = (uHitsPattern >> (
s_svdUshift + 4 * arrayId)).to_ulong();
 
   72   const unsigned short vHits = (vHitsPattern >> (
s_svdVshift + 4 * arrayId)).to_ulong();
 
   73   return std::make_pair(uHits, vHits);
 
   78   B2ASSERT(
"SVD layer is out of range.", 3 <= layerId and layerId <= 6);
 
   85   unsigned short svdHits = 0;
 
   87     std::pair<const unsigned short, const unsigned short> svdHitPair = 
getSVDLayer(layerId);
 
   88     svdHits += svdHitPair.first + svdHitPair.second;
 
   95   unsigned short nSVD = 0;
 
   97     std::pair<const unsigned short, const unsigned short> hits(
getSVDLayer(layerId));
 
   98     if ((hits.first + hits.second) > 0) ++nSVD;
 
  106     std::pair<const unsigned short, const unsigned short> hits(
getSVDLayer(layerId));
 
  107     if ((hits.first + hits.second) > 0) 
return layerId;
 
  115     const auto layerId = *rit;
 
  116     std::pair<const unsigned short, const unsigned short> hits(
getSVDLayer(layerId));
 
  117     if ((hits.first + hits.second) > 0) 
return layerId;
 
  124   B2ASSERT(
"PXD layer is out of range.", layerId == 1 or layerId == 2);
 
  126   if (nHits > 3) nHits = 3;  
 
  127   std::bitset<32> hits(nHits);
 
  128   const unsigned short arrayId = layerId - 1;
 
  129   hits <<= 4 * arrayId + 2 * static_cast<unsigned short>(mode);
 
  135   B2ASSERT(
"PXD layer is out of range.", layerId == 1 or layerId == 2);
 
  136   const unsigned short arrayId = layerId - 1;
 
  138   return (hits >> (4 * arrayId + 2 * 
static_cast<unsigned short>(mode))).to_ulong();
 
  143   B2ASSERT(
"PXD layer is out of range.", layerId == 1 or layerId == 2);
 
  149   unsigned short pxdHits = 0;
 
  159   unsigned short nPXD = 0;
 
  169     if (
getPXDLayer(layerId, mode) > 0) 
return layerId;
 
  177     const auto layerId = *rit;
 
  178     if (
getPXDLayer(layerId, mode) > 0) 
return layerId;
 
  185   B2ASSERT(
"Information is out of range. Information: " << innermostHitShareStatus << 
", range: " << (
s_V0DaughterMask >>
 
  189   std::bitset<32> hits(innermostHitShareStatus);
 
  197   return (hits >> (4 * 6)).to_ulong();
 
short getLastSVDLayer() const
Get the last activated SVD layer index.
static const std::list< unsigned short > s_SVDLayerNumbers
For iterating through layers.
void resetSVDLayer(const unsigned short layerId)
Reset the number of hits in a specific layer of the SVD.
std::bitset< 32 > m_pattern
Storing of actual hit pattern.
std::string __str__() const
String for printing in python.
unsigned short getNSVDLayers() const
Returns the total number of activated layers of the SVD.
unsigned short getNPXDLayers(const PXDMode &mode=PXDMode::normal) const
Returns the total number of activated layers of the PXD.
static const std::bitset< 32 > s_PXDModeMasks[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_SVDuvMasks[2]
Mask to zero out all bits from other layers.
short getFirstSVDLayer() const
Get the first activated SVD layer index.
void setSVDLayer(const unsigned short layerId, unsigned short uHits, unsigned short vHits)
Set the number of hits in a specific layer of the 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 resetPXDLayer(const unsigned short layerId, const PXDMode &mode=PXDMode::normal)
Reset the number of hits in a specific layer of the PXD.
static const std::list< unsigned short > s_PXDLayerNumbers
For iterating through layers.
unsigned short getNPXDHits() const
Get total number of hits in the PXD.
unsigned short getNSVDHits() const
Get total number of hits in the SVD.
void setInnermostHitShareStatus(const unsigned short innermostHitShareStatus)
Set the innermost hit share flags for V0 daughters.
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.
short getLastPXDLayer(const PXDMode &mode=PXDMode::normal) const
Returns the last activated layer of the PXD depending on the mode.
void resetInnermostHitShareStatus()
Reset the innermost hit share flags for V0 daughters.
static const std::bitset< 32 > s_infoLayerMask
Mask to zero out all bits from other layers.
static const std::bitset< 32 > s_LayerMasks[6]
Masks to zero out all bits from other layers.
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.
static const unsigned int s_svdVshift
for internal shifting to the SVD bits.
static const unsigned int s_svdUshift
for internal shifting to the SVD bits.
short getFirstPXDLayer(const PXDMode &mode=PXDMode::normal) const
Returns the first activated layer of the PXD depending on the mode.
unsigned short getNdf() const
Get degrees of freedom in PXD and 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.
std::bitset< 32 > getLayerMask(const unsigned short layerId) const
Getter for the proper layer masks.
unsigned short getInnermostHitShareStatus() const
Get the innermost hit share flags for V0 daughters.
Abstract base class for different kinds of events.