Commit 137a0be5 authored by Lennart Huth's avatar Lennart Huth Committed by Simon Spannagel
Browse files

Binary pixel

parent 6646e99b
......@@ -52,6 +52,7 @@ The following authors, in alphabetical order, have contributed to Corryvreckan:
* Matthew Daniel Buckland, University of Liverpool, @mbucklan
* Dominik Dannheim, CERN, @dannheim
* Adrian Fiergolski, CERN, @afiergol
* Lennart Huth, DESY, @lhuth
* Jens Kroeger, University of Heidelberg/CERN, @jekroege
* Andreas Matthias Nürnberg, CERN, @nurnberg
* Florian Pitters, CERN, @fpipper
......
......@@ -9,7 +9,7 @@ This module collects `pixel` and `cluster` objects from the clipboard and create
### Parameters
* `make_correlatons`: Boolean to change if correlation plots should be outputted. Default value is `false`.
* `make_correlations`: Boolean to change if correlation plots should be outputted. Default value is `false`.
* `do_timing_cut`: Boolean to switch on/off the cut on cluster times for correlations. Defaults to `false`.
* `timing_cut`: maximum time difference between clusters to be taken into account. Only used if `do_timing_cut` is set to `true`, defaults to `100ns`.
......
......@@ -3,5 +3,6 @@
using namespace corryvreckan;
void Pixel::print(std::ostream& out) const {
out << "Pixel " << this->column() << ", " << this->row() << ", " << this->adc() << ", " << this->timestamp();
out << "Pixel " << this->column() << ", " << this->row() << ", " << this->adc() << ", " << this->timestamp()
<< ", is Binary" << (m_isBinary == true ? "true" : "false");
}
......@@ -15,17 +15,21 @@ namespace corryvreckan {
Pixel() = default;
Pixel(std::string detectorID, int row, int col, int tot) : Pixel(detectorID, row, col, tot, 0.) {}
Pixel(std::string detectorID, int row, int col, int tot, double timestamp)
: Object(detectorID, timestamp), m_row(row), m_column(col), m_adc(tot), m_charge(tot) {}
: Pixel(detectorID, row, col, tot, timestamp, false) {}
Pixel(std::string detectorID, int row, int col, int tot, double timestamp, bool binary)
: Object(detectorID, timestamp), m_row(row), m_column(col), m_adc(tot), m_charge(tot), 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); }
int adc() const { return m_adc; }
int adc() const { return (m_isBinary == true ? 1 : m_adc); }
int tot() const { return adc(); }
double charge() const { return m_charge; }
void setCharge(double charge) { m_charge = charge; }
void setToT(int tot) { m_adc = tot; }
void setBinary(bool binary) { m_isBinary = binary; }
/**
* @brief Print an ASCII representation of Pixel to the given stream
......@@ -43,8 +47,8 @@ namespace corryvreckan {
int m_row;
int m_column;
int m_adc;
double m_charge;
bool m_isBinary;
};
// Vector type declaration
......
Markdown is supported
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