Commit 1ff51b3d authored by Morag Jean Williams's avatar Morag Jean Williams
Browse files

Adding hitmaps to the Timepix3 event loader.

parent 085f090d
......@@ -199,6 +199,16 @@ void EventLoaderTimepix3::initialise() {
LOG(INFO) << "No calibration file path or no DUT name given; data will be uncalibrated.";
applyCalibration = false;
}
// Make debugging plots
std::string title = m_detector->name() + " Hit map;x [px];y [px];pixels";
hHitMap = new TH2F("hitMap",
title.c_str(),
m_detector->nPixels().X(),
0,
m_detector->nPixels().X(),
m_detector->nPixels().Y(),
0,
m_detector->nPixels().Y());
}
StatusCode EventLoaderTimepix3::run(std::shared_ptr<Clipboard> clipboard) {
......@@ -606,6 +616,7 @@ bool EventLoaderTimepix3::loadData(std::shared_ptr<Clipboard> clipboard, Pixels*
Pixel* pixel = new Pixel(detectorID, row, col, static_cast<int>(tot), ftimestamp);
pixel->setCharge(fcharge);
devicedata->push_back(pixel);
hHitMap->Fill(col, row);
LOG(DEBUG) << "Pixel Charge = " << fcharge << "; ToT value = " << tot;
pixelToT_aftercalibration->Fill(fcharge);
} else {
......@@ -613,6 +624,7 @@ bool EventLoaderTimepix3::loadData(std::shared_ptr<Clipboard> clipboard, Pixels*
// creating new pixel object with non-calibrated values of tot and toa
Pixel* pixel = new Pixel(detectorID, row, col, static_cast<int>(tot), timestamp);
devicedata->push_back(pixel);
hHitMap->Fill(col, row);
}
m_prevTime = time;
......
......@@ -27,6 +27,7 @@ namespace corryvreckan {
std::shared_ptr<Detector> m_detector;
// ROOT graphs
TH2F* hHitMap;
TH1F* pixelToT_beforecalibration;
TH1F* pixelToT_aftercalibration;
TH2F* pixelTOTParameterA;
......
......@@ -23,6 +23,7 @@ This module requires either another event loader of another detector type before
* `threshold`: String defining the `[threshold]` DAC value for loading the appropriate calibration file, See above.
### Plots produced
* 2D map of pixel hits
* Histogram with pixel ToT before and after calibration
* Map for each calibration parameter if calibration is used
......
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