CbmRoot
CbmStar2019MonitorPulserAlgo.cxx
Go to the documentation of this file.
1 // -----------------------------------------------------------------------------
2 // ----- -----
3 // ----- CbmStar2019MonitorPulserAlgo -----
4 // ----- Created 12.10.2019 by P.-A. Loizeau -----
5 // ----- -----
6 // -----------------------------------------------------------------------------
7 
9 
11 #include "CbmStar2019TofPar.h"
12 
13 #include "FairLogger.h"
14 #include "FairRootManager.h"
15 #include "FairRun.h"
16 #include "FairRunOnline.h"
17 #include "FairRuntimeDb.h"
18 
19 #include "TCanvas.h"
20 #include "TH1.h"
21 #include "TH2.h"
22 #include "TList.h"
23 #include "TPaveStats.h"
24 #include "TProfile.h"
25 #include "TROOT.h"
26 #include "TString.h"
27 
28 #include <fstream>
29 #include <iomanip>
30 #include <iostream>
31 #include <stdint.h>
32 
33 // -------------------------------------------------------------------------
35  : CbmStar2019Algo()
36  ,
38  fbEtofFeeIndexing(kTRUE)
39  , fvbMaskedComponents()
40  , fiSectorIndex(-1)
41  , fuUpdateFreqTs(100)
42  , fUnpackPar(nullptr)
43  , fuNrOfGdpbs(0)
44  , fGdpbIdIndexMap()
45  , fuNrOfFeePerGdpb(0)
46  , fuNrOfGet4PerFee(0)
47  , fuNrOfChannelsPerGet4(0)
48  , fuNrOfChannelsPerFee(0)
49  , fuNrOfGet4(0)
50  , fuNrOfGet4PerGdpb(0)
51  , fuNrOfChannelsPerGdpb(0)
52  , fuPulserMinTot(90)
53  , fuPulserMaxTot(110)
54  , fuPulserChannel(3)
55  , fulCurrentTsIdx(0)
56  , fulCurrentMsIdx(0)
57  , fdTsStartTime(-1.0)
58  , fdTsStopTimeCore(-1.0)
59  , fdMsTime(-1.0)
60  , fuMsIndex(0)
61  , fuCurrentEquipmentId(0)
62  , fuCurrDpbId(0)
63  , fuCurrDpbIdx(0)
64  , fuGet4Id(0)
65  , fuGet4Nr(0)
66  , fvulCurrentEpoch()
67  , fvulCurrentEpochCycle()
68  , fvulCurrentEpochFull()
69  , fvmEpSupprBuffer()
70  , fvvbFeeHitFound()
71  , fvvdFeeHits()
72  , dMinDt(0.0)
73  , dMaxDt(0.0)
74  , fdStartTime(-1.0)
75  , fuHistoryHistoSize(1800)
76  , fvvhFeePairPulserTimeDiff()
77  , fhPulserTimeDiffMean(nullptr)
78  , fhPulserTimeDiffRms(nullptr)
79  , fhPulserTimeDiffRmsZoom(nullptr)
80  , fhPulserRmsGdpbToRefEvo(nullptr)
81  , fhPulserRmsGbtxToRefEvo(nullptr) {}
84  fvmEpSupprBuffer.clear();
85 }
86 
87 // -------------------------------------------------------------------------
89  LOG(info) << "Initializing mCBM T0 2019 monitor algo";
90 
91  return kTRUE;
92 }
96 
98 }
99 
100 // -------------------------------------------------------------------------
102  LOG(info) << "Init parameter containers for CbmStar2019MonitorPulserAlgo";
103  Bool_t initOK = ReInitContainers();
104 
105  return initOK;
106 }
108  LOG(info) << "**********************************************";
109  LOG(info) << "ReInit parameter containers for CbmStar2019MonitorPulserAlgo";
110 
111  fUnpackPar = (CbmStar2019TofPar*) fParCList->FindObject("CbmStar2019TofPar");
112  if (nullptr == fUnpackPar) return kFALSE;
113 
114  Bool_t initOK = InitParameters();
115 
116  return initOK;
117 }
119  if (nullptr == fParCList) fParCList = new TList();
120  fUnpackPar = new CbmStar2019TofPar("CbmStar2019TofPar");
121  fParCList->Add(fUnpackPar);
122 
123  return fParCList;
124 }
126 
128  LOG(info) << "Nr. of Tof GDPBs: " << fuNrOfGdpbs;
129 
131  LOG(info) << "Nr. of FEES per Tof GDPB: " << fuNrOfFeePerGdpb;
132 
134  LOG(info) << "Nr. of GET4 per Tof FEE: " << fuNrOfGet4PerFee;
135 
137  LOG(info) << "Nr. of channels per GET4: " << fuNrOfChannelsPerGet4;
138 
140  LOG(info) << "Nr. of channels per FEE: " << fuNrOfChannelsPerFee;
141 
143  LOG(info) << "Nr. of GET4s: " << fuNrOfGet4;
144 
146  LOG(info) << "Nr. of GET4s per GDPB: " << fuNrOfGet4PerGdpb;
147 
149  LOG(info) << "Nr. of channels per GDPB: " << fuNrOfChannelsPerGdpb;
150 
151  fGdpbIdIndexMap.clear();
152  for (UInt_t i = 0; i < fuNrOfGdpbs; ++i) {
154  LOG(info) << "GDPB Id of TOF " << i << " : " << std::hex
155  << fUnpackPar->GetGdpbId(i) << std::dec;
156  } // for( UInt_t i = 0; i < fuNrOfGdpbs; ++i )
157 
160  LOG(info) << "Timeslice parameters: each MS is " << fdMsSizeInNs << " ns";
161 
163  if (-1 < fiSectorIndex) {
165  if (fuNrOfGdpbs <= static_cast<UInt_t>(fiSectorIndex))
166  LOG(fatal) << "Selected sector out of bounds relative to parameter file: "
167  << fiSectorIndex << " VS " << fuNrOfGdpbs;
168  else
169  LOG(info) << "Selected sector "
171  << " for single sector analysis";
172  fuNrOfGdpbs = 1;
173  fGdpbIdIndexMap.clear();
175  } // if( -1 < fiSectorIndex )
176 
177  if (fbEtofFeeIndexing)
178  LOG(info) << "Using eTOF indexing with only 3 FEE per GBTx instead of 5";
179 
181  fvulCurrentEpoch.resize(fuNrOfGdpbs, 0);
185  fvvdFeeHits.resize(fuNrOfGdpbs);
186  for (UInt_t uGdpb = 0; uGdpb < fuNrOfGdpbs; ++uGdpb) {
187  fvvbFeeHitFound[uGdpb].resize(fuNrOfFeePerGdpb, kFALSE);
188  fvvdFeeHits[uGdpb].resize(fuNrOfFeePerGdpb, 0.0);
189  } // for( UInt_t uGdpb = 0; uGdpb < fuNrOfGdpbs; ++uGdpb )
190 
191 
192  return kTRUE;
193 }
194 // -------------------------------------------------------------------------
195 
197  UShort_t usDetectorId) {
199  for (UInt_t uCompIdx = 0; uCompIdx < fvMsComponentsList.size(); ++uCompIdx)
200  if (component == fvMsComponentsList[uCompIdx]) return;
201 
203  fvMsComponentsList.push_back(component);
204 
205  LOG(info)
206  << "CbmStar2019MonitorPulserAlgo::AddMsComponentToList => Component "
207  << component << " with detector ID 0x" << std::hex << usDetectorId
208  << std::dec << " added to list";
209 }
210 // -------------------------------------------------------------------------
211 
212 Bool_t CbmStar2019MonitorPulserAlgo::ProcessTs(const fles::Timeslice& ts) {
213  fulCurrentTsIdx = ts.index();
214  fdTsStartTime = static_cast<Double_t>(ts.descriptor(0, 0).idx);
215 
217  if (0 == fulCurrentTsIdx) return kTRUE;
218 
220  if (-1.0 == fdTsCoreSizeInNs) {
221  fuNbCoreMsPerTs = ts.num_core_microslices();
222  fuNbOverMsPerTs = ts.num_microslices(0) - ts.num_core_microslices();
225  LOG(info) << "Timeslice parameters: each TS has " << fuNbCoreMsPerTs
226  << " Core MS and " << fuNbOverMsPerTs
227  << " Overlap MS, for a core duration of " << fdTsCoreSizeInNs
228  << " ns and a full duration of " << fdTsFullSizeInNs << " ns";
229 
232  if (kFALSE == fbIgnoreOverlapMs) fuNbMsLoop += fuNbOverMsPerTs;
233  LOG(info) << "In each TS " << fuNbMsLoop << " MS will be looped over";
234  } // if( -1.0 == fdTsCoreSizeInNs )
235 
238  // LOG(info) << Form( "TS %5d Start %12f Stop %12f", fulCurrentTsIdx, fdTsStartTime, fdTsStopTimeCore );
239 
241  for (fuMsIndex = 0; fuMsIndex < fuNbMsLoop; fuMsIndex++) {
243  for (UInt_t uMsCompIdx = 0; uMsCompIdx < fvMsComponentsList.size();
244  ++uMsCompIdx) {
245  UInt_t uMsComp = fvMsComponentsList[uMsCompIdx];
246 
247  if (kFALSE == ProcessMs(ts, uMsComp, fuMsIndex)) {
248  LOG(error) << "Failed to process ts " << fulCurrentTsIdx << " MS "
249  << fuMsIndex << " for component " << uMsComp;
250  return kFALSE;
251  } // if( kFALSE == ProcessMs( ts, uMsCompIdx, fuMsIndex ) )
252  } // for( UInt_t uMsCompIdx = 0; uMsCompIdx < fvMsComponentsList.size(); ++uMsCompIdx )
253 
255  FillHistograms();
256  } // for( fuMsIndex = 0; fuMsIndex < uNbMsLoop; fuMsIndex ++ )
257 
258  return kTRUE;
259 }
260 
261 Bool_t CbmStar2019MonitorPulserAlgo::ProcessMs(const fles::Timeslice& ts,
262  size_t uMsCompIdx,
263  size_t uMsIdx) {
264  auto msDescriptor = ts.descriptor(uMsCompIdx, uMsIdx);
265  fuCurrentEquipmentId = msDescriptor.eq_id;
266  const uint8_t* msContent =
267  reinterpret_cast<const uint8_t*>(ts.content(uMsCompIdx, uMsIdx));
268 
269  uint32_t uSize = msDescriptor.size;
270  fulCurrentMsIdx = msDescriptor.idx;
271  fdMsTime = (1e-9) * static_cast<double>(fulCurrentMsIdx);
272  LOG(debug) << "Microslice: " << fulCurrentMsIdx << " from EqId " << std::hex
273  << fuCurrentEquipmentId << std::dec << " has size: " << uSize;
274 
275  if (-1.0 == fdStartTime) fdStartTime = fdMsTime;
276 
277  if (0 == fvbMaskedComponents.size())
278  fvbMaskedComponents.resize(ts.num_components(), kFALSE);
279 
280  fuCurrDpbId = static_cast<uint32_t>(fuCurrentEquipmentId & 0xFFFF);
281  // fuCurrDpbIdx = fDpbIdIndexMap[ fuCurrDpbId ];
282 
284  auto it = fGdpbIdIndexMap.find(fuCurrDpbId);
285  if (it == fGdpbIdIndexMap.end()) {
286  if (kFALSE == fvbMaskedComponents[uMsCompIdx]) {
287  LOG(info)
288  << "---------------------------------------------------------------";
289  LOG(info) << FormatMsHeaderPrintout(msDescriptor);
290  LOG(warning) << "Could not find the gDPB index for AFCK id 0x" << std::hex
291  << fuCurrDpbId << std::dec << " in timeslice "
292  << fulCurrentTsIdx << " in microslice " << uMsIdx
293  << " component " << uMsCompIdx << "\n"
294  << "If valid this index has to be added in the TOF "
295  "parameter file in the DbpIdArray field";
296  fvbMaskedComponents[uMsCompIdx] = kTRUE;
297  } // if( kFALSE == fvbMaskedComponents[ uMsComp ] )
298  else
299  return kTRUE;
300 
303 
304  return kFALSE;
305  } // if( it == fGdpbIdIndexMap.end() )
306  else
308 
309  // If not integer number of message in input buffer, print warning/error
310  if (0 != (uSize % kuBytesPerMessage))
311  LOG(error) << "The input microslice buffer does NOT "
312  << "contain only complete nDPB messages!";
313 
314  // Compute the number of complete messages in the input microslice buffer
315  uint32_t uNbMessages =
316  (uSize - (uSize % kuBytesPerMessage)) / kuBytesPerMessage;
317 
318  // Prepare variables for the loop on contents
319  Int_t messageType = -111;
320  const uint64_t* pInBuff = reinterpret_cast<const uint64_t*>(msContent);
321  for (uint32_t uIdx = 0; uIdx < uNbMessages; uIdx++) {
322  // Fill message
323  uint64_t ulData = static_cast<uint64_t>(pInBuff[uIdx]);
324 
326  if (0 == uIdx) {
327  ProcessEpochCycle(ulData);
328  continue;
329  } // if( 0 == uIdx )
330 
331  gdpbv100::Message mess(ulData);
333  messageType = mess.getMessageType();
334 
337 
338  if (fuNrOfGet4PerGdpb <= fuGet4Id && !mess.isStarTrigger()
340  LOG(warning) << "Message with Get4 ID too high: " << fuGet4Id << " VS "
341  << fuNrOfGet4PerGdpb << " set in parameters.";
342 
343  switch (messageType) {
344  case gdpbv100::MSG_HIT: {
345  if (mess.getGdpbHitIs24b()) {
347  LOG(fatal) << "This monitor does not support 24b hit messages!!!.";
348  continue;
349  } // if( getGdpbHitIs24b() )
350  else {
351  fvmEpSupprBuffer.push_back(mess);
352  } // else of if( getGdpbHitIs24b() )
353  break;
354  } // case gdpbv100::MSG_HIT:
355  case gdpbv100::MSG_EPOCH: {
357  ProcessEpoch(mess);
358  } // if this epoch message is a merged one valid for all chips
359  else {
361  LOG(fatal) << "This event builder does not support unmerged epoch "
362  "messages!!!.";
363  continue;
364  } // if single chip epoch message
365  break;
366  } // case gdpbv100::MSG_EPOCH:
367  case gdpbv100::MSG_SLOWC:
368  case gdpbv100::MSG_SYST:
374  break;
375  } // case not hit or epoch
376  default:
377  LOG(fatal) << "Message type " << std::hex << std::setw(2)
378  << static_cast<uint16_t>(messageType)
379  << " not included in Get4 data format.";
380  } // switch( mess.getMessageType() )
381  } // for (uint32_t uIdx = 0; uIdx < uNbMessages; uIdx ++)
382 
383  return kTRUE;
384 }
385 
386 // -------------------------------------------------------------------------
388  ULong64_t ulEpochCycleVal = ulCycleData & gdpbv100::kulEpochCycleFieldSz;
389 
390  if (!(ulEpochCycleVal == fvulCurrentEpochCycle[fuCurrDpbIdx]
391  || ulEpochCycleVal == fvulCurrentEpochCycle[fuCurrDpbIdx] + 1)
392  && 0 < fulCurrentMsIdx) {
393  LOG(warning) << "CbmStar2019MonitorPulserAlgo::ProcessEpochCycle => "
394  << " Missmatch in epoch cycles detected for Gdpb "
395  << fuCurrDpbIdx
396  << ", probably fake cycles due to epoch index corruption! "
397  << Form(" Current cycle 0x%09llX New cycle 0x%09llX",
399  ulEpochCycleVal);
400  } // if epoch cycle did not stay constant or increase by exactly 1, except if first MS of the TS
401  if (ulEpochCycleVal != fvulCurrentEpochCycle[fuCurrDpbIdx]) {
402  LOG(info) << "CbmStar2019EventBuilderEtofAlgo::ProcessEpochCycle => "
403  << " New epoch cycle for Gdpb " << fuCurrDpbIdx
404  << Form(": Current cycle 0x%09llX New cycle 0x%09llX",
406  ulEpochCycleVal);
407  } // if( ulEpochCycleVal != fvulCurrentEpochCycle[fuCurrDpbIdx] )
408  fvulCurrentEpochCycle[fuCurrDpbIdx] = ulEpochCycleVal;
409 
410  return;
411 }
413  ULong64_t ulEpochNr = mess.getGdpbEpEpochNb();
414  /*
415  Bool_t bSyncFlag = ( 1 == mess.getGdpbEpSync() );
416  Bool_t bDataLoss = ( 1 == mess.getGdpbEpDataLoss() );
417  Bool_t bEpochLoss = ( 1 == mess.getGdpbEpEpochLoss() );
418  Bool_t bMissmMatch = ( 1 == mess.getGdpbEpMissmatch() );
419 */
420  fvulCurrentEpoch[fuCurrDpbIdx] = ulEpochNr;
422  ulEpochNr
424 
427 }
428 // -------------------------------------------------------------------------
430  Int_t iBufferSize = fvmEpSupprBuffer.size();
431 
432  if (0 == iBufferSize) return;
433 
434  LOG(debug) << "Now processing stored messages for for gDPB " << fuCurrDpbIdx
435  << " with epoch number " << (fvulCurrentEpoch[fuCurrDpbIdx] - 1);
436 
439  std::stable_sort(fvmEpSupprBuffer.begin(), fvmEpSupprBuffer.end());
440 
442  ULong64_t ulCurEpochGdpbGet4 = fvulCurrentEpochFull[fuCurrDpbIdx];
443 
445  if (0 == ulCurEpochGdpbGet4) return;
446 
448  ulCurEpochGdpbGet4--;
449 
450  Int_t messageType = -111;
451  for (Int_t iMsgIdx = 0; iMsgIdx < iBufferSize; iMsgIdx++) {
452  messageType = fvmEpSupprBuffer[iMsgIdx].getMessageType();
453 
455  fvmEpSupprBuffer[iMsgIdx].getGdpbGenChipId());
457 
459  gdpbv100::FullMessage fullMess(fvmEpSupprBuffer[iMsgIdx],
460  ulCurEpochGdpbGet4);
461 
463  switch (messageType) {
464  case gdpbv100::MSG_HIT: {
465  ProcessHit(fullMess);
466  break;
467  } // case gdpbv100::MSG_HIT:
468  case gdpbv100::MSG_SLOWC:
469  case gdpbv100::MSG_SYST:
470  case gdpbv100::MSG_EPOCH:
476  break;
477  default:
478  LOG(error) << "Message type " << std::hex << std::setw(2)
479  << static_cast<uint16_t>(messageType)
480  << " not included in Get4 unpacker.";
481  } // switch( mess.getMessageType() )
482  } // for( Int_t iMsgIdx = 0; iMsgIdx < iBufferSize; iMsgIdx++ )
483 
484  fvmEpSupprBuffer.clear();
485 }
486 // -------------------------------------------------------------------------
488  UInt_t uChannel = mess.getGdpbHitChanId();
489  UInt_t uTot = mess.getGdpbHit32Tot();
490 
494  // UInt_t uFts = mess.getGdpbHitFullTs() % 112;
495  // UInt_t uCts = mess.getGdpbHitFullTs() / 112;
496 
497  // UInt_t uChannelNr = fuGet4Id * fuNrOfChannelsPerGet4 + uChannel;
498  UInt_t uChannelNrInFee =
500  UInt_t uFeeNr = (fuGet4Id / fuNrOfGet4PerFee);
501  // UInt_t uFeeNrInSys = fuCurrDpbIdx * fuNrOfFeePerGdpb + uFeeNr;
502  // UInt_t uRemappedChannelNr = uFeeNr * fuNrOfChannelsPerFee + fUnpackPar->Get4ChanToPadiChan( uChannelNrInFee );
503  UInt_t uRemappedChanNrInFee = fUnpackPar->Get4ChanToPadiChan(uChannelNrInFee);
504  // UInt_t uGbtxNr = (uFeeNr / fUnpackPar->GetNrOfFeePerGbtx());
505  // UInt_t uFeeInGbtx = (uFeeNr % fUnpackPar->GetNrOfFeePerGbtx());
506  // UInt_t uGbtxNrInSys = fuCurrDpbIdx * fUnpackPar->GetNrOfGbtxPerGdpb() + uGbtxNr;
507 
508  // UInt_t uChanInSyst = fuCurrDpbIdx * fuNrOfChannelsPerGdpb + uChannelNr;
509  // UInt_t uRemappedChannelNrInSys = fuCurrDpbIdx * fuNrOfChannelsPerGdpb
510  // + uFeeNr * fuNrOfChannelsPerFee
511  // + fUnpackPar->Get4ChanToPadiChan( uChannelNrInFee );
512 
513  // ULong_t ulHitTime = mess.getMsgFullTime( mess.getExtendedEpoch() );
514  Double_t dHitTime = mess.GetFullTimeNs();
515  // Double_t dHitTot = uTot; // in bins
516 
517  if (fuPulserChannel == uRemappedChanNrInFee && fuPulserMinTot < uTot
518  && uTot < fuPulserMaxTot) {
519  fvvbFeeHitFound[fuCurrDpbIdx][uFeeNr] = kTRUE;
520  fvvdFeeHits[fuCurrDpbIdx][uFeeNr] = dHitTime;
521  } // if( fuPulserChannel == uRemappedChanNrInFee && fuPulserMinTot < uTot && uTot < fuPulserMaxTot )
522 }
523 // -------------------------------------------------------------------------
524 
526  std::string sFolder = "eTofMoni";
527 
528  LOG(info) << "create Histos for eTOF monitoring ";
529  /*
531  // Number of log bins =
532  // 9 for the sub-unit decade
533  // + 9 for each unit of each decade * 10 for the subdecade range
534  // + 1 for the closing bin top edge
535  const Int_t iNbDecadesLog = 4;
536  const Int_t iNbStepsDecade = 9;
537  const Int_t iNbSubStepsInStep = 1;
538  const Int_t iNbBinsLog = iNbStepsDecade
539  + iNbStepsDecade * iNbSubStepsInStep * iNbDecadesLog
540  + 1;
541  Double_t dBinsLog[iNbBinsLog];
542  // First fill sub-unit decade
543  for( Int_t iSubU = 0; iSubU < iNbStepsDecade; iSubU ++ )
544  dBinsLog[ iSubU ] = 0.1 * ( 1 + iSubU );
545  std::cout << std::endl;
546  // Then fill the main decades
547  Double_t dSubstepSize = 1.0 / iNbSubStepsInStep;
548  for( Int_t iDecade = 0; iDecade < iNbDecadesLog; iDecade ++)
549  {
550  Double_t dBase = std::pow( 10, iDecade );
551  Int_t iDecadeIdx = iNbStepsDecade
552  + iDecade * iNbStepsDecade * iNbSubStepsInStep;
553  for( Int_t iStep = 0; iStep < iNbStepsDecade; iStep++ )
554  {
555  Int_t iStepIdx = iDecadeIdx + iStep * iNbSubStepsInStep;
556  for( Int_t iSubStep = 0; iSubStep < iNbSubStepsInStep; iSubStep++ )
557  {
558  dBinsLog[ iStepIdx + iSubStep ] = dBase * (1 + iStep)
559  + dBase * dSubstepSize * iSubStep;
560  } // for( Int_t iSubStep = 0; iSubStep < iNbSubStepsInStep; iSubStep++ )
561  } // for( Int_t iStep = 0; iStep < iNbStepsDecade; iStep++ )
562  } // for( Int_t iDecade = 0; iDecade < iNbDecadesLog; iDecade ++)
563  dBinsLog[ iNbBinsLog - 1 ] = std::pow( 10, iNbDecadesLog );
564 */
565  /*******************************************************************/
566  UInt_t uNbBinsDt =
567  kuNbBinsDt
568  + 1; // To account for extra bin due to shift by 1/2 bin of both ranges
569  dMinDt =
570  -1. * (kuNbBinsDt * gdpbv100::kdBinSize / 2.) - gdpbv100::kdBinSize / 2.;
571  dMaxDt =
573 
574  std::cout << " Bin size " << gdpbv100::kdBinSize << std::endl;
575  std::cout << " Epo bins " << gdpbv100::kuEpochInBins << std::endl;
576  std::cout << " Epo size " << gdpbv100::kdEpochInPs << std::endl;
577  std::cout << " Epo size " << gdpbv100::kdEpochInNs << std::endl;
578  /*******************************************************************/
581  for (UInt_t uFeeA = 0; uFeeA < fuNrOfFeePerGdpb * fuNrOfGdpbs; ++uFeeA) {
582  UInt_t uGdpbA = uFeeA / (fuNrOfFeePerGdpb);
583  UInt_t uSectorA = uGdpbA + fUnpackPar->GetGdpbToSectorOffset();
584  if (-1 != fiSectorIndex)
587  UInt_t uFeeIndexA = uFeeA;
588  if (fbEtofFeeIndexing) {
589  uFeeIndexA = 3 * (uFeeA / 5) + (uFeeA % 5);
590  } // if( fbEtofFeeIndexing )
591  // UInt_t uFeeIdA = uFeeA - ( fuNrOfFeePerGdpb * uGdpbA );
592  UInt_t uFeeIdA = uFeeIndexA - (3 * 6 * uGdpbA);
593 
595  for (UInt_t uFeeB = 0; uFeeB < fuNrOfFeePerGdpb * fuNrOfGdpbs; ++uFeeB) {
596 
597  if (uFeeA < uFeeB
598  && (!fbEtofFeeIndexing || ((uFeeA % 5) < 3 && (uFeeB % 5) < 3))) {
600  UInt_t uFeeIndexB = uFeeB;
602  if (fbEtofFeeIndexing) {
603  uFeeIndexB = 3 * (uFeeB / 5) + (uFeeB % 5);
604  } // if( fbEtofFeeIndexing )
605 
606  UInt_t uGdpbB = uFeeB / (fuNrOfFeePerGdpb);
607  UInt_t uSectorB = uGdpbB + fUnpackPar->GetGdpbToSectorOffset();
608  if (-1 != fiSectorIndex)
610  // UInt_t uFeeIdB = uFeeB - ( fuNrOfFeePerGdpb * uGdpbB );
611  UInt_t uFeeIdB = uFeeIndexB - (3 * 6 * uGdpbB);
612  fvvhFeePairPulserTimeDiff[uFeeA][uFeeB] =
613  new TH1I(Form("hFeePairPulserTimeDiff_s%02u_f%1u_s%02u_f%1u",
614  uSectorA,
615  uFeeIdA,
616  uSectorB,
617  uFeeIdB),
618  Form("Time difference for pulser on sector %02u FEE %1u and "
619  "sector %02u FEE %1u; DeltaT [ps]; Counts",
620  uSectorA,
621  uFeeIdA,
622  uSectorB,
623  uFeeIdB),
624  uNbBinsDt,
625  dMinDt,
626  dMaxDt);
627 
629  Form("TofDt/s%03u", uFeeIndexA));
630  } // if( uFeeA < uFeeB )
631  else
632  fvvhFeePairPulserTimeDiff[uFeeA][uFeeB] = NULL;
633  } // for( UInt_t uFeeB = 0; uFeeB < fuNrOfFeePerGdpb * fuNrOfGdpbs; ++uFeeB )
634  } // for( UInt_t uFeeA = 0; uFeeA < fuNrOfFeePerGdpb * fuNrOfGdpbs; ++uFeeA )
635 
637  UInt_t uTotalNbFee = fuNrOfFeePerGdpb * fuNrOfGdpbs;
638  // Double_t dSectorMin = -0.5;
639  // Double_t dSectorMax = fuNrOfGdpbs;
640  if (fbEtofFeeIndexing) {
641  uTotalNbFee = fuNrOfFeePerGdpb * fuNrOfGdpbs * 3 / 5;
642  // dSectorMin = -0.5 + fUnpackPar->GetGdpbToSectorOffset();
643  // dSectorMax = fuNrOfGdpbs + dSectorMin;
644  } // if( fbEtofFeeIndexing )
645  fhPulserTimeDiffMean = new TH2D(
646  "hPulserTimeDiffMean",
647  "Time difference Mean for each FEE pairs; FEE A; FEE B ; Mean [ps]",
648  uTotalNbFee - 1,
649  -0.5,
650  uTotalNbFee - 1.5,
651  uTotalNbFee - 1,
652  0.5,
653  uTotalNbFee - 0.5);
654 
656  new TH2D("hPulserTimeDiffRms",
657  "Time difference RMS for each FEE pairs; FEE A; FEE B ; RMS [ps]",
658  uTotalNbFee - 1,
659  -0.5,
660  uTotalNbFee - 1.5,
661  uTotalNbFee - 1,
662  0.5,
663  uTotalNbFee - 0.5);
664 
666  new TH2D("hPulserTimeDiffRmsZoom",
667  "Time difference RMS for each FEE pairs after zoom on peak; FEE "
668  "A; FEE B ; RMS [ps]",
669  uTotalNbFee - 1,
670  -0.5,
671  uTotalNbFee - 1.5,
672  uTotalNbFee - 1,
673  0.5,
674  uTotalNbFee - 0.5);
675 
676  if (fbEtofFeeIndexing) {
678  new TH2D("hPulserRmsGdpbToRefEvo",
679  "Evo. of Time difference RMS for selected FEE of each sector to "
680  "the 1st; Time in run [s] A; Sector ; RMS [ps]",
682  0,
685  0.5,
687 
688  fhPulserRmsGbtxToRefEvo = new TH2D(
689  "hPulserTimeDiffRmsZoom",
690  "Evo. of Time difference RMS for selected FEE pairs of each GBTx to the "
691  "1st in same sector; Time in run [s] A; FEE ; RMS [ps]",
693  0,
695  uTotalNbFee - 1,
696  0.5,
697  uTotalNbFee - 0.5);
698  } // if( fbEtofFeeIndexing )
699  else {
701  new TH2D("hPulserRmsGdpbToRefEvo",
702  "Evo. of Time difference RMS for selected FEE of each gDPb to "
703  "the 1st; Time in run [s] A; gDPB ; RMS [ps]",
705  0,
707  fuNrOfGdpbs - 1,
708  0.5,
709  fuNrOfGdpbs - 0.5);
710 
711  fhPulserRmsGbtxToRefEvo = new TH2D(
712  "hPulserTimeDiffRmsZoom",
713  "Evo. of Time difference RMS for selected FEE pairs of each GBTx to the "
714  "1st in same gDPB; Time in run [s] A; FEE ; RMS [ps]",
716  0,
718  uTotalNbFee - 1,
719  0.5,
720  uTotalNbFee - 0.5);
721  } // if( fbEtofFeeIndexing )
722 
727  /*******************************************************************/
728 
729  /*******************************************************************/
732  fcSummary = new TCanvas("cSummary", "Pulser Monitoring Summary");
733  fcSummary->Divide(3);
734 
735  fcSummary->cd(1);
736  gPad->SetGridx();
737  gPad->SetGridy();
738  fhPulserTimeDiffMean->Draw("colz");
739 
740  fcSummary->cd(2);
741  gPad->SetGridx();
742  gPad->SetGridy();
743  fhPulserTimeDiffRms->Draw("colz");
744 
745  fcSummary->cd(3);
746  gPad->SetGridx();
747  gPad->SetGridy();
748  fhPulserTimeDiffRmsZoom->Draw("colz");
749 
750  AddCanvasToVector(fcSummary, "canvases");
752  /*******************************************************************/
753 
754  return kTRUE;
755 }
760  && fuNbCoreMsPerTs - 1 == fuMsIndex) {
761  fhPulserTimeDiffMean->Reset();
762  fhPulserTimeDiffRms->Reset();
763  fhPulserTimeDiffRmsZoom->Reset();
764  } // if( 1 == fulCurrentTsIdx % fuUpdateFreqTs && fuNbCoreMsPerTs - 1 == fuMsIndex )
765 
766  for (UInt_t uFeeA = 0; uFeeA < fuNrOfFeePerGdpb * fuNrOfGdpbs; uFeeA++) {
767  UInt_t uGdpbA = uFeeA / (fuNrOfFeePerGdpb);
768  UInt_t uFeeIdA = uFeeA - (fuNrOfFeePerGdpb * uGdpbA);
769 
771  if (kFALSE == fvvbFeeHitFound[uGdpbA][uFeeIdA]) continue;
772 
773  for (UInt_t uFeeB = uFeeA + 1; uFeeB < fuNrOfFeePerGdpb * fuNrOfGdpbs;
774  uFeeB++) {
775  UInt_t uGdpbB = uFeeB / (fuNrOfFeePerGdpb);
776  UInt_t uFeeIdB = uFeeB - (fuNrOfFeePerGdpb * uGdpbB);
777 
779  if (kFALSE == fvvbFeeHitFound[uGdpbB][uFeeIdB]) continue;
780 
781  Double_t dTimeDiff =
782  1e3 * (fvvdFeeHits[uGdpbB][uFeeIdB] - fvvdFeeHits[uGdpbA][uFeeIdA]);
783  if (TMath::Abs(dTimeDiff) < kdMaxDtPulserPs) {
784  fvvhFeePairPulserTimeDiff[uFeeA][uFeeB]->Fill(dTimeDiff);
785  } // f( TMath::Abs( dTimeDiff ) < kdMaxDtPulserPs )
786 
789  && fuNbCoreMsPerTs - 1 == fuMsIndex) {
791  UInt_t uFeeIndexA = uFeeA;
792  UInt_t uFeeIndexB = uFeeB;
794  if (fbEtofFeeIndexing) {
795  uFeeIndexA = 3 * (uFeeA / 5) + (uFeeA % 5);
796  uFeeIndexB = 3 * (uFeeB / 5) + (uFeeB % 5);
797  } // if( fbEtofFeeIndexing )
798  fhPulserTimeDiffMean->Fill(
799  uFeeIndexA,
800  uFeeIndexB,
801  fvvhFeePairPulserTimeDiff[uFeeA][uFeeB]->GetMean());
802  fhPulserTimeDiffRms->Fill(
803  uFeeIndexA,
804  uFeeIndexB,
805  fvvhFeePairPulserTimeDiff[uFeeA][uFeeB]->GetRMS());
806 
808  Int_t iBinWithMax =
809  fvvhFeePairPulserTimeDiff[uFeeA][uFeeB]->GetMaximumBin();
810  Double_t dNbCounts =
811  fvvhFeePairPulserTimeDiff[uFeeA][uFeeB]->Integral();
812 
814  Double_t dPeakPos =
815  fvvhFeePairPulserTimeDiff[uFeeA][uFeeB]->GetXaxis()->GetBinCenter(
816  iBinWithMax);
817  fvvhFeePairPulserTimeDiff[uFeeA][uFeeB]->GetXaxis()->SetRangeUser(
818  dPeakPos - kdFitZoomWidthPs, dPeakPos + kdFitZoomWidthPs);
819 
821  Double_t dZoomCounts =
822  fvvhFeePairPulserTimeDiff[uFeeA][uFeeB]->Integral();
823 
825  if ((dZoomCounts / dNbCounts) < 0.8) {
826  fhPulserTimeDiffRmsZoom->Fill(uFeeIndexA, uFeeIndexB, 0.0);
827  // LOG(warning) << "CbmStar2019MonitorPulserAlgo::FillHistograms => Zoom too strong, "
828  // << "more than 20% loss for FEE pair " << uFeeA << " and " << uFeeB << " !!! ";
829  } // if( ( dZoomCounts / dNbCounts ) < 0.8 )
830  else
832  uFeeIndexA,
833  uFeeIndexB,
834  fvvhFeePairPulserTimeDiff[uFeeA][uFeeB]->GetRMS());
835 
837  fvvhFeePairPulserTimeDiff[uFeeA][uFeeB]->GetXaxis()->UnZoom();
838  /*
839  LOG(info) << "Stats FEE A " << std::setw(3) << uFeeA
840  << " FEE B " << std::setw(3) << uFeeB
841  << Form( " %5.0f %f", fvvhFeePairPulserTimeDiff[ uFeeA ][ uFeeB ]->GetMean(),
842  fvvhFeePairPulserTimeDiff[ uFeeA ][ uFeeB ]->GetRMS() );
843 */
844  } // if( 1 == fulCurrentTsIdx % fuUpdateFreqTs && fuNbCoreMsPerTs - 1 == fuMsIndex )
845  } // for( UInt_t uFeeB = uFeeA + 1; uFeeB < fuNrOfFeePerGdpb * fuNrOfGdpbs; uFeeB++)
846 
848  fvvbFeeHitFound[uGdpbA][uFeeIdA] = kFALSE;
849  } // for( UInt_t uFeeA = 0; uFeeA < fuNrOfFeePerGdpb * fuNrOfGdpbs; uFeeA++)
850 
851  return kTRUE;
852 }
854  fhPulserTimeDiffMean->Reset();
855  fhPulserTimeDiffRms->Reset();
856  fhPulserTimeDiffRmsZoom->Reset();
857 
858  for (UInt_t uFeeA = 0; uFeeA < fuNrOfFeePerGdpb * fuNrOfGdpbs; uFeeA++) {
859  UInt_t uGdpbA = uFeeA / (fuNrOfFeePerGdpb);
860  UInt_t uFeeIdA = uFeeA - (fuNrOfFeePerGdpb * uGdpbA);
861 
862  for (UInt_t uFeeB = uFeeA + 1; uFeeB < fuNrOfFeePerGdpb * fuNrOfGdpbs;
863  uFeeB++) {
864  // UInt_t uGdpbB = uFeeB / ( fuNrOfFeePerGdpb );
865  // UInt_t uFeeIdB = uFeeB - ( fuNrOfFeePerGdpb * uGdpbB );
866 
867  if (nullptr == fvvhFeePairPulserTimeDiff[uFeeA][uFeeB]) continue;
868 
870  UInt_t uFeeIndexA = uFeeA;
871  UInt_t uFeeIndexB = uFeeB;
873  if (fbEtofFeeIndexing) {
874  uFeeIndexA = 3 * (uFeeA / 5) + (uFeeA % 5);
875  uFeeIndexB = 3 * (uFeeB / 5) + (uFeeB % 5);
876  } // if( fbEtofFeeIndexing )
877  fhPulserTimeDiffMean->Fill(
878  uFeeIndexA,
879  uFeeIndexB,
880  fvvhFeePairPulserTimeDiff[uFeeA][uFeeB]->GetMean());
881  fhPulserTimeDiffRms->Fill(
882  uFeeIndexA,
883  uFeeIndexB,
884  fvvhFeePairPulserTimeDiff[uFeeA][uFeeB]->GetRMS());
885 
887  Int_t iBinWithMax =
888  fvvhFeePairPulserTimeDiff[uFeeA][uFeeB]->GetMaximumBin();
889  Double_t dNbCounts = fvvhFeePairPulserTimeDiff[uFeeA][uFeeB]->Integral();
890 
892  Double_t dPeakPos =
893  fvvhFeePairPulserTimeDiff[uFeeA][uFeeB]->GetXaxis()->GetBinCenter(
894  iBinWithMax);
895  fvvhFeePairPulserTimeDiff[uFeeA][uFeeB]->GetXaxis()->SetRangeUser(
896  dPeakPos - kdFitZoomWidthPs, dPeakPos + kdFitZoomWidthPs);
897 
899  Double_t dZoomCounts =
900  fvvhFeePairPulserTimeDiff[uFeeA][uFeeB]->Integral();
901 
903  if ((dZoomCounts / dNbCounts) < 0.8) {
904  fhPulserTimeDiffRmsZoom->Fill(uFeeIndexA, uFeeIndexB, 0.0);
905  LOG(warning)
906  << "CbmStar2019MonitorPulserAlgo::FillHistograms => Zoom too strong, "
907  << "more than 20% loss for FEE pair " << uFeeA << " and " << uFeeB
908  << " !!! ";
909  continue;
910  } // if( ( dZoomCounts / dNbCounts ) < 0.8 )
911  else
913  uFeeIndexA,
914  uFeeIndexB,
915  fvvhFeePairPulserTimeDiff[uFeeA][uFeeB]->GetRMS());
916 
917 
919  fvvhFeePairPulserTimeDiff[uFeeA][uFeeB]->GetXaxis()->UnZoom();
920 
921  LOG(info) << "Stats FEE A " << std::setw(3) << uFeeIndexA << " FEE B "
922  << std::setw(3) << uFeeIndexB
923  << Form(" %5.0f %f",
924  fvvhFeePairPulserTimeDiff[uFeeA][uFeeB]->GetMean(),
925  fvvhFeePairPulserTimeDiff[uFeeA][uFeeB]->GetRMS());
926 
927  } // for( UInt_t uFeeB = uFeeA + 1; uFeeB < fuNrOfFeePerGdpb * fuNrOfGdpbs; uFeeB++)
928 
930  fvvbFeeHitFound[uGdpbA][uFeeIdA] = kFALSE;
931  } // for( UInt_t uFeeA = 0; uFeeA < fuNrOfFeePerGdpb * fuNrOfGdpbs; uFeeA++)
932 
933  return kTRUE;
934 }
936  for (UInt_t uFeeA = 0; uFeeA < fuNrOfFeePerGdpb * fuNrOfGdpbs; uFeeA++) {
937  for (UInt_t uFeeB = uFeeA + 1; uFeeB < fuNrOfFeePerGdpb * fuNrOfGdpbs;
938  uFeeB++) {
939  fvvhFeePairPulserTimeDiff[uFeeA][uFeeB]->Reset();
940  } // for( UInt_t uFeeB = uFeeA + 1; uFeeB < fuNrOfFeePerGdpb * fuNrOfGdpbs; uFeeB++)
941  } // for( UInt_t uFeeA = 0; uFeeA < fuNrOfFeePerGdpb * fuNrOfGdpbs; uFeeA++)
942  fhPulserTimeDiffMean->Reset();
943  fhPulserTimeDiffRms->Reset();
944  fhPulserTimeDiffRmsZoom->Reset();
945 
946  fdStartTime = -1.0;
947 
948  return kTRUE;
949 }
950 // -------------------------------------------------------------------------
gdpbv100::MSG_STAR_TRI_A
@ MSG_STAR_TRI_A
Definition: gDpbMessv100.h:63
gdpbv100::Message
Definition: gDpbMessv100.h:133
CbmStar2019MonitorPulserAlgo::fUnpackPar
CbmStar2019TofPar * fUnpackPar
Settings from parameter file.
Definition: CbmStar2019MonitorPulserAlgo.h:81
CbmStar2019MonitorPulserAlgo::Init
virtual Bool_t Init()
Definition: CbmStar2019MonitorPulserAlgo.cxx:88
CbmStar2019MonitorPulserAlgo::fhPulserRmsGdpbToRefEvo
TH2 * fhPulserRmsGdpbToRefEvo
Definition: CbmStar2019MonitorPulserAlgo.h:155
CbmStar2019MonitorPulserAlgo::fiSectorIndex
Int_t fiSectorIndex
Definition: CbmStar2019MonitorPulserAlgo.h:77
CbmStar2019MonitorPulserAlgo::fGdpbIdIndexMap
std::map< UInt_t, UInt_t > fGdpbIdIndexMap
Total number of GDPBs in the system.
Definition: CbmStar2019MonitorPulserAlgo.h:84
CbmStar2019MonitorPulserAlgo::fvulCurrentEpoch
std::vector< ULong64_t > fvulCurrentEpoch
Data format control: Current time references for each GDPB: merged epoch marker, epoch cycle,...
Definition: CbmStar2019MonitorPulserAlgo.h:125
CbmStar2019MonitorPulserAlgo::AddMsComponentToList
void AddMsComponentToList(size_t component, UShort_t usDetectorId)
Definition: CbmStar2019MonitorPulserAlgo.cxx:196
gdpbv100::Message::getGdpbEpEpochNb
uint32_t getGdpbEpEpochNb() const
Definition: gDpbMessv100.h:231
CbmStar2019MonitorPulserAlgo::fvvdFeeHits
std::vector< std::vector< Double_t > > fvvdFeeHits
[ Sector ][ FEE ]
Definition: CbmStar2019MonitorPulserAlgo.h:135
CbmStar2019Algo< CbmTofDigi >::fdMsSizeInNs
Double_t fdMsSizeInNs
/‍** Ignore Overlap Ms: all fuOverlapMsNb MS at the end of timeslice **‍/
Definition: CbmStar2019Algo.h:117
CbmStar2019MonitorPulserAlgo::fuCurrDpbId
UInt_t fuCurrDpbId
Current equipment ID, tells from which DPB the current MS is originating.
Definition: CbmStar2019MonitorPulserAlgo.h:117
CbmStar2019MonitorPulserAlgo::fuCurrentEquipmentId
UInt_t fuCurrentEquipmentId
Definition: CbmStar2019MonitorPulserAlgo.h:115
gdpbv100::FullMessage::GetFullTimeNs
double GetFullTimeNs() const
Definition: gDpbMessv100.h:395
CbmStar2019MonitorPulserAlgo::fdTsStopTimeCore
Double_t fdTsStopTimeCore
Time in ns of current TS from the index of the first MS first component.
Definition: CbmStar2019MonitorPulserAlgo.h:109
CbmStar2019MonitorPulserAlgo::fvbMaskedComponents
std::vector< Bool_t > fvbMaskedComponents
Definition: CbmStar2019MonitorPulserAlgo.h:76
CbmStar2019TofPar::GetNrOfChannelsPerGet4
static constexpr UInt_t GetNrOfChannelsPerGet4()
Definition: CbmStar2019TofPar.h:45
CbmStar2019MonitorPulserAlgo::fuNrOfChannelsPerFee
UInt_t fuNrOfChannelsPerFee
Number of channels in each GET4.
Definition: CbmStar2019MonitorPulserAlgo.h:88
CbmStar2019Algo< CbmTofDigi >::fuNbMsLoop
size_t fuNbMsLoop
Definition: CbmStar2019Algo.h:114
CbmStar2019MonitorPulserAlgo::fuGet4Id
UInt_t fuGet4Id
Index of the DPB from which the MS currently unpacked is coming.
Definition: CbmStar2019MonitorPulserAlgo.h:121
CbmStar2019MonitorPulserAlgo::fuPulserMinTot
UInt_t fuPulserMinTot
Number of channels per GDPB.
Definition: CbmStar2019MonitorPulserAlgo.h:94
gdpbv100::MSG_HIT
@ MSG_HIT
Definition: gDpbMessv100.h:59
i
int i
Definition: L1/vectors/P4_F32vec4.h:25
gdpbv100::MSG_SLOWC
@ MSG_SLOWC
Definition: gDpbMessv100.h:61
CbmStar2019MonitorPulserAlgo::~CbmStar2019MonitorPulserAlgo
~CbmStar2019MonitorPulserAlgo()
Definition: CbmStar2019MonitorPulserAlgo.cxx:82
CbmStar2019Algo< CbmTofDigi >::fuNbOverMsPerTs
size_t fuNbOverMsPerTs
Definition: CbmStar2019Algo.h:113
CbmStar2019MonitorPulserAlgo::ProcessMs
Bool_t ProcessMs(const fles::Timeslice &ts, size_t uMsCompIdx, size_t uMsIdx)
Definition: CbmStar2019MonitorPulserAlgo.cxx:261
GetRMS
static Double_t GetRMS(const char *name)
Definition: GenNoiseElectrons.cxx:34
gdpbv100::MSG_STAR_TRI_D
@ MSG_STAR_TRI_D
Definition: gDpbMessv100.h:66
gdpbv100::Message::getMessageType
uint8_t getMessageType() const
Returns the message type. Valid for all message types. 4 bit.
Definition: gDpbMessv100.h:206
CbmStar2019Algo< CbmTofDigi >::AddHistoToVector
void AddHistoToVector(TNamed *pointer, std::string sFolder="")
For monitor algos.
Definition: CbmStar2019Algo.h:80
CbmStar2019Algo< CbmTofDigi >::fuNbCoreMsPerTs
size_t fuNbCoreMsPerTs
Definition: CbmStar2019Algo.h:112
CbmStar2019MonitorPulserAlgo::Reset
virtual void Reset()
Definition: CbmStar2019MonitorPulserAlgo.cxx:93
gdpbv100::kdEpochInNs
const double kdEpochInNs
Definition: gDpbMessv100.h:37
CbmStar2019MonitorPulserAlgo::fuNrOfGet4
UInt_t fuNrOfGet4
Number of channels in each FEE.
Definition: CbmStar2019MonitorPulserAlgo.h:89
gdpbv100::kuEpochCounterSz
const uint32_t kuEpochCounterSz
Definition: gDpbMessv100.h:40
CbmStar2019MonitorPulserAlgo::ProcessHit
void ProcessHit(gdpbv100::FullMessage mess)
Definition: CbmStar2019MonitorPulserAlgo.cxx:487
gdpbv100::Message::isStarTrigger
bool isStarTrigger() const
Returns true is message type is MSG_STAR_TRI_A, _B, _C, _D (STAR Trigger message)
Definition: gDpbMessv100.h:329
CbmStar2019MonitorPulserAlgo::GetParList
TList * GetParList()
Definition: CbmStar2019MonitorPulserAlgo.cxx:118
CbmStar2019MonitorPulserAlgo::fuNrOfGdpbs
UInt_t fuNrOfGdpbs
Definition: CbmStar2019MonitorPulserAlgo.h:83
CbmStar2019Algo< CbmTofDigi >::fdTsFullSizeInNs
Double_t fdTsFullSizeInNs
Total size of the core MS in a TS, [nanoseconds].
Definition: CbmStar2019Algo.h:121
CbmStar2019Algo< CbmTofDigi >::fParCList
TList * fParCList
Parameter management.
Definition: CbmStar2019Algo.h:108
gdpbv100::kdEpochInPs
const double kdEpochInPs
Definition: gDpbMessv100.h:35
CbmStar2019TofPar::GetGdpbId
Int_t GetGdpbId(Int_t i)
Definition: CbmStar2019TofPar.h:39
CbmStar2019MonitorPulserAlgo::ReInitContainers
Bool_t ReInitContainers()
Definition: CbmStar2019MonitorPulserAlgo.cxx:107
CbmStar2019MonitorPulserAlgo::fvmEpSupprBuffer
std::vector< gdpbv100::Message > fvmEpSupprBuffer
Epoch + Epoch Cycle.
Definition: CbmStar2019MonitorPulserAlgo.h:131
CbmStar2019Algo< CbmTofDigi >::fvMsComponentsList
std::vector< size_t > fvMsComponentsList
Parameters related to FLES containers.
Definition: CbmStar2019Algo.h:111
CbmStar2019MonitorPulserAlgo::fbEtofFeeIndexing
Bool_t fbEtofFeeIndexing
Control flags.
Definition: CbmStar2019MonitorPulserAlgo.h:75
CbmStar2019MonitorPulserAlgo::fuNrOfGet4PerGdpb
UInt_t fuNrOfGet4PerGdpb
Total number of Get4 chips in the system.
Definition: CbmStar2019MonitorPulserAlgo.h:90
CbmStar2019MonitorPulserAlgo::fuPulserChannel
UInt_t fuPulserChannel
Definition: CbmStar2019MonitorPulserAlgo.h:96
CbmStar2019MonitorPulserAlgo::fvulCurrentEpochCycle
std::vector< ULong64_t > fvulCurrentEpochCycle
Current epoch index, per DPB.
Definition: CbmStar2019MonitorPulserAlgo.h:127
CbmStar2019MonitorPulserAlgo::kuBytesPerMessage
static const UInt_t kuBytesPerMessage
Definition: CbmStar2019MonitorPulserAlgo.h:100
CbmStar2019MonitorPulserAlgo::CbmStar2019MonitorPulserAlgo
CbmStar2019MonitorPulserAlgo()
Definition: CbmStar2019MonitorPulserAlgo.cxx:34
CbmStar2019MonitorPulserAlgo::fulCurrentTsIdx
ULong64_t fulCurrentTsIdx
Definition: CbmStar2019MonitorPulserAlgo.h:104
CbmStar2019MonitorPulserAlgo::kdMaxDtPulserPs
const Double_t kdMaxDtPulserPs
[ Sector ][ FEE ]
Definition: CbmStar2019MonitorPulserAlgo.h:139
CbmStar2019MonitorPulserAlgo::dMaxDt
Double_t dMaxDt
Definition: CbmStar2019MonitorPulserAlgo.h:142
gdpbv100::MSG_STAR_TRI_C
@ MSG_STAR_TRI_C
Definition: gDpbMessv100.h:65
CbmStar2019TofPar::ElinkIdxToGet4Idx
Int_t ElinkIdxToGet4Idx(UInt_t uElink)
Definition: CbmStar2019TofPar.cxx:169
CbmStar2019MonitorPulserAlgo::ResetHistograms
Bool_t ResetHistograms()
Definition: CbmStar2019MonitorPulserAlgo.cxx:935
CbmStar2019TofPar::Get4ChanToPadiChan
Int_t Get4ChanToPadiChan(UInt_t uChannelInFee)
Definition: CbmStar2019TofPar.cxx:146
CbmStar2019Algo
Definition: CbmStar2019Algo.h:43
CbmStar2019MonitorPulserAlgo::fvulCurrentEpochFull
std::vector< ULong64_t > fvulCurrentEpochFull
Epoch cycle from the Ms Start message and Epoch counter flip.
Definition: CbmStar2019MonitorPulserAlgo.h:128
CbmStar2019MonitorPulserAlgo::ProcessTs
Bool_t ProcessTs(const fles::Timeslice &ts)
Definition: CbmStar2019MonitorPulserAlgo.cxx:212
CbmStar2019MonitorPulserAlgo::fuHistoryHistoSize
UInt_t fuHistoryHistoSize
Time of first MS.
Definition: CbmStar2019MonitorPulserAlgo.h:146
CbmStar2019MonitorPulserAlgo::ProcessEpoch
void ProcessEpoch(gdpbv100::Message mess)
Definition: CbmStar2019MonitorPulserAlgo.cxx:412
CbmStar2019MonitorPulserAlgo::InitParameters
Bool_t InitParameters()
Definition: CbmStar2019MonitorPulserAlgo.cxx:125
CbmStar2019Algo< CbmTofDigi >::fdTsCoreSizeInNs
Double_t fdTsCoreSizeInNs
Size of a single MS, [nanoseconds].
Definition: CbmStar2019Algo.h:119
CbmStar2019MonitorPulserAlgo::fuNrOfChannelsPerGdpb
UInt_t fuNrOfChannelsPerGdpb
Number of GET4s per GDPB.
Definition: CbmStar2019MonitorPulserAlgo.h:91
gdpbv100::kuChipIdMergedEpoch
const uint32_t kuChipIdMergedEpoch
Definition: gDpbMessv100.h:51
CbmStar2019MonitorPulserAlgo::InitContainers
Bool_t InitContainers()
Definition: CbmStar2019MonitorPulserAlgo.cxx:101
CbmStar2019TofPar::GetNrOfGet4PerFee
static constexpr UInt_t GetNrOfGet4PerFee()
Definition: CbmStar2019TofPar.h:48
CbmStar2019MonitorPulserAlgo.h
CbmStar2019MonitorPulserAlgo::fuGet4Nr
UInt_t fuGet4Nr
running number (0 to fuNrOfGet4PerGdpb) of the Get4 chip of a unique GDPB for current message
Definition: CbmStar2019MonitorPulserAlgo.h:123
CbmStar2019MonitorPulserAlgo::fuMsIndex
UInt_t fuMsIndex
Start Time in ns of current MS from its index field in header.
Definition: CbmStar2019MonitorPulserAlgo.h:112
CbmStar2019TofPar.h
CbmStar2019MonitorPulserAlgo::fuNrOfChannelsPerGet4
UInt_t fuNrOfChannelsPerGet4
Number of GET4s per FEE.
Definition: CbmStar2019MonitorPulserAlgo.h:87
gdpbv100::MSG_SYST
@ MSG_SYST
Definition: gDpbMessv100.h:62
CbmStar2019MonitorPulserAlgo::fhPulserTimeDiffRmsZoom
TH2 * fhPulserTimeDiffRmsZoom
Definition: CbmStar2019MonitorPulserAlgo.h:154
CbmStar2019MonitorPulserAlgo::fhPulserRmsGbtxToRefEvo
TH2 * fhPulserRmsGbtxToRefEvo
Definition: CbmStar2019MonitorPulserAlgo.h:156
FormatMsHeaderPrintout
std::string FormatMsHeaderPrintout(const fles::MicrosliceDescriptor &msDescriptor)
Definition: CbmFormatMsHeaderPrintout.cxx:5
gdpbv100::kdBinSize
const double kdBinSize
Definition: gDpbMessv100.h:30
CbmStar2019MonitorPulserAlgo::fhPulserTimeDiffMean
TH2 * fhPulserTimeDiffMean
[ FEE A ][ FEE B ]
Definition: CbmStar2019MonitorPulserAlgo.h:152
CbmStar2019MonitorPulserAlgo::fuUpdateFreqTs
UInt_t fuUpdateFreqTs
Definition: CbmStar2019MonitorPulserAlgo.h:78
CbmStar2019TofPar
Definition: CbmStar2019TofPar.h:18
CbmStar2019MonitorPulserAlgo::dMinDt
Double_t dMinDt
Definition: CbmStar2019MonitorPulserAlgo.h:141
CbmStar2019MonitorPulserAlgo::fuCurrDpbIdx
UInt_t fuCurrDpbIdx
Temp holder until Current equipment ID is properly filled in MS.
Definition: CbmStar2019MonitorPulserAlgo.h:119
gdpbv100::MSG_EPOCH
@ MSG_EPOCH
Definition: gDpbMessv100.h:60
CbmStar2019MonitorPulserAlgo::UpdateStats
Bool_t UpdateStats()
Definition: CbmStar2019MonitorPulserAlgo.cxx:853
CbmStar2019TofPar::GetNrOfGdpbs
Int_t GetNrOfGdpbs()
Definition: CbmStar2019TofPar.h:38
gdpbv100::kulEpochCycleFieldSz
const uint64_t kulEpochCycleFieldSz
Definition: gDpbMessv100.h:49
gdpbv100::Message::getGdpbHitIs24b
uint16_t getGdpbHitIs24b() const
Definition: gDpbMessv100.h:218
gdpbv100::Message::getGdpbGenChipId
uint16_t getGdpbGenChipId() const
Definition: gDpbMessv100.h:214
CbmStar2019MonitorPulserAlgo::CreateHistograms
Bool_t CreateHistograms()
Definition: CbmStar2019MonitorPulserAlgo.cxx:525
gdpbv100::kuEpochInBins
const uint32_t kuEpochInBins
Definition: gDpbMessv100.h:32
gdpbv100::MSG_STAR_TRI_B
@ MSG_STAR_TRI_B
Definition: gDpbMessv100.h:64
CbmStar2019MonitorPulserAlgo::fcSummary
TCanvas * fcSummary
Canvases.
Definition: CbmStar2019MonitorPulserAlgo.h:159
CbmStar2019Algo< CbmTofDigi >::AddCanvasToVector
void AddCanvasToVector(TCanvas *pointer, std::string sFolder="")
Definition: CbmStar2019Algo.h:87
gdpbv100::FullMessage
Definition: gDpbMessv100.h:362
CbmStar2019MonitorPulserAlgo::fuPulserMaxTot
UInt_t fuPulserMaxTot
Definition: CbmStar2019MonitorPulserAlgo.h:95
CbmStar2019MonitorPulserAlgo::fvvbFeeHitFound
std::vector< std::vector< Bool_t > > fvvbFeeHitFound
Storing the time of the last hit for each MS in each of the FEE.
Definition: CbmStar2019MonitorPulserAlgo.h:134
CbmStar2019MonitorPulserAlgo::ProcessEpSupprBuffer
void ProcessEpSupprBuffer()
Definition: CbmStar2019MonitorPulserAlgo.cxx:429
CbmStar2019MonitorPulserAlgo::kdFitZoomWidthPs
const Double_t kdFitZoomWidthPs
Definition: CbmStar2019MonitorPulserAlgo.h:143
CbmStar2019TofPar::GetGdpbToSectorOffset
static constexpr UInt_t GetGdpbToSectorOffset()
Definition: CbmStar2019TofPar.h:72
gdpbv100::Message::getGdpbHitChanId
uint16_t getGdpbHitChanId() const
Definition: gDpbMessv100.h:219
CbmStar2019MonitorPulserAlgo::fuNrOfGet4PerFee
UInt_t fuNrOfGet4PerFee
Number of FEBs per GDPB.
Definition: CbmStar2019MonitorPulserAlgo.h:86
CbmStar2019TofPar::GetSizeMsInNs
Double_t GetSizeMsInNs()
Definition: CbmStar2019TofPar.h:93
CbmStar2019MonitorPulserAlgo::fvvhFeePairPulserTimeDiff
std::vector< std::vector< TH1 * > > fvvhFeePairPulserTimeDiff
Size in seconds of the evolution histograms.
Definition: CbmStar2019MonitorPulserAlgo.h:151
CbmStar2019MonitorPulserAlgo::fuNrOfFeePerGdpb
UInt_t fuNrOfFeePerGdpb
gDPB ID to index map
Definition: CbmStar2019MonitorPulserAlgo.h:85
CbmStar2019MonitorPulserAlgo::FillHistograms
Bool_t FillHistograms()
Definition: CbmStar2019MonitorPulserAlgo.cxx:756
CbmStar2019TofPar::GetNrOfFeePerGdpb
static constexpr UInt_t GetNrOfFeePerGdpb()
Definition: CbmStar2019TofPar.h:60
CbmStar2019MonitorPulserAlgo::ProcessEpochCycle
void ProcessEpochCycle(uint64_t ulCycleData)
Definition: CbmStar2019MonitorPulserAlgo.cxx:387
CbmStar2019MonitorPulserAlgo::fdTsStartTime
Double_t fdTsStartTime
Definition: CbmStar2019MonitorPulserAlgo.h:107
CbmStar2019Algo< CbmTofDigi >::fbIgnoreOverlapMs
Bool_t fbIgnoreOverlapMs
Definition: CbmStar2019Algo.h:116
CbmStar2019MonitorPulserAlgo::fulCurrentMsIdx
ULong64_t fulCurrentMsIdx
Definition: CbmStar2019MonitorPulserAlgo.h:105
gdpbv100::Message::getGdpbHit32Tot
uint16_t getGdpbHit32Tot() const
Definition: gDpbMessv100.h:227
CbmStar2019MonitorPulserAlgo::fhPulserTimeDiffRms
TH2 * fhPulserTimeDiffRms
Definition: CbmStar2019MonitorPulserAlgo.h:153
CbmFormatMsHeaderPrintout.h
CbmStar2019MonitorPulserAlgo::kuNbBinsDt
const UInt_t kuNbBinsDt
Definition: CbmStar2019MonitorPulserAlgo.h:140
CbmStar2019MonitorPulserAlgo::fdStartTime
Double_t fdStartTime
Starting time and time evolution book-keeping.
Definition: CbmStar2019MonitorPulserAlgo.h:145
CbmStar2019MonitorPulserAlgo::fdMsTime
Double_t fdMsTime
End Time in ns of current TS Core from the index of the first MS first component.
Definition: CbmStar2019MonitorPulserAlgo.h:111
CbmStar2019MonitorPulserAlgo::Finish
virtual void Finish()
Definition: CbmStar2019MonitorPulserAlgo.cxx:94