Skip to content

Commit

Permalink
Split TOF and TPC PID Response
Browse files Browse the repository at this point in the history
Update

Alighn

Update
  • Loading branch information
njacazio committed Dec 12, 2024
1 parent f640ac8 commit b1edcf4
Show file tree
Hide file tree
Showing 342 changed files with 1,529 additions and 1,141 deletions.
2 changes: 1 addition & 1 deletion ALICE3/TableProducer/alice3-pidTOF.cxx
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@
#include "Framework/HistogramRegistry.h"
#include "ReconstructionDataFormats/Track.h"
#include "CCDB/BasicCCDBManager.h"
#include "Common/DataModel/PIDResponse.h"
#include "Common/DataModel/PIDResponseTOF.h"
#include "ALICE3/Core/TOFResoALICE3.h"
#include "Common/DataModel/TrackSelectionTables.h"
#include "Framework/RunningWorkflowInfo.h"
Expand Down
2 changes: 1 addition & 1 deletion ALICE3/Tasks/ECALqa.cxx
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@
// O2 includes
#include "Framework/AnalysisTask.h"
#include "ALICE3/DataModel/ECAL.h"
#include "Common/DataModel/PIDResponse.h"
#include "Common/DataModel/PIDResponseTOF.h"
#include "ReconstructionDataFormats/PID.h"
#include "Framework/HistogramRegistry.h"
#include "Framework/runDataProcessing.h"
Expand Down
2 changes: 1 addition & 1 deletion ALICE3/Tasks/alice3-cdeuteron.cxx
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@
#include "ReconstructionDataFormats/PID.h"
#include "Common/Core/RecoDecay.h"
#include "DCAFitter/DCAFitterN.h"
#include "Common/DataModel/PIDResponse.h"
#include "Common/DataModel/PIDResponseTOF.h"
#include "Common/Core/trackUtilities.h"

using namespace o2;
Expand Down
2 changes: 1 addition & 1 deletion ALICE3/Tasks/pidRICHqa.cxx
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@
// O2 includes
#include "Framework/AnalysisTask.h"
#include "ALICE3/DataModel/RICH.h"
#include "Common/DataModel/PIDResponse.h"
#include "Common/DataModel/PIDResponseTOF.h"
#include "ReconstructionDataFormats/PID.h"

using namespace o2;
Expand Down
6 changes: 5 additions & 1 deletion Common/DataModel/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,11 @@ o2physics_add_header_only_library(DataModel
EventSelection.h
FT0Corrected.h
Multiplicity.h
PIDResponse.h
PIDResponseITS.h
PIDResponseTPC.h
PIDResponseTOF.h
PIDResponseCombined.h
PIDUtils.h
CollisionAssociationTables.h
TrackSelectionTables.h
McCollisionExtra.h
Expand Down
804 changes: 0 additions & 804 deletions Common/DataModel/PIDResponse.h

This file was deleted.

76 changes: 76 additions & 0 deletions Common/DataModel/PIDResponseCombined.h
Original file line number Diff line number Diff line change
@@ -0,0 +1,76 @@
// 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 PIDResponseCombined.h
/// \author Nicolò Jacazio [email protected]
/// \brief Set of tables, tasks and utilities to provide the interface between
/// the analysis data model and the combined PID response
///

#ifndef COMMON_DATAMODEL_PIDRESPONSECOMBINED_H_
#define COMMON_DATAMODEL_PIDRESPONSECOMBINED_H_

#include <experimental/type_traits>

// O2 includes
#include "Framework/ASoA.h"
#include "Framework/AnalysisDataModel.h"
#include "ReconstructionDataFormats/PID.h"
#include "Framework/Logger.h"

namespace o2::aod
{

namespace pidbayes
{
typedef int8_t binned_prob_t;
// Bayesian probabilities with reduced size
DECLARE_SOA_COLUMN(BayesEl, bayesEl, binned_prob_t); //! Bayesian probability for electron expressed in %
DECLARE_SOA_COLUMN(BayesMu, bayesMu, binned_prob_t); //! Bayesian probability for muon expressed in %
DECLARE_SOA_COLUMN(BayesPi, bayesPi, binned_prob_t); //! Bayesian probability for pion expressed in %
DECLARE_SOA_COLUMN(BayesKa, bayesKa, binned_prob_t); //! Bayesian probability for kaon expressed in %
DECLARE_SOA_COLUMN(BayesPr, bayesPr, binned_prob_t); //! Bayesian probability for proton expressed in %
DECLARE_SOA_COLUMN(BayesDe, bayesDe, binned_prob_t); //! Bayesian probability for deuteron expressed in %
DECLARE_SOA_COLUMN(BayesTr, bayesTr, binned_prob_t); //! Bayesian probability for triton expressed in %
DECLARE_SOA_COLUMN(BayesHe, bayesHe, binned_prob_t); //! Bayesian probability for helium3 expressed in %
DECLARE_SOA_COLUMN(BayesAl, bayesAl, binned_prob_t); //! Bayesian probability for alpha expressed in %
DECLARE_SOA_COLUMN(BayesProb, bayesProb, binned_prob_t); //! Bayesian probability of the most probable ID
DECLARE_SOA_COLUMN(BayesID, bayesID, o2::track::pid_constants::ID); //! Most probable ID

} // namespace pidbayes

// Table for each particle hypothesis
DECLARE_SOA_TABLE(pidBayesEl, "AOD", "pidBayesEl", //! Binned (in percentage) Bayesian probability of having a Electron
pidbayes::BayesEl);
DECLARE_SOA_TABLE(pidBayesMu, "AOD", "pidBayesMu", //! Binned (in percentage) Bayesian probability of having a Muon
pidbayes::BayesMu);
DECLARE_SOA_TABLE(pidBayesPi, "AOD", "pidBayesPi", //! Binned (in percentage) Bayesian probability of having a Pion
pidbayes::BayesPi);
DECLARE_SOA_TABLE(pidBayesKa, "AOD", "pidBayesKa", //! Binned (in percentage) Bayesian probability of having a Kaon
pidbayes::BayesKa);
DECLARE_SOA_TABLE(pidBayesPr, "AOD", "pidBayesPr", //! Binned (in percentage) Bayesian probability of having a Proton
pidbayes::BayesPr);
DECLARE_SOA_TABLE(pidBayesDe, "AOD", "pidBayesDe", //! Binned (in percentage) Bayesian probability of having a Deuteron
pidbayes::BayesDe);
DECLARE_SOA_TABLE(pidBayesTr, "AOD", "pidBayesTr", //! Binned (in percentage) Bayesian probability of having a Triton
pidbayes::BayesTr);
DECLARE_SOA_TABLE(pidBayesHe, "AOD", "pidBayesHe", //! Binned (in percentage) Bayesian probability of having a Helium3
pidbayes::BayesHe);
DECLARE_SOA_TABLE(pidBayesAl, "AOD", "pidBayesAl", //! Binned (in percentage) Bayesian probability of having a Alpha
pidbayes::BayesAl);

// Table for the most probable particle
DECLARE_SOA_TABLE(pidBayes, "AOD", "pidBayes", pidbayes::BayesProb, pidbayes::BayesID); //! Index of the most probable ID and its bayesian probability

} // namespace o2::aod

#endif // COMMON_DATAMODEL_PIDRESPONSECOMBINED_H_
Loading

0 comments on commit b1edcf4

Please sign in to comment.