Skip to content

Commit

Permalink
CTP: change in the task, check and trending (#2454)
Browse files Browse the repository at this point in the history
* change of the parameter read out in Raw QC task

* change of the parameter read out in the check

* change of the parameter read out + consistent input names

* trending plots generated based on the varexp

* add token also for MB input1

* simplification and assuring of default names

* histogram labels from CTPInputsConfiguration

* change of the read out of the parameters in Check

* fix

---------

Co-authored-by: Lucia Anna Tarasovicova <[email protected]>
  • Loading branch information
2 people authored and Barthelemy committed Oct 22, 2024
1 parent 7e7076f commit 5ac7250
Show file tree
Hide file tree
Showing 6 changed files with 149 additions and 135 deletions.
25 changes: 15 additions & 10 deletions Modules/CTP/include/CTP/CTPTrendingTask.h
Original file line number Diff line number Diff line change
Expand Up @@ -62,16 +62,21 @@ class CTPTrendingTask : public PostProcessingInterface
MetaData mMetaData;
UInt_t mTime; // this is not a specific time, used for x axis in trending plots, this name is used in all other modules, please suggest a new name if not appropriate

std::string mInputNamesDefault[5] = { "TVX", "VBA", "DMC", "EMC", "PH0" }; // ctp inputs to be trended by default, unless modified in config.json
std::string 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" }; // all ctp input names
std::string mClassNamesDefault[5] = { "CMTVX-B-NOPF", "CMVBA-B-NOPF", "CTVXDMC-B-NOPF-EMC", "CTVXEMC-B-NOPF-EMC", "CTVXPH0-B-NOPF-PHSCPV" }; // ctp classes to be trended by default, unless modified in config.json
std::string mClassNames[5] = { "", "", "", "", "" }; // the trended ctp classes will be filled in this array, either default or from config
std::string mInputNames[5] = { "", "", "", "", "" }; // the trended ctp inputs will be filled in this array, either default or from config
const int mNumberOfClasses = 5; // number of thrended ctp classes
const int mNumberOfInputs = 5; // number of thrended ctp inputs
int mClassIndex[5] = { 65, 65, 65, 65, 65 }; // indices of trended ctp classes, found in CTPconfig
int mInputIndex[5] = { 49, 49, 49, 49, 49 }; // indices of trended ctp inputs, found in CTPconfig
bool mCTPconfigFound = false; // bool telling whether the CTPconfing was already found
std::string mInputNamesDefault[5] = { "MTVX", "MVBA", "0DMC", "0EMC", "0PH0" }; // ctp inputs to be trended by default, unless modified in config.json
std::string mTrendedInputNames[5] = { "inputContentMinBias1:time", "inputContentMinBias2:time", "inputContentDMC:time", "inputContentEMC:time", "inputContentPHO:time" };
std::string mTrendedClassNames[5] = { "classContentMinBias1:time", "classContentMinBias2:time", "classContentDMC:time", "classContentEMC:time", "classContentPHO:time" };
std::string mTrendedInputRatioNames[4] = { "inputContentMinBias2/inputs", "inputContentDMC/inputs", "inputContentEMC/inputs", "inputContentPHO/inputs" };
std::string mTrendedClassRatioNames[4] = { "classContentMinBias2/classes", "classContentDMC/classes", "classContentEMC/classes", "classContentPHO/classes" };
std::string mClassNamesDefault[5] = { "CMTVX-B-NOPF", "CMVBA-B-NOPF", "CTVXDMC-B-NOPF-EMC", "CTVXEMC-B-NOPF-EMC", "CTVXPH0-B-NOPF-PHSCPV" }; // ctp classes to be trended by default, unless modified in config.json
std::string mClassNames[5] = { "", "", "", "", "" }; // the trended ctp classes will be filled in this array, either default or from config
std::string mInputNames[5] = { "", "", "", "", "" }; // the trended ctp inputs will be filled in this array, either default or from config
std::string mInputParameters[5] = { "minBias1Input", "minBias2Input", "minBisDMCInput", "minBiasEMCInput", "minBiasPHOInput" };
std::string mClassParameters[5] = { "minBias1Class", "minBias2Class", "minBisDMCclass", "minBiasEMCclass", "minBiasPHOclass" };
const int mNumberOfClasses = 5; // number of thrended ctp classes
const int mNumberOfInputs = 5; // number of thrended ctp inputs
int mClassIndex[5] = { 65, 65, 65, 65, 65 }; // indices of trended ctp classes, found in CTPconfig
int mInputIndex[5] = { 49, 49, 49, 49, 49 }; // indices of trended ctp inputs, found in CTPconfig
bool mCTPconfigFound = false; // bool telling whether the CTPconfing was already found

std::map<std::string, TObject*> mPlots;

Expand Down
2 changes: 2 additions & 0 deletions Modules/CTP/include/CTP/RawDataQcTask.h
Original file line number Diff line number Diff line change
Expand Up @@ -61,6 +61,8 @@ class CTPRawDataReaderTask final : public TaskInterface
int indexMB2 = -1;
static const int ninps = o2::ctp::CTP_NINPUTS + 1;
static const int nclasses = o2::ctp::CTP_NCLASSES + 1;
double mScaleInput1 = 1;
double mScaleInput2 = 1;
long int mTimestamp;
std::string classNames[nclasses];
int mIndexMBclass = -1; // index for the MB ctp class, which is used as scaling for the ratios
Expand Down
17 changes: 8 additions & 9 deletions Modules/CTP/include/CTP/RawDataReaderCheck.h
Original file line number Diff line number Diff line change
Expand Up @@ -65,16 +65,15 @@ class RawDataReaderCheck : public o2::quality_control::checker::CheckInterface
TH1D* mHistClassesPrevious = nullptr; // histogram storing ctp class rates from previous cycle
TH1D* mHistInputRatioPrevious = nullptr; // histogram storing ctp input ratios to MB from previous cycle
TH1D* mHistClassRatioPrevious = nullptr;
TH1D* mHistAbsolute = nullptr; // histogram storing ctp class ratios to MB from previous cycle
std::vector<int> mVecGoodBC; // vector of good BC positions
std::vector<int> mVecMediumBC; // vector of medium BC positions, we expect a BC at this position, but inputs are below mThreshold
std::vector<int> mVecBadBC; // vector of bad BC positions, we don't expect a BC at this position, but inputs are abow mThreshold
std::vector<int> mVecIndexBad; // vector of ctp input and class indices, which had a big relative change
std::vector<int> mVecIndexMedium; // vector of ctp input and class indices, which had a relative change
std::bitset<o2::constants::lhc::LHCMaxBunches> mLHCBCs; // LHC filling scheme
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
TH1D* mHistAbsolute = nullptr; // histogram storing ctp class ratios to MB from previous cycle
std::vector<int> mVecGoodBC; // vector of good BC positions
std::vector<int> mVecMediumBC; // vector of medium BC positions, we expect a BC at this position, but inputs are below mThreshold
std::vector<int> mVecBadBC; // vector of bad BC positions, we don't expect a BC at this position, but inputs are abow mThreshold
std::vector<int> mVecIndexBad; // vector of ctp input and class indices, which had a big relative change
std::vector<int> mVecIndexMedium; // vector of ctp input and class indices, which had a relative change
std::bitset<o2::constants::lhc::LHCMaxBunches> mLHCBCs; // LHC filling scheme

ClassDefOverride(RawDataReaderCheck, 8);
ClassDefOverride(RawDataReaderCheck, 9);
};

} // namespace o2::quality_control_modules::ctp
Expand Down
Loading

0 comments on commit 5ac7250

Please sign in to comment.