|
| 1 | +// Copyright 2019-2020 CERN and copyright holders of ALICE O2. |
| 2 | +// See https://alice-o2.web.cern.ch/copyright for details of the copyright holders. |
| 3 | +// All rights not expressly granted are reserved. |
| 4 | +// |
| 5 | +// This software is distributed under the terms of the GNU General Public |
| 6 | +// License v3 (GPL Version 3), copied verbatim in the file "COPYING". |
| 7 | +// |
| 8 | +// In applying this license CERN does not waive the privileges and immunities |
| 9 | +// granted to it by virtue of its status as an Intergovernmental Organization |
| 10 | +// or submit itself to any jurisdiction. |
| 11 | + |
| 12 | +/// |
| 13 | +/// \file PIDResponseCombined.h |
| 14 | +/// \author Nicolò Jacazio nicolo.jacazio@cern.ch |
| 15 | +/// \brief Set of tables, tasks and utilities to provide the interface between |
| 16 | +/// the analysis data model and the combined PID response |
| 17 | +/// |
| 18 | + |
| 19 | +#ifndef COMMON_DATAMODEL_PIDRESPONSECOMBINED_H_ |
| 20 | +#define COMMON_DATAMODEL_PIDRESPONSECOMBINED_H_ |
| 21 | + |
| 22 | +#include <experimental/type_traits> |
| 23 | + |
| 24 | +// O2 includes |
| 25 | +#include "Framework/ASoA.h" |
| 26 | +#include "Framework/AnalysisDataModel.h" |
| 27 | +#include "ReconstructionDataFormats/PID.h" |
| 28 | +#include "Framework/Logger.h" |
| 29 | + |
| 30 | +namespace o2::aod |
| 31 | +{ |
| 32 | + |
| 33 | +namespace pidbayes |
| 34 | +{ |
| 35 | +typedef int8_t binned_prob_t; |
| 36 | +// Bayesian probabilities with reduced size |
| 37 | +DECLARE_SOA_COLUMN(BayesEl, bayesEl, binned_prob_t); //! Bayesian probability for electron expressed in % |
| 38 | +DECLARE_SOA_COLUMN(BayesMu, bayesMu, binned_prob_t); //! Bayesian probability for muon expressed in % |
| 39 | +DECLARE_SOA_COLUMN(BayesPi, bayesPi, binned_prob_t); //! Bayesian probability for pion expressed in % |
| 40 | +DECLARE_SOA_COLUMN(BayesKa, bayesKa, binned_prob_t); //! Bayesian probability for kaon expressed in % |
| 41 | +DECLARE_SOA_COLUMN(BayesPr, bayesPr, binned_prob_t); //! Bayesian probability for proton expressed in % |
| 42 | +DECLARE_SOA_COLUMN(BayesDe, bayesDe, binned_prob_t); //! Bayesian probability for deuteron expressed in % |
| 43 | +DECLARE_SOA_COLUMN(BayesTr, bayesTr, binned_prob_t); //! Bayesian probability for triton expressed in % |
| 44 | +DECLARE_SOA_COLUMN(BayesHe, bayesHe, binned_prob_t); //! Bayesian probability for helium3 expressed in % |
| 45 | +DECLARE_SOA_COLUMN(BayesAl, bayesAl, binned_prob_t); //! Bayesian probability for alpha expressed in % |
| 46 | +DECLARE_SOA_COLUMN(BayesProb, bayesProb, binned_prob_t); //! Bayesian probability of the most probable ID |
| 47 | +DECLARE_SOA_COLUMN(BayesID, bayesID, o2::track::pid_constants::ID); //! Most probable ID |
| 48 | + |
| 49 | +} // namespace pidbayes |
| 50 | + |
| 51 | +// Table for each particle hypothesis |
| 52 | +DECLARE_SOA_TABLE(pidBayesEl, "AOD", "pidBayesEl", //! Binned (in percentage) Bayesian probability of having a Electron |
| 53 | + pidbayes::BayesEl); |
| 54 | +DECLARE_SOA_TABLE(pidBayesMu, "AOD", "pidBayesMu", //! Binned (in percentage) Bayesian probability of having a Muon |
| 55 | + pidbayes::BayesMu); |
| 56 | +DECLARE_SOA_TABLE(pidBayesPi, "AOD", "pidBayesPi", //! Binned (in percentage) Bayesian probability of having a Pion |
| 57 | + pidbayes::BayesPi); |
| 58 | +DECLARE_SOA_TABLE(pidBayesKa, "AOD", "pidBayesKa", //! Binned (in percentage) Bayesian probability of having a Kaon |
| 59 | + pidbayes::BayesKa); |
| 60 | +DECLARE_SOA_TABLE(pidBayesPr, "AOD", "pidBayesPr", //! Binned (in percentage) Bayesian probability of having a Proton |
| 61 | + pidbayes::BayesPr); |
| 62 | +DECLARE_SOA_TABLE(pidBayesDe, "AOD", "pidBayesDe", //! Binned (in percentage) Bayesian probability of having a Deuteron |
| 63 | + pidbayes::BayesDe); |
| 64 | +DECLARE_SOA_TABLE(pidBayesTr, "AOD", "pidBayesTr", //! Binned (in percentage) Bayesian probability of having a Triton |
| 65 | + pidbayes::BayesTr); |
| 66 | +DECLARE_SOA_TABLE(pidBayesHe, "AOD", "pidBayesHe", //! Binned (in percentage) Bayesian probability of having a Helium3 |
| 67 | + pidbayes::BayesHe); |
| 68 | +DECLARE_SOA_TABLE(pidBayesAl, "AOD", "pidBayesAl", //! Binned (in percentage) Bayesian probability of having a Alpha |
| 69 | + pidbayes::BayesAl); |
| 70 | + |
| 71 | +// Table for the most probable particle |
| 72 | +DECLARE_SOA_TABLE(pidBayes, "AOD", "pidBayes", pidbayes::BayesProb, pidbayes::BayesID); //! Index of the most probable ID and its bayesian probability |
| 73 | + |
| 74 | +} // namespace o2::aod |
| 75 | + |
| 76 | +#endif // COMMON_DATAMODEL_PIDRESPONSECOMBINED_H_ |
0 commit comments