Commit 651c69b1 authored by Simon Spannagel's avatar Simon Spannagel
Browse files

EventLoaders: swap column/row to match new Pixel constructor

parent 71b80160
......@@ -321,7 +321,7 @@ Pixels* EventLoaderATLASpix::read_caribou_data(double start_time, double end_tim
<< "\tTS_FULL: " << hit_ts << "\t" << Units::display(timestamp, {"s", "us", "ns"})
<< "\tTOT: " << tot; // << "\t" << Units::display(tot_ns, {"s", "us", "ns"});
Pixel* pixel = new Pixel(m_detector->name(), row, col, tot, timestamp);
Pixel* pixel = new Pixel(m_detector->name(), col, row, tot, timestamp);
LOG(DEBUG) << "PIXEL:\t" << *pixel;
pixels->push_back(pixel);
......@@ -532,7 +532,7 @@ Pixels* EventLoaderATLASpix::read_legacy_data(double, double) {
// Convert TOA to nanoseconds:
toa_timestamp /= (4096. * 0.04);
Pixel* pixel = new Pixel(m_detector->name(), row, col, tot, toa_timestamp);
Pixel* pixel = new Pixel(m_detector->name(), col, row, tot, toa_timestamp);
pixel->setCharge(cal_tot);
pixels->push_back(pixel);
}
......
......@@ -107,7 +107,7 @@ StatusCode EventLoaderCLICpix::run(std::shared_ptr<Clipboard> clipboard) {
// If this pixel is masked, do not save it
if(m_detector->masked(col, row))
continue;
Pixel* pixel = new Pixel(m_detector->name(), row, col, tot, 0);
Pixel* pixel = new Pixel(m_detector->name(), col, row, tot, 0);
pixels->push_back(pixel);
npixels++;
hHitMap->Fill(col, row);
......
......@@ -275,7 +275,7 @@ StatusCode EventLoaderCLICpix2::run(std::shared_ptr<Clipboard> clipboard) {
}
}
Pixel* pixel = new Pixel(m_detector->name(), row, col, tot, timestamp);
Pixel* pixel = new Pixel(m_detector->name(), col, row, tot, timestamp);
if(tot == 0 && discardZeroToT) {
hHitMapDiscarded->Fill(col, row);
......
......@@ -76,7 +76,7 @@ StatusCode EventLoaderEUDAQ::run(std::shared_ptr<Clipboard> clipboard) {
continue;
}
Pixel* pixel = new Pixel(detectorID, row, col, static_cast<int>(plane.GetPixel(ipix)));
Pixel* pixel = new Pixel(detectorID, col, row, static_cast<int>(plane.GetPixel(ipix)));
pixel->setCharge(plane.GetPixel(ipix));
// Pixel gets timestamp of trigger assigned:
......
......@@ -147,7 +147,7 @@ void EventLoaderEUDAQ2::store_data(std::shared_ptr<Clipboard> clipboard, std::sh
}
Pixel* pixel =
new Pixel(m_detector->name(), row, col, static_cast<int>(plane.GetPixel(i)), plane.GetTimestamp(i));
new Pixel(m_detector->name(), col, row, static_cast<int>(plane.GetPixel(i)), plane.GetTimestamp(i));
pixels->push_back(pixel);
}
}
......
......@@ -84,7 +84,7 @@ StatusCode EventLoaderMuPixTelescope::run(std::shared_ptr<Clipboard> clipboard)
RawHit h = tf.get_hit(i);
if(h.tag() == 0x4)
h = tf.get_hit(i, 66);
Pixel* p = new Pixel(detectors.at(h.tag() / 4), h.row(), h.column(), 1, 0, true);
Pixel* p = new Pixel(detectors.at(h.tag() / 4), h.column(), h.row(), 1, 0, true);
p->setTimestamp(8 * static_cast<double>(((tf.timestamp() >> 2) & 0xFFFFF700) + h.timestamp_raw()));
p->setToT(0);
......
......@@ -157,7 +157,7 @@ StatusCode EventLoaderTimepix1::run(std::shared_ptr<Clipboard> clipboard) {
// load the real event data, and make a new pixel object
istringstream detectorData(data);
detectorData >> col >> row >> tot;
Pixel* pixel = new Pixel(m_currentDevice, row, col, tot);
Pixel* pixel = new Pixel(m_currentDevice, col, row, tot);
// FIXME to work properly, m_eventTime needs to be converted to nanoseconds!
pixel->timestamp(static_cast<double>(m_eventTime));
dataContainers[m_currentDevice]->push_back(pixel);
......
......@@ -613,7 +613,7 @@ bool EventLoaderTimepix3::loadData(std::shared_ptr<Clipboard> clipboard, Pixels*
LOG(DEBUG) << "Time shift= " << Units::display(t_shift, {"s", "ns"});
LOG(DEBUG) << "Timestamp calibrated = " << Units::display(ftimestamp, {"s", "ns"});
// creating new pixel object with calibrated values of tot and toa
Pixel* pixel = new Pixel(detectorID, row, col, static_cast<int>(tot), ftimestamp);
Pixel* pixel = new Pixel(detectorID, col, row, static_cast<int>(tot), ftimestamp);
pixel->setCharge(fcharge);
devicedata->push_back(pixel);
hHitMap->Fill(col, row);
......@@ -622,7 +622,7 @@ bool EventLoaderTimepix3::loadData(std::shared_ptr<Clipboard> clipboard, Pixels*
} else {
LOG(DEBUG) << "Pixel hit at " << Units::display(timestamp, {"s", "ns"});
// creating new pixel object with non-calibrated values of tot and toa
Pixel* pixel = new Pixel(detectorID, row, col, static_cast<int>(tot), timestamp);
Pixel* pixel = new Pixel(detectorID, col, row, static_cast<int>(tot), timestamp);
devicedata->push_back(pixel);
hHitMap->Fill(col, row);
}
......
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