From 02ef6e8454fd0ffeecc5a5cd465cea742f4de1da Mon Sep 17 00:00:00 2001 From: Alberto Caliva Date: Thu, 28 May 2026 11:57:10 +0200 Subject: [PATCH 1/5] [PWGLF] Add explicit ROOT leaflists for coalescence tree branches --- .../Nuspex/coalescenceTreeProducer.cxx | 81 ++++++++++--------- 1 file changed, 41 insertions(+), 40 deletions(-) diff --git a/PWGLF/TableProducer/Nuspex/coalescenceTreeProducer.cxx b/PWGLF/TableProducer/Nuspex/coalescenceTreeProducer.cxx index 18a3d6bdd64..b5cae4e7b22 100644 --- a/PWGLF/TableProducer/Nuspex/coalescenceTreeProducer.cxx +++ b/PWGLF/TableProducer/Nuspex/coalescenceTreeProducer.cxx @@ -28,13 +28,13 @@ /// /// \author Alberto CalivĂ  -#include "Framework/AnalysisTask.h" -#include "Framework/Configurable.h" -#include "Framework/HistogramRegistry.h" -#include "Framework/InitContext.h" -#include "Framework/Logger.h" -#include "Framework/OutputObjHeader.h" -#include "Framework/runDataProcessing.h" +#include +#include +#include +#include +#include +#include +#include #include #include @@ -71,7 +71,7 @@ struct CoalescenceTreeProducer { Preslice mcParticlesPerMcCollision = aod::mcparticle::mcCollisionId; - OutputObj treeBoundState{"treeBoundState"}; + OutputObj treeBoundState{"treeBoundState","treeBoundState"}; int64_t eventID = 0; // Event ID int64_t idB1 = 0, idB2 = 0, idB3 = 0; // MC particle IDs @@ -154,45 +154,46 @@ struct CoalescenceTreeProducer { // Tree for pairs/triplets. // For deuterons only the first two baryons are stored. // For three-body states, the third-baryon branches are also created. - treeBoundState->Branch("eventID", &eventID); + treeBoundState->Branch("eventID", &eventID, "eventID/L"); - treeBoundState->Branch("idB1", &idB1); - treeBoundState->Branch("idB2", &idB2); + treeBoundState->Branch("idB1", &idB1, "idB1/L"); + treeBoundState->Branch("idB2", &idB2, "idB2/L"); - treeBoundState->Branch("pdgB1", &pdgB1); - treeBoundState->Branch("pdgB2", &pdgB2); + treeBoundState->Branch("pdgB1", &pdgB1, "pdgB1/I"); + treeBoundState->Branch("pdgB2", &pdgB2, "pdgB2/I"); - treeBoundState->Branch("chargeB1", &chargeB1); - treeBoundState->Branch("chargeB2", &chargeB2); + treeBoundState->Branch("chargeB1", &chargeB1, "chargeB1/I"); + treeBoundState->Branch("chargeB2", &chargeB2, "chargeB2/I"); - treeBoundState->Branch("xB1", &xB1); - treeBoundState->Branch("yB1", &yB1); - treeBoundState->Branch("zB1", &zB1); - treeBoundState->Branch("tB1", &tB1); - treeBoundState->Branch("pxB1", &pxB1); - treeBoundState->Branch("pyB1", &pyB1); - treeBoundState->Branch("pzB1", &pzB1); + treeBoundState->Branch("xB1", &xB1, "xB1/F"); + treeBoundState->Branch("yB1", &yB1, "yB1/F"); + treeBoundState->Branch("zB1", &zB1, "zB1/F"); + treeBoundState->Branch("tB1", &tB1, "tB1/F"); + treeBoundState->Branch("pxB1", &pxB1, "pxB1/F"); + treeBoundState->Branch("pyB1", &pyB1, "pyB1/F"); + treeBoundState->Branch("pzB1", &pzB1, "pzB1/F"); - treeBoundState->Branch("xB2", &xB2); - treeBoundState->Branch("yB2", &yB2); - treeBoundState->Branch("zB2", &zB2); - treeBoundState->Branch("tB2", &tB2); - treeBoundState->Branch("pxB2", &pxB2); - treeBoundState->Branch("pyB2", &pyB2); - treeBoundState->Branch("pzB2", &pzB2); + treeBoundState->Branch("xB2", &xB2, "xB2/F"); + treeBoundState->Branch("yB2", &yB2, "yB2/F"); + treeBoundState->Branch("zB2", &zB2, "zB2/F"); + treeBoundState->Branch("tB2", &tB2, "tB2/F"); + treeBoundState->Branch("pxB2", &pxB2, "pxB2/F"); + treeBoundState->Branch("pyB2", &pyB2, "pyB2/F"); + treeBoundState->Branch("pzB2", &pzB2, "pzB2/F"); if (static_cast(boundStateSpecies) != kDeuteron) { - treeBoundState->Branch("idB3", &idB3); - treeBoundState->Branch("pdgB3", &pdgB3); - treeBoundState->Branch("chargeB3", &chargeB3); - - treeBoundState->Branch("xB3", &xB3); - treeBoundState->Branch("yB3", &yB3); - treeBoundState->Branch("zB3", &zB3); - treeBoundState->Branch("tB3", &tB3); - treeBoundState->Branch("pxB3", &pxB3); - treeBoundState->Branch("pyB3", &pyB3); - treeBoundState->Branch("pzB3", &pzB3); + treeBoundState->Branch("idB3", &idB3, "idB3/L"); + + treeBoundState->Branch("pdgB3", &pdgB3, "pdgB3/I"); + treeBoundState->Branch("chargeB3", &chargeB3, "chargeB3/I"); + + treeBoundState->Branch("xB3", &xB3, "xB3/F"); + treeBoundState->Branch("yB3", &yB3, "yB3/F"); + treeBoundState->Branch("zB3", &zB3, "zB3/F"); + treeBoundState->Branch("tB3", &tB3, "tB3/F"); + treeBoundState->Branch("pxB3", &pxB3, "pxB3/F"); + treeBoundState->Branch("pyB3", &pyB3, "pyB3/F"); + treeBoundState->Branch("pzB3", &pzB3, "pzB3/F"); } } From 4b6e31645bbbb5d31d7373657668bf3efef3cd02 Mon Sep 17 00:00:00 2001 From: Alberto Caliva Date: Thu, 28 May 2026 12:22:52 +0200 Subject: [PATCH 2/5] fix tree --- PWGLF/TableProducer/Nuspex/coalescenceTreeProducer.cxx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/PWGLF/TableProducer/Nuspex/coalescenceTreeProducer.cxx b/PWGLF/TableProducer/Nuspex/coalescenceTreeProducer.cxx index b5cae4e7b22..be12ea38eba 100644 --- a/PWGLF/TableProducer/Nuspex/coalescenceTreeProducer.cxx +++ b/PWGLF/TableProducer/Nuspex/coalescenceTreeProducer.cxx @@ -71,7 +71,7 @@ struct CoalescenceTreeProducer { Preslice mcParticlesPerMcCollision = aod::mcparticle::mcCollisionId; - OutputObj treeBoundState{"treeBoundState","treeBoundState"}; + OutputObj treeBoundState{"treeBoundState", ""}; int64_t eventID = 0; // Event ID int64_t idB1 = 0, idB2 = 0, idB3 = 0; // MC particle IDs From abd13964e1780c18265f3a347b48dbf29763cfcb Mon Sep 17 00:00:00 2001 From: Alberto Caliva Date: Thu, 28 May 2026 13:20:50 +0200 Subject: [PATCH 3/5] fix tree --- PWGLF/TableProducer/Nuspex/coalescenceTreeProducer.cxx | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/PWGLF/TableProducer/Nuspex/coalescenceTreeProducer.cxx b/PWGLF/TableProducer/Nuspex/coalescenceTreeProducer.cxx index be12ea38eba..0d70246172b 100644 --- a/PWGLF/TableProducer/Nuspex/coalescenceTreeProducer.cxx +++ b/PWGLF/TableProducer/Nuspex/coalescenceTreeProducer.cxx @@ -71,7 +71,10 @@ struct CoalescenceTreeProducer { Preslice mcParticlesPerMcCollision = aod::mcparticle::mcCollisionId; - OutputObj treeBoundState{"treeBoundState", ""}; + OutputObj treeBoundState{ + "treeBoundState", + OutputObjHandlingPolicy::AnalysisObject + }; int64_t eventID = 0; // Event ID int64_t idB1 = 0, idB2 = 0, idB3 = 0; // MC particle IDs From 3de3ea2d6a89570e966514b01f4d0ea999124e0c Mon Sep 17 00:00:00 2001 From: Alberto Caliva Date: Thu, 28 May 2026 13:51:02 +0200 Subject: [PATCH 4/5] fix clang format --- PWGLF/TableProducer/Nuspex/coalescenceTreeProducer.cxx | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) diff --git a/PWGLF/TableProducer/Nuspex/coalescenceTreeProducer.cxx b/PWGLF/TableProducer/Nuspex/coalescenceTreeProducer.cxx index 0d70246172b..da20f784f40 100644 --- a/PWGLF/TableProducer/Nuspex/coalescenceTreeProducer.cxx +++ b/PWGLF/TableProducer/Nuspex/coalescenceTreeProducer.cxx @@ -71,10 +71,7 @@ struct CoalescenceTreeProducer { Preslice mcParticlesPerMcCollision = aod::mcparticle::mcCollisionId; - OutputObj treeBoundState{ - "treeBoundState", - OutputObjHandlingPolicy::AnalysisObject - }; + OutputObj treeBoundState{"treeBoundState", OutputObjHandlingPolicy::AnalysisObject}; int64_t eventID = 0; // Event ID int64_t idB1 = 0, idB2 = 0, idB3 = 0; // MC particle IDs From 68dadb555cb0f7344b736c468545bed1cfccbaa7 Mon Sep 17 00:00:00 2001 From: Alberto Caliva Date: Thu, 28 May 2026 13:53:45 +0200 Subject: [PATCH 5/5] fix clang format --- PWGLF/TableProducer/Nuspex/coalescenceTreeProducer.cxx | 1 + 1 file changed, 1 insertion(+) diff --git a/PWGLF/TableProducer/Nuspex/coalescenceTreeProducer.cxx b/PWGLF/TableProducer/Nuspex/coalescenceTreeProducer.cxx index da20f784f40..f747488691a 100644 --- a/PWGLF/TableProducer/Nuspex/coalescenceTreeProducer.cxx +++ b/PWGLF/TableProducer/Nuspex/coalescenceTreeProducer.cxx @@ -154,6 +154,7 @@ struct CoalescenceTreeProducer { // Tree for pairs/triplets. // For deuterons only the first two baryons are stored. // For three-body states, the third-baryon branches are also created. + treeBoundState.setObject(new TTree("BoundStateTree", "Tree for coalescence studies")); treeBoundState->Branch("eventID", &eventID, "eventID/L"); treeBoundState->Branch("idB1", &idB1, "idB1/L");