Skip to content

Commit

Permalink
exclude bad tdc in calculating the mean of edges
Browse files Browse the repository at this point in the history
  • Loading branch information
khem chirapatpimol authored and Makoto Uchida committed Apr 22, 2022
1 parent dee0887 commit 4be67ca
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions dqm/analysis/modules/src/DQMHistAnalysisCDCMonObj.cc
Original file line number Diff line number Diff line change
Expand Up @@ -261,7 +261,7 @@ void DQMHistAnalysisCDCMonObjModule::endRun()
}
// TDC related
B2DEBUG(20, "tdc related");
int nDeadTDC = 1; // bid 0 always empty
int nDeadTDC = -1; // bid 0 always empty
TH1F* hTDCEdge = new TH1F("hTDCEdge", "TDC edge;board;tdc edge [nsec]", 300, 0, 300);
TH1F* hTDCSlope = new TH1F("hTDCSlope", "TDC slope;board;tdc slope [nsec]", 300, 0, 300);
std::vector<float> tdcEdges = {};
Expand Down Expand Up @@ -435,7 +435,7 @@ void DQMHistAnalysisCDCMonObjModule::endRun()
m_monObj->setVariable("adcMean", std::accumulate(means.begin(), means.end(), 0.0) / means.size());
m_monObj->setVariable("nDeadADC", nDeadADC);
m_monObj->setVariable("nBadADC", nBadADC); //???? n_0/n_tot>0.9
m_monObj->setVariable("tdcEdge", std::accumulate(tdcEdges.begin(), tdcEdges.end(), 0.0) / tdcEdges.size());
m_monObj->setVariable("tdcEdge", std::accumulate(tdcEdges.begin(), tdcEdges.end(), 0.0) / (tdcEdges.size() - 1 - nDeadTDC));
m_monObj->setVariable("nDeadTDC", nDeadTDC);
m_monObj->setVariable("tdcSlope", std::accumulate(tdcSlopes.begin(), tdcSlopes.end(), 0.0) / tdcSlopes.size());

Expand Down

0 comments on commit 4be67ca

Please sign in to comment.