Skip to content

Commit

Permalink
[QC-TPC] Remove non-mergable canvas objects from PID task. Add switch…
Browse files Browse the repository at this point in the history
… for hypothesis histos.
  • Loading branch information
Maximilian Korwieser committed Aug 26, 2024
1 parent 3bb7634 commit f613fd6
Show file tree
Hide file tree
Showing 2 changed files with 19 additions and 17 deletions.
24 changes: 17 additions & 7 deletions Modules/TPC/run/tpcQCPID_sampled.json
Original file line number Diff line number Diff line change
Expand Up @@ -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"
}
Expand All @@ -47,11 +55,13 @@
"moduleName": "QcSkeleton",
"policy": "OnAny",
"detectorName": "TPC",
"dataSource": [{
"type": "Task",
"name": "PID",
"MOs": ["example"]
}]
"dataSource": [
{
"type": "Task",
"name": "PID",
"MOs": ["example"]
}
]
}
}
},
Expand All @@ -60,7 +70,7 @@
"id": "tpc-tracks",
"active": "true",
"machines": [],
"query" : "inputTracks:TPC/TRACKS/0",
"query": "inputTracks:TPC/TRACKS/0",
"samplingConditions": [
{
"condition": "random",
Expand Down
12 changes: 2 additions & 10 deletions Modules/TPC/src/PID.cxx
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,6 @@
///

// root includes
#include <TCanvas.h>
#include <TH1.h>
#include <TH2.h>

Expand Down Expand Up @@ -51,12 +50,10 @@ void PID::initialize(o2::framework::InitContext& /*ctx*/)
const float cutMaxpTPC = o2::quality_control_modules::common::getFromConfig<float>(mCustomParameters, "cutMaxpTPC");
const float cutMinpTPCMIPs = o2::quality_control_modules::common::getFromConfig<float>(mCustomParameters, "cutMinpTPCMIPs");
const float cutMaxpTPCMIPs = o2::quality_control_modules::common::getFromConfig<float>(mCustomParameters, "cutMaxpTPCMIPs");
const int createCanvas = o2::quality_control_modules::common::getFromConfig<float>(mCustomParameters, "createCanvas");
const bool runAsyncAndTurnOffSomeHistos = o2::quality_control_modules::common::getFromConfig<bool>(mCustomParameters, "turnOffHistosForAsync");
const float getdEdxVspHypoHist = o2::quality_control_modules::common::getFromConfig<bool>(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!

Expand All @@ -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*/)
Expand Down

0 comments on commit f613fd6

Please sign in to comment.