From 0292c5eaa6d487a534e7734cc39344b791a718e1 Mon Sep 17 00:00:00 2001 From: iravasen Date: Mon, 30 Jun 2025 10:40:28 +0200 Subject: [PATCH] vertex contributors vs z --- Modules/ITS/include/ITS/ITSTrackTask.h | 1 + Modules/ITS/src/ITSTrackTask.cxx | 10 ++++++++-- 2 files changed, 9 insertions(+), 2 deletions(-) diff --git a/Modules/ITS/include/ITS/ITSTrackTask.h b/Modules/ITS/include/ITS/ITSTrackTask.h index cc89ea0e1f..383d079c85 100644 --- a/Modules/ITS/include/ITS/ITSTrackTask.h +++ b/Modules/ITS/include/ITS/ITSTrackTask.h @@ -84,6 +84,7 @@ class ITSTrackTask : public TaskInterface std::unique_ptr hAngularDistribution; TH2D* hVertexCoordinates; TH2D* hVertexRvsZ; + TH2D* hVertexContvsZ; TH1D* hVertexZ; TH1D* hVertexContributors; TH1D* hAssociatedClusterFraction; diff --git a/Modules/ITS/src/ITSTrackTask.cxx b/Modules/ITS/src/ITSTrackTask.cxx index af949e9a1f..570b6ba88d 100644 --- a/Modules/ITS/src/ITSTrackTask.cxx +++ b/Modules/ITS/src/ITSTrackTask.cxx @@ -47,6 +47,7 @@ ITSTrackTask::~ITSTrackTask() // make_shared objects will be delete automaticall delete hVertexRvsZ; delete hVertexZ; delete hVertexContributors; + delete hVertexContvsZ; delete hAssociatedClusterFraction; delete hNtracks; delete hTrackPtVsEta; @@ -177,6 +178,7 @@ void ITSTrackTask::monitorData(o2::framework::ProcessingContext& ctx) hVertexCoordinates->Fill(vertex.getX(), vertex.getY()); hVertexRvsZ->Fill(vertex.getZ(), sqrt(vertex.getX() * vertex.getX() + vertex.getY() * vertex.getY())); hVertexZ->Fill(vertex.getZ()); + hVertexContvsZ->Fill(vertex.getZ(), vertex.getNContributors()); hVertexContributors->Fill(vertex.getNContributors()); } @@ -216,7 +218,6 @@ void ITSTrackTask::monitorData(o2::framework::ProcessingContext& ctx) float vx = 0, vy = 0, vz = 0; float dca[2]{ 0., 0. }; float bz = 5.0; - // loop on tracks per ROF for (int iROF = 0; iROF < trackRofArr.size(); iROF++) { @@ -233,7 +234,6 @@ void ITSTrackTask::monitorData(o2::framework::ProcessingContext& ctx) hTrackPhi->getNum()->Fill(out.getPhi()); hAngularDistribution->getNum()->Fill(Eta, out.getPhi()); hNClusters->getNum()->Fill(track.getNumberOfClusters()); - hTrackPtVsEta->Fill(out.getPt(), Eta); hTrackPtVsPhi->Fill(out.getPt(), out.getPhi()); @@ -545,6 +545,7 @@ void ITSTrackTask::reset() hVertexRvsZ->Reset(); hVertexZ->Reset(); hVertexContributors->Reset(); + hVertexContvsZ->Reset(); hAssociatedClusterFraction->Reset(); hNtracks->Reset(); @@ -635,6 +636,11 @@ void ITSTrackTask::createAllHistos() formatAxes(hVertexContributors, "Number of contributors for vertex", "Counts", 1, 1.10); hVertexContributors->SetStats(0); + hVertexContvsZ = new TH2D("VertexContvsZ", "Vertex Contributors vs Z", (int)(mVertexZsize * 2 / 0.01), -mVertexZsize, mVertexZsize, 500, 0, 500); + addObject(hVertexContvsZ); + formatAxes(hVertexContvsZ, "Z coordinate (cm)", "N contributors", 1, 1.10); + hVertexContvsZ->SetStats(0); + hAssociatedClusterFraction = new TH1D("AssociatedClusterFraction", "AssociatedClusterFraction", 100, 0, 1); hAssociatedClusterFraction->SetTitle("The fraction of clusters into tracks event by event"); addObject(hAssociatedClusterFraction);