Skip to content

Commit f3d744b

Browse files
committed
Merge pull request #958 in B2/basf2 from bugfix/BII-9318-exclude-bad-tdc-in-calculating-the-mean-of-edges-r61 to release/06-01
* commit '4be67cac4b4f1b8d53562fd8a25a4714089aa6c3': exclude bad tdc in calculating the mean of edges
2 parents f822e8d + 4be67ca commit f3d744b

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

dqm/analysis/modules/src/DQMHistAnalysisCDCMonObj.cc

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -261,7 +261,7 @@ void DQMHistAnalysisCDCMonObjModule::endRun()
261261
}
262262
// TDC related
263263
B2DEBUG(20, "tdc related");
264-
int nDeadTDC = 1; // bid 0 always empty
264+
int nDeadTDC = -1; // bid 0 always empty
265265
TH1F* hTDCEdge = new TH1F("hTDCEdge", "TDC edge;board;tdc edge [nsec]", 300, 0, 300);
266266
TH1F* hTDCSlope = new TH1F("hTDCSlope", "TDC slope;board;tdc slope [nsec]", 300, 0, 300);
267267
std::vector<float> tdcEdges = {};
@@ -435,7 +435,7 @@ void DQMHistAnalysisCDCMonObjModule::endRun()
435435
m_monObj->setVariable("adcMean", std::accumulate(means.begin(), means.end(), 0.0) / means.size());
436436
m_monObj->setVariable("nDeadADC", nDeadADC);
437437
m_monObj->setVariable("nBadADC", nBadADC); //???? n_0/n_tot>0.9
438-
m_monObj->setVariable("tdcEdge", std::accumulate(tdcEdges.begin(), tdcEdges.end(), 0.0) / tdcEdges.size());
438+
m_monObj->setVariable("tdcEdge", std::accumulate(tdcEdges.begin(), tdcEdges.end(), 0.0) / (tdcEdges.size() - 1 - nDeadTDC));
439439
m_monObj->setVariable("nDeadTDC", nDeadTDC);
440440
m_monObj->setVariable("tdcSlope", std::accumulate(tdcSlopes.begin(), tdcSlopes.end(), 0.0) / tdcSlopes.size());
441441

0 commit comments

Comments
 (0)