Skip to content

Commit 497df8f

Browse files
committed
GLO: based mtc trending on histo
Signed-off-by: Felix Schlepper <felix.schlepper@cern.ch>
1 parent 2fb6317 commit 497df8f

4 files changed

Lines changed: 9 additions & 21 deletions

File tree

Modules/GLO/glo-itstpc-mtch-qcmn-test.json

Lines changed: 4 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -49,7 +49,6 @@
4949
"GID": "ITS-TPC,ITS",
5050
"verbose": "false",
5151
"doMTCRatios": "true",
52-
"doMTCTrending": "true",
5352
"doK0QC": "true",
5453
"isSync": "true",
5554
"trackSourcesK0": "ITS,TPC,ITS-TPC,ITS-TPC-TOF,TPC-TOF,TPC-TRD,ITS-TPC-TRD,TPC-TRD-TOF,ITS-TPC-TOF,ITS-TPC-TRD-TOF"
@@ -155,7 +154,7 @@
155154
"once"
156155
],
157156
"updateTrigger": [
158-
"newobject:qcdb:GLO/MO/ITSTPCMatchingTask/gloMTCTrendingObject"
157+
"newobject:qcdb:GLO/MO/ITSTPCMatchingTask/mFractionITSTPCmatch_ITS_Hist"
159158
],
160159
"stopTrigger": [
161160
"usercontrol"
@@ -165,7 +164,7 @@
165164
"type": "repository",
166165
"path": "GLO/MO/ITSTPCMatchingTask",
167166
"names": [
168-
"gloMTCTrendingObject"
167+
"mFractionITSTPCmatch_ITS_Hist"
169168
],
170169
"reductorName": "o2::quality_control_modules::glo::MTCReductor",
171170
"moduleName": "QcGLO"
@@ -174,8 +173,8 @@
174173
"plots": [
175174
{
176175
"name": "glo_mtc_pt_trending",
177-
"title": "MTC #it{p}_{T} trending",
178-
"varexp": "gloMTCTrendingObject.pt:time",
176+
"title": "MTC at #it{p}_{T}=1.5 trending",
177+
"varexp": "mFractionITSTPCmatch_ITS_Hist.pt:time",
179178
"option": "*L",
180179
"graphYRange": "0:1.02",
181180
"graphAxisLabel": "MTC:time"

Modules/GLO/include/GLO/ITSTPCMatchingTask.h

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -57,9 +57,6 @@ class ITSTPCMatchingTask final : public TaskInterface
5757
std::unique_ptr<common::TH1FRatio> mEffPt;
5858
std::unique_ptr<common::TH1FRatio> mEffEta;
5959
std::unique_ptr<common::TH1FRatio> mEffPhi;
60-
bool mDoMTCTrending{ false };
61-
float mMTCTrendingPt{ 1.5 };
62-
std::unique_ptr<TF1> mMTCTrendingObject;
6360

6461
bool mDoK0s{ false };
6562
bool mPublishK0s3D{ false };

Modules/GLO/src/ITSTPCMatchingTask.cxx

Lines changed: 1 addition & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -55,12 +55,7 @@ void ITSTPCMatchingTask::initialize(o2::framework::InitContext& /*ctx*/)
5555
// Sync
5656
mIsSync = common::getFromConfig(mCustomParameters, "isSync", false);
5757
// MTC ratios
58-
if ((mDoMTCRatios = common::getFromConfig(mCustomParameters, "doMTCRatios", false))) {
59-
if ((mDoMTCTrending = getFromConfig(mCustomParameters, "doMTCTrending", false))) {
60-
mMTCTrendingPt = getFromConfig(mCustomParameters, "trendingPt", 1.5f);
61-
mMTCTrendingObject.reset(new TF1("gloMTCTrendingObject", "pol0"));
62-
}
63-
}
58+
mDoMTCRatios = common::getFromConfig(mCustomParameters, "doMTCRatios", false);
6459
// K0s
6560
mMatchITSTPCQC.setDoK0QC((mDoK0s = getFromConfig(mCustomParameters, "doK0QC", false)));
6661
if (mIsSync && mDoK0s) {
@@ -136,10 +131,6 @@ void ITSTPCMatchingTask::endOfCycle()
136131
makeRatio(mEffPt, mMatchITSTPCQC.getFractionITSTPCmatch(gloqc::MatchITSTPCQC::ITS));
137132
getObjectsManager()->startPublishing(mEffPt.get(), PublicationPolicy::Once);
138133
getObjectsManager()->setDefaultDrawOptions(mEffPt->GetName(), "logx");
139-
if (mDoMTCTrending) {
140-
mMTCTrendingObject->SetParameter(0, mEffPt->GetBinContent(mEffPt->FindBin(mMTCTrendingPt)));
141-
getObjectsManager()->startPublishing<true>(mMTCTrendingObject.get(), PublicationPolicy::Once);
142-
}
143134

144135
// Eta
145136
makeRatio(mEffEta, mMatchITSTPCQC.getFractionITSTPCmatchEta(gloqc::MatchITSTPCQC::ITS));

Modules/GLO/src/Reductors.cxx

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,7 @@
1313
#include "GLO/Helpers.h"
1414

1515
#include <TF1.h>
16+
#include <TH1.h>
1617

1718
namespace o2::quality_control_modules::glo
1819
{
@@ -30,12 +31,12 @@ void K0sFitReductor::update(TObject* obj)
3031

3132
void MTCReductor::update(TObject* obj)
3233
{
33-
auto f = dynamic_cast<TF1*>(obj);
34-
if (!f) {
34+
auto h = dynamic_cast<TH1*>(obj);
35+
if (!h) {
3536
return;
3637
}
3738

38-
mStats.pt = f->GetParameter(0);
39+
mStats.pt = (float)h->GetBinContent(h->FindBin(1.5));
3940
}
4041

4142
} // namespace o2::quality_control_modules::glo

0 commit comments

Comments
 (0)