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
116 changes: 116 additions & 0 deletions PWGLF/DataModel/LFHypernucleiTables.h
Original file line number Diff line number Diff line change
@@ -0,0 +1,116 @@
// 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 LFHypernucleiTables.h
/// \brief Slim hypernuclei tables
///

#include "Framework/AnalysisDataModel.h"
#include "Framework/ASoAHelpers.h"

#ifndef PWGLF_DATAMODEL_LFHYPERNUCLEITABLES_H_
#define PWGLF_DATAMODEL_LFHYPERNUCLEITABLES_H_

namespace o2::aod
{
namespace hyperrec
{
DECLARE_SOA_COLUMN(IsMatter, isMatter, bool); // bool: true for matter
DECLARE_SOA_COLUMN(Pt, pt, float); // Momentum of the candidate (x direction)
DECLARE_SOA_COLUMN(Phi, phi, float); // Momentum of the candidate (y direction)
DECLARE_SOA_COLUMN(Eta, eta, float); // Momentum of the candidate (z direction)
DECLARE_SOA_COLUMN(XDecVtx, xDecVtx, float); // Decay vertex of the candidate (x direction)
DECLARE_SOA_COLUMN(YDecVtx, yDecVtx, float); // Decay vertex of the candidate (y direction)
DECLARE_SOA_COLUMN(ZDecVtx, zDecVtx, float); // Decay vertex of the candidate (z direction)
DECLARE_SOA_COLUMN(MassH3L, massH3L, float); // Squared mass w/ hypertriton mass hypo
DECLARE_SOA_COLUMN(MassH4L, massH4L, float); // Squared mass w/ H4L mass hypo
DECLARE_SOA_COLUMN(DcaV0Daug, dcaV0Daug, float); // DCA between daughters
DECLARE_SOA_COLUMN(CosPA, cosPA, double); // Cosine of the pointing angle
DECLARE_SOA_COLUMN(NSigmaHe, nSigmaHe, float); // Number of sigmas of the He daughter
DECLARE_SOA_COLUMN(NTPCclusHe, nTPCclusHe, uint8_t); // Number of TPC clusters of the He daughter
DECLARE_SOA_COLUMN(NTPCclusPi, nTPCclusPi, uint8_t); // Number of TPC clusters of the Pi daughter
DECLARE_SOA_COLUMN(TPCsignalHe, tpcSignalHe, uint16_t); // TPC signal of the He daughter
DECLARE_SOA_COLUMN(TPCsignalPi, tpcSignalPi, uint16_t); // TPC signal of the Pi daughter
DECLARE_SOA_COLUMN(TPCmomHe, tpcMomHe, float); // TPC momentum of the He daughter
DECLARE_SOA_COLUMN(TPCmomPi, tpcMomPi, float); // TPC momentum of the Pi daughter
DECLARE_SOA_COLUMN(DcaHe, dcaHe, float); // DCA between He daughter and V0
DECLARE_SOA_COLUMN(DcaPi, dcaPi, float); // DCA between pi daughter and V0
DECLARE_SOA_COLUMN(GenPt, genPt, float); // Momentum of the candidate (x direction)
DECLARE_SOA_COLUMN(GenPhi, genPhi, float); // Momentum of the candidate (y direction)
DECLARE_SOA_COLUMN(GenEta, genEta, float); // Momentum of the candidate (z direction)
DECLARE_SOA_COLUMN(GenXDecVtx, genXDecVtx, float); // Decay vertex of the candidate (x direction)
DECLARE_SOA_COLUMN(GenYDecVtx, genYDecVtx, float); // Decay vertex of the candidate (y direction)
DECLARE_SOA_COLUMN(GenZDecVtx, genZDecVtx, float); // Decay vertex of the candidate (z direction)
DECLARE_SOA_COLUMN(IsReco, isReco, bool); // bool: true for reco
DECLARE_SOA_COLUMN(IsSignal, isSignal, bool); // bool: true for signal
} // namespace hyperrec

DECLARE_SOA_TABLE(DataHypCands, "AOD", "DATAHYPCANDS",
o2::soa::Index<>,
hyperrec::IsMatter,
hyperrec::Pt,
hyperrec::Phi,
hyperrec::Eta,
hyperrec::XDecVtx,
hyperrec::YDecVtx,
hyperrec::ZDecVtx,
hyperrec::MassH3L,
hyperrec::MassH4L,
hyperrec::DcaV0Daug,
hyperrec::CosPA,
hyperrec::NSigmaHe,
hyperrec::NTPCclusHe,
hyperrec::NTPCclusPi,
hyperrec::TPCmomHe,
hyperrec::TPCmomPi,
hyperrec::TPCsignalHe,
hyperrec::TPCsignalPi,
hyperrec::DcaHe,
hyperrec::DcaPi);

DECLARE_SOA_TABLE(MCHypCands, "AOD", "MCHYPCANDS",
o2::soa::Index<>,
hyperrec::IsMatter,
hyperrec::Pt,
hyperrec::Phi,
hyperrec::Eta,
hyperrec::XDecVtx,
hyperrec::YDecVtx,
hyperrec::ZDecVtx,
hyperrec::MassH3L,
hyperrec::MassH4L,
hyperrec::DcaV0Daug,
hyperrec::CosPA,
hyperrec::NSigmaHe,
hyperrec::NTPCclusHe,
hyperrec::NTPCclusPi,
hyperrec::TPCmomHe,
hyperrec::TPCmomPi,
hyperrec::TPCsignalHe,
hyperrec::TPCsignalPi,
hyperrec::DcaHe,
hyperrec::DcaPi,
hyperrec::GenPt,
hyperrec::GenPhi,
hyperrec::GenEta,
hyperrec::GenXDecVtx,
hyperrec::GenYDecVtx,
hyperrec::GenZDecVtx,
hyperrec::IsReco,
hyperrec::IsSignal);

using DataHypCand = DataHypCands::iterator;
using MCHypCand = MCHypCands::iterator;

} // namespace o2::aod

#endif // PWGLF_DATAMODEL_LFHYPERNUCLEITABLES_H_
68 changes: 68 additions & 0 deletions PWGLF/DataModel/LFSlimNucleiTables.h
Original file line number Diff line number Diff line change
@@ -0,0 +1,68 @@
// 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 LFSlimNucleiTables.h
/// \brief Slim nuclei tables
///

#include "Framework/AnalysisDataModel.h"
#include "Framework/ASoAHelpers.h"

#ifndef PWGLF_DATAMODEL_LFSLIMNUCLEITABLES_H_
#define PWGLF_DATAMODEL_LFSLIMNUCLEITABLES_H_

namespace o2::aod
{
namespace NucleiTableNS
{
DECLARE_SOA_COLUMN(Pt, pt, float);
DECLARE_SOA_COLUMN(Eta, eta, float);
DECLARE_SOA_COLUMN(ITSclsMap, itsClsMap, uint8_t);
DECLARE_SOA_COLUMN(TPCnCls, tpcNCls, uint8_t);
DECLARE_SOA_COLUMN(DCAxy, dcaxy, int8_t);
DECLARE_SOA_COLUMN(DCAz, dcaz, int8_t);
DECLARE_SOA_COLUMN(Flags, flags, uint16_t);
DECLARE_SOA_COLUMN(TPCnsigma, tpcnsigma, uint8_t);
DECLARE_SOA_COLUMN(TOFmass, tofmass, uint8_t);
DECLARE_SOA_COLUMN(gPt, genPt, float);
DECLARE_SOA_COLUMN(gEta, genEta, float);
DECLARE_SOA_COLUMN(PDGcode, pdgCode, int);

} // namespace NucleiTableNS
DECLARE_SOA_TABLE(NucleiTable, "AOD", "NUCLEITABLE",
NucleiTableNS::Pt,
NucleiTableNS::Eta,
NucleiTableNS::ITSclsMap,
NucleiTableNS::TPCnCls,
NucleiTableNS::DCAxy,
NucleiTableNS::DCAz,
NucleiTableNS::Flags,
NucleiTableNS::TPCnsigma,
NucleiTableNS::TOFmass)

DECLARE_SOA_TABLE(NucleiTableMC, "AOD", "NUCLEITABLEMC",
NucleiTableNS::Pt,
NucleiTableNS::Eta,
NucleiTableNS::ITSclsMap,
NucleiTableNS::TPCnCls,
NucleiTableNS::DCAxy,
NucleiTableNS::DCAz,
NucleiTableNS::Flags,
NucleiTableNS::TPCnsigma,
NucleiTableNS::TOFmass,
NucleiTableNS::gPt,
NucleiTableNS::gEta,
NucleiTableNS::PDGcode)

} // namespace o2::aod

#endif // PWGLF_DATAMODEL_LFSLIMNUCLEITABLES_H_
11 changes: 11 additions & 0 deletions PWGLF/TableProducer/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -72,6 +72,17 @@ o2physics_add_dpl_workflow(nucleustreecreator
PUBLIC_LINK_LIBRARIES O2Physics::AnalysisCore
COMPONENT_NAME Analysis)

o2physics_add_dpl_workflow(nuclei-spectra
SOURCES nucleiSpectra.cxx
PUBLIC_LINK_LIBRARIES O2Physics::AnalysisCore O2::DetectorsBase
COMPONENT_NAME Analysis)

# Hypernuclei
o2physics_add_dpl_workflow(hypertriton-reco-task
SOURCES hyperRecoTask.cxx
PUBLIC_LINK_LIBRARIES O2Physics::AnalysisCore O2::DCAFitter
COMPONENT_NAME Analysis)

# Resonances
o2physics_add_dpl_workflow(reso2initializer
SOURCES LFResonanceInitializer.cxx
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,8 @@
#include "DataFormatsTPC/BetheBlochAleph.h"
#include "DCAFitter/DCAFitterN.h"

#include "PWGLF/DataModel/LFHypernucleiTables.h"

using namespace o2;
using namespace o2::framework;
using namespace o2::framework::expressions;
Expand All @@ -50,98 +52,6 @@ std::shared_ptr<TH2> hDeDx3HeSel;
std::shared_ptr<TH2> hDeDxTot;
} // namespace

namespace o2::aod
{
namespace hyperrec
{
DECLARE_SOA_COLUMN(IsMatter, isMatter, bool); // bool: true for matter
DECLARE_SOA_COLUMN(Pt, pt, float); // Momentum of the candidate (x direction)
DECLARE_SOA_COLUMN(Phi, phi, float); // Momentum of the candidate (y direction)
DECLARE_SOA_COLUMN(Eta, eta, float); // Momentum of the candidate (z direction)
DECLARE_SOA_COLUMN(XDecVtx, xDecVtx, float); // Decay vertex of the candidate (x direction)
DECLARE_SOA_COLUMN(YDecVtx, yDecVtx, float); // Decay vertex of the candidate (y direction)
DECLARE_SOA_COLUMN(ZDecVtx, zDecVtx, float); // Decay vertex of the candidate (z direction)
DECLARE_SOA_COLUMN(MassH3L, massH3L, float); // Squared mass w/ hypertriton mass hypo
DECLARE_SOA_COLUMN(MassH4L, massH4L, float); // Squared mass w/ H4L mass hypo
DECLARE_SOA_COLUMN(DcaV0Daug, dcaV0Daug, float); // DCA between daughters
DECLARE_SOA_COLUMN(CosPA, cosPA, double); // Cosine of the pointing angle
DECLARE_SOA_COLUMN(NSigmaHe, nSigmaHe, float); // Number of sigmas of the He daughter
DECLARE_SOA_COLUMN(NTPCclusHe, nTPCclusHe, uint8_t); // Number of TPC clusters of the He daughter
DECLARE_SOA_COLUMN(NTPCclusPi, nTPCclusPi, uint8_t); // Number of TPC clusters of the Pi daughter
DECLARE_SOA_COLUMN(TPCsignalHe, tpcSignalHe, uint16_t); // TPC signal of the He daughter
DECLARE_SOA_COLUMN(TPCsignalPi, tpcSignalPi, uint16_t); // TPC signal of the Pi daughter
DECLARE_SOA_COLUMN(TPCmomHe, tpcMomHe, float); // TPC momentum of the He daughter
DECLARE_SOA_COLUMN(TPCmomPi, tpcMomPi, float); // TPC momentum of the Pi daughter
DECLARE_SOA_COLUMN(DcaHe, dcaHe, float); // DCA between He daughter and V0
DECLARE_SOA_COLUMN(DcaPi, dcaPi, float); // DCA between pi daughter and V0
DECLARE_SOA_COLUMN(GenPt, genPt, float); // Momentum of the candidate (x direction)
DECLARE_SOA_COLUMN(GenPhi, genPhi, float); // Momentum of the candidate (y direction)
DECLARE_SOA_COLUMN(GenEta, genEta, float); // Momentum of the candidate (z direction)
DECLARE_SOA_COLUMN(GenXDecVtx, genXDecVtx, float); // Decay vertex of the candidate (x direction)
DECLARE_SOA_COLUMN(GenYDecVtx, genYDecVtx, float); // Decay vertex of the candidate (y direction)
DECLARE_SOA_COLUMN(GenZDecVtx, genZDecVtx, float); // Decay vertex of the candidate (z direction)
DECLARE_SOA_COLUMN(IsReco, isReco, bool); // bool: true for reco
DECLARE_SOA_COLUMN(IsSignal, isSignal, bool); // bool: true for signal
} // namespace hyperrec

DECLARE_SOA_TABLE(DataHypCands, "AOD", "DATAHYPCANDS",
o2::soa::Index<>,
hyperrec::IsMatter,
hyperrec::Pt,
hyperrec::Phi,
hyperrec::Eta,
hyperrec::XDecVtx,
hyperrec::YDecVtx,
hyperrec::ZDecVtx,
hyperrec::MassH3L,
hyperrec::MassH4L,
hyperrec::DcaV0Daug,
hyperrec::CosPA,
hyperrec::NSigmaHe,
hyperrec::NTPCclusHe,
hyperrec::NTPCclusPi,
hyperrec::TPCmomHe,
hyperrec::TPCmomPi,
hyperrec::TPCsignalHe,
hyperrec::TPCsignalPi,
hyperrec::DcaHe,
hyperrec::DcaPi);

DECLARE_SOA_TABLE(MCHypCands, "AOD", "MCHYPCANDS",
o2::soa::Index<>,
hyperrec::IsMatter,
hyperrec::Pt,
hyperrec::Phi,
hyperrec::Eta,
hyperrec::XDecVtx,
hyperrec::YDecVtx,
hyperrec::ZDecVtx,
hyperrec::MassH3L,
hyperrec::MassH4L,
hyperrec::DcaV0Daug,
hyperrec::CosPA,
hyperrec::NSigmaHe,
hyperrec::NTPCclusHe,
hyperrec::NTPCclusPi,
hyperrec::TPCmomHe,
hyperrec::TPCmomPi,
hyperrec::TPCsignalHe,
hyperrec::TPCsignalPi,
hyperrec::DcaHe,
hyperrec::DcaPi,
hyperrec::GenPt,
hyperrec::GenPhi,
hyperrec::GenEta,
hyperrec::GenXDecVtx,
hyperrec::GenYDecVtx,
hyperrec::GenZDecVtx,
hyperrec::IsReco,
hyperrec::IsSignal);

using DataHypCand = DataHypCands::iterator;
using MCHypCand = MCHypCands::iterator;
} // namespace o2::aod

struct hyperCandidate {
float recoPt() const { return std::hypot(mom[0], mom[1]); }
float recoPhi() const { return std::atan2(mom[1], mom[0]); }
Expand Down
Loading