Skip to content
Snippets Groups Projects
Commit b084ee21 authored by Adrian A. Weber's avatar Adrian A. Weber
Browse files

Add ToT histrograms of each DiRICH to mRICH monitoring

parent 95f262c2
No related branches found
No related tags found
No related merge requests found
......@@ -63,6 +63,7 @@ bool CbmRichUnpackAlgo2022::unpack(const fles::Timeslice* ts, std::uint16_t icom
for (auto itHit = fOutputVec.begin(); itHit != fOutputVec.end(); ++itHit) {
fMonitor->FillDigisTimeInRun(itHit->GetTime());
fMonitor->FillDigisToT(itHit->GetToT());
fMonitor->FillDigisToTDiRICH(itHit->GetAddress(), itHit->GetToT());
}
fMonitor->FillVectorSize(ts->index(), fOutputVec.size());
}
......
......@@ -48,10 +48,17 @@ Bool_t CbmRichUnpackMonitor::CreateHistograms(CbmMcbm2018RichPar* pUnpackPar)
fhDigisTimeInRun->SetCanExtend(TH1::kAllAxes);
AddHistoToVector(fhDigisTimeInRun, "");
fhDigisToT = new TH1F("hDigisToT", "fhDigisToT; ToT [ns]; Entries", 400, 0, 40.);
fhDigisTimeInRun->SetCanExtend(TH1::kAllAxes);
fhDigisToT = new TH1D("hDigisToT", "fhDigisToT; ToT [ns]; Entries", 400, 0, 40.);
AddHistoToVector(fhDigisToT, "");
for (Int_t i = 0; i < pUnpackPar->GetNaddresses(); ++i) {
auto DiRICH = pUnpackPar->GetAddress(i);
TH2* hist = new TH2D(Form("fhDigisToT_0x%04x", DiRICH),
Form("fhDigisToT_0x%04x; channel; ToT [ns]; Entries", DiRICH), 33, 0, 32, 450, 15, 30.);
fhDigisToTDiRICH.push_back(hist);
AddHistoToVector(fhDigisToTDiRICH.back(), "");
}
fhVectorSize = new TH1I("fhVectorSize", "Size of the vector VS TS index; TS index; Size [bytes]", 10, 0, 10);
fhVectorSize->SetCanExtend(TH1::kAllAxes);
AddHistoToVector(fhVectorSize, "");
......@@ -87,6 +94,14 @@ void CbmRichUnpackMonitor::FillPerTimesliceCountersHistos(double_t dTsStartTimeS
// double_t dRatio = 0;
}
void CbmRichUnpackMonitor::FillDigisToTDiRICH(Int_t Address, Double_t ToT)
{
// Get Index from Address;
Int_t Fpga = (Address >> 16) & 0xFFFF;
Int_t channel = Address & 0xFFFF;
fhDigisToTDiRICH.at(pUnpackParameters->GetAddressIdx(Fpga))->Fill(channel, ToT);
}
// -------------------------------------------------------------------------
void CbmRichUnpackMonitor::PrintDebugInfo(const uint64_t MsStartTime, const size_t NrProcessedTs,
......@@ -97,6 +112,7 @@ void CbmRichUnpackMonitor::PrintDebugInfo(const uint64_t MsStartTime, const size
// ---- Init ----
Bool_t CbmRichUnpackMonitor::Init(CbmMcbm2018RichPar* parset)
{
pUnpackParameters = parset;
/// Trigger histo creation on all associated monitors
CreateHistograms(parset);
if (fDebugMode) CreateDebugHistograms(parset);
......
......@@ -71,6 +71,7 @@ public:
void FillDigisTimeInRun(Double_t Time) { fhDigisTimeInRun->Fill(Time * 1e-9); }
void FillDigisToT(Double_t ToT) { fhDigisToT->Fill(ToT); }
void FillDigisToTDiRICH(Int_t Address, Double_t ToT);
void FillPerTimesliceCountersHistos(double_t dTsStartTime);
......@@ -92,6 +93,10 @@ private:
TH1* fhVectorSize = nullptr;
TH1* fhVectorCapacity = nullptr;
std::vector<TH2*> fhDigisToTDiRICH;
CbmMcbm2018RichPar* pUnpackParameters = nullptr;
/** @brief Flag if debug mode is active or not */
bool fDebugMode = false;
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment