From 29ddbf9f2a01a5501c1ae2b03c4fb63c3150350a Mon Sep 17 00:00:00 2001 From: ddobrigk Date: Fri, 3 Feb 2023 17:41:21 -0300 Subject: [PATCH] More equivalency declarations This is a suggested change following a conversation also with @aalkin These equivalency declarations have an important role for avoiding that track pre-selection and MC pre-selection depend unnecessarily on the track propagation workflow and on the data being analysed being from Run 2 or Run 3. By declaring TracksExtra and McTrackLabels to be equivalent to the base Track tables, one can de-reference an index to the base Track tables straight to the TracksExtra or McTrackLabels tables. As an example use case, this will greatly simplify the V0 and cascade candidate pre-selectors as these can loop over the TracksExtra properties belonging to the Tracks that are indexed in the array pairs or triplets without ever resolving the main Track table, which is only needed when using the actual track parameters. Without this equivalency, the existing four process functions would have to be duplicated into 8 process functions. --- Framework/Core/include/Framework/AnalysisDataModel.h | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/Framework/Core/include/Framework/AnalysisDataModel.h b/Framework/Core/include/Framework/AnalysisDataModel.h index da30a315acf53..fb4253757a45c 100644 --- a/Framework/Core/include/Framework/AnalysisDataModel.h +++ b/Framework/Core/include/Framework/AnalysisDataModel.h @@ -1029,6 +1029,8 @@ namespace soa DECLARE_EQUIVALENT_FOR_INDEX(aod::Collisions_000, aod::Collisions_001); DECLARE_EQUIVALENT_FOR_INDEX(aod::StoredMcParticles_000, aod::StoredMcParticles_001); DECLARE_EQUIVALENT_FOR_INDEX(aod::StoredTracks, aod::StoredTracksIU); +DECLARE_EQUIVALENT_FOR_INDEX(aod::StoredTracks, aod::StoredTracksExtra); +DECLARE_EQUIVALENT_FOR_INDEX(aod::StoredTracksIU, aod::StoredTracksExtra); } // namespace soa namespace aod @@ -1200,6 +1202,8 @@ DECLARE_SOA_INDEX_TABLE(Run2MatchedToBCSparse, BCs, "MA_RN2_BC_SP", //! } // namespace aod namespace soa { +DECLARE_EQUIVALENT_FOR_INDEX(aod::StoredTracks, aod::McTrackLabels); +DECLARE_EQUIVALENT_FOR_INDEX(aod::StoredTracksIU, aod::McTrackLabels); extern template struct Join; extern template struct Join; } // namespace soa