Skip to content
Merged
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
7 changes: 7 additions & 0 deletions ALICE3/Tasks/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -9,52 +9,52 @@
# granted to it by virtue of its status as an Intergovernmental Organization
# or submit itself to any jurisdiction.

o2physics_add_dpl_workflow(alice3-qa-multiplicity

Check failure on line 12 in ALICE3/Tasks/CMakeLists.txt

View workflow job for this annotation

GitHub Actions / O2 linter

[name/o2-workflow]

Workflow name alice3-qa-multiplicity does not match its file name alice3-qa-multiplicity.cxx. (Matches alice3QaMultiplicity.cxx.)
SOURCES alice3-qa-multiplicity.cxx
PUBLIC_LINK_LIBRARIES O2::Framework O2Physics::AnalysisCore
COMPONENT_NAME Analysis)

o2physics_add_dpl_workflow(alice3-qa-singleparticle

Check failure on line 17 in ALICE3/Tasks/CMakeLists.txt

View workflow job for this annotation

GitHub Actions / O2 linter

[name/o2-workflow]

Workflow name alice3-qa-singleparticle does not match its file name alice3-qa-singleparticle.cxx. (Matches alice3QaSingleparticle.cxx.)
SOURCES alice3-qa-singleparticle.cxx
PUBLIC_LINK_LIBRARIES O2::Framework O2Physics::AnalysisCore O2::FrameworkPhysicsSupport
COMPONENT_NAME Analysis)

o2physics_add_dpl_workflow(alice3-lutmaker

Check failure on line 22 in ALICE3/Tasks/CMakeLists.txt

View workflow job for this annotation

GitHub Actions / O2 linter

[name/o2-workflow]

Workflow name alice3-lutmaker does not match its file name alice3-lutmaker.cxx. (Matches alice3Lutmaker.cxx.)
SOURCES alice3-lutmaker.cxx
PUBLIC_LINK_LIBRARIES O2::Framework FairRoot::Base O2Physics::AnalysisCore
COMPONENT_NAME Analysis)

o2physics_add_dpl_workflow(alice3-pid-rich-qa

Check failure on line 27 in ALICE3/Tasks/CMakeLists.txt

View workflow job for this annotation

GitHub Actions / O2 linter

[name/o2-workflow]

Workflow name alice3-pid-rich-qa does not match its file name pidRICHqa.cxx. (Matches alice3PidRichQa.cxx.)
SOURCES pidRICHqa.cxx
PUBLIC_LINK_LIBRARIES O2Physics::AnalysisCore
COMPONENT_NAME Analysis)

o2physics_add_dpl_workflow(alice3-ecal-qa

Check failure on line 32 in ALICE3/Tasks/CMakeLists.txt

View workflow job for this annotation

GitHub Actions / O2 linter

[name/o2-workflow]

Workflow name alice3-ecal-qa does not match its file name ECALqa.cxx. (Matches alice3EcalQa.cxx.)
SOURCES ECALqa.cxx
PUBLIC_LINK_LIBRARIES O2Physics::AnalysisCore
COMPONENT_NAME Analysis)

o2physics_add_dpl_workflow(alice3-pid-ftof-qa

Check failure on line 37 in ALICE3/Tasks/CMakeLists.txt

View workflow job for this annotation

GitHub Actions / O2 linter

[name/o2-workflow]

Workflow name alice3-pid-ftof-qa does not match its file name pidFTOFqa.cxx. (Matches alice3PidFtofQa.cxx.)
SOURCES pidFTOFqa.cxx
PUBLIC_LINK_LIBRARIES O2Physics::AnalysisCore
COMPONENT_NAME Analysis)

o2physics_add_dpl_workflow(alice3-pid-separation-power

Check failure on line 42 in ALICE3/Tasks/CMakeLists.txt

View workflow job for this annotation

GitHub Actions / O2 linter

[name/o2-workflow]

Workflow name alice3-pid-separation-power does not match its file name alice3SeparationPower.cxx. (Matches alice3PidSeparationPower.cxx.)
SOURCES alice3SeparationPower.cxx
PUBLIC_LINK_LIBRARIES O2Physics::AnalysisCore
COMPONENT_NAME Analysis)

o2physics_add_dpl_workflow(alice3-cdeuteron

Check failure on line 47 in ALICE3/Tasks/CMakeLists.txt

View workflow job for this annotation

GitHub Actions / O2 linter

[name/o2-workflow]

Workflow name alice3-cdeuteron does not match its file name alice3-cdeuteron.cxx. (Matches alice3Cdeuteron.cxx.)
SOURCES alice3-cdeuteron.cxx
PUBLIC_LINK_LIBRARIES O2::DCAFitter O2Physics::AnalysisCore
COMPONENT_NAME Analysis)

o2physics_add_dpl_workflow(alice3-dilepton

Check failure on line 52 in ALICE3/Tasks/CMakeLists.txt

View workflow job for this annotation

GitHub Actions / O2 linter

[name/o2-workflow]

Workflow name alice3-dilepton does not match its file name alice3-dilepton.cxx. (Matches alice3Dilepton.cxx.)
SOURCES alice3-dilepton.cxx
PUBLIC_LINK_LIBRARIES O2::Framework O2Physics::AnalysisCore O2::FrameworkPhysicsSupport
COMPONENT_NAME Analysis)

o2physics_add_dpl_workflow(alice3-taskcorrelationddbar

Check failure on line 57 in ALICE3/Tasks/CMakeLists.txt

View workflow job for this annotation

GitHub Actions / O2 linter

[name/o2-workflow]

Workflow name alice3-taskcorrelationddbar does not match its file name alice3-taskcorrelationDDbar.cxx. (Matches alice3Taskcorrelationddbar.cxx.)
SOURCES alice3-taskcorrelationDDbar.cxx
PUBLIC_LINK_LIBRARIES O2Physics::AnalysisCore
COMPONENT_NAME Analysis)
Expand All @@ -68,3 +68,10 @@
SOURCES alice3Efficiency.cxx
PUBLIC_LINK_LIBRARIES O2Physics::AnalysisCore
COMPONENT_NAME Analysis)

o2physics_add_dpl_workflow(alice3-tracking-performance
SOURCES alice3TrackingPerformance.cxx
PUBLIC_LINK_LIBRARIES O2Physics::AnalysisCore
COMPONENT_NAME Analysis)


94 changes: 94 additions & 0 deletions ALICE3/Tasks/alice3TrackingPerformance.cxx
Original file line number Diff line number Diff line change
@@ -0,0 +1,94 @@
// Copyright 2019-2020 CERN and copyright holders of ALICE O2.
// See https://alice-o2.web.cern.ch/copyright for details of the copyright holders.
// All rights not expressly granted are reserved.
//
// This software is distributed under the terms of the GNU General Public
// License v3 (GPL Version 3), copied verbatim in the file "COPYING".
//
// In applying this license CERN does not waive the privileges and immunities
// granted to it by virtue of its status as an Intergovernmental Organization
// or submit itself to any jurisdiction.
///
/// \file alice3TrackingPerformance.cxx
///
/// \brief This task produces the tracking performance
///
/// \author Nicolò Jacazio, Universita del Piemonte Orientale (IT)
/// \since May 27, 2025
///

#include "Common/DataModel/TrackSelectionTables.h"

#include "Framework/AnalysisTask.h"
#include "Framework/ConfigParamRegistry.h"
#include "Framework/HistogramRegistry.h"
#include "Framework/runDataProcessing.h"

#include <map>
#include <vector>

using namespace o2;
using namespace o2::framework;
std::map<int, std::shared_ptr<TH2>> ptResolutionVsPt;
std::map<int, std::shared_ptr<TH2>> invPtResolutionVsPt;
std::map<int, std::shared_ptr<TH2>> dcaXyResolutionVsPt;
std::map<int, std::shared_ptr<TH2>> dcaZResolutionVsPt;

struct alice3TrackingPerformance {
Configurable<std::vector<int>> pdgCodes{"pdgCodes", {211}, "List of PDG codes to consider for efficiency calculation"};
HistogramRegistry histos{"Histos", {}, OutputObjHandlingPolicy::AnalysisObject};
Configurable<std::pair<float, float>> etaRange{"etaRange", {-5.f, 5.f}, "Eta range for efficiency calculation"};

void init(o2::framework::InitContext&)
{
const AxisSpec axisPt{100, 0, 10, "p_{T} (GeV/c)"};
const AxisSpec axisPtDelta{100, -1, 1, "p_{T}^{gen} - p_{T}^{reco} (GeV/c)"};
const AxisSpec axisInvPtDelta{100, -1, 1, "1./p_{T}^{gen} - 1./p_{T}^{reco} (GeV/c)^{-1}"};
const AxisSpec axisDcaXy{100, -1, 1, "DCA_{xy} (cm)"};
const AxisSpec axisDcaZ{100, -1, 1, "DCA_{z} (cm)"};
for (auto pdg : pdgCodes.value) {
ptResolutionVsPt[pdg] = histos.add<TH2>(Form("ptResolutionVsPt_%d", pdg), "", kTH2D, {axisPt, axisPtDelta});
invPtResolutionVsPt[pdg] = histos.add<TH2>(Form("invPtResolutionVsPt_%d", pdg), "", kTH2D, {axisPt, axisInvPtDelta});
dcaXyResolutionVsPt[pdg] = histos.add<TH2>(Form("dcaXyResolutionVsPt_%d", pdg), "", kTH2D, {axisPt, axisDcaXy});
dcaZResolutionVsPt[pdg] = histos.add<TH2>(Form("dcaZResolutionVsPt_%d", pdg), "", kTH2D, {axisPt, axisDcaZ});
}
}

void process(soa::Join<aod::Tracks, o2::aod::McTrackLabels, o2::aod::TracksDCA> const& tracks,
aod::McParticles const&)
{
auto isParticleSelected = [&](const o2::aod::McParticle& p) {
if (!p.isPhysicalPrimary()) {
return false;
}
if (p.eta() < etaRange.value.first) {
return false;
}
if (p.eta() > etaRange.value.second) {
return false;
}
return true;
};
for (const auto& track : tracks) {
if (!track.has_mcParticle()) {
continue;
}
const auto& mcParticle = track.mcParticle();
if (!isParticleSelected(mcParticle)) {
continue;
}
if (ptResolutionVsPt.find(mcParticle.pdgCode()) == ptResolutionVsPt.end()) {
continue;
}
ptResolutionVsPt[mcParticle.pdgCode()]->Fill(mcParticle.pt(), mcParticle.pt() - track.pt());
invPtResolutionVsPt[mcParticle.pdgCode()]->Fill(mcParticle.pt(), 1.f / mcParticle.pt() - 1.f / track.pt());
dcaXyResolutionVsPt[mcParticle.pdgCode()]->Fill(mcParticle.pt(), track.dcaXY());
dcaZResolutionVsPt[mcParticle.pdgCode()]->Fill(mcParticle.pt(), track.dcaZ());
}
}
};

WorkflowSpec defineDataProcessing(ConfigContext const& ctx)
{
return WorkflowSpec{adaptAnalysisTask<alice3TrackingPerformance>(ctx)};
}
Loading