17#ifndef O2_MCH_PADORIGINAL_H_
18#define O2_MCH_PADORIGINAL_H_
59 double x()
const {
return mx; }
61 double y()
const {
return my; }
63 double xy(
int ixy)
const {
return (ixy == 0) ? mx : my; }
70 double dx()
const {
return mdx; }
72 double dy()
const {
return mdy; }
74 double dxy(
int ixy)
const {
return (ixy == 0) ? mdx : mdy; }
79 double charge()
const {
return mCharge; }
82 int plane()
const {
return mPlane; }
87 bool isReal()
const {
return mDigitIdx >= 0; }
92 int status()
const {
return mStatus; }
103 bool mIsSaturated =
false;
110inline auto findPad(std::vector<PadOriginal>& pads,
double x,
double y,
double minCharge)
116 return pad.charge() >= minCharge && TMath::Abs(pad.x() -
x) < 1.e-3 && TMath::Abs(pad.y() -
y) < 1.e-3;
119 auto itPad = std::find_if(pads.begin(), pads.end(),
match);
121 if (itPad == pads.end()) {
122 throw std::runtime_error(
"Pad not found");
void setx(double x)
set position in x (cm)
void setdx(double dx)
set half dimension in x (cm)
PadOriginal(PadOriginal &&)=default
double x() const
return position in x (cm)
void setdy(double dy)
set half dimension in y (cm)
double dy() const
return half dimension in y (cm)
void setCharge(double charge)
set the charge
@ kUseForFit
should be used for fit
@ kOver
processing is over
@ kMustKeep
do not kill (for pixels)
@ kCoupled
coupled to another cluster of pixels
int digitIndex() const
return the index of the corresponding digit
double dxy(int ixy) const
return half dimension in x or y (cm)
bool isSaturated() const
return whether this pad is saturated or not
bool isReal() const
return whether this is a real pad or a virtual pad
int status() const
return the status word
double xy(int ixy) const
return position in x or y (cm)
int plane() const
return 0 if bending pad, 1 if non-bending pad or -1 if none (e.g. pixel)
void sety(double y)
set position in y (cm)
PadOriginal & operator=(const PadOriginal &cl)=default
double dx() const
return half dimension in x (cm)
double charge() const
return the charge
void setStatus(int status)
set the status word
PadOriginal & operator=(PadOriginal &&)=default
PadOriginal(double x, double y, double dx, double dy, double charge, bool isSaturated=false, int plane=-1, int digitIdx=-1, int status=kZero)
PadOriginal(const PadOriginal &cl)=default
double y() const
return position in y (cm)
bool match(const std::vector< std::string > &queries, const char *pattern)
GLenum GLint GLint * precision
bool areOverlapping(const PadOriginal &pad1, const PadOriginal &pad2, double precision)
auto findPad(std::vector< PadOriginal > &pads, double x, double y, double minCharge)
a couple of static helper functions to create timestamp values for CCDB queries or override obsolete ...