131 uint32_t iNbBinsLog = 0;
134 double* dBinsLog = dBinsLogVector.data();
142 fBmonStsDiffEvo =
new TH2F(
"fBmonStsDiffEvo",
"Bmon-Sts;TS; time diff [ns];Counts", 1000, 0, 10000, nrOfBinsSts,
151 fBmonMuchDiffEvo =
new TH2F(
"fBmonMuchDiffEvo",
"Bmon-Much;TS; time diff [ns];Counts", 1000, 0, 10000, nrOfBinsMuch,
160 fBmonTrdDiffEvo =
new TH2F(
"fBmonTrdDiffEvo",
"Bmon-Trd;TS; time diff [ns];Counts", 1000, 0, 10000, nrOfBinsTrd,
169 fBmonTofDiffEvo =
new TH2F(
"fBmonTofDiffEvo",
"Bmon-Tof;TS; time diff [ns];Counts", 1000, 0, 10000, nrOfBinsTof,
178 fBmonRichDiffEvo =
new TH2F(
"fBmonRichDiffEvo",
"Bmon-Rich;TS; time diff [ns];Counts", 1000, 0, 10000, nrOfBinsRich,
186 fBmonPsdDiffEvo =
new TH2F(
"fBmonPsdDiffEvo",
"Bmon-Psd;TS; time diff [ns];Counts", 1000, 0, 10000, nrOfBinsPsd,
189 fBmonPsdDiffCharge =
new TH2F(
"fBmonPsdDiffCharge",
"Bmon-Psd;time diff [ns]; Charge [a.u]; ;Counts", nrOfBinsPsd,
194 fBmonStsDiffEvoLong =
new TH2F(
"fBmonStsDiffEvoLong",
"Bmon-Sts;TS; time diff [ns];Counts", 1800, 0, 180000,
197 fBmonMuchDiffEvoLong =
new TH2F(
"fBmonMuchDiffEvoLong",
"Bmon-Much;TS; time diff [ns];Counts", 1800, 0, 180000,
200 fBmonTrdDiffEvoLong =
new TH2F(
"fBmonTrdDiffEvoLong",
"Bmon-Trd;TS; time diff [ns];Counts", 1800, 0, 180000,
203 fBmonTofDiffEvoLong =
new TH2F(
"fBmonTofDiffEvoLong",
"Bmon-Tof;TS; time diff [ns];Counts", 1800, 0, 180000,
206 fBmonRichDiffEvoLong =
new TH2F(
"fBmonRichDiffEvoLong",
"Bmon-Rich;TS; time diff [ns];Counts", 1800, 0, 180000,
210 fBmonPsdDiffEvoLong =
new TH2F(
"fBmonPsdDiffEvoLong",
"Bmon-Psd;TS; time diff [ns];Counts", 1800, 0, 180000,
215 fBmonStsMeanEvo =
new TProfile(
"fBmonStsMeanEvo",
"Bmon-Sts; time in run [s]; Mean time diff [ns]", 4320, 0, 4320);
217 fBmonMuchMeanEvo =
new TProfile(
"fBmonMuchMeanEvo",
"Bmon-Much; time in run [s]; Mean time diff [ns]", 4320, 0, 4320);
219 fBmonTrdMeanEvo =
new TProfile(
"fBmonTrdMeanEvo",
"Bmon-Trd; time in run [s]; Mean time diff [ns]", 4320, 0, 4320);
221 fBmonTofMeanEvo =
new TProfile(
"fBmonTofMeanEvo",
"Bmon-Tof; time in run [s]; Mean time diff [ns]", 4320, 0, 4320);
223 fBmonRichMeanEvo =
new TProfile(
"fBmonRichMeanEvo",
"Bmon-Rich; time in run [s]; Mean time diff [ns]", 4320, 0, 4320);
225 fBmonPsdMeanEvo =
new TProfile(
"fBmonPsdMeanEvo",
"Bmon-Psd; time in run [s]; Mean time diff [ns]", 4320, 0, 4320);
230 fBmonStsDpbDiff =
new TH2F(
"fBmonStsDpbDiff",
"Bmon-Much;DPB; time diff [ns];Counts", 2, -0.5, 1.5, nrOfBinsSts,
235 new TH2F(Form(
"fBmonStsDpbDiffEvo%02u", uStsDpb), Form(
"Bmon-STS DPB %02u;TS; time diff [ns];Counts", uStsDpb),
238 new TH1F(Form(
"fStsDpbCntsEvo%02u", uStsDpb), Form(
"Time STS DPB %02u;TS; Hit Counts", uStsDpb), 1800, 0, 180000);
251 Form(
"Bmon-Much ASIC %02u;TS; time diff [ns];Counts", uMuchAsic), 1800,
255 fBmonBmonDiff =
new TH1F(
"fBmonBmonDiff",
"Bmon-Bmon_prev;time diff [ns];Counts", iNbBinsLog, dBinsLog);
257 fStsStsDiff =
new TH1F(
"fStsStsDiff",
"Sts-Sts_prev;time diff [ns];Counts", iNbBinsLog, dBinsLog);
259 fMuchMuchDiff =
new TH1F(
"fMuchMuchDiff",
"Much-Much_prev;time diff [ns];Counts", iNbBinsLog, dBinsLog);
261 fTrdTrdDiff =
new TH1F(
"fTrdTrdDiff",
"Trd-Trd_prev;time diff [ns];Counts", iNbBinsLog, dBinsLog);
263 fTofTofDiff =
new TH1F(
"fTofTofDiff",
"Tof-Tof_prev;time diff [ns];Counts", iNbBinsLog, dBinsLog);
265 fRichRichDiff =
new TH1F(
"fRichRichDiff",
"Rich-Rich_prev;time diff [ns];Counts", iNbBinsLog, dBinsLog);
267 fPsdPsdDiff =
new TH1F(
"fPsdPsdDiff",
"Psd-Psd_prev;time diff [ns];Counts", iNbBinsLog, dBinsLog);
270 fBmonStsNb =
new TH2F(
"fBmonStsNb",
"Bmon-STS;Nb Bmon; Nb STS;TS []", 100, 0, 100, 100, 0, 100);
271 fBmonMuchNb =
new TH2F(
"fBmonMuchNb",
"Bmon-MUCH;Nb Bmon; Nb MUCH;TS []", 100, 0, 100, 100, 0, 100);
272 fBmonTrdNb =
new TH2F(
"fBmonTrdNb",
"Bmon-TRD;Nb Bmon; Nb TRD;TS []", 100, 0, 100, 100, 0, 100);
273 fBmonTofNb =
new TH2F(
"fBmonTofNb",
"Bmon-TOF;Nb Bmon; Nb TOF;TS []", 100, 0, 100, 100, 0, 100);
274 fBmonRichNb =
new TH2F(
"fBmonRichNb",
"Bmon-RICH;Nb Bmon; Nb RICH;TS []", 100, 0, 100, 100, 0, 100);
275 fBmonPsdNb =
new TH2F(
"fBmonPsdNb",
"Bmon-PSD;Nb Bmon; Nb PSD;TS []", 100, 0, 100, 100, 0, 100);
277 fBmonAddress =
new TH1F(
"fBmonAddress",
"Bmon address;address;Counts", 1000000, 0, 1000000.);
279 fBmonChannel =
new TH1F(
"fBmonChannel",
"Bmon channel;channel nr;Counts", 100, -0.5, 99.5);
285 FairRunOnline* run = FairRunOnline::Instance();
287 THttpServer* server = run->GetHttpServer();
288 if (
nullptr != server) {
449 LOG(debug) <<
"Begin";
450 Int_t nrBmonDigis = 0;
454 LOG(debug) <<
"BmonDigis: " << nrBmonDigis;
477 if (nrBmonDigis < 1000000) {
487 if (
nullptr ==
pTsMetaData) LOG(fatal) << Form(
"No TS metadata found for TS %6u.",
fNrTs);
489 for (
Int_t iBmon = 0; iBmon < nrBmonDigis; ++iBmon) {
491 if (iBmon % 1000 == 0) LOG(debug) <<
"Executing entry " << iBmon;
502 Double_t T0Time = BmonDigi->
GetTime();
506 if (0x00005006 != BmonAddress && 0x04005006 != BmonAddress)
continue;
549 for (
Int_t iDigi = 0; iDigi < nrStsDigis; ++iDigi) {
565 for (
Int_t iDigi = 0; iDigi < nrMuchDigis; ++iDigi) {
568 UInt_t uAsic = digi->
GetNxId();
569 UInt_t uChan = digi->
GetNxCh();
581 for (
Int_t iDigi = 0; iDigi < nrTrdDigis; ++iDigi) {
593 for (
Int_t iDigi = 0; iDigi < nrTofDigis; ++iDigi) {
601 for (
Int_t iDigi = 0; iDigi < nrRichDigis; ++iDigi) {
609 for (
Int_t iDigi = 0; iDigi < nrPsdDigis; ++iDigi) {
682 TProfile* profMeanEvo, TH2* histoAFCK,
const Double_t T0Time,
687 Int_t iFirstDigiInWin = iStartDigi;
689 for (
Int_t i = iStartDigi; i < nrDigis; ++i) {
691 const Digi* digi =
fDigiMan->Get<Digi>(i);
698 stsDigi = boost::any_cast<const CbmStsDigi*>(digi);
701 LOG(fatal) <<
"Failed boost any_cast in "
702 "CbmMcbm2019CheckPulser::FillSystemOffsetHistos for a "
704 << Digi::GetClassName();
724 muchDigi = boost::any_cast<const CbmMuchBeamTimeDigi*>(digi);
727 LOG(fatal) <<
"Failed boost any_cast in "
728 "CbmMcbm2019CheckPulser::FillSystemOffsetHistos for a "
730 << Digi::GetClassName();
733 UInt_t uAsic = muchDigi->GetNxId();
734 UInt_t uChan = muchDigi->GetNxCh();
759 UInt_t uAddr = digi->GetAddress();
784 UInt_t uAddr = digi->GetAddress();
789 if (digi->GetAddress() != (9 << 10) + 8)
continue;
797 Double_t diffTime = T0Time - digi->GetTime();
800 if (diffTime > offsetRange) {
804 if (diffTime < -offsetRange)
break;
806 histo->Fill(diffTime);
807 histoEvo->Fill(
fNrTs, diffTime);
808 histoEvoLong->Fill(
fNrTs, diffTime);
811 profMeanEvo->Fill(T0Time * 1e-9 -
fdStartTime, diffTime);
821 UInt_t uDPB = (0 < (digi->GetAddress() & 0x00000400));
822 histoAFCK->Fill(uDPB, diffTime);
830 muchDigi = boost::any_cast<const CbmMuchBeamTimeDigi*>(digi);
833 LOG(fatal) <<
"Failed boost any_cast in CbmCheckTiming::FillSystemOffsetHistos "
834 "for a digi of type "
835 << Digi::GetClassName();
838 UInt_t afck = muchDigi->GetRocId();
839 UInt_t asic = muchDigi->GetNxId();
840 histoAFCK->Fill(afck, diffTime);
846 return iFirstDigiInWin;
Int_t FillSystemOffsetHistos(TH1 *histo, TH2 *histoEvo, TH2 *histoEvoLong, TProfile *profMeanEvo, TH2 *histoAFCK, const Double_t T0Time, const Int_t offsetRange, Int_t iStartDigi, ECbmModuleId iDetId=ECbmModuleId::kLastModule)