Skip to content

Commit d134e08

Browse files
committed
new plot: n_clusters per track vs pt
1 parent 2effd72 commit d134e08

File tree

2 files changed

+16
-0
lines changed

2 files changed

+16
-0
lines changed

Diff for: Modules/ITS/include/ITS/ITSTrackTask.h

+2
Original file line numberDiff line numberDiff line change
@@ -71,6 +71,7 @@ class ITSTrackTask : public TaskInterface
7171

7272
std::vector<TObject*> mPublishedObjects;
7373
TH1D* hNClusters;
74+
TH2D* hNClustersPt;
7475
std::unique_ptr<TH1DRatio> hTrackEta;
7576
std::unique_ptr<TH1DRatio> hTrackPhi;
7677
TH1D* hVerticesRof;
@@ -114,6 +115,7 @@ class ITSTrackTask : public TaskInterface
114115
int nVertices = 0;
115116
double mChipBins[2125]; // x bins for cos(lambda) plot
116117
double mCoslBins[25]; // y bins for cos(lambda) plot
118+
double ptBins[141]; // pt bins
117119

118120
o2::itsmft::TopologyDictionary* mDict;
119121
};

Diff for: Modules/ITS/src/ITSTrackTask.cxx

+14
Original file line numberDiff line numberDiff line change
@@ -44,6 +44,7 @@ ITSTrackTask::ITSTrackTask() : TaskInterface()
4444
ITSTrackTask::~ITSTrackTask() // make_shared objects will be delete automatically
4545
{
4646
delete hNClusters;
47+
delete hNClustersPt;
4748
delete hVertexCoordinates;
4849
delete hVertexRvsZ;
4950
delete hVertexZ;
@@ -67,6 +68,12 @@ void ITSTrackTask::initialize(o2::framework::InitContext& /*ctx*/)
6768
mDoNorm = o2::quality_control_modules::common::getFromConfig<int>(mCustomParameters, "doNorm", mDoNorm);
6869
mInvMasses = o2::quality_control_modules::common::getFromConfig<int>(mCustomParameters, "InvMasses", mInvMasses);
6970

71+
// pt bins definition: 20 MeV/c width up to 1 GeV/c, 100 MeV/c afterwards
72+
ptBins[0] = 0.;
73+
for (int i = 1; i < 141; i++) {
74+
ptBins[i] = i <= 50 ? ptBins[i - 1] + 0.02 : ptBins[i - 1] + 0.1;
75+
}
76+
7077
createAllHistos();
7178
publishHistos();
7279

@@ -200,6 +207,7 @@ void ITSTrackTask::monitorData(o2::framework::ProcessingContext& ctx)
200207
hTrackPhi->getNum()->Fill(out.getPhi());
201208
hAngularDistribution->getNum()->Fill(Eta, out.getPhi());
202209
hNClusters->Fill(track.getNumberOfClusters());
210+
hNClustersPt->Fill(track.getPt(), track.getNumberOfClusters());
203211

204212
hTrackPtVsEta->Fill(out.getPt(), Eta);
205213
hTrackPtVsPhi->Fill(out.getPt(), out.getPhi());
@@ -402,6 +410,7 @@ void ITSTrackTask::reset()
402410
ILOG(Debug, Devel) << "Resetting the histograms" << ENDM;
403411
hAngularDistribution->Reset();
404412
hNClusters->Reset();
413+
hNClustersPt->Reset();
405414
hTrackPhi->Reset();
406415
hTrackEta->Reset();
407416
hVerticesRof->Reset();
@@ -450,6 +459,11 @@ void ITSTrackTask::createAllHistos()
450459
formatAxes(hNClusters, "Number of clusters per Track", "Counts", 1, 1.10);
451460
hNClusters->SetStats(0);
452461

462+
hNClustersPt = new TH2D("NClustersPt", "NClustersPt;#it{p}_{T} (GeV/#it{c}); Number of clusters per Track", 140, ptBins, 4, 3.5, 7.5);
463+
addObject(hNClustersPt);
464+
formatAxes(hNClustersPt, "#it{p}_{T} (GeV/#it{c})", "Number of clusters per Track", 1, 1.10);
465+
hNClustersPt->SetStats(0);
466+
453467
hTrackEta = std::make_unique<TH1DRatio>("EtaDistribution", "EtaDistribution", 40, -2.0, 2.0, true);
454468
if (mDoNorm) {
455469
hTrackEta->SetBit(TH1::kIsAverage);

0 commit comments

Comments
 (0)