From 6c224363871f8a189dc3688be54b4db1fb2bbd43 Mon Sep 17 00:00:00 2001 From: Jan Fiete Date: Mon, 12 Jul 2021 16:49:32 +0200 Subject: [PATCH 1/2] Use slice and array --- Framework/Core/include/Framework/AnalysisDataModel.h | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/Framework/Core/include/Framework/AnalysisDataModel.h b/Framework/Core/include/Framework/AnalysisDataModel.h index 8f77174c14fad..887047252697d 100644 --- a/Framework/Core/include/Framework/AnalysisDataModel.h +++ b/Framework/Core/include/Framework/AnalysisDataModel.h @@ -512,12 +512,14 @@ using FullFwdTrack = FullFwdTracks::iterator; namespace ambiguoustracks { -DECLARE_SOA_INDEX_COLUMN(Collision, collision); //! Collision index -DECLARE_SOA_INDEX_COLUMN(Track, track); //! Track index +DECLARE_SOA_INDEX_COLUMN(Track, track); //! Track index +DECLARE_SOA_SLICE_INDEX_COLUMN(BC, bc); //! BC index (slice for 1 to N entries) +// TODO to be replaced by a variable length array +DECLARE_SOA_ARRAY_INDEX_COLUMN(Collision, collision, 2); //! Collision index } // namespace ambiguoustracks DECLARE_SOA_TABLE(AmbiguousTracks, "AOD", "AMBIGUOUSTRACK", //! Table for tracks which are not uniquely associated with a collision - ambiguoustracks::CollisionId, ambiguoustracks::TrackId); + ambiguoustracks::TrackId, ambiguoustracks::BCIdSlice, ambiguoustracks::CollisionIds); using AmbiguousTrack = AmbiguousTracks::iterator; From de78b58cb9df5327a8931cd9ea35ae78f4d94994 Mon Sep 17 00:00:00 2001 From: Jan Fiete Date: Mon, 12 Jul 2021 16:57:17 +0200 Subject: [PATCH 2/2] add comment --- Framework/Core/include/Framework/AnalysisDataModel.h | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/Framework/Core/include/Framework/AnalysisDataModel.h b/Framework/Core/include/Framework/AnalysisDataModel.h index 887047252697d..be567cb9e32cc 100644 --- a/Framework/Core/include/Framework/AnalysisDataModel.h +++ b/Framework/Core/include/Framework/AnalysisDataModel.h @@ -510,6 +510,12 @@ namespace aod using FullFwdTracks = soa::Join; using FullFwdTrack = FullFwdTracks::iterator; +// Some tracks cannot be uniquely identified with a collision. Some tracks cannot be assigned to a collision at all. +// Those tracks have -1 as collision index and have an entry in the following table. Either of the two following then applies: +// If a track has several matching collisions these are listed in the Collision array. In this case the BC slice is not filled +// If on the contrary, a track has no matching collision and can only be assigned through its estimated time, it is assigned all +// BCs which are compatible with this time. As the BCs are time ordered, a slice is used to store the relation. In this case +// no entry is found in the collision member. namespace ambiguoustracks { DECLARE_SOA_INDEX_COLUMN(Track, track); //! Track index