|
| 1 | +// Copyright 2019-2025 CERN and copyright holders of ALICE O2. |
| 2 | +// See https://alice-o2.web.cern.ch/copyright for details. |
| 3 | + |
| 4 | +#ifndef PWGJE_DATAMODEL_SLIMTABLES_H_ |
| 5 | +#define PWGJE_DATAMODEL_SLIMTABLES_H_ |
| 6 | +#include "Common/DataModel/TrackSelectionTables.h" |
| 7 | +#include "PWGJE/Core/JetDerivedDataUtilities.h" |
| 8 | + |
| 9 | + |
| 10 | +#include <Framework/ASoA.h> |
| 11 | +#include <Framework/AnalysisDataModel.h> |
| 12 | + |
| 13 | +#include <Rtypes.h> |
| 14 | + |
| 15 | +#include <cstdint> |
| 16 | + |
| 17 | + |
| 18 | +namespace o2::aod |
| 19 | +{ |
| 20 | + |
| 21 | +namespace slimcollision |
| 22 | +{ |
| 23 | +DECLARE_SOA_INDEX_COLUMN(Collision, collision); |
| 24 | +DECLARE_SOA_COLUMN(PosZ, posZ, float); |
| 25 | +DECLARE_SOA_COLUMN(CentFT0C, centFT0C, float); |
| 26 | +DECLARE_SOA_COLUMN(CentFT0M, centFT0M, float); |
| 27 | +DECLARE_SOA_COLUMN(Weight, weight, float); |
| 28 | +DECLARE_SOA_COLUMN(EventSel, eventSel, uint16_t); |
| 29 | +DECLARE_SOA_COLUMN(TrackOccupancyInTimeRange, trackOccupancyInTimeRange, int); |
| 30 | +} |
| 31 | + |
| 32 | +DECLARE_SOA_TABLE(SlimCollisions, "AOD", "SlimCollisions", |
| 33 | + o2::soa::Index<>, |
| 34 | + slimcollision::PosZ, |
| 35 | + slimcollision::CentFT0C, |
| 36 | + slimcollision::CentFT0M, |
| 37 | + slimcollision::Weight, |
| 38 | + slimcollision::EventSel, |
| 39 | + slimcollision::TrackOccupancyInTimeRange); |
| 40 | + |
| 41 | +namespace slimmccollision |
| 42 | +{ |
| 43 | +DECLARE_SOA_INDEX_COLUMN(McCollision, mcCollision); |
| 44 | +DECLARE_SOA_COLUMN(PosZ, posZ, float); |
| 45 | +DECLARE_SOA_COLUMN(CentFT0M, centFT0M, float); |
| 46 | +DECLARE_SOA_COLUMN(Weight, weight, float); |
| 47 | +DECLARE_SOA_COLUMN(Accepted, accepted, uint64_t); |
| 48 | +DECLARE_SOA_COLUMN(PtHard, ptHard, float); |
| 49 | +} |
| 50 | + |
| 51 | +DECLARE_SOA_TABLE(SlimMcCollisions, "AOD", "SlimMcCollisions", |
| 52 | + o2::soa::Index<>, |
| 53 | + slimmccollision::PosZ, |
| 54 | + slimmccollision::CentFT0M, |
| 55 | + slimmccollision::Weight, |
| 56 | + slimmccollision::Accepted, |
| 57 | + slimmccollision::PtHard); |
| 58 | + |
| 59 | + |
| 60 | +namespace slimtracks |
| 61 | +{ |
| 62 | +DECLARE_SOA_INDEX_COLUMN(Collision, collisionId); |
| 63 | +DECLARE_SOA_INDEX_COLUMN(Track, track); |
| 64 | +DECLARE_SOA_COLUMN(Pt, pt, float); |
| 65 | +DECLARE_SOA_COLUMN(Eta, eta, float); |
| 66 | +DECLARE_SOA_COLUMN(Phi, phi, float); |
| 67 | +DECLARE_SOA_COLUMN(DCAXY, dcaXY, float); |
| 68 | +DECLARE_SOA_DYNAMIC_COLUMN(Px, px, |
| 69 | + [](float pt, float phi) -> float { return pt * std::cos(phi); }); |
| 70 | +DECLARE_SOA_DYNAMIC_COLUMN(Py, py, |
| 71 | + [](float pt, float phi) -> float { return pt * std::sin(phi); }); |
| 72 | +DECLARE_SOA_DYNAMIC_COLUMN(Pz, pz, |
| 73 | + [](float pt, float eta) -> float { return pt * std::sinh(eta); }); |
| 74 | +DECLARE_SOA_DYNAMIC_COLUMN(Energy, energy, |
| 75 | + [](float pt, float eta) -> float { return std::sqrt((pt * std::cosh(eta) * pt * std::cosh(eta)) + (jetderiveddatautilities::mPion * jetderiveddatautilities::mPion)); }); |
| 76 | + |
| 77 | + |
| 78 | +} |
| 79 | +DECLARE_SOA_TABLE(SlimTracks, "AOD", "SlimTracks", |
| 80 | + o2::soa::Index<>, |
| 81 | + slimtracks::CollisionId, |
| 82 | + slimtracks::Pt, |
| 83 | + slimtracks::Eta, |
| 84 | + slimtracks::Phi, |
| 85 | + slimtracks::DCAXY, |
| 86 | + slimtracks::Px<slimtracks::Pt, slimtracks::Phi>, |
| 87 | + slimtracks::Py<slimtracks::Pt, slimtracks::Phi>, |
| 88 | + slimtracks::Pz<slimtracks::Pt, slimtracks::Eta>, |
| 89 | + slimtracks::Energy<slimtracks::Pt, slimtracks::Eta>); |
| 90 | + |
| 91 | + |
| 92 | +namespace slimparticles |
| 93 | +{ |
| 94 | +DECLARE_SOA_INDEX_COLUMN(McCollision, mcCollisionId); |
| 95 | +DECLARE_SOA_INDEX_COLUMN(McParticle, mcParticle); |
| 96 | +DECLARE_SOA_COLUMN(Pt, pt, float); |
| 97 | +DECLARE_SOA_COLUMN(Eta, eta, float); |
| 98 | +DECLARE_SOA_COLUMN(Phi, phi, float); |
| 99 | + |
| 100 | +DECLARE_SOA_DYNAMIC_COLUMN(Px, px, |
| 101 | + [](float pt, float phi) -> float { return pt * std::cos(phi); }); |
| 102 | +DECLARE_SOA_DYNAMIC_COLUMN(Py, py, |
| 103 | + [](float pt, float phi) -> float { return pt * std::sin(phi); }); |
| 104 | +DECLARE_SOA_DYNAMIC_COLUMN(Pz, pz, |
| 105 | + [](float pt, float eta) -> float { return pt * std::sinh(eta); }); |
| 106 | +DECLARE_SOA_DYNAMIC_COLUMN(Energy, energy, |
| 107 | + [](float e) -> float { return e; }); |
| 108 | +} |
| 109 | + |
| 110 | +DECLARE_SOA_TABLE(SlimParticles, "AOD", "SlimParticles", |
| 111 | + o2::soa::Index<>, |
| 112 | + slimparticles::McCollisionId, |
| 113 | + slimparticles::Pt, |
| 114 | + slimparticles::Eta, |
| 115 | + slimparticles::Phi, |
| 116 | + slimparticles::Px<slimparticles::Pt, slimparticles::Phi>, |
| 117 | + slimparticles::Py<slimparticles::Pt, slimparticles::Phi>, |
| 118 | + slimparticles::Pz<slimparticles::Pt, slimparticles::Eta>, |
| 119 | + slimparticles::Energy<slimparticles::Pt, slimparticles::Eta> |
| 120 | + ); |
| 121 | + |
| 122 | +} // namespace o2::aod |
| 123 | + |
| 124 | +#endif // PWGJE_DATAMODEL_SLIMTABLES_H_ |
0 commit comments