From de1e13a085dd471a9461935a7bf3f130184c9c39 Mon Sep 17 00:00:00 2001 From: Yuanjun Mei Date: Tue, 22 Sep 2026 12:41:18 +0200 Subject: [PATCH 1/2] Fix impact parameter bug and other improvements according to code check --- .../Tasks/multiparticleCorrelationsMei.cxx | 37 +++++++++++-------- 1 file changed, 22 insertions(+), 15 deletions(-) diff --git a/PWGCF/MultiparticleCorrelations/Tasks/multiparticleCorrelationsMei.cxx b/PWGCF/MultiparticleCorrelations/Tasks/multiparticleCorrelationsMei.cxx index b676b66994d..06a03fa7154 100644 --- a/PWGCF/MultiparticleCorrelations/Tasks/multiparticleCorrelationsMei.cxx +++ b/PWGCF/MultiparticleCorrelations/Tasks/multiparticleCorrelationsMei.cxx @@ -43,6 +43,7 @@ #include +#include #include #include #include @@ -187,37 +188,37 @@ struct MultiparticleCorrelationsMei // this name is used in lower-case format to // *) Define and initialize all data members to be called in the main process* functions: // **) Task configuration: struct TaskConfiguration { - bool fProcess[eProcess_N] = {false}; // Set what to process. See enum EProcess for full description. Set via implicit variables within a PROCESS_SWITCH clause. - bool fDryRun = false; // book all histos and run without filling and calculating anything - } tc; // you have to prepend "tc." for all objects name in this group later in the code + std::array fProcess{false}; // Set what to process. See enum EProcess for full description. Set via implicit variables within a PROCESS_SWITCH clause. + bool fDryRun = false; // book all histos and run without filling and calculating anything + } tc; // you have to prepend "tc." for all objects name in this group later in the code // **) Particle histograms: struct ParticleHistograms { - TList* fParticleHistogramsList = NULL; //!, 2>, eParticleHistograms_N> fParticleHistograms{nullptr}; } pc; // you have to prepend "pc." for all objects name in this group later in the code // *) Event histograms: struct EventHistograms { - TList* fEventHistogramsList = NULL; //!, 2>, eEventHistograms_N> fEventHistograms{nullptr}; //! [ type - see enum EEventHistograms ][reco,sim][before, after event cuts] + } ec; // prepend "ec." for event counters // *) External histograms: struct ExternalHistograms { - TList* fExternalHistogramsList = NULL; - TH1D* fhistWeights = NULL; + TList* fExternalHistogramsList = nullptr; + TH1D* fhistWeights = nullptr; } ex; struct Observables { - TList* fObservablesList = NULL; - TProfile* fProfTwo[2][2] = {{NULL}}; //! [reco,sim][before, after event cuts] + TList* fObservablesList = nullptr; + std::array, 2> fProfTwo{nullptr}; //! [reco,sim][before, after event cuts] } obs; // *) Quality assurance histograms: struct QualityAssurance { - TList* fQualityAssuranceList = NULL; //!(tracks.size()); - auto impactParameter = thisMCCollision.impactParameter() * 1e15; + auto impactParameter = thisMCCollision.impactParameter(); LOGF(info, "Reco collision = %d, MC collision = %d, b = %f", collision.globalIndex(), From 6eebf81e84c646c98f0f5915d0318a554ab9220e Mon Sep 17 00:00:00 2001 From: Yuanjun Mei Date: Tue, 22 Sep 2026 18:17:57 +0200 Subject: [PATCH 2/2] Fix array initialization bugs --- .../Tasks/multiparticleCorrelationsMei.cxx | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/PWGCF/MultiparticleCorrelations/Tasks/multiparticleCorrelationsMei.cxx b/PWGCF/MultiparticleCorrelations/Tasks/multiparticleCorrelationsMei.cxx index 06a03fa7154..9e32c7d2a4f 100644 --- a/PWGCF/MultiparticleCorrelations/Tasks/multiparticleCorrelationsMei.cxx +++ b/PWGCF/MultiparticleCorrelations/Tasks/multiparticleCorrelationsMei.cxx @@ -195,14 +195,14 @@ struct MultiparticleCorrelationsMei // this name is used in lower-case format to // **) Particle histograms: struct ParticleHistograms { TList* fParticleHistogramsList = nullptr; //!, 2>, eParticleHistograms_N> fParticleHistograms{nullptr}; + std::array, 2>, eParticleHistograms_N> fParticleHistograms{}; } pc; // you have to prepend "pc." for all objects name in this group later in the code // *) Event histograms: struct EventHistograms { - TList* fEventHistogramsList = nullptr; //!, 2>, eEventHistograms_N> fEventHistograms{nullptr}; //! [ type - see enum EEventHistograms ][reco,sim][before, after event cuts] - } ec; // prepend "ec." for event counters + TList* fEventHistogramsList = nullptr; //!, 2>, eEventHistograms_N> fEventHistograms{}; //! [ type - see enum EEventHistograms ][reco,sim][before, after event cuts] + } ec; // prepend "ec." for event counters // *) External histograms: struct ExternalHistograms { @@ -212,7 +212,7 @@ struct MultiparticleCorrelationsMei // this name is used in lower-case format to struct Observables { TList* fObservablesList = nullptr; - std::array, 2> fProfTwo{nullptr}; //! [reco,sim][before, after event cuts] + std::array, 2> fProfTwo{}; //! [reco,sim][before, after event cuts] } obs; // *) Quality assurance histograms: