diff --git a/PWGCF/Flow/TableProducer/zdcQVectors.cxx b/PWGCF/Flow/TableProducer/zdcQVectors.cxx index 4dfb2f8eba7..c646b410b5e 100644 --- a/PWGCF/Flow/TableProducer/zdcQVectors.cxx +++ b/PWGCF/Flow/TableProducer/zdcQVectors.cxx @@ -1138,7 +1138,7 @@ struct ZdcQVectors { double qYcShift = std::hypot(qRec[2], qRec[3]) * std::sin(psiZDCCshift); if (isSelected && cfgFillHistRegistry && !cfgFillNothing) { - fillCommonRegistry(qRec[0], qRec[1], qRec[2], qRec[3], v, centrality, rsTimestamp); + fillCommonRegistry(qXaShift, qYaShift, qXcShift, qYcShift, v, centrality, rsTimestamp); registry.fill(HIST("QA/centrality_after"), centrality); registry.get(HIST("QA/after/ZNA_Qx"))->Fill(Form("%d", runnumber), qXaShift); registry.get(HIST("QA/after/ZNA_Qy"))->Fill(Form("%d", runnumber), qYaShift); diff --git a/PWGCF/Flow/Tasks/flowSP.cxx b/PWGCF/Flow/Tasks/flowSP.cxx index 4c2e03141bd..29245794607 100644 --- a/PWGCF/Flow/Tasks/flowSP.cxx +++ b/PWGCF/Flow/Tasks/flowSP.cxx @@ -58,6 +58,7 @@ #include #include #include +#include #include #include #include @@ -258,19 +259,19 @@ struct FlowSP { double meanPxC = 0; } spm; - struct ptMaps { - TProfile* meanPTMap = new TProfile("meanPTMap", "meanPTMap", 8, -0.8, 0.8); - TProfile* meanPTMapPos = new TProfile("meanPTMapPos", "meanPTMapPos", 8, -0.8, 0.8); - TProfile* meanPTMapNeg = new TProfile("meanPTMapNeg", "meanPTMapNeg", 8, -0.8, 0.8); + struct PtMaps { + std::unique_ptr meanPTMap = std::make_unique("meanPTMap", "meanPTMap", 8, -0.8, 0.8); + std::unique_ptr meanPTMapPos = std::make_unique("meanPTMapPos", "meanPTMapPos", 8, -0.8, 0.8); + std::unique_ptr meanPTMapNeg = std::make_unique("meanPTMapNeg", "meanPTMapNeg", 8, -0.8, 0.8); - TProfile* relPxA = new TProfile("relPxA", "relPxA", 8, -0.8, 0.8); - TProfile* relPxC = new TProfile("relPxC", "relPxC", 8, -0.8, 0.8); + std::unique_ptr relPxA = std::make_unique("relPxA", "relPxA", 8, -0.8, 0.8); + std::unique_ptr relPxC = std::make_unique("relPxC", "relPxC", 8, -0.8, 0.8); - TProfile* relPxANeg = new TProfile("relPxANeg", "relPxANeg", 8, -0.8, 0.8); - TProfile* relPxAPos = new TProfile("relPxAPos", "relPxAPos", 8, -0.8, 0.8); + std::unique_ptr relPxANeg = std::make_unique("relPxANeg", "relPxANeg", 8, -0.8, 0.8); + std::unique_ptr relPxAPos = std::make_unique("relPxAPos", "relPxAPos", 8, -0.8, 0.8); - TProfile* relPxCNeg = new TProfile("relPxCNeg", "relPxCNeg", 8, -0.8, 0.8); - TProfile* relPxCPos = new TProfile("relPxCPos", "relPxCPos", 8, -0.8, 0.8); + std::unique_ptr relPxCNeg = std::make_unique("relPxCNeg", "relPxCNeg", 8, -0.8, 0.8); + std::unique_ptr relPxCPos = std::make_unique("relPxCPos", "relPxCPos", 8, -0.8, 0.8); } ptmaps; OutputObj fWeights{GFWWeights("weights")}; @@ -281,13 +282,13 @@ struct FlowSP { HistogramRegistry histos{"QAhistos", {}, OutputObjHandlingPolicy::AnalysisObject, false, true}; // Event selection cuts - TF1* fPhiCutLow = nullptr; - TF1* fPhiCutHigh = nullptr; - TF1* fMultPVCutLow = nullptr; - TF1* fMultPVCutHigh = nullptr; - TF1* fMultCutLow = nullptr; - TF1* fMultCutHigh = nullptr; - TF1* fMultMultPVCut = nullptr; + std::unique_ptr fPhiCutLow = nullptr; + std::unique_ptr fPhiCutHigh = nullptr; + std::unique_ptr fMultPVCutLow = nullptr; + std::unique_ptr fMultPVCutHigh = nullptr; + std::unique_ptr fMultCutLow = nullptr; + std::unique_ptr fMultCutHigh = nullptr; + std::unique_ptr fMultMultPVCut = nullptr; enum SelectionCriteria { evSel_FilteredEvent, @@ -694,10 +695,10 @@ struct FlowSP { } if (cfg.cEvSelsUseAdditionalEventCut) { - fMultPVCutLow = new TF1("fMultPVCutLow", "[0]+[1]*x+[2]*x*x+[3]*x*x*x+[4]*x*x*x*x", 0, 100); - fMultPVCutHigh = new TF1("fMultPVCutHigh", "[0]+[1]*x+[2]*x*x+[3]*x*x*x+[4]*x*x*x*x", 0, 100); - fMultCutLow = new TF1("fMultCutLow", "[0]+[1]*x+[2]*x*x+[3]*x*x*x+[4]*x*x*x*x", 0, 100); - fMultCutHigh = new TF1("fMultCutHigh", "[0]+[1]*x+[2]*x*x+[3]*x*x*x+[4]*x*x*x*x", 0, 100); + fMultPVCutLow = std::make_unique("fMultPVCutLow", "[0]+[1]*x+[2]*x*x+[3]*x*x*x+[4]*x*x*x*x", 0, 100); + fMultPVCutHigh = std::make_unique("fMultPVCutHigh", "[0]+[1]*x+[2]*x*x+[3]*x*x*x+[4]*x*x*x*x", 0, 100); + fMultCutLow = std::make_unique("fMultCutLow", "[0]+[1]*x+[2]*x*x+[3]*x*x*x+[4]*x*x*x*x", 0, 100); + fMultCutHigh = std::make_unique("fMultCutHigh", "[0]+[1]*x+[2]*x*x+[3]*x*x*x+[4]*x*x*x*x", 0, 100); std::vector paramsMultPVCut; std::vector paramsMultCut; @@ -756,8 +757,8 @@ struct FlowSP { } if (cfg.cTrackSelsUseAdditionalTrackCut) { - fPhiCutLow = new TF1("fPhiCutLow", "0.06/x+pi/18.0-0.06", 0, 100); - fPhiCutHigh = new TF1("fPhiCutHigh", "0.1/x+pi/18.0+0.06", 0, 100); + fPhiCutLow = std::make_unique("fPhiCutLow", "0.06/x+pi/18.0-0.06", 0, 100); + fPhiCutHigh = std::make_unique("fPhiCutHigh", "0.1/x+pi/18.0+0.06", 0, 100); } } // end of init