Skip to content

Commit aaa5061

Browse files
[PWGLF] Fix for unbound indices in reduced3bodyCreator (#10105)
Co-authored-by: yuanzhe <yuanzhe.wang@cern.ch>
1 parent b554a46 commit aaa5061

File tree

4 files changed

+76
-125
lines changed

4 files changed

+76
-125
lines changed

PWGLF/DataModel/Reduced3BodyTables.h

Lines changed: 20 additions & 22 deletions
Original file line numberDiff line numberDiff line change
@@ -23,32 +23,32 @@
2323
namespace o2::aod
2424
{
2525

26-
DECLARE_SOA_TABLE(ReducedCollisions, "AOD", "REDCOLLISION", //! reduced collision table (same structure as the original collision table)
26+
DECLARE_SOA_TABLE(RedCollisions, "AOD", "REDCOLLISION", //! reduced collision table (same structure as the original collision table)
2727
o2::soa::Index<>,
2828
collision::PosX, collision::PosY, collision::PosZ,
2929
collision::CovXX, collision::CovXY, collision::CovYY, collision::CovXZ, collision::CovYZ, collision::CovZZ,
3030
collision::Flags, collision::Chi2, collision::NumContrib,
3131
collision::CollisionTime, collision::CollisionTimeRes,
3232
bc::RunNumber);
3333

34-
DECLARE_SOA_TABLE(ReducedPVMults, "AOD", "REDPVMULT", //! Multiplicity from the PV contributors, joinable with reducedCollisions
34+
DECLARE_SOA_TABLE(RedPVMults, "AOD", "REDPVMULT", //! Multiplicity from the PV contributors, joinable with reducedCollisions
3535
mult::MultNTracksPV);
3636

37-
DECLARE_SOA_TABLE(ReducedCentFT0Cs, "AOD", "REDCENTFT0C", //! Reduced Run 3 FT0C centrality table, joinable with reducedCollisions
37+
DECLARE_SOA_TABLE(RedCentFT0Cs, "AOD", "REDCENTFT0C", //! Reduced Run 3 FT0C centrality table, joinable with reducedCollisions
3838
cent::CentFT0C);
3939

4040
namespace reducedtracks3body
4141
{
4242
// track parameter definition
43-
DECLARE_SOA_INDEX_COLUMN(Collision, collision); //! Collision to which this track belongs
44-
DECLARE_SOA_COLUMN(X, x, float); //!
45-
DECLARE_SOA_COLUMN(Alpha, alpha, float); //!
46-
DECLARE_SOA_COLUMN(Y, y, float); //!
47-
DECLARE_SOA_COLUMN(Z, z, float); //!
48-
DECLARE_SOA_COLUMN(Snp, snp, float); //!
49-
DECLARE_SOA_COLUMN(Tgl, tgl, float); //!
50-
DECLARE_SOA_COLUMN(Signed1Pt, signed1Pt, float); //! (sign of charge)/Pt in c/GeV. Use pt() and sign() instead
51-
DECLARE_SOA_EXPRESSION_COLUMN(Phi, phi, float, //! Phi of the track, in radians within [0, 2pi)
43+
DECLARE_SOA_INDEX_COLUMN_FULL(Collision, collision, int, RedCollisions, ""); //! Collision index
44+
DECLARE_SOA_COLUMN(X, x, float); //!
45+
DECLARE_SOA_COLUMN(Alpha, alpha, float); //!
46+
DECLARE_SOA_COLUMN(Y, y, float); //!
47+
DECLARE_SOA_COLUMN(Z, z, float); //!
48+
DECLARE_SOA_COLUMN(Snp, snp, float); //!
49+
DECLARE_SOA_COLUMN(Tgl, tgl, float); //!
50+
DECLARE_SOA_COLUMN(Signed1Pt, signed1Pt, float); //! (sign of charge)/Pt in c/GeV. Use pt() and sign() instead
51+
DECLARE_SOA_EXPRESSION_COLUMN(Phi, phi, float, //! Phi of the track, in radians within [0, 2pi)
5252
ifnode(nasin(aod::track::snp) + aod::track::alpha < 0.0f, nasin(aod::track::snp) + aod::track::alpha + o2::constants::math::TwoPI,
5353
ifnode(nasin(aod::track::snp) + aod::track::alpha >= o2::constants::math::TwoPI, nasin(aod::track::snp) + aod::track::alpha - o2::constants::math::TwoPI,
5454
nasin(aod::track::snp) + aod::track::alpha)));
@@ -191,7 +191,7 @@ DECLARE_SOA_COLUMN(TOFNSigmaDe, tofNSigmaDe, float); //! Nsigma separation with
191191

192192
} // namespace reducedtracks3body
193193

194-
DECLARE_SOA_TABLE_FULL(StoredReducedTracksIU, "ReducedTracks_IU", "AOD", "REDTRACK_IU", //! On disk version of the track parameters at inner most update (e.g. ITS) as it comes from the tracking
194+
DECLARE_SOA_TABLE_FULL(StoredRedIUTracks, "RedIUTracks", "AOD", "REDIUTRACK", //! On disk version of the track parameters at inner most update (e.g. ITS) as it comes from the tracking
195195
o2::soa::Index<>, reducedtracks3body::CollisionId,
196196
reducedtracks3body::X, reducedtracks3body::Alpha,
197197
reducedtracks3body::Y, reducedtracks3body::Z, reducedtracks3body::Snp, reducedtracks3body::Tgl,
@@ -226,7 +226,7 @@ DECLARE_SOA_TABLE_FULL(StoredReducedTracksIU, "ReducedTracks_IU", "AOD", "REDTRA
226226
reducedtracks3body::ITSClsSizeInLayer<reducedtracks3body::ITSClusterSizes>,
227227
reducedtracks3body::TPCCrossedRowsOverFindableCls<reducedtracks3body::TPCNClsFindable, reducedtracks3body::TPCNClsFindableMinusCrossedRows>);
228228

229-
DECLARE_SOA_EXTENDED_TABLE(ReducedTracksIU, StoredReducedTracksIU, "EXREDTRACK_IU", 0, //! Track parameters at inner most update (e.g. ITS) as it comes from the tracking
229+
DECLARE_SOA_EXTENDED_TABLE(RedIUTracks, StoredRedIUTracks, "EXREDIUTRACK", 0, //! Track parameters at inner most update (e.g. ITS) as it comes from the tracking
230230
reducedtracks3body::Pt,
231231
reducedtracks3body::P,
232232
reducedtracks3body::Eta,
@@ -250,20 +250,18 @@ DECLARE_SOA_EXTENDED_TABLE(ReducedTracksIU, StoredReducedTracksIU, "EXREDTRACK_I
250250
// tracks extra
251251
reducedtracks3body::DetectorMap);
252252

253-
using ReducedTrackIU = ReducedTracksIU::iterator;
254-
255253
namespace reduceddecay3body
256254
{
257-
DECLARE_SOA_INDEX_COLUMN_FULL(Track0, track0, int, ReducedTracksIU, "_0"); //! Track 0 index
258-
DECLARE_SOA_INDEX_COLUMN_FULL(Track1, track1, int, ReducedTracksIU, "_1"); //! Track 1 index
259-
DECLARE_SOA_INDEX_COLUMN_FULL(Track2, track2, int, ReducedTracksIU, "_2"); //! Track 2 index
260-
DECLARE_SOA_INDEX_COLUMN_FULL(Collision, collision, int, ReducedCollisions, ""); //! Collision index
255+
DECLARE_SOA_INDEX_COLUMN_FULL(Track0, track0, int, RedIUTracks, "_0"); //! Track 0 index
256+
DECLARE_SOA_INDEX_COLUMN_FULL(Track1, track1, int, RedIUTracks, "_1"); //! Track 1 index
257+
DECLARE_SOA_INDEX_COLUMN_FULL(Track2, track2, int, RedIUTracks, "_2"); //! Track 2 index
258+
DECLARE_SOA_INDEX_COLUMN_FULL(Collision, collision, int, RedCollisions, ""); //! Collision index
261259
} // namespace reduceddecay3body
262260

263-
DECLARE_SOA_TABLE(ReducedDecay3Bodys, "AOD", "REDDECAY3BODY", //! reduced 3-body decay table
261+
DECLARE_SOA_TABLE(RedDecay3Bodys, "AOD", "REDDECAY3BODY", //! reduced 3-body decay table
264262
o2::soa::Index<>, reduceddecay3body::CollisionId, reduceddecay3body::Track0Id, reduceddecay3body::Track1Id, reduceddecay3body::Track2Id);
265263

266-
using ReducedDecay3BodysLinked = soa::Join<ReducedDecay3Bodys, Decay3BodyDataLink>;
264+
using ReducedDecay3BodysLinked = soa::Join<RedDecay3Bodys, Decay3BodyDataLink>;
267265
using ReducedDecay3BodyLinked = ReducedDecay3BodysLinked::iterator;
268266

269267
} // namespace o2::aod

0 commit comments

Comments
 (0)