Commit 816ebc03 authored by Jens Kroeger's avatar Jens Kroeger
Browse files

Pixel object: renamed generic value to raw

parent 0b491372
......@@ -3,6 +3,6 @@
using namespace corryvreckan;
void Pixel::print(std::ostream& out) const {
out << "Pixel " << this->column() << ", " << this->row() << ", " << this->value() << ", " << this->timestamp()
out << "Pixel " << this->column() << ", " << this->row() << ", " << this->raw() << ", " << this->timestamp()
<< ", is Binary" << (m_isBinary == true ? "true" : "false");
}
......@@ -13,24 +13,23 @@ namespace corryvreckan {
public:
// Constructors and destructors
Pixel() = default;
Pixel(std::string detectorID, int row, int col, int value) : Pixel(detectorID, row, col, value, 0.) {}
Pixel(std::string detectorID, int row, int col, int value, double timestamp)
: Pixel(detectorID, row, col, value, timestamp, false) {}
Pixel(std::string detectorID, int row, int col, int value, double timestamp, bool binary)
: Object(detectorID, timestamp), m_row(row), m_column(col), m_value(value), m_charge(value), m_isBinary(binary) {
}
Pixel(std::string detectorID, int row, int col, int raw) : Pixel(detectorID, row, col, raw, 0.) {}
Pixel(std::string detectorID, int row, int col, int raw, double timestamp)
: Pixel(detectorID, row, col, raw, timestamp, false) {}
Pixel(std::string detectorID, int row, int col, int raw, double timestamp, bool binary)
: Object(detectorID, timestamp), m_row(row), m_column(col), m_raw(raw), m_charge(raw), m_isBinary(binary) {}
int row() const { return m_row; }
int column() const { return m_column; }
std::pair<int, int> coordinates() { return std::make_pair(m_column, m_row); }
// value is a generic pixel value which can be ToT, ADC, ..., depending on the detector
// raw is a generic pixel value which can be ToT, ADC, ..., depending on the detector
// if isBinary==true, the value will always be 1
int value() const { return (m_isBinary == true ? 1 : m_value); }
int raw() const { return (m_isBinary == true ? 1 : m_raw); }
double charge() const { return m_charge; }
void setCharge(double charge) { m_charge = charge; }
void setValue(int value) { m_value = value; }
void setRaw(int raw) { m_raw = raw; }
void setBinary(bool binary) { m_isBinary = binary; }
/**
......@@ -48,7 +47,7 @@ namespace corryvreckan {
// Member variables
int m_row;
int m_column;
int m_value;
int m_raw;
double m_charge;
bool m_isBinary;
};
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment