Commit d0522f21 authored by Simon Spannagel's avatar Simon Spannagel
Browse files

Fix formatting and document new histogram

parent 789e31c5
......@@ -55,16 +55,14 @@ void EventLoaderEUDAQ2::initialise() {
title = "rawValues; column; row; raw values";
hRawValuesMap = new TProfile2D("hRawValuesMap",
title.c_str(),
m_detector->nPixels().X(),
0,
m_detector->nPixels().X(),
m_detector->nPixels().Y(),
0,
m_detector->nPixels().Y(),
0,
500);
title.c_str(),
m_detector->nPixels().X(),
0,
m_detector->nPixels().X(),
m_detector->nPixels().Y(),
0,
m_detector->nPixels().Y());
title = ";hit time [ms];# events";
hPixelTimes = new TH1F("hPixelTimes", title.c_str(), 3e6, 0, 3e3);
......@@ -347,13 +345,13 @@ std::shared_ptr<PixelVector> EventLoaderEUDAQ2::get_pixel_data(std::shared_ptr<e
auto row = static_cast<int>(plane.GetY(i));
auto raw = static_cast<int>(plane.GetPixel(i)); // generic pixel raw value (could be ToT, ADC, ...)
double ts;
if(plane.GetTimestamp(i) == 0) {
ts = static_cast<double>(evt->GetTimeBegin()) / 1000 + m_detector->timingOffset();
} else {
ts = static_cast<double>(plane.GetTimestamp(i)) / 1000 + m_detector->timingOffset();
}
double ts;
if(plane.GetTimestamp(i) == 0) {
ts = static_cast<double>(evt->GetTimeBegin()) / 1000 + m_detector->timingOffset();
} else {
ts = static_cast<double>(plane.GetTimestamp(i)) / 1000 + m_detector->timingOffset();
}
if(col >= m_detector->nPixels().X() || row >= m_detector->nPixels().Y()) {
LOG(WARNING) << "Pixel address " << col << ", " << row << " is outside of pixel matrix with size "
<< m_detector->nPixels();
......@@ -370,10 +368,10 @@ std::shared_ptr<PixelVector> EventLoaderEUDAQ2::get_pixel_data(std::shared_ptr<e
Pixel* pixel = new Pixel(m_detector->name(), col, row, raw, raw, ts);
hitmap->Fill(col, row);
hRawValuesMap->Fill(col, row, raw);
hPixelTimes->Fill(static_cast<double>(Units::convert(ts, "ms")));
hPixelTimes_long->Fill(static_cast<double>(Units::convert(ts, "s")));
hPixelRawValues->Fill(raw);
hRawValuesMap->Fill(col, row, raw);
pixels->push_back(pixel);
}
......
......@@ -142,8 +142,8 @@ namespace corryvreckan {
// 2D histograms
TH2F* hitmap;
// 2D profiles
TProfile2D *hRawValuesMap;
// 2D profiles
TProfile2D* hRawValuesMap;
// 1D histograms
TH1F* hPixelTimes;
......
......@@ -82,7 +82,7 @@ Also, more complex constructs such as arrays or matrices read by the Corryvrecka
* 2D hitmap
* 1D pixel hit times (3 second range)
* 1D pixel hit times (3000 second range)
* 1D pixel raw value histogram (corresponds to chip-specific charge equivalent measurement, e.g. ToT)
* 1D and 2D pixel raw value histograms (corresponding to chip-specific charge equivalent measurement, e.g. ToT)
* 1D pixel multiplicity per Corryvreckan event histogram
* 1D eudaq event start histogram (3 second range)
* 1D eudaq event start histogram (3000 second range)
......
......@@ -215,9 +215,11 @@ StatusCode TestAlgorithm::run(std::shared_ptr<Clipboard> clipboard) {
}
// correlationTime[m_detector->name()]->Fill(Units::convert(timeDifference, "s"));
correlationTime->Fill(timeDifference); // time difference in ns
LOG(DEBUG) << "timeDifference: " << Units::display(timeDifference, {"ns", "us"}) << ", Time ref. cluster: " << Units::display(refCluster->timestamp(), {"ns", "us"}) <<", Time cluster: " << Units::display(cluster->timestamp(), {"ns", "us"});
LOG(DEBUG) << "timeDifference: " << Units::display(timeDifference, {"ns", "us"})
<< ", Time ref. cluster: " << Units::display(refCluster->timestamp(), {"ns", "us"})
<< ", Time cluster: " << Units::display(cluster->timestamp(), {"ns", "us"});
correlationTimeOverTime->Fill(static_cast<double>(Units::convert(cluster->timestamp(), "s")),
timeDifference); // time difference in ns
timeDifference); // time difference in ns
correlationTimeInt->Fill(static_cast<double>(timeDifferenceInt));
}
}
......
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