Loading src/modules/DetectorHistogrammer/DetectorHistogrammerModule.cpp +4 −3 Original line number Diff line number Diff line Loading @@ -130,10 +130,11 @@ void DetectorHistogrammerModule::initialize() { seed_charge_map = CreateHistogram<TProfile2D>( "seed_charge_map", seed_charge_map_title.c_str(), inpixel_bins.x(), 0., pitch_x, inpixel_bins.y(), 0., pitch_y); // Create cluster size plots, preventing a zero-bin histogram by scaling with integer ceiling: (x + y - 1) / y // Create cluster size plots, preventing unphysically low bin numbers int max_cluster_size = std::max(10, (xpixels * ypixels + 9) / 10); std::string cluster_size_title = "Cluster size (" + detector_->getName() + ");cluster size [px];clusters"; cluster_size = CreateHistogram<TH1D>( "cluster_size", cluster_size_title.c_str(), (xpixels * ypixels + 9) / 10, 0.5, (xpixels * ypixels + 9.0) / 10 + 0.5); cluster_size = CreateHistogram<TH1D>("cluster_size", cluster_size_title.c_str(), max_cluster_size, 0.5, max_cluster_size + 0.5); std::string cluster_size_x_title = "Cluster size in X (" + detector_->getName() + ");cluster size x [px];clusters"; cluster_size_x = CreateHistogram<TH1D>("cluster_size_x", cluster_size_x_title.c_str(), xpixels, 0.5, xpixels + 0.5); Loading Loading
src/modules/DetectorHistogrammer/DetectorHistogrammerModule.cpp +4 −3 Original line number Diff line number Diff line Loading @@ -130,10 +130,11 @@ void DetectorHistogrammerModule::initialize() { seed_charge_map = CreateHistogram<TProfile2D>( "seed_charge_map", seed_charge_map_title.c_str(), inpixel_bins.x(), 0., pitch_x, inpixel_bins.y(), 0., pitch_y); // Create cluster size plots, preventing a zero-bin histogram by scaling with integer ceiling: (x + y - 1) / y // Create cluster size plots, preventing unphysically low bin numbers int max_cluster_size = std::max(10, (xpixels * ypixels + 9) / 10); std::string cluster_size_title = "Cluster size (" + detector_->getName() + ");cluster size [px];clusters"; cluster_size = CreateHistogram<TH1D>( "cluster_size", cluster_size_title.c_str(), (xpixels * ypixels + 9) / 10, 0.5, (xpixels * ypixels + 9.0) / 10 + 0.5); cluster_size = CreateHistogram<TH1D>("cluster_size", cluster_size_title.c_str(), max_cluster_size, 0.5, max_cluster_size + 0.5); std::string cluster_size_x_title = "Cluster size in X (" + detector_->getName() + ");cluster size x [px];clusters"; cluster_size_x = CreateHistogram<TH1D>("cluster_size_x", cluster_size_x_title.c_str(), xpixels, 0.5, xpixels + 0.5); Loading