Skip to content

Commit acbc83c

Browse files
committed
GLO: Add PV multiplicity vs ITS tracks
Signed-off-by: Felix Schlepper <felix.schlepper@cern.ch>
1 parent 497df8f commit acbc83c

File tree

3 files changed

+37
-1
lines changed

3 files changed

+37
-1
lines changed

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

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -50,6 +50,7 @@
5050
"verbose": "false",
5151
"doMTCRatios": "true",
5252
"doK0QC": "true",
53+
"doPVITSQC": "true",
5354
"isSync": "true",
5455
"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"
5556
},

Modules/GLO/include/GLO/ITSTPCMatchingTask.h

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -27,6 +27,7 @@
2727

2828
#include <memory>
2929

30+
#include <TH2F.h>
3031
#include <TH3F.h>
3132

3233
using namespace o2::quality_control::core;
@@ -63,6 +64,10 @@ class ITSTPCMatchingTask final : public TaskInterface
6364
std::unique_ptr<TH3F> mK0sCycle;
6465
std::unique_ptr<TH3F> mK0sIntegral;
6566
helpers::K0sFitter mK0sFitter;
67+
68+
bool mDoPVITS{ false };
69+
std::unique_ptr<TH2F> mPVITSCycle;
70+
std::unique_ptr<TH2F> mPVITSIntegral;
6671
};
6772

6873
} // namespace o2::quality_control_modules::glo

Modules/GLO/src/ITSTPCMatchingTask.cxx

Lines changed: 31 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,7 @@
1515
///
1616

1717
#include <TH1D.h>
18+
#include <TProfile.h>
1819

1920
#include "QualityControl/QcInfoLogger.h"
2021
#include "GLO/ITSTPCMatchingTask.h"
@@ -38,7 +39,6 @@ void ITSTPCMatchingTask::initialize(o2::framework::InitContext& /*ctx*/)
3839
mMatchITSTPCQC.setUseTrkPID(getFromConfig(mCustomParameters, "useTrkPID", false));
3940
// ITS track
4041
mMatchITSTPCQC.setMinPtITSCut(getFromConfig(mCustomParameters, "minPtITSCut", 0.1f));
41-
mMatchITSTPCQC.setEtaITSCut(getFromConfig(mCustomParameters, "minEtaITSCut", 1.4f));
4242
mMatchITSTPCQC.setEtaITSCut(getFromConfig(mCustomParameters, "etaITSCut", 1.4f));
4343
mMatchITSTPCQC.setMinNClustersITS(getFromConfig(mCustomParameters, "minNITSClustersCut", 0));
4444
mMatchITSTPCQC.setMaxChi2PerClusterITS(getFromConfig(mCustomParameters, "maxChi2PerClusterITS", 1e10f));
@@ -69,6 +69,8 @@ void ITSTPCMatchingTask::initialize(o2::framework::InitContext& /*ctx*/)
6969
mPublishK0s3D = getFromConfig(mCustomParameters, "publishK0s3D", false);
7070
mK0sFitter.init(mCustomParameters);
7171
}
72+
// PV
73+
mDoPVITS = common::getFromConfig(mCustomParameters, "doPVITSQC", false);
7274

7375
mMatchITSTPCQC.initDataRequest();
7476
mMatchITSTPCQC.init();
@@ -176,6 +178,34 @@ void ITSTPCMatchingTask::endOfCycle()
176178

177179
getObjectsManager()->startPublishing((h = mK0sIntegral->ProjectionY("mK0sMassVsPtVsOcc_Integral_pmass")), PublicationPolicy::Once);
178180
}
181+
182+
if (mDoPVITS) {
183+
const auto* h = mMatchITSTPCQC.getHistoPVNContVsITSTracks();
184+
if (!h) {
185+
ILOG(Fatal) << "Could not retrieve pv ITS histogram!" << ENDM;
186+
}
187+
188+
mPVITSCycle.reset();
189+
mPVITSCycle.reset(dynamic_cast<TH2F*>(h->Clone("mPVNContVsITSTracks_Cycle")));
190+
if (!mPVITSCycle) {
191+
ILOG(Fatal) << "Could not retrieve pv ITS histogram for current cycle!" << ENDM;
192+
}
193+
if (!mPVITSIntegral) {
194+
mPVITSIntegral.reset(dynamic_cast<TH2F*>(h->Clone("mPVNContVsITSTracks_Integral")));
195+
if (!mPVITSIntegral) {
196+
ILOG(Fatal) << "Could not retrieve pv ITS histogram for integral!" << ENDM;
197+
}
198+
}
199+
mPVITSCycle->Reset();
200+
mPVITSCycle->Add(h, mPVITSCycle.get(), 1., -1.);
201+
mPVITSIntegral->Reset();
202+
mPVITSIntegral->Add(h);
203+
204+
getObjectsManager()->startPublishing(mPVITSCycle.get(), PublicationPolicy::Once);
205+
getObjectsManager()->startPublishing(mPVITSIntegral.get(), PublicationPolicy::Once);
206+
getObjectsManager()->startPublishing(mPVITSCycle->ProfileX(), PublicationPolicy::Once);
207+
getObjectsManager()->startPublishing(mPVITSIntegral->ProfileX(), PublicationPolicy::Once);
208+
}
179209
}
180210
}
181211

0 commit comments

Comments
 (0)