18#include "FairRootManager.h"
20#include "FairRunOnline.h"
21#include "FairRuntimeDb.h"
153 LOG(info) <<
"Initializing mCBM HODO 2019 monitor algo";
168 LOG(info) <<
"Init parameter containers for CbmCosy2019MonitorAlgoHodo";
175 LOG(info) <<
"**********************************************";
176 LOG(info) <<
"ReInit parameter containers for CbmCosy2019MonitorAlgoHodo";
279 fviFebAddress.push_back( fviModAddress[ fviFebModuleIdx[ uDpb ][ uCrobIdx ][ uFebIdx ] ]
280 + ( fviFebModuleSide[ uDpb ][ uCrobIdx ][ uFebIdx ] << 25 ) );
283 } // case 0: // FEB-8-1 with ZIF connector on the right
284 case 1: // FEB-8-1 with ZIF connector on the left
286 // P side (0) has type B (1)
287 // N side (1) has type A (0)
288 fviFebType[ uDpb ][ uCrobIdx ][ uFebIdx ] = !(fviFebModuleSide[ uDpb ][ uCrobIdx ][ uFebIdx ]);
294 fviFebAddress.push_back( fviModAddress[ fviFebModuleIdx[ uDpb ][ uCrobIdx ][ uFebIdx ] ]
295 + ( (!fviFebModuleSide[ uDpb ][ uCrobIdx ][ uFebIdx ]) << 25 ) );
297 } // case 1: // FEB-8-1 with ZIF connector on the left
299 LOG(fatal) << Form( "Bad module type for DPB #%02u CROB #%u FEB %02u: %d",
300 uDpb, uCrobIdx, uFebIdx,
301 fviModuleType[ fviFebModuleIdx[ uDpb ][ uCrobIdx ][ uFebIdx ] ] );
303 } // switch( fviModuleType[ fviFebModuleIdx[ uDpb ][ uCrobIdx ][ uFebIdx ] ] )
304 } // FEB active and module index OK
305 else if( -1 == fviFebModuleIdx[ uDpb ][ uCrobIdx ][ uFebIdx ] ||
306 -1 == fviFebModuleSide[ uDpb ][ uCrobIdx ][ uFebIdx ] )
308 fviFebAddress.push_back( 0 );
309 } // Module index or type is set to inactive
312 LOG(fatal) << Form( "Bad module Index and/or Side for DPB #%02u CROB #%u FEB %02u: %d %d",
313 uDpb, uCrobIdx, uFebIdx,
314 fviFebModuleIdx[ uDpb ][ uCrobIdx ][ uFebIdx ],
315 fviFebModuleSide[ uDpb ][ uCrobIdx ][ uFebIdx ] );
316 } // Bad module index or type for this FEB
317 } // for( UInt_t uFebIdx = 0; uFebIdx < fUnpackPar->GetNbFebsPerCrob(); ++ uFebIdx )
318 } // for( UInt_t uCrobIdx = 0; uCrobIdx < fUnpackPar->GetNbCrobsPerDpb(); ++uCrobIdx )
319 } // for( UInt_t uDpb = 0; uDpb < fuNrOfDpbs; ++uDpb )
321 for( UInt_t uDpb = 0; uDpb < fuNrOfDpbs; ++uDpb )
323 TString sPrintoutLine = Form( "DPB #%02u CROB Active ?: ", uDpb);
324 for( UInt_t uCrobIdx = 0; uCrobIdx < fUnpackPar->GetNbCrobsPerDpb(); ++uCrobIdx )
326 sPrintoutLine += Form( "%1u", ( fvbCrobActiveFlag[ uDpb ][ uCrobIdx ] == kTRUE ) );
327 } // for( UInt_t uCrobIdx = 0; uCrobIdx < fUnpackPar->GetNbCrobsPerDpb(); ++uCrobIdx )
328 LOG(info) << sPrintoutLine;
329 } // for( UInt_t uDpb = 0; uDpb < fuNrOfDpbs; ++uDpb )
331 UInt_t uGlobalFebIdx = 0;
332 for( UInt_t uDpb = 0; uDpb < fuNrOfDpbs; ++uDpb )
334 for( UInt_t uCrobIdx = 0; uCrobIdx < fUnpackPar->GetNbCrobsPerDpb(); ++uCrobIdx )
336 LOG(info) << Form( "DPB #%02u CROB #%u: ", uDpb, uCrobIdx);
337 for( UInt_t uFebIdx = 0; uFebIdx < fUnpackPar->GetNbFebsPerCrob(); ++ uFebIdx )
339 if( 0 <= fviFebModuleIdx[ uDpb ][ uCrobIdx ][ uFebIdx ] )
340 LOG(info) << Form( " FEB #%02u (%02u): Mod. Idx = %03d Side %c (%2d) Type %c (%2d) (Addr. 0x%08x) ADC gain %4.0f e- ADC Offs %5.0f e-",
341 uFebIdx, uGlobalFebIdx,
342 fviFebModuleIdx[ uDpb ][ uCrobIdx ][ uFebIdx ],
343 1 == fviFebModuleSide[ uDpb ][ uCrobIdx ][ uFebIdx ] ? 'N': 'P',
344 fviFebModuleSide[ uDpb ][ uCrobIdx ][ uFebIdx ],
345 1 == fviFebType[ uDpb ][ uCrobIdx ][ uFebIdx ] ? 'B' : 'A',
346 fviFebType[ uDpb ][ uCrobIdx ][ uFebIdx ],
347 fviFebAddress[ uGlobalFebIdx ],
348 fvdFebAdcGain[ uDpb ][ uCrobIdx ][ uFebIdx ],
349 fvdFebAdcOffs[ uDpb ][ uCrobIdx ][ uFebIdx ]
352 } // for( UInt_t uFebIdx = 0; uFebIdx < fUnpackPar->GetNbFebsPerCrob(); ++ uFebIdx )
353 } // for( UInt_t uCrobIdx = 0; uCrobIdx < fUnpackPar->GetNbCrobsPerDpb(); ++uCrobIdx )
354 } // for( UInt_t uDpb = 0; uDpb < fuNrOfDpbs; ++uDpb )
356 // Internal status initialization
357 fvulCurrentTsMsb.resize( fuNrOfDpbs );
358 fvuCurrentTsMsbCycle.resize( fuNrOfDpbs );
359 for( UInt_t uDpb = 0; uDpb < fuNrOfDpbs; ++uDpb )
361 fvulCurrentTsMsb[uDpb] = 0;
362 fvuCurrentTsMsbCycle[uDpb] = 0;
363 } // for( UInt_t uDpb = 0; uDpb < fuNrOfDpbs; ++uDpb )
391 LOG(info) <<
"CbmCosy2019MonitorAlgoHodo::AddMsComponentToList => Component " << component <<
" with detector ID 0x"
392 << std::hex << usDetectorId << std::dec <<
" added to list";
399 fdTsStartTime =
static_cast<Double_t
>(ts.descriptor(0, 0).idx);
411 <<
" Overlap MS, for a core duration of " <<
fdTsCoreSizeInNs <<
" ns and a full duration of "
417 LOG(info) <<
"In each TS " <<
fuNbMsLoop <<
" MS will be looped over";
440 for( auto itHitIn = fvmHitsInMs.begin(); itHitIn < fvmHitsInMs.end(); ++itHitIn )
442 UInt_t uFebIdx = itHitIn->GetAsic() / fUnpackPar->GetNbAsicsPerFeb();
443 UInt_t uChanInFeb = itHitIn->GetChan()
444 + fUnpackPar->GetNbChanPerAsic() * (itHitIn->GetAsic() % fUnpackPar->GetNbAsicsPerFeb());
446 ULong64_t ulTimeInNs = static_cast< ULong64_t >( itHitIn->GetTs() * stsxyter::kdClockCycleNs - fdTimeOffsetNs );
448 fDigiVect.push_back( CbmHodoDigi( fviFebAddress[ uFebIdx ], uChanInFeb, ulTimeInNs, itHitIn->GetAdc() ) );
449 } // for( auto itHitIn = fvmHitsInMs.begin(); itHitIn < fvmHitsInMs.end(); ++itHitIn )
470 auto msDescriptor = ts.descriptor(uMsCompIdx, uMsIdx);
472 const uint8_t* msContent =
reinterpret_cast<const uint8_t*
>(ts.content(uMsCompIdx, uMsIdx));
474 uint32_t uSize = msDescriptor.size;
479 <<
" has size: " << uSize;
488 LOG(info) <<
"---------------------------------------------------------------";
499 LOG(warning) <<
"Could not find the sDPB index for AFCK id 0x" << std::hex <<
fuCurrDpbId << std::dec
500 <<
" in timeslice " <<
fulCurrentTsIdx <<
" in microslice " << uMsIdx <<
" component " << uMsCompIdx
502 <<
"If valid this index has to be added in the STS "
503 "parameter file in the DbpIdArray field";
519 for (UInt_t uHodoIdx = 0; uHodoIdx <
kuNbHodos; ++uHodoIdx) {
543 uint16_t uMsHeaderFlags = msDescriptor.flags;
544 for (UInt_t uBit = 0; uBit < 16; ++uBit)
555 LOG(warning) <<
"TS MSB cycle from MS header does not match current cycle from data "
558 << uTsMsbCycleHeader;
564 LOG(error) <<
"The input microslice buffer does NOT "
565 <<
"contain only complete nDPB messages!";
571 const uint32_t* pInBuff =
reinterpret_cast<const uint32_t*
>(msContent);
572 for (uint32_t uIdx = 0; uIdx < uNbMessages; uIdx++) {
574 uint32_t ulData =
static_cast<uint32_t
>(pInBuff[uIdx]);
592 for (uHodoIdx = 0; uHodoIdx <
kuNbHodos; ++uHodoIdx)
599 LOG(warning) <<
"CbmCosy2019MonitorAlgoHodo::DoUnpack => "
600 <<
"Wrong elink Idx! Elink raw " << Form(
"%2d", usElinkIdx);
620 LOG(info) <<
"CbmCosy2019MonitorAlgoHodo::DoUnpack => "
621 <<
"EPOCH message at unexpected position in MS: message " << uIdx <<
" VS message 0 expected!";
640 LOG(fatal) <<
"CbmCosy2019MonitorAlgoHodo::DoUnpack => "
641 <<
"Unknown message type, should never happen, stopping "
642 "here! Type found was: "
643 <<
static_cast<int>(typeMess);
684 Long64_t ulHitTime = usRawTs;
701 Double_t dTimeSinceStartSec = (dHitTimeNs -
fdStartTime) * 1e-9;
721 << std::setw(4) << uMsIdx <<
" Msg Idx " << std::setw(5) << uMessIdx <<
" Old TsMsb " << std::setw(5)
723 << std::setw(5) << uVal;
730 LOG(info) <<
"TS MSb Jump in "
732 << std::setw(4) << uMsIdx <<
" Msg Idx " << std::setw(5) << uMessIdx <<
" => Old TsMsb " << std::setw(5)
768 if( fbPrintMessages )
770 std::cout << Form("TS %12u MS %12u mess %5u ", fulCurrentTsIdx, fulCurrentMsIdx, uIdx );
771 mess.PrintMess( std::cout, fPrintMessCtrl );
772 } // if( fbPrintMessages )
782 fhHodoMessType =
new TH1I(
"hHodoMessType",
"Nb of message for each type; Type", 6, 0., 6.);
791 new TH2I(
"hHodoStatusMessType",
"Nb of status message of each type for each DPB; ASIC; Status Type",
kuNbHodos, 0,
801 new TH2I(
"hHodoMsStatusFieldType",
"For each flag in the MS header, ON/OFF counts; Flag bit []; ON/OFF; MS []", 16,
802 -0.5, 15.5, 2, -0.5, 1.5);
810 fhHodoMessTypePerElink =
new TH2I(
"hHodoMessTypePerElink",
"Nb of message of each type for each eLink; eLink; Type",
824 for (UInt_t uHodoIdx = 0; uHodoIdx <
kuNbHodos; ++uHodoIdx) {
828 Form(
"Hits Count per channel, Hodo #%u; Channel; Hits []", uHodoIdx),
833 Form(
"Raw Adc distribution per channel, Hodo #%u; Channel []; "
841 new TProfile(Form(
"hHodoChanAdcRawProf_%u", uHodoIdx),
842 Form(
"Raw Adc prodile per channel, Hodo #%u; Channel []; Adc []", uHodoIdx),
kuNbChanPerAsic, -0.5,
846 fhHodoChanAdcCal[ uHodoIdx ] = new TH2I( Form( "hHodoChanAdcCal_%u", uHodoIdx ),
847 Form( "Cal. Adc distribution per channel, Hodo #%u; Channel []; Adc [e-]; Hits []", uHodoIdx ),
848 kuNbChanPerAsic, -0.5, kuNbChanPerAsic - 0.5,
852 fhHodoChanAdcCalProf[ uHodoIdx ] = new TProfile( Form( "hHodoChanAdcCalProf_%u", uHodoIdx ),
853 Form( "Cal. Adc prodile per channel, Hodo #%u; Channel []; Adc [e-]", uHodoIdx ),
854 kuNbChanPerAsic, -0.5, kuNbChanPerAsic - 0.5 );
857 fhHodoChanRawTs[uHodoIdx] =
new TH2I(Form(
"hHodoChanRawTs_%u", uHodoIdx),
858 Form(
"Raw Timestamp distribution per channel, FEB #%03u; "
859 "Channel []; Ts []; Hits []",
866 Form(
"Missed Event flags per channel, Hodo #%u; Channel []; "
867 "Miss Evt []; Hits []",
873 Form(
"Missed Evt flags per second & channel in Hodo #%u; Time "
874 "[s]; Channel []; Missed Evt flags []",
880 new TH2I(Form(
"hHodoChanHitRateEvo_%u", uHodoIdx),
881 Form(
"Hits per second & channel in Hodo #%u; Time [s]; Channel []; Hits []", uHodoIdx), 1800, 0, 1800,
886 new TProfile(Form(
"hHodoChanHitRateProf_%u", uHodoIdx),
887 Form(
"Hits per second for each channel in Hodo #%u; Channel []; Hits/s []", uHodoIdx),
891 fhHodoChanDistT[uHodoIdx] =
new TH2I(Form(
"hHodoChanDistT_%u", uHodoIdx),
892 Form(
"Time distance between hits on same channel in Hodo #%u; "
893 "Time difference [ns]; Channel []; ",
898 for (UInt_t uAxis = 0; uAxis <
kuNbAxis; ++uAxis) {
899 Char_t cAxisName = (uAxis ?
'Y' :
'X');
902 new TH1I(Form(
"hHodoFiberCnt%c_%u", cAxisName, uHodoIdx),
903 Form(
"Hits Count per Fiber, Hodo #%u Axis %c; Fiber; Hits []", uHodoIdx, cAxisName),
907 fhHodoFiberAdc[uHodoIdx][uAxis] =
new TH2I(Form(
"fhHodoFiberAdc%c_%u", cAxisName, uHodoIdx),
908 Form(
"Raw Adc distribution per Fiber, Hodo #%u Axis %c; "
909 "Channel []; Adc []; Hits []",
910 uHodoIdx, cAxisName),
916 new TProfile(Form(
"hHodoFiberAdcProf%c_%u", cAxisName, uHodoIdx),
917 Form(
"Raw Adc prodile per Fiber, Hodo #%u Axis %c; Channel []; Adc []", uHodoIdx, cAxisName),
922 new TH2I(Form(
"hHodoFiberHitRateEvo%c_%u", cAxisName, uHodoIdx),
923 Form(
"Hits per second & Fiber in Hodo #%u Axis %c; Time [s]; "
924 "Channel []; Hits []",
925 uHodoIdx, cAxisName),
940 Form(
"Map of coincident (X, Y) pairs in Hodo #%u; X [Fiber]; Y "
947 Form(
"Time difference of coincident (X, Y) pairs in Hodo #%u; "
948 "t_Y - t_X [ns]; Hits []",
953 Form(
"Walk X of coincident (X, Y) pairs in Hodo #%u; ADC X "
954 "[bin]; t_Y - t_X [ns]; Hits []",
959 Form(
"Walk X of coincident (X, Y) pairs in Hodo #%u; ADC X "
960 "[bin]; t_Y - t_X [ns]; Hits []",
982 for (UInt_t uAxis = 0; uAxis <
kuNbAxis; ++uAxis) {
983 Char_t cAxisName = (uAxis ?
'Y' :
'X');
984 Char_t cOtherAxisName = (uAxis ?
'X' :
'Y');
988 Form(
"Map of coincident (%c, %c) pairs in Hodo A and B; %c_A "
989 "[Fiber]; %c_B [Fiber]; Hits []",
990 cAxisName, cAxisName, cAxisName, cAxisName),
995 Form(
"Time difference of coincident (%c, %c) pairs in Hodo A "
996 "and B; t_%c_B - t_%c_A [ns]; Hits []",
997 cAxisName, cAxisName, cAxisName, cAxisName),
1002 Form(
"Map of coincident (%c, %c) pairs in Hodo A and B; %c_A "
1003 "[Fiber]; %c_B [Fiber]; Hits []",
1004 cAxisName, cOtherAxisName, cOtherAxisName, cAxisName),
1009 Form(
"Time difference of coincident (%c, %c) pairs in Hodo A and B; "
1010 "t_%c_B - t_%c_A [ns]; Hits []",
1011 cAxisName, cOtherAxisName, cOtherAxisName, cAxisName),
1023 "Position on Hodo A for coincident pairs in Hodo A and B; X_A "
1024 "[Fiber]; Y_A [Fiber]; Hits []",
1029 "Position on Hodo B for coincident pairs in Hodo A and B; X_B "
1030 "[Fiber]; Y_B [Fiber]; Hits []",
1035 "Comparison of X pos for coincident pairs in Hodo A and B; X_A "
1036 "[Fiber]; X_B [Fiber]; Hits []",
1041 "Comparison of Y pos for coincident pairs in Hodo A and B; Y_A "
1042 "[Fiber]; Y_B [Fiber]; Hits []",
1048 new TH2I(
"hHodoFullCoincResidualXY",
1049 "X and Y residuals for coincident pairs in Hodo A and B; X_B - "
1050 "X_A [Fiber]; Y_B - Y_A [Fiber]; Hits []",
1055 "Time difference of coincident pairs in Hodo A and B; (t_X_B + "
1056 "t_Y_B)/2 - (t_X_A + t_Y_A)/2 [ns]; Hits []",
1060 "Evolution of the full coincidence rate; "
1061 "Time in run [s]; Full coincidences;",
1062 1800, -0.5, 1800 - 0.5);
1072 for (UInt_t uHodoIdx = 0; uHodoIdx <
kuNbHodos; ++uHodoIdx) {
1073 for (UInt_t uAxis = 0; uAxis <
kuNbAxis; ++uAxis) {
1074 Char_t cAxisName = (uAxis ?
'Y' :
'X');
1076 new TH2I(Form(
"hHodoFullCoincTimeWalk_%u%c", uHodoIdx, cAxisName),
1077 Form(
"Time walk of coincident (A, B) pairs in Hodo #%u Axis "
1078 "%c; ADC %u_%c [bin]; Time Diff <B> - <A> [ns]; Hits []",
1079 uHodoIdx, cAxisName, uHodoIdx, cAxisName),
1085 new TH2I(Form(
"hHodoFullCoincPosEvo_%u%c", uHodoIdx, cAxisName),
1086 Form(
"Time evolution of coincident (A, B) pairs position in Hodo #%u "
1087 "Axis %c; Time in run [s]; Position %u_%c [Fiber]; Hits []",
1088 uHodoIdx, cAxisName, uHodoIdx, cAxisName),
1096 "Time difference between current and previous hits in any ASIC; t "
1097 "- t_prev [ns]; Hit pairs []",
1100 "Time difference between current and previous "
1101 "hits in ASIC A; t - t_prev [ns]; Hit pairs []",
1104 "Time difference between current and previous "
1105 "hits in ASIC B; t - t_prev [ns]; Hit pairs []",
1108 "Time difference between current in ASIC A and previous hit in "
1109 "ASIC B; t - t_prev [ns]; Hit pairs []",
1121 fcSummary =
new TCanvas(
"fcSummary",
"Summary for the Hodo sDPB", w,
h);
1151 for (UInt_t uHodoIdx = 0; uHodoIdx <
kuNbHodos; ++uHodoIdx) {
1154 new TCanvas(Form(
"cHodoSummaryRaw%u", uHodoIdx), Form(
"Raw Summary for Hodo %u", uHodoIdx), w,
h);
1206 new TCanvas(Form(
"cHodoSummaryFiber%u", uHodoIdx), Form(
"Fiber Summary for Hodo %u", uHodoIdx), w,
h);
1209 for (UInt_t uAxis = 0; uAxis <
kuNbAxis; ++uAxis) {
1238 fcHodoFiberCoinc =
new TCanvas(
"fcHodoFiberCoinc",
"X/Y coincidences in same hodoscope", w,
h);
1289 fcHodoFiberCoincAB =
new TCanvas(
"fcHodoFiberCoincAB",
"X/Y coincidences between hodoscopes", w,
h);
1292 for (UInt_t uAxis = 0; uAxis <
kuNbAxis; ++uAxis) {
1318 fcHodoFullCoinc =
new TCanvas(
"fcHodoFullCoinc",
"Full coincidences between hodoscopes", w,
h);
1371 new TCanvas(
"fcHodoFullCoincPos",
"Hit Positions for Full coincidences between hodoscopes", w,
h);
1387 new TCanvas(
"fcHodoFullCoincPosEvo",
"Hit Positions Evo for Full coincidences between hodoscopes", w,
h);
1414 fcHodoPrevHitDt =
new TCanvas(
"fcHodoPrevHitDt",
"Time difference between current and previous hits", w,
h);
1452 std::vector<std::vector<stsxyter::FinalHit>> lastHitHodoAxis;
1453 std::vector<std::vector<Bool_t>> bHitFoundHodoAxis;
1456 for (UInt_t uHodoIdx = 0; uHodoIdx <
kuNbHodos; ++uHodoIdx) {
1457 lastHitHodoAxis[uHodoIdx].resize(
kuNbAxis);
1458 bHitFoundHodoAxis[uHodoIdx].resize(
kuNbAxis, kFALSE);
1463 for (UInt_t uHit = 0; uHit < uTotalNbHits; ++uHit) {
1481 lastHitHodoAxis[uHodo][uAxis] =
fvmHitsInMs[uHit];
1482 bHitFoundHodoAxis[uHodo][uAxis] = kTRUE;
1485 if (bHitFoundHodoAxis[uHodo][0] && bHitFoundHodoAxis[uHodo][1]) {
1490 fhHodoFiberCoincMapXY[uHodo]->Fill(lastHitHodoAxis[uHodo][0].GetChan(), lastHitHodoAxis[uHodo][1].GetChan());
1498 if (bHitFoundHodoAxis[0][uAxis] && bHitFoundHodoAxis[1][uAxis]) {
1504 lastHitHodoAxis[1][uAxis].GetChan());
1509 UInt_t uAxisA = (uHodo ? !uAxis : uAxis);
1510 UInt_t uAxisB = (uHodo ? uAxis : !uAxis);
1511 if (bHitFoundHodoAxis[0][uAxisA] && bHitFoundHodoAxis[1][uAxisB]) {
1517 lastHitHodoAxis[1][uAxisB].GetChan());
1523 if (bHitFoundHodoAxis[0][0] && bHitFoundHodoAxis[0][1] && bHitFoundHodoAxis[1][0] && bHitFoundHodoAxis[1][1]) {
1543 UInt_t uPosXA =
fvbHodoSwapXY[0] ? lastHitHodoAxis[0][1].GetChan() : lastHitHodoAxis[0][0].GetChan();
1544 UInt_t uPosYA =
fvbHodoSwapXY[0] ? lastHitHodoAxis[0][0].GetChan() : lastHitHodoAxis[0][1].GetChan();
1545 UInt_t uPosXB =
fvbHodoSwapXY[1] ? lastHitHodoAxis[1][1].GetChan() : lastHitHodoAxis[1][0].GetChan();
1546 UInt_t uPosYB =
fvbHodoSwapXY[1] ? lastHitHodoAxis[1][0].GetChan() : lastHitHodoAxis[1][1].GetChan();
1553 Double_t dResX = uPosXB;
1554 Double_t dResY = uPosYB;
1572 Double_t dTimeSinceStart = (dTimeHitHodoAB -
fdStartTime) * 1e-9;
1613 for (UInt_t uHodoIdx = 0; uHodoIdx <
kuNbHodos; ++uHodoIdx) {
1614 for (UInt_t uAxis = 0; uAxis <
kuNbAxis; ++uAxis) {
1644 for (UInt_t uAxis = 0; uAxis <
kuNbAxis; ++uAxis) {
UInt_t fuDpbId
Settings from parameter file => For now use only accessors!
std::vector< TH2 * > fhHodoFiberCoincMapXY
+/- in clock cycles
TH2 * fhHodoFullCoincCompY
static const Int_t kiMaxNbFlibLinks
Constants.
TCanvas * fcHodoFullCoincPos
std::vector< std::vector< TH2 * > > fhHodoFullCoincTimeWalk
TCanvas * fcHodoFiberCoincAB
std::vector< UInt_t > fvuAdcGainHodo
Bool_t CreateHistograms()
TH1 * fhHodoFullCoincTimeDiff
std::vector< Bool_t > fvbHodoSwapXY
TH1 * fhHodoFullCoincRateEvo
[ Hodo ][ Axis ]
CbmCosy2019MonitorAlgoHodo()
TH1 * fhPrevHitDtAllAsics
Setup debugging.
TH2 * fhHodoFullCoincPosB
std::vector< std::vector< TH2 * > > fhHodoFiberHitRateEvo
[ Hodo ][ Axis ]
std::vector< Double_t > fvdPrevMsTime
End Time in ns of current TS Core from the index of the first MS first component.
std::chrono::steady_clock::time_point ftStartTimeUnix
Double_t fdMsTime
Header time of previous MS per link.
const UInt_t kuChannelToPlaneMap[kuNbChanPerAsic]
Map from channel index to PMT pixel.
TCanvas * fcHodoFullCoinc
std::vector< Double_t > fvdPreviousHitTimePerAsic
std::map< stsxyter::MessType, UInt_t > fmMsgCounter
static const UInt_t kuBytesPerMessage
std::vector< stsxyter::FinalHit > fvmHitsInMs
Hits time-sorting.
Int_t fiRunStartDateTimeSec
Temp holder until Current equipment ID is properly filled in MS.
std::vector< TH2 * > fhHodoChanMissEvtEvo
[ Hodo ]
Double_t fdTimeOffsetNs
User settings: Data correction parameters.
std::vector< std::vector< TProfile * > > fhHodoFiberAdcProf
[ Hodo ][ Axis ]
std::vector< std::vector< Double_t > > fvdChanCountsSinceLastRateUpdate
[ Hodo ]
TCanvas * fcHodoFiberCoinc
UInt_t fuCurrentEquipmentId
void AddMsComponentToList(size_t component, UShort_t usDetectorId)
Bool_t ReInitContainers()
TCanvas * fcSummary
[ Asic ]
Double_t fdTimeCoincLimit
Bool_t fbDebugMonitorMode
Switch ON the filling of a minimal set of histograms.
TH2 * fhHodoStatusMessType
std::vector< TH1 * > fhHodoFiberCoincTimeSameAB
[ Axis ]
Int_t fiBinSizeDatePlots
Start of run time since "epoch" in s, for the plots with date as X axis.
std::vector< UInt_t > fvuElinkIdxHodo
std::vector< TH2 * > fhHodoChanDistT
[ Hodo ]
Double_t fdTsStopTimeCore
Time in ns of current TS from the index of the first MS first component.
std::vector< UInt_t > fvuAdcOffsHodo
UInt_t fuPreviousHitAsic
[ Hodo ][ Chan ]
std::vector< Int_t > fviTimeSecLastRateUpdate
std::vector< TH1 * > fhHodoFiberCoincTimeDiffAB
[ Axis ]
std::vector< TH2 * > fhHodoChanRawTs
[ Hodo ]
std::vector< TH2 * > fhHodoFiberCoincMapSameAB
[ Hodo ]
TH2 * fhHodoMsStatusFieldType
const UInt_t kuChannelToFiberMap[kuNbChanPerAsic]
Bool_t fbMonitorMode
Default set closest cosmic setup stack.
TCanvas * fcHodoPrevHitDt
TH1 * fhHodoMessType
All hits (time in bins, ADC in bins, asic, channel) in last MS, sorted with "<" operator.
static const UInt_t kuNbHodos
Max Nb of eLinks for this sDPB: 2 GBTx with 42 eLinks each.
ULong64_t fvulCurrentTsMsb
std::vector< std::vector< Double_t > > fdHodoChanLastTimeForDist
[ Hodo ][ Chan ]
TH2 * fhHodoFullCoincCompX
void ProcessEpochInfo(stsxyter::Message mess)
static const UInt_t kuNbChanPerAsic
Per hodoscope = X and Y.
std::vector< TH2 * > fhHodoChanMissEvt
[ Hodo ]
Bool_t ProcessTs(const fles::Timeslice &ts)
Int_t fiTimeIntervalRateUpdate
std::vector< TCanvas * > fcHodoSummaryRaw
std::vector< Bool_t > fvbMaskedComponents
Switch ON the filling of a additional set of histograms.
std::vector< TProfile * > fhHodoChanAdcRawProf
[ Hodo ]
std::vector< TProfile * > fhHodoChanAdcCalProf
[ Hodo ]
std::vector< TH2 * > fhHodoFiberCoincWalkXY_Y
[ Hodo ]
std::vector< TH1 * > fhHodoChanCntRaw
Raw = ASIC channels.
void ProcessStatusInfo(stsxyter::Message mess)
Double_t fdTimeCoincLimitNs
+/- in clock cycles
std::vector< std::vector< TH2 * > > fhHodoFiberAdc
[ Hodo ][ Axis ]
std::vector< std::vector< TH1 * > > fhHodoFiberCnt
static const UInt_t kuNbAxis
Nb of hodoscopes = Nb FEBs = Nb ASICs.
Bool_t ProcessMs(const fles::Timeslice &ts, size_t uMsCompIdx, size_t uMsIdx)
std::vector< TH2 * > fhHodoChanAdcRaw
[ Hodo ]
ULong64_t fulCurrentTsIdx
Map from channel index to Hodoscope Axis (X or Y)
std::vector< TH2 * > fhHodoFiberCoincWalkXY_X
[ Hodo ]
std::vector< Bool_t > fvbHodoInvertX
TH2 * fhHodoMessTypePerElink
TH2 * fhHodoFullCoincResidualXY
std::vector< TCanvas * > fcHodoSummaryFiber
std::vector< TH2 * > fhHodoChanAdcCal
[ Hodo ]
std::vector< TH2 * > fhHodoFiberCoincMapDiffAB
[ Axis ]
TH2 * fhHodoFullCoincPosA
[ Axis ]
~CbmCosy2019MonitorAlgoHodo()
void ProcessTsMsbInfo(stsxyter::Message mess, UInt_t uMessIdx=0, UInt_t uMsIdx=0)
std::vector< TH1 * > fhHodoFiberCoincTimeXY
[ Hodo ]
std::vector< std::vector< TH2 * > > fhHodoFullCoincPosEvo
UInt_t fuMsIndex
Start Time in ns of current MS from its index field in header.
void ProcessHitInfo(stsxyter::Message mess, const UInt_t &uHodoIdx, const UInt_t &uMsIdx)
std::vector< TProfile * > fhHodoChanHitRateProf
[ Hodo ]
ULong64_t fulCurrentMsIdx
UInt_t fuCurrDpbId
Current equipment ID, tells from which DPB the current MS is originating.
static const UInt_t kuNbElinksDpb
UInt_t fvuCurrentTsMsbCycle
Current TS MSB for each DPB.
TCanvas * fcHodoFullCoincPosEvo
std::vector< Bool_t > fvbHodoInvertY
std::vector< TH2 * > fhHodoChanHitRateEvo
[ Hodo ]
Double_t fdTsCoreSizeInNs
void AddHistoToVector(TNamed *pointer, std::string sFolder="")
std::vector< size_t > fvMsComponentsList
void AddCanvasToVector(TCanvas *pointer, std::string sFolder="")
Double_t fdTsFullSizeInNs
Data class with information on a STS local track.
XPU_D bool IsHitMissedEvts() const
For Hit data: Returns Missed event flag (1 bit field)
XPU_D uint16_t GetHitAdc() const
For Hit data: Returns ADC value (5 bit field)
XPU_D uint16_t GetHitChannel() const
For Hit data: Returns StsXYTER channel number (7 bit field)
XPU_D uint16_t GetLinkIndex() const
For all data: Returns the (global) index of the eLink on which the message was received (n bit field)
XPU_D MessType GetMessType() const
Returns the message type, see enum MessType.
XPU_D uint16_t GetHitTime() const
For Hit data: Returns timestamp (8 bit field, 2 MSB bits overlap removed)
XPU_D uint32_t GetTsMsbVal() const
For TS MSB data: Returns the TS MSB 22 bit field)
XPU_D uint16_t GetStatusLink() const
For Status data: Returns the Link Inedx (9 bit field)
static constexpr uint64_t kulTsCycleNbBins
static constexpr uint32_t kuHitNbTsBins
static constexpr uint32_t kuHitNbAdcBins
Status/properties constants.
static constexpr double kdClockCycleNs