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

Merge branch 'fix_issue_59' into 'master'

AnalysisEfficiency: bug fix

Closes #59

See merge request !107
parents b0dd9892 512edc0d
Pipeline #859341 passed with stages
in 17 minutes and 7 seconds
......@@ -30,18 +30,15 @@ void AnalysisEfficiency::initialise() {
auto pitch_x = static_cast<double>(Units::convert(m_detector->pitch().X(), "um"));
auto pitch_y = static_cast<double>(Units::convert(m_detector->pitch().Y(), "um"));
auto nbins_x = static_cast<int>(std::ceil(m_detector->pitch().X() / m_inpixelBinSize));
auto nbins_y = static_cast<int>(std::ceil(m_detector->pitch().Y() / m_inpixelBinSize));
if(nbins_x > 1e4 || nbins_y > 1e4) {
throw InvalidValueError(m_config, "inpixel_bin_size", "Too many bins for in-pixel histograms.");
}
std::string title = m_detector->name() + " Pixel efficiency map;x_{track} mod " + std::to_string(pitch_x) +
"#mum;y_{track} mod " + std::to_string(pitch_y) + "#mum;efficiency";
hPixelEfficiencyMap_trackPos = new TProfile2D("pixelEfficiencyMap_trackPos",
title.c_str(),
static_cast<int>(ceil(pitch_x / m_inpixelBinSize)),
0,
pitch_x,
static_cast<int>(ceil(pitch_y / m_inpixelBinSize)),
0,
pitch_y,
0,
1);
hPixelEfficiencyMap_trackPos =
new TProfile2D("pixelEfficiencyMap_trackPos", title.c_str(), nbins_x, 0, pitch_x, nbins_y, 0, pitch_y, 0, 1);
title = m_detector->name() + " Chip efficiency map;x [px];y [px];efficiency";
hChipEfficiencyMap_trackPos = new TProfile2D("chipEfficiencyMap_trackPos",
title.c_str(),
......
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