From 246ab0fc914afe33ae606ad8298dd2f4682d5c13 Mon Sep 17 00:00:00 2001 From: Christopher Date: Thu, 2 Jun 2022 19:14:58 +0200 Subject: [PATCH] Fix Sampic DQM channel_per_plane histograms --- DQM/CTPPS/plugins/DiamondSampicDQMSource.cc | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/DQM/CTPPS/plugins/DiamondSampicDQMSource.cc b/DQM/CTPPS/plugins/DiamondSampicDQMSource.cc index 68f72805e4420..0e78861951c29 100644 --- a/DQM/CTPPS/plugins/DiamondSampicDQMSource.cc +++ b/DQM/CTPPS/plugins/DiamondSampicDQMSource.cc @@ -546,7 +546,8 @@ void DiamondSampicDQMSource::analyze(const edm::Event &event, const edm::EventSe if (channelsPerPlane.find(detId_plane) != channelsPerPlane.end()) channelsPerPlane[detId_plane]++; else - channelsPerPlane[detId_plane] = 0; + //if it's the first channel, create new map element with the value of 1 + channelsPerPlane[detId_plane] = 1; } // Channel Plots @@ -620,7 +621,8 @@ void DiamondSampicDQMSource::analyze(const edm::Event &event, const edm::EventSe if (channelsPerPlaneWithTime.find(detId_plane) != channelsPerPlaneWithTime.end()) channelsPerPlaneWithTime[detId_plane]++; else - channelsPerPlaneWithTime[detId_plane] = 0; + //if it's the first channel, create new map element with the value of 1 + channelsPerPlaneWithTime[detId_plane] = 1; } if (channelPlots_.find(detId) != channelPlots_.end()) {