|
| 1 | +// Copyright CERN and copyright holders of ALICE O2. This software is |
| 2 | +// distributed under the terms of the GNU General Public License v3 (GPL |
| 3 | +// Version 3), copied verbatim in the file "COPYING". |
| 4 | +// |
| 5 | +// See http://alice-o2.web.cern.ch/license for full licensing information. |
| 6 | +// |
| 7 | +// In applying this license CERN does not waive the privileges and immunities |
| 8 | +// granted to it by virtue of its status as an Intergovernmental Organization |
| 9 | +// or submit itself to any jurisdiction. |
| 10 | +#ifndef O2_ANALYSIS_STRANGENESSTABLES_H_ |
| 11 | +#define O2_ANALYSIS_STRANGENESSTABLES_H_ |
| 12 | + |
| 13 | +#include "Framework/AnalysisDataModel.h" |
| 14 | +#include "Analysis/RecoDecay.h" |
| 15 | + |
| 16 | +namespace o2::aod |
| 17 | +{ |
| 18 | +namespace v0data |
| 19 | +{ |
| 20 | +//General V0 properties: position, momentum |
| 21 | +DECLARE_SOA_COLUMN(PxPos, pxpos, float); |
| 22 | +DECLARE_SOA_COLUMN(PyPos, pypos, float); |
| 23 | +DECLARE_SOA_COLUMN(PzPos, pzpos, float); |
| 24 | +DECLARE_SOA_COLUMN(PxNeg, pxneg, float); |
| 25 | +DECLARE_SOA_COLUMN(PyNeg, pyneg, float); |
| 26 | +DECLARE_SOA_COLUMN(PzNeg, pzneg, float); |
| 27 | +DECLARE_SOA_COLUMN(X, x, float); |
| 28 | +DECLARE_SOA_COLUMN(Y, y, float); |
| 29 | +DECLARE_SOA_COLUMN(Z, z, float); |
| 30 | + |
| 31 | +//Saved from finding: DCAs |
| 32 | +DECLARE_SOA_COLUMN(DCAV0Daughters, dcaV0daughters, float); |
| 33 | +DECLARE_SOA_COLUMN(DCAPosToPV, dcapostopv, float); |
| 34 | +DECLARE_SOA_COLUMN(DCANegToPV, dcanegtopv, float); |
| 35 | + |
| 36 | +//Derived expressions |
| 37 | +//Momenta |
| 38 | +DECLARE_SOA_DYNAMIC_COLUMN(Pt, pt, [](float pxpos, float pypos, float pxneg, float pyneg) { return RecoDecay::sqrtSumOfSquares(pxpos + pxneg, pypos + pyneg); }); |
| 39 | + |
| 40 | +//Length quantities |
| 41 | +DECLARE_SOA_DYNAMIC_COLUMN(V0Radius, v0radius, [](float x, float y) { return RecoDecay::sqrtSumOfSquares(x, y); }); |
| 42 | + |
| 43 | +//CosPA |
| 44 | +DECLARE_SOA_DYNAMIC_COLUMN(V0CosPA, v0cosPA, [](float X, float Y, float Z, float Px, float Py, float Pz, float pvX, float pvY, float pvZ) { return RecoDecay::CPA(array{pvX, pvY, pvZ}, array{X, Y, Z}, array{Px, Py, Pz}); }); |
| 45 | + |
| 46 | +//Calculated on the fly with mass assumption + dynamic tables |
| 47 | +DECLARE_SOA_DYNAMIC_COLUMN(MLambda, mLambda, [](float pxpos, float pypos, float pzpos, float pxneg, float pyneg, float pzneg) { return RecoDecay::M(array{array{pxpos, pypos, pzpos}, array{pxneg, pyneg, pzneg}}, array{RecoDecay::getMassPDG(kProton), RecoDecay::getMassPDG(kPiPlus)}); }); |
| 48 | +DECLARE_SOA_DYNAMIC_COLUMN(MAntiLambda, mAntiLambda, [](float pxpos, float pypos, float pzpos, float pxneg, float pyneg, float pzneg) { return RecoDecay::M(array{array{pxpos, pypos, pzpos}, array{pxneg, pyneg, pzneg}}, array{RecoDecay::getMassPDG(kPiPlus), RecoDecay::getMassPDG(kProton)}); }); |
| 49 | +DECLARE_SOA_DYNAMIC_COLUMN(MK0Short, mK0Short, [](float pxpos, float pypos, float pzpos, float pxneg, float pyneg, float pzneg) { return RecoDecay::M(array{array{pxpos, pypos, pzpos}, array{pxneg, pyneg, pzneg}}, array{RecoDecay::getMassPDG(kPiPlus), RecoDecay::getMassPDG(kPiPlus)}); }); |
| 50 | +} // namespace v0data |
| 51 | + |
| 52 | +namespace v0dataext |
| 53 | +{ |
| 54 | +DECLARE_SOA_EXPRESSION_COLUMN(Px, px, float, 1.f * aod::v0data::pxpos + 1.f * aod::v0data::pxneg); |
| 55 | +DECLARE_SOA_EXPRESSION_COLUMN(Py, py, float, 1.f * aod::v0data::pypos + 1.f * aod::v0data::pyneg); |
| 56 | +DECLARE_SOA_EXPRESSION_COLUMN(Pz, pz, float, 1.f * aod::v0data::pzpos + 1.f * aod::v0data::pzneg); |
| 57 | +} // namespace v0dataext |
| 58 | + |
| 59 | +DECLARE_SOA_TABLE(V0Data, "AOD", "V0DATA", |
| 60 | + v0data::X, v0data::Y, v0data::Z, |
| 61 | + v0data::PxPos, v0data::PyPos, v0data::PzPos, |
| 62 | + v0data::PxNeg, v0data::PyNeg, v0data::PzNeg, |
| 63 | + v0data::DCAV0Daughters, v0data::DCAPosToPV, v0data::DCANegToPV, |
| 64 | + |
| 65 | + //Dynamic columns |
| 66 | + v0data::Pt<v0data::PxPos, v0data::PyPos, v0data::PxNeg, v0data::PyNeg>, |
| 67 | + v0data::V0Radius<v0data::X, v0data::Y>, |
| 68 | + v0data::V0CosPA<v0data::X, v0data::Y, v0data::Z, v0dataext::Px, v0dataext::Py, v0dataext::Pz>, |
| 69 | + |
| 70 | + //Invariant masses |
| 71 | + v0data::MLambda<v0data::PxPos, v0data::PyPos, v0data::PzPos, v0data::PxNeg, v0data::PyNeg, v0data::PzNeg>, |
| 72 | + v0data::MAntiLambda<v0data::PxPos, v0data::PyPos, v0data::PzPos, v0data::PxNeg, v0data::PyNeg, v0data::PzNeg>, |
| 73 | + v0data::MK0Short<v0data::PxPos, v0data::PyPos, v0data::PzPos, v0data::PxNeg, v0data::PyNeg, v0data::PzNeg>); |
| 74 | + |
| 75 | +using V0DataOrigin = V0Data; |
| 76 | + |
| 77 | +// extended table with expression columns that can be used as arguments of dynamic columns |
| 78 | +DECLARE_SOA_EXTENDED_TABLE_USER(V0DataExt, V0DataOrigin, "V0DATAEXT", |
| 79 | + v0dataext::Px, v0dataext::Py, v0dataext::Pz); |
| 80 | + |
| 81 | +using V0DataFull = V0DataExt; |
| 82 | + |
| 83 | +} // namespace o2::aod |
| 84 | + |
| 85 | +#endif // O2_ANALYSIS_STRANGENESSTABLES_H_ |
0 commit comments