Commit 64103be4 authored by Pierre-Alain Loizeau's avatar Pierre-Alain Loizeau
Browse files

[mMUCH] TO REMOVE BEFORE MAIN MERGE! Add mmuch only plots to event builder,...

[mMUCH] TO REMOVE BEFORE MAIN MERGE! Add mmuch only plots to event builder, needed until offsets knwown
parent c5d1d0a3
......@@ -887,6 +887,26 @@ void CbmAlgoBuildRawEvents::CreateHistograms()
Form("#DeltaT of %s digis to seed time of event;#DeltaT (ns); Counts []", (*det).sName.data()), 200,
(*det).fdTimeWinBeg, (*det).fdTimeWinEnd);
fvhTDiff.push_back(hTDiff);
/// ==> mMUCH specific histograms
if (ECbmModuleId::kMuch == (*det).detId) {
fhTDiffMuchGem1 =
new TH1I("hTDiffMuchGem1", "#DeltaT of MUCH GEM1 digis to seed time of event;#DeltaT (ns); Counts []", 200,
(*det).fdTimeWinBeg, (*det).fdTimeWinEnd);
fhTDiffMuchGem2 =
new TH1I("hTDiffMuchGem2", "#DeltaT of MUCH GEM2 digis to seed time of event;#DeltaT (ns); Counts []", 200,
(*det).fdTimeWinBeg, (*det).fdTimeWinEnd);
fhTDiffMuchRpc =
new TH1I("hTDiffMuchRpc", "#DeltaT of MUCH RPC digis to seed time of event;#DeltaT (ns); Counts []", 200,
(*det).fdTimeWinBeg, (*det).fdTimeWinEnd);
AddHistoToVector(fhTDiffMuchGem1, "evtbuild");
AddHistoToVector(fhTDiffMuchGem2, "evtbuild");
AddHistoToVector(fhTDiffMuchRpc, "evtbuild");
outFolder->Add(fhTDiffMuchGem1);
outFolder->Add(fhTDiffMuchGem2);
outFolder->Add(fhTDiffMuchRpc);
}
}
/// Same plots for the reference detector
......@@ -996,6 +1016,33 @@ void CbmAlgoBuildRawEvents::CreateHistograms()
}
}
AddCanvasToVector(fcTdif, "canvases");
// ------------------------ //
/// ==> mMUCH specific histograms
if (nullptr != fhTDiffMuchGem1) {
TCanvas* fcTdifMuch = new TCanvas("cEvBTdifMuch", "EvB Time Difference plots for MUCH", w, h);
fcTdifMuch->Divide(2, 2);
fcTdifMuch->cd(1);
gPad->SetGridx();
gPad->SetGridy();
gPad->SetLogy();
fhTDiffMuchGem1->Draw();
fcTdifMuch->cd(2);
gPad->SetGridx();
gPad->SetGridy();
gPad->SetLogy();
fhTDiffMuchGem2->Draw();
fcTdifMuch->cd(3);
gPad->SetGridx();
gPad->SetGridy();
gPad->SetLogy();
fhTDiffMuchRpc->Draw();
AddCanvasToVector(fcTdifMuch, "canvases");
}
}
void CbmAlgoBuildRawEvents::FillHistos()
......@@ -1041,6 +1088,26 @@ void CbmAlgoBuildRawEvents::FillHistos()
auto pDigi = GetDigi<CbmMuchDigi>(idx);
if (nullptr == pDigi) continue;
dTimeDiff = pDigi->GetTime() - evt->GetStartTime();
/// ==> mMUCH specific histograms
uint32_t uStation = CbmMuchAddress::GetStationIndex(pDigi->GetAddress());
switch (uStation) {
case 0: {
if (dTimeDiff < 1.E30) fhTDiffMuchGem1->Fill(dTimeDiff);
break;
}
case 1: {
if (dTimeDiff < 1.E30) fhTDiffMuchGem2->Fill(dTimeDiff);
break;
}
case 2: {
if (dTimeDiff < 1.E30) fhTDiffMuchRpc->Fill(dTimeDiff);
break;
}
default: {
break;
}
}
}
break;
}
......@@ -1193,6 +1260,13 @@ void CbmAlgoBuildRawEvents::ResetHistograms(Bool_t /*bResetTime*/)
for (std::vector<TH1*>::iterator itHist = fvhTDiff.begin(); itHist != fvhTDiff.end(); ++itHist) {
(*itHist)->Reset();
}
/// ==> mMUCH specific histograms
if (nullptr != fhTDiffMuchGem1) {
fhTDiffMuchGem1->Reset();
fhTDiffMuchGem2->Reset();
fhTDiffMuchRpc->Reset();
}
/*
if( kTRUE == bResetTime )
{
......
......@@ -340,6 +340,11 @@ private:
std::vector<TH1*> fvhNbDigiPerEvtDet = {}; //! histograms with the nb of digis in each detector per event
std::vector<TH1*> fvhTDiff = {}; // digi time difference to seed
/// ==> mMUCH specific histograms
TH1* fhTDiffMuchGem1 = nullptr;
TH1* fhTDiffMuchGem2 = nullptr;
TH1* fhTDiffMuchRpc = nullptr;
/// Internal state variables
UInt_t fuCurEv = 0; //! Event Counter
UInt_t fuNrTs = 0; //! Timeslice Counter
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment