Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[QC-TPC] Remove non-mergable canvas objects from PID task. Add switch… #2396

Closed
wants to merge 1 commit into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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
Loading