From f613fd6087a807c0ec6163a61a687733e0dcc284 Mon Sep 17 00:00:00 2001 From: Maximilian Korwieser Date: Thu, 22 Aug 2024 18:23:19 +0200 Subject: [PATCH] [QC-TPC] Remove non-mergable canvas objects from PID task. Add switch for hypothesis histos. --- Modules/TPC/run/tpcQCPID_sampled.json | 24 +++++++++++++++++------- Modules/TPC/src/PID.cxx | 12 ++---------- 2 files changed, 19 insertions(+), 17 deletions(-) diff --git a/Modules/TPC/run/tpcQCPID_sampled.json b/Modules/TPC/run/tpcQCPID_sampled.json index 095b2f3cf0..db705b7652 100644 --- a/Modules/TPC/run/tpcQCPID_sampled.json +++ b/Modules/TPC/run/tpcQCPID_sampled.json @@ -35,7 +35,15 @@ "name": "tpc-tracks" }, "taskParameters": { - "cutMinNCluster": "60", "cutAbsTgl": "1.", "cutMindEdxTot": "10.", "cutMaxdEdxTot": "70.", "cutMinpTPC": "0.05", "cutMaxpTPC": "20.", "cutMinpTPCMIPs": "0.45", "cutMaxpTPCMIPs": "0.55" , "createCanvas" : "1" + "cutMinNCluster": "60", + "cutAbsTgl": "1.", + "cutMindEdxTot": "10.", + "cutMaxdEdxTot": "70.", + "cutMinpTPC": "0.05", + "cutMaxpTPC": "20.", + "cutMinpTPCMIPs": "0.45", + "cutMaxpTPCMIPs": "0.55", + "getdEdxVspHypoHist": false }, "location": "remote" } @@ -47,11 +55,13 @@ "moduleName": "QcSkeleton", "policy": "OnAny", "detectorName": "TPC", - "dataSource": [{ - "type": "Task", - "name": "PID", - "MOs": ["example"] - }] + "dataSource": [ + { + "type": "Task", + "name": "PID", + "MOs": ["example"] + } + ] } } }, @@ -60,7 +70,7 @@ "id": "tpc-tracks", "active": "true", "machines": [], - "query" : "inputTracks:TPC/TRACKS/0", + "query": "inputTracks:TPC/TRACKS/0", "samplingConditions": [ { "condition": "random", diff --git a/Modules/TPC/src/PID.cxx b/Modules/TPC/src/PID.cxx index 6657a73349..5976e2ac95 100644 --- a/Modules/TPC/src/PID.cxx +++ b/Modules/TPC/src/PID.cxx @@ -15,7 +15,6 @@ /// // root includes -#include #include #include @@ -51,12 +50,10 @@ void PID::initialize(o2::framework::InitContext& /*ctx*/) const float cutMaxpTPC = o2::quality_control_modules::common::getFromConfig(mCustomParameters, "cutMaxpTPC"); const float cutMinpTPCMIPs = o2::quality_control_modules::common::getFromConfig(mCustomParameters, "cutMinpTPCMIPs"); const float cutMaxpTPCMIPs = o2::quality_control_modules::common::getFromConfig(mCustomParameters, "cutMaxpTPCMIPs"); - const int createCanvas = o2::quality_control_modules::common::getFromConfig(mCustomParameters, "createCanvas"); - const bool runAsyncAndTurnOffSomeHistos = o2::quality_control_modules::common::getFromConfig(mCustomParameters, "turnOffHistosForAsync"); + const float getdEdxVspHypoHist = o2::quality_control_modules::common::getFromConfig(mCustomParameters, "getdEdxVspHypoHist"); // set track cuts defaults are (AbsEta = 1.0, nCluster = 60, MindEdxTot = 20) - mQCPID.setPIDCuts(cutMinNCluster, cutAbsTgl, cutMindEdxTot, cutMaxdEdxTot, cutMinpTPC, cutMaxpTPC, cutMinpTPCMIPs, cutMaxpTPCMIPs, runAsyncAndTurnOffSomeHistos); - mQCPID.setCreateCanvas(createCanvas); + mQCPID.setPIDCuts(cutMinNCluster, cutAbsTgl, cutMindEdxTot, cutMaxdEdxTot, cutMinpTPC, cutMaxpTPC, cutMinpTPCMIPs, cutMaxpTPCMIPs, getdEdxVspHypoHist); mQCPID.initializeHistograms(); // pass map of vectors of histograms to be beautified! @@ -66,11 +63,6 @@ void PID::initialize(o2::framework::InitContext& /*ctx*/) getObjectsManager()->startPublishing(hist.get()); } } - for (auto const& pair : mQCPID.getMapOfCanvas()) { - for (auto& canv : pair.second) { - getObjectsManager()->startPublishing(canv.get()); - } - } } void PID::startOfActivity(const Activity& /*activity*/)