|
| 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 LFKinkDecayTables.h |
| 14 | +/// \brief Slim tables for kinks |
| 15 | +/// \author Francesco Mazzaschi <[email protected]> |
| 16 | +/// |
| 17 | + |
| 18 | +#include "Framework/AnalysisDataModel.h" |
| 19 | +#include "Framework/ASoAHelpers.h" |
| 20 | +#include "Common/Core/RecoDecay.h" |
| 21 | + |
| 22 | +#ifndef PWGLF_DATAMODEL_LFKINKDECAYTABLES_H_ |
| 23 | +#define PWGLF_DATAMODEL_LFKINKDECAYTABLES_H_ |
| 24 | + |
| 25 | +namespace o2::aod |
| 26 | +{ |
| 27 | + |
| 28 | +namespace kinkcand |
| 29 | +{ |
| 30 | + |
| 31 | +DECLARE_SOA_INDEX_COLUMN_FULL(TrackMoth, trackMoth, int, TracksIU, "_Moth"); //! |
| 32 | +DECLARE_SOA_INDEX_COLUMN_FULL(TrackDaug, trackDaug, int, TracksIU, "_Daug"); //! |
| 33 | +DECLARE_SOA_INDEX_COLUMN(Collision, collision); //! |
| 34 | + |
| 35 | +DECLARE_SOA_COLUMN(XDecVtx, xDecVtx, float); //! Decay vertex of the candidate (x direction) |
| 36 | +DECLARE_SOA_COLUMN(YDecVtx, yDecVtx, float); //! Decay vertex of the candidate (y direction) |
| 37 | +DECLARE_SOA_COLUMN(ZDecVtx, zDecVtx, float); //! Decay vertex of the candidate (z direction) |
| 38 | +DECLARE_SOA_COLUMN(PxMoth, pxMoth, float); //! Px of the mother kink |
| 39 | +DECLARE_SOA_COLUMN(PyMoth, pyMoth, float); //! Py of the mother kink |
| 40 | +DECLARE_SOA_COLUMN(PzMoth, pzMoth, float); //! Pz of the mother kink |
| 41 | +DECLARE_SOA_COLUMN(PxDaug, pxDaug, float); //! Px of the daughter kink |
| 42 | +DECLARE_SOA_COLUMN(PyDaug, pyDaug, float); //! Py of the daughter kink |
| 43 | +DECLARE_SOA_COLUMN(PzDaug, pzDaug, float); //! Pz of the daughter kink |
| 44 | +DECLARE_SOA_COLUMN(MothSign, mothSign, int); //! Sign of the mother kink |
| 45 | +DECLARE_SOA_COLUMN(DcaMothPv, dcaMothPv, float); //! DCA of the mother to the primary vertex |
| 46 | +DECLARE_SOA_COLUMN(DcaDaugPv, dcaDaugPv, float); //! DCA of the daughter kink to the primary vertex |
| 47 | +DECLARE_SOA_COLUMN(DcaKinkTopo, dcaKinkTopo, float); //! DCA of the kink topology |
| 48 | + |
| 49 | +// DYNAMIC COLUMNS |
| 50 | + |
| 51 | +DECLARE_SOA_DYNAMIC_COLUMN(PxDaugNeut, pxDaugNeut, //! Px of the daughter neutral particle |
| 52 | + [](float pxmoth, float pxdau) -> float { return pxmoth - pxdau; }); |
| 53 | + |
| 54 | +DECLARE_SOA_DYNAMIC_COLUMN(PyDaugNeut, pyDaugNeut, //! Py of the daughter neutral particle |
| 55 | + [](float pymoth, float pydau) -> float { return pymoth - pydau; }); |
| 56 | + |
| 57 | +DECLARE_SOA_DYNAMIC_COLUMN(PzDaugNeut, pzDaugNeut, //! Pz of the daughter neutral particle |
| 58 | + [](float pzmoth, float pzdau) -> float { return pzmoth - pzdau; }); |
| 59 | + |
| 60 | +DECLARE_SOA_DYNAMIC_COLUMN(PtMoth, ptMoth, //! pT of the mother kink |
| 61 | + [](float pxmoth, float pymoth) -> float { return std::hypot(pxmoth, pymoth); }); |
| 62 | + |
| 63 | +DECLARE_SOA_DYNAMIC_COLUMN(PtDaug, ptDaug, //! |
| 64 | + [](float pxdaug, float pydaug) -> float { return std::hypot(pxdaug, pydaug); }); |
| 65 | + |
| 66 | +DECLARE_SOA_DYNAMIC_COLUMN(MSigmaMinus, mSigmaMinus, //! mass under sigma minus hypothesis |
| 67 | + [](float pxmoth, float pymoth, float pzmoth, float pxch, float pych, float pzch) -> float { |
| 68 | + float pxneut = pxmoth - pxch; |
| 69 | + float pyneut = pymoth - pych; |
| 70 | + float pzneut = pzmoth - pzch; |
| 71 | + return RecoDecay::m(std::array{std::array{pxch, pych, pzch}, std::array{pxneut, pyneut, pzneut}}, std::array{o2::constants::physics::MassPionCharged, o2::constants::physics::MassNeutron}); }); |
| 72 | + |
| 73 | +DECLARE_SOA_DYNAMIC_COLUMN(MSigmaPlus, mSigmaPlus, //! mass under sigma plus hypothesis |
| 74 | + [](float pxmoth, float pymoth, float pzmoth, float pxch, float pych, float pzch) -> float { |
| 75 | + float pxneut = pxmoth - pxch; |
| 76 | + float pyneut = pymoth - pych; |
| 77 | + float pzneut = pzmoth - pzch; |
| 78 | + return RecoDecay::m(std::array{std::array{pxch, pych, pzch}, std::array{pxneut, pyneut, pzneut}}, std::array{o2::constants::physics::MassProton, o2::constants::physics::MassPionNeutral}); }); |
| 79 | + |
| 80 | +} // namespace kinkcand |
| 81 | + |
| 82 | +DECLARE_SOA_TABLE(KinkCands, "AOD", "KINKCANDS", |
| 83 | + o2::soa::Index<>, kinkcand::CollisionId, kinkcand::TrackMothId, kinkcand::TrackDaugId, |
| 84 | + kinkcand::XDecVtx, kinkcand::YDecVtx, kinkcand::ZDecVtx, |
| 85 | + kinkcand::MothSign, kinkcand::PxMoth, kinkcand::PyMoth, kinkcand::PzMoth, |
| 86 | + kinkcand::PxDaug, kinkcand::PyDaug, kinkcand::PzDaug, |
| 87 | + kinkcand::DcaMothPv, kinkcand::DcaDaugPv, kinkcand::DcaKinkTopo, |
| 88 | + |
| 89 | + // dynamic columns |
| 90 | + kinkcand::PxDaugNeut<kinkcand::PxMoth, kinkcand::PxDaug>, |
| 91 | + kinkcand::PyDaugNeut<kinkcand::PyMoth, kinkcand::PyDaug>, |
| 92 | + kinkcand::PzDaugNeut<kinkcand::PzMoth, kinkcand::PzDaug>, |
| 93 | + kinkcand::PtMoth<kinkcand::PxMoth, kinkcand::PyMoth>, |
| 94 | + kinkcand::PtDaug<kinkcand::PxDaug, kinkcand::PyDaug>, |
| 95 | + kinkcand::MSigmaMinus<kinkcand::PxMoth, kinkcand::PyMoth, kinkcand::PzMoth, kinkcand::PxDaug, kinkcand::PyDaug, kinkcand::PzDaug>, |
| 96 | + kinkcand::MSigmaPlus<kinkcand::PxMoth, kinkcand::PyMoth, kinkcand::PzMoth, kinkcand::PxDaug, kinkcand::PyDaug, kinkcand::PzDaug>); |
| 97 | + |
| 98 | +} // namespace o2::aod |
| 99 | + |
| 100 | +#endif // PWGLF_DATAMODEL_LFKINKDECAYTABLES_H_ |
0 commit comments