diff --git a/Modules/TPC/include/TPC/AtmosPressureReductor.h b/Modules/TPC/include/TPC/AtmosPressureReductor.h index 814f5c086..29a3a782e 100644 --- a/Modules/TPC/include/TPC/AtmosPressureReductor.h +++ b/Modules/TPC/include/TPC/AtmosPressureReductor.h @@ -22,10 +22,10 @@ namespace o2::quality_control_modules::tpc { -/// \brief A Reductor for atmospheric pressure +/// \brief A reductor for atmospheric pressure /// -/// A Reductor for atmospheric pressure -/// It produces a branch in the format: "pressure1/F:errPressure1:pressure2:errPressure2" +/// A reductor for atmospheric pressure +/// It produces a branch in the format: "cavernPressure1/F:errCavernPressure1:cavernPressure2:errCavernPressure2:surfacePressure:errSurfacePressure" class AtmosPressureReductor : public quality_control::postprocessing::ReductorConditionAny { @@ -39,10 +39,12 @@ class AtmosPressureReductor : public quality_control::postprocessing::ReductorCo private: struct { - Float_t pressure1; - Float_t errPressure1; - Float_t pressure2; - Float_t errPressure2; + Float_t cavernPressure1; + Float_t errCavernPressure1; + Float_t cavernPressure2; + Float_t errCavernPressure2; + Float_t surfacePressure; + Float_t errSurfacePressure; } mStats; }; diff --git a/Modules/TPC/run/tpcQCAtmosPressureTrending.json b/Modules/TPC/run/tpcQCAtmosPressureTrending.json index bf7be4988..e71d48c09 100644 --- a/Modules/TPC/run/tpcQCAtmosPressureTrending.json +++ b/Modules/TPC/run/tpcQCAtmosPressureTrending.json @@ -47,21 +47,21 @@ "plots": [ { "name": "atmosPressure1_Trending", - "title": "Trend of atmospheric pressure 1 over time", - "varexp": "EnvVars.pressure1:time", + "title": "Trend of atmospheric cavern pressure 1 over time", + "varexp": "EnvVars.cavernPressure1:time", "selection": "", "option": "*L", - "graphAxisLabel": "atmos. Pressure:time", - "graphErrors": "EnvVars.errPressure1:0" + "graphAxisLabel": "atmospheric Cavern Pressure:time", + "graphErrors": "EnvVars.errCavernPressure1:0" }, { "name": "atmosPressure2_Trending", - "title": "Trend of atmospheric pressure 2 over time", - "varexp": "EnvVars.pressure2:time", + "title": "Trend of atmospheric cavern pressure 2 over time", + "varexp": "EnvVars.cavernPressure2:time", "selection": "", "option": "*L", - "graphAxisLabel": "atmos. Pressure:time", - "graphErrors": "EnvVars.errPressure2:0" + "graphAxisLabel": "atmospheric Cavern Pressure:time", + "graphErrors": "EnvVars.errCavernPressure2:0" } ], "initTrigger": [ diff --git a/Modules/TPC/src/AtmosPressureReductor.cxx b/Modules/TPC/src/AtmosPressureReductor.cxx index 4f7da87d9..5b90af35a 100644 --- a/Modules/TPC/src/AtmosPressureReductor.cxx +++ b/Modules/TPC/src/AtmosPressureReductor.cxx @@ -28,26 +28,33 @@ void* AtmosPressureReductor::getBranchAddress() const char* AtmosPressureReductor::getBranchLeafList() { - return "pressure1/F:errPressure1:pressure2:errPressure2"; + return "cavernPressure1/F:errCavernPressure1:cavernPressure2:errCavernPressure2:surfacePressure:errSurfacePressure"; } bool AtmosPressureReductor::update(ConditionRetriever& retriever) { if (auto env = retriever.retrieve()) { - std::vector pressureValues; + std::vector pressureValues; - // pressure 1 + // Cavern pressure 1 for (const auto& [time, p] : env->mEnvVars["CavernAtmosPressure"]) { - pressureValues.emplace_back(p); + pressureValues.emplace_back((float)p); } - //calcMeanAndStddev(pressureValues, mStats.pressure1, mStats.errPressure1); + calcMeanAndStddev(pressureValues, mStats.cavernPressure1, mStats.errCavernPressure1); pressureValues.clear(); - // pressure 2 + // Cavern pressure 2 for (const auto& [time, p] : env->mEnvVars["CavernAtmosPressure2"]) { - pressureValues.emplace_back(p); + pressureValues.emplace_back((float)p); } - //calcMeanAndStddev(pressureValues, mStats.pressure2, mStats.errPressure2); + calcMeanAndStddev(pressureValues, mStats.cavernPressure2, mStats.errCavernPressure2); + pressureValues.clear(); + + // Surface pressure + for (const auto& [time, p] : env->mEnvVars["SurfaceAtmosPressure"]) { + pressureValues.emplace_back((float)p); + } + calcMeanAndStddev(pressureValues, mStats.surfacePressure, mStats.errSurfacePressure); return true; } return false;