12#ifndef ALICEO2_BASE_BASECLUSTER_H
13#define ALICEO2_BASE_BASECLUSTER_H
40 std::uint16_t mSensorID = 0;
41 std::int8_t mCount = 0;
42 std::uint8_t mBits = 0;
43 enum masks_t : std::int32_t { kUserBitsMask = 0xff };
53 : mPos(xyz), mSigmaY2(sy2), mSigmaZ2(sz2), mSigmaYZ(syz), mSensorID(sensid)
57 : mPos(
x,
y,
z), mSigmaY2(sy2), mSigmaZ2(sz2), mSigmaYZ(syz), mSensorID(sensid)
62 T
getX()
const {
return mPos.X(); }
63 T
getY()
const {
return mPos.Y(); }
64 T
getZ()
const {
return mPos.Z(); }
83 std::int8_t
getCount()
const {
return mCount; }
85 std::uint8_t
getBits()
const {
return mBits; }
86 bool isBitSet(
int bit)
const {
return mBits & (0xff & (0x1 << bit)); }
97 void setBit(
int bit) { mBits |= kUserBitsMask & (0x1 << bit); }
98 void resetBit(
int bit) { mBits &= ~(kUserBitsMask & (0x1 << bit)); }
129 os <<
"SId" << std::setw(5) <<
c.getSensorID() <<
" (" << std::showpos << std::scientific
130 <<
c.getX() <<
"," <<
c.getY() <<
"," <<
c.getZ() <<
")/("
131 <<
c.getSigmaY2() <<
"," <<
c.getSigmaYZ() <<
"," <<
c.getSigmaZ2()
132 <<
") cnt:" << std::setw(4) << +
c.getCount() <<
" bits:" << std::bitset<8>(
c.getBits());
void setBits(std::uint8_t b)
math_utils::Point3D< T > getXYZ() const
BaseCluster(std::uint16_t sensid, const math_utils::Point3D< T > &xyz, T sy2, T sz2, T syz)
void setCount(std::int8_t c)
std::int8_t getCount() const
math_utils::Point3D< T > getXYZGlo(const o2::detectors::DetMatrixCache &dm) const
ClassDefNV(BaseCluster, 2)
void setSensorID(std::int16_t sid)
std::uint8_t getBits() const
math_utils::Point3D< T > getXYZGloRot(const o2::detectors::DetMatrixCache &dm) const
BaseCluster(std::int16_t sensid, T x, T y, T z, T sy2, T sz2, T syz)
void setPos(const math_utils::Point3D< T > &p)
math_utils::Point3D< T > getXYZLoc(const o2::detectors::DetMatrixCache &dm) const
BaseCluster(std::uint16_t sensid, T x, T y, T z)
math_utils::Point3D< T > & getXYZ()
BaseCluster(std::uint16_t sensid, const math_utils::Point3D< T > &xyz)
bool isBitSet(int bit) const
void setXYZ(T x, T y, T z)
std::int16_t getSensorID() const
void setErrors(T sy2, T sz2, T syz)
const Mat3D & getMatrixT2L(int sensID) const
const Rot2D & getMatrixT2GRot(int sensID) const
const Mat3D & getMatrixT2G(int sensID) const
GLboolean GLboolean GLboolean b
GLdouble GLdouble GLdouble z
a couple of static helper functions to create timestamp values for CCDB queries or override obsolete ...
std::ostream & operator<<(std::ostream &stream, o2::InteractionRecord const &ir)