Skip to content

Commit

Permalink
Fix OOT plot in PPS Diamond DQM
Browse files Browse the repository at this point in the history
  • Loading branch information
Christopher committed Aug 23, 2022
1 parent b46958c commit 2a430fa
Showing 1 changed file with 4 additions and 5 deletions.
9 changes: 4 additions & 5 deletions DQM/CTPPS/plugins/CTPPSDiamondDQMSource.cc
Original file line number Diff line number Diff line change
Expand Up @@ -912,7 +912,7 @@ void CTPPSDiamondDQMSource::analyze(const edm::Event& event, const edm::EventSet
}
}

if (rechit.toT() != 0) {
if (rechit.toT() > 0) {
// Both
potPlots_[detId_pot].leadingEdgeCumulative_both->Fill(rechit.time() + 25 * rechit.ootIndex());
potPlots_[detId_pot].timeOverThresholdCumulativePot->Fill(rechit.toT());
Expand All @@ -922,18 +922,17 @@ void CTPPSDiamondDQMSource::analyze(const edm::Event& event, const edm::EventSet
int startBin = hitHistoOOTTmpYAxis->FindBin(rechit.x() - x_shift.global - 0.5 * rechit.xWidth());
int numOfBins = rechit.xWidth() * INV_DISPLAY_RESOLUTION_FOR_HITS_MM;
for (int i = 0; i < numOfBins; ++i)
hitHistoOOTTmp->Fill(detId.plane() + 0.25 * rechit.ootIndex(),
hitHistoOOTTmp->Fill(detId.plane() + 1. / windowsNum_ * rechit.ootIndex(),
hitHistoOOTTmpYAxis->GetBinCenter(startBin + i));
} else if (rechit.ootIndex() != CTPPSDiamondRecHit::TIMESLICE_WITHOUT_LEADING && plotOnline_) {
// Only leading
TH2F* hitHistoOOTTmp = potPlots_[detId_pot].hitDistribution2dOOT_le->getTH2F();
TAxis* hitHistoOOTTmpYAxis = hitHistoOOTTmp->GetYaxis();
int startBin = hitHistoOOTTmpYAxis->FindBin(rechit.x() - x_shift.global - 0.5 * rechit.xWidth());
int numOfBins = rechit.xWidth() * INV_DISPLAY_RESOLUTION_FOR_HITS_MM;
for (int i = 0; i < numOfBins; ++i) {
hitHistoOOTTmp->Fill(detId.plane() + 0.25 * rechit.ootIndex(),
for (int i = 0; i < numOfBins; ++i)
hitHistoOOTTmp->Fill(detId.plane() + 1. / windowsNum_ * rechit.ootIndex(),
hitHistoOOTTmpYAxis->GetBinCenter(startBin + i));
}
}
if (rechit.ootIndex() != CTPPSDiamondRecHit::TIMESLICE_WITHOUT_LEADING &&
potPlots_[detId_pot].activity_per_bx.count(rechit.ootIndex()) > 0)
Expand Down

0 comments on commit 2a430fa

Please sign in to comment.