2121#include " CommonConstants/LHCConstants.h"
2222#include " DetectorsBase/GRPGeomHelper.h"
2323#include < bitset>
24- class TH1F ;
24+ class TH1D ;
2525
2626namespace o2 ::quality_control_modules::ctp
2727{
2828
2929// / \brief This class is checking the expected BC filling scheme
30+ // / \brief This class is checking the relative change of ctp input and ctp class rates and ratios to MB
3031// / \author Lucia Anna Tarasovicova
3132class RawDataReaderCheck : public o2 ::quality_control::checker::CheckInterface
3233{
@@ -44,35 +45,33 @@ class RawDataReaderCheck : public o2::quality_control::checker::CheckInterface
4445 void startOfActivity (const Activity& activity) override ;
4546 const double_t nofOrbitsPerTF = o2::base::GRPGeomHelper::instance().getNHBFPerTF();
4647 const double_t TimeTF = nofOrbitsPerTF * o2::constants::lhc::LHCOrbitMUS / 1e6 ; // in seconds
47- ClassDefOverride (RawDataReaderCheck, 5 );
4848
4949 private:
5050 int getRunNumberFromMO (std::shared_ptr<MonitorObject> mo);
51- int getNumberFilledBins (TH1F * hist);
52- int checkChange (TH1F * fHist , TH1F * fHistPrev , std::vector<int >& vIndexBad, std::vector<int >& vIndexMedium);
53- Quality SetQualityResult (std::vector<int >& vBad, std::vector<int >& vMedium);
54- void ClearIndexVectors ();
51+ int checkChange (TH1D * mHist , TH1D * mHistPrev );
52+ Quality setQualityResult (std::vector<int >& vBad, std::vector<int >& vMedium);
53+ void clearIndexVectors ();
5554 long int mTimestamp ;
56- float mThreshold = -1 ;
57- float mThresholdRateBad ;
58- float mThresholdRateMedium ;
59- float mThresholdRateRatioBad ;
60- float mThresholdRateRatioMedium ;
61- float mFraction ;
62- int mCycleDuration ;
63- bool flagRatio = false ;
64- bool flagInput = false ;
65- TH1F * fHistInputPrevious = nullptr ;
66- TH1F * fHistClassesPrevious = nullptr ;
67- TH1F * fHistInputRatioPrevious = nullptr ;
68- TH1F * fHistClassRatioPrevious = nullptr ;
69- std::vector<int > vGoodBC;
70- std::vector<int > vMediumBC;
71- std::vector<int > vBadBC;
72- std::vector< int > vIndexBad;
73- std::vector< int > vIndexMedium;
74- std::bitset<o2::constants::lhc::LHCMaxBunches> mLHCBCs ;
75- const char * ctpinputs[ 49 ] = { " T0A " , " T0C " , " TVX " , " TSC " , " TCE " , " VBA " , " VOR " , " VIR " , " VNC " , " VCH " , " 11 " , " 12 " , " UCE " , " DMC " , " USC " , " UVX " , " U0C " , " U0A " , " COS " , " LAS " , " EMC " , " PH0 " , " 23 " , " 24 " , " ZED " , " ZNC " , " PHL " , " PHH " , " PHM " , " 30 " , " 31 " , " 32 " , " 33 " , " 34 " , " 35 " , " 36 " , " EJ1 " , " EJ2 " , " EG1 " , " EG2 " , " DJ1 " , " DG1 " , " DJ2 " , " DG2 " , " 45 " , " 46 " , " 47 " , " 48 " , " 49 " } ;
55+ float mThreshold = -1 ; // threshold for BCs
56+ float mThresholdRateBad ; // threshold for the relative change in ctp input and class rates
57+ float mThresholdRateMedium ; // threshold for the relative change in ctp input and class rates
58+ float mThresholdRateRatioBad ; // threshold for the relative change in ctp input and class ratios
59+ float mThresholdRateRatioMedium ; // threshold for the relative change in ctp input and class ratios
60+ bool mFlagRatio = false ; // flag that a ratio plot is checked
61+ bool mFlagInput = false ; // flag that an input plot is checked
62+ TH1D * mHistInputPrevious = nullptr ; // histogram storing ctp input rates from previous cycle
63+ TH1D * mHistClassesPrevious = nullptr ; // histogram storing ctp class rates from previous cycle
64+ TH1D * mHistInputRatioPrevious = nullptr ; // histogram storing ctp input ratios to MB from previous cycle
65+ TH1D * mHistClassRatioPrevious = nullptr ; // histogram storing ctp class ratios to MB from previous cycle
66+ std::vector< int > mVecGoodBC ; // vector of good BC positions
67+ std::vector< int > mVecMediumBC ; // vector of medium BC positions, we expect a BC at this position, but inputs are below mThreshold
68+ std::vector<int > mVecBadBC ; // vector of bad BC positions, we don't expect a BC at this position, but inputs are abow mThreshold
69+ std::vector<int > mVecIndexBad ; // vector of ctp input and class indices, which had a big relative change
70+ std::vector<int > mVecIndexMedium ; // vector of ctp input and class indices, which had a relative change
71+ std::bitset<o2::constants::lhc::LHCMaxBunches> mLHCBCs ; // LHC filling scheme
72+ const char * ctpinputs[ 49 ] = { " T0A " , " T0C " , " TVX " , " TSC " , " TCE " , " VBA " , " VOR " , " VIR " , " VNC " , " VCH " , " 11 " , " 12 " , " UCE " , " DMC " , " USC " , " UVX " , " U0C " , " U0A " , " COS " , " LAS " , " EMC " , " PH0 " , " 23 " , " 24 " , " ZED " , " ZNC " , " PHL " , " PHH " , " PHM " , " 30 " , " 31 " , " 32 " , " 33 " , " 34 " , " 35 " , " 36 " , " EJ1 " , " EJ2 " , " EG1 " , " EG2 " , " DJ1 " , " DG1 " , " DJ2 " , " DG2 " , " 45 " , " 46 " , " 47 " , " 48 " , " 49 " }; // ctp input names
73+
74+ ClassDefOverride (RawDataReaderCheck, 6 ) ;
7675};
7776
7877} // namespace o2::quality_control_modules::ctp
0 commit comments