Commit 8024d56b authored by Simon Spannagel's avatar Simon Spannagel
Browse files

Merge branch 'fix_pixel_multiplicity' into 'master'

Fix pixel multiplicity histogram

See merge request corryvreckan/corryvreckan!293
parents be7705a0 12566b77
......@@ -105,8 +105,11 @@ void EventLoaderEUDAQ2::initialise() {
title = ";pixel raw values;# events";
hPixelRawValues = new TH1F("hPixelRawValues", title.c_str(), 1024, 0, 1024);
title = "Pixel Multiplicity per EUDAQ Event;# pixels;# events";
hPixelMultiplicityPerEudaqEvent = new TH1F("hPixelMultiplicityPerEudaqEvent", title.c_str(), 1000, 0, 1000);
title = "Pixel Multiplicity per Corry Event;# pixels;# events";
hPixelMultiplicity = new TH1F("pixelMultiplicity", title.c_str(), 1000, 0, 1000);
hPixelMultiplicityPerCorryEvent = new TH1F("hPixelMultiplicityPerCorryEvent", title.c_str(), 1000, 0, 1000);
if(m_get_time_residuals) {
hPixelTimeEventBeginResidual =
......@@ -391,7 +394,7 @@ std::shared_ptr<PixelVector> EventLoaderEUDAQ2::get_pixel_data(std::shared_ptr<e
pixels->push_back(pixel);
}
hPixelMultiplicity->Fill(static_cast<int>(pixels->size()));
hPixelMultiplicityPerEudaqEvent->Fill(static_cast<int>(pixels->size()));
LOG(DEBUG) << m_detector->getName() << ": Plane contains " << pixels->size() << " pixels";
return pixels;
......@@ -514,6 +517,11 @@ StatusCode EventLoaderEUDAQ2::run(std::shared_ptr<Clipboard> clipboard) {
LOG(DEBUG) << "\t ID: " << trigger.first << ", time: " << Units::display(trigger.second, "us");
}
// histogram only exists for non-auxiliary detectors:
if(!m_detector->isAuxiliary()) {
hPixelMultiplicityPerCorryEvent->Fill(static_cast<int>(pixels->size()));
}
// Loop over pixels for plotting
if(m_get_time_residuals) {
for(auto& pixel : (*pixels)) {
......
......@@ -150,7 +150,8 @@ namespace corryvreckan {
TH1F* hPixelTimes;
TH1F* hPixelTimes_long;
TH1F* hPixelRawValues;
TH1F* hPixelMultiplicity;
TH1F* hPixelMultiplicityPerEudaqEvent;
TH1F* hPixelMultiplicityPerCorryEvent;
TH1D* hEudaqEventStart;
TH1D* hEudaqEventStart_long;
TH1D* hClipboardEventStart;
......
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