From 1f5c6a6f61a6a3e08aefe9ee045d7938ad3a9964 Mon Sep 17 00:00:00 2001 From: Suraj Prasad Date: Fri, 25 Oct 2024 18:33:00 +0530 Subject: [PATCH 1/3] PWGLF:Moving analysis code from PWGMM/UE to PWGLF/Strangeness (#8143) --- PWGLF/Tasks/Strangeness/CMakeLists.txt | 5 +++++ .../Tasks/Strangeness}/lambdak0sflattenicity.cxx | 0 PWGMM/UE/Tasks/CMakeLists.txt | 5 ----- 3 files changed, 5 insertions(+), 5 deletions(-) rename {PWGMM/UE/Tasks => PWGLF/Tasks/Strangeness}/lambdak0sflattenicity.cxx (100%) diff --git a/PWGLF/Tasks/Strangeness/CMakeLists.txt b/PWGLF/Tasks/Strangeness/CMakeLists.txt index a2bce136cdc..660c7ce8610 100644 --- a/PWGLF/Tasks/Strangeness/CMakeLists.txt +++ b/PWGLF/Tasks/Strangeness/CMakeLists.txt @@ -118,3 +118,8 @@ o2physics_add_dpl_workflow(strange-yield-pbpb SOURCES strange-yield-pbpb.cxx PUBLIC_LINK_LIBRARIES O2Physics::AnalysisCore COMPONENT_NAME Analysis) + +o2physics_add_dpl_workflow(lambdak0sflattenicity + SOURCES lambdak0sflattenicity.cxx + PUBLIC_LINK_LIBRARIES O2::Framework O2Physics::AnalysisCore + COMPONENT_NAME Analysis) diff --git a/PWGMM/UE/Tasks/lambdak0sflattenicity.cxx b/PWGLF/Tasks/Strangeness/lambdak0sflattenicity.cxx similarity index 100% rename from PWGMM/UE/Tasks/lambdak0sflattenicity.cxx rename to PWGLF/Tasks/Strangeness/lambdak0sflattenicity.cxx diff --git a/PWGMM/UE/Tasks/CMakeLists.txt b/PWGMM/UE/Tasks/CMakeLists.txt index 19a0ecba60a..9bfee98cbbb 100644 --- a/PWGMM/UE/Tasks/CMakeLists.txt +++ b/PWGMM/UE/Tasks/CMakeLists.txt @@ -18,8 +18,3 @@ o2physics_add_dpl_workflow(ue-zdc-analysis SOURCES ue-zdc-analysys.cxx PUBLIC_LINK_LIBRARIES O2::Framework O2Physics::AnalysisCore COMPONENT_NAME Analysis) - -o2physics_add_dpl_workflow(ue-lambdak0sflattenicity - SOURCES lambdak0sflattenicity.cxx - PUBLIC_LINK_LIBRARIES O2::Framework O2Physics::AnalysisCore - COMPONENT_NAME Analysis) \ No newline at end of file From 7b5a9d2a5c702db321e098a2ca322ae2806405ff Mon Sep 17 00:00:00 2001 From: fuchuncui <162277233+fuchuncui@users.noreply.github.com> Date: Fri, 25 Oct 2024 22:02:05 +0800 Subject: [PATCH 2/3] PWGCF: fix a bug at flowGFWOmegaXi.cxx (#8145) --- PWGCF/Flow/Tasks/flowGFWOmegaXi.cxx | 69 +++++++++++++++++++---------- 1 file changed, 45 insertions(+), 24 deletions(-) diff --git a/PWGCF/Flow/Tasks/flowGFWOmegaXi.cxx b/PWGCF/Flow/Tasks/flowGFWOmegaXi.cxx index 113acb21179..9654dac54e4 100644 --- a/PWGCF/Flow/Tasks/flowGFWOmegaXi.cxx +++ b/PWGCF/Flow/Tasks/flowGFWOmegaXi.cxx @@ -112,8 +112,8 @@ struct FlowGFWOmegaXi { // Connect to ccdb Service ccdb; - O2_DEFINE_CONFIGURABLE(nolaterthan, int64_t, std::chrono::duration_cast(std::chrono::system_clock::now().time_since_epoch()).count(), "latest acceptable timestamp of creation for the object") - O2_DEFINE_CONFIGURABLE(url, std::string, "http://ccdb-test.cern.ch", "url of the ccdb repository") + O2_DEFINE_CONFIGURABLE(cfgnolaterthan, int64_t, std::chrono::duration_cast(std::chrono::system_clock::now().time_since_epoch()).count(), "latest acceptable timestamp of creation for the object") + O2_DEFINE_CONFIGURABLE(cfgurl, std::string, "http://alice-ccdb.cern.ch", "url of the ccdb repository") // Define output HistogramRegistry registry{"registry"}; @@ -140,39 +140,35 @@ struct FlowGFWOmegaXi { using aodCollisions = soa::Filtered>; // collisions filter using DaughterTracks = soa::Join; - // Set the pt, mult and phi Axis; - o2::framework::AxisSpec axisPt = cfgaxisPt; - int nPtBins = axisPt.binEdges.size() - 1; - TAxis* fPtAxis = new TAxis(nPtBins, &(axisPt.binEdges)[0]); + // Declare the pt, mult and phi Axis; + int nPtBins = 0; + TAxis* fPtAxis = nullptr; - o2::framework::AxisSpec axisXiPt = cfgaxisPtXi; - int nXiPtBins = axisXiPt.binEdges.size() - 1; - TAxis* fXiPtAxis = new TAxis(nXiPtBins, &(axisXiPt.binEdges)[0]); + int nXiPtBins = 0; + TAxis* fXiPtAxis = nullptr; - o2::framework::AxisSpec axisV0Pt = cfgaxisPtV0; - int nV0PtBins = axisV0Pt.binEdges.size() - 1; - TAxis* fV0PtAxis = new TAxis(nV0PtBins, &(axisV0Pt.binEdges)[0]); + int nV0PtBins = 0; + TAxis* fV0PtAxis = nullptr; - o2::framework::AxisSpec axisMult = axisMultiplicity; - int nMultBins = axisMult.binEdges.size() - 1; - TAxis* fMultAxis = new TAxis(nMultBins, &(axisMult.binEdges)[0]); + int nMultBins = 0; + TAxis* fMultAxis = nullptr; int nPhiBins = 60; TAxis* fPhiAxis = new TAxis(nPhiBins, 0, constants::math::TwoPI); - TAxis* fOmegaMass = new TAxis(cfgOmegaMassbins, 1.63, 1.71); + TAxis* fOmegaMass = nullptr; - TAxis* fXiMass = new TAxis(cfgXiMassbins, 1.3, 1.37); + TAxis* fXiMass = nullptr; - TAxis* fK0sMass = new TAxis(cfgK0sMassbins, 0.4, 0.6); + TAxis* fK0sMass = nullptr; - TAxis* fLambdaMass = new TAxis(cfgLambdaMassbins, 1.08, 1.16); + TAxis* fLambdaMass = nullptr; void init(InitContext const&) // Initialization { - ccdb->setURL(url.value); + ccdb->setURL(cfgurl.value); ccdb->setCaching(true); - ccdb->setCreatedNotAfter(nolaterthan.value); + ccdb->setCreatedNotAfter(cfgnolaterthan.value); // Add some output objects to the histogram registry registry.add("hPhi", "", {HistType::kTH1D, {cfgaxisPhi}}); @@ -180,7 +176,7 @@ struct FlowGFWOmegaXi { registry.add("hVtxZ", "", {HistType::kTH1D, {cfgaxisVertex}}); registry.add("hMult", "", {HistType::kTH1D, {{3000, 0.5, 3000.5}}}); registry.add("hCent", "", {HistType::kTH1D, {{90, 0, 90}}}); - registry.add("hPt", "", {HistType::kTH1D, {axisPt}}); + registry.add("hPt", "", {HistType::kTH1D, {cfgaxisPt}}); registry.add("hEtaPhiVtxzREF", "", {HistType::kTH3D, {cfgaxisEta, cfgaxisPhi, {20, -10, 10}}}); registry.add("hEtaPhiVtxzPOIXi", "", {HistType::kTH3D, {cfgaxisEta, cfgaxisPhi, {20, -10, 10}}}); registry.add("hEtaPhiVtxzPOIOmega", "", {HistType::kTH3D, {cfgaxisEta, cfgaxisPhi, {20, -10, 10}}}); @@ -197,8 +193,8 @@ struct FlowGFWOmegaXi { registry.get(HIST("hEventCount"))->GetYaxis()->SetBinLabel(4, "Omega"); // cumulant of flow - registry.add("c22", ";Centrality (%) ; C_{2}{2}", {HistType::kTProfile2D, {axisPt, axisMultiplicity}}); - registry.add("c24", ";Centrality (%) ; C_{2}{4}", {HistType::kTProfile2D, {axisPt, axisMultiplicity}}); + registry.add("c22", ";Centrality (%) ; C_{2}{2}", {HistType::kTProfile2D, {cfgaxisPt, axisMultiplicity}}); + registry.add("c24", ";Centrality (%) ; C_{2}{4}", {HistType::kTProfile2D, {cfgaxisPt, axisMultiplicity}}); // pt-diff cumulant of flow registry.add("Xic22dpt", ";pt ; C_{2}{2} ", {HistType::kTProfile3D, {cfgaxisPtXi, cfgaxisXiminusMassforflow, axisMultiplicity}}); registry.add("Omegac22dpt", ";pt ; C_{2}{2} ", {HistType::kTProfile3D, {cfgaxisPtXi, cfgaxisOmegaminusMassforflow, axisMultiplicity}}); @@ -218,6 +214,31 @@ struct FlowGFWOmegaXi { registry.add("InvMassK0s", "", {HistType::kTHnSparseF, {cfgaxisPtV0, axisK0sMass, cfgaxisEta, axisMultiplicity}}); registry.add("InvMassLambda", "", {HistType::kTHnSparseF, {cfgaxisPtV0, axisLambdaMass, cfgaxisEta, axisMultiplicity}}); + // Set the pt, mult and phi Axis; + o2::framework::AxisSpec axisPt = cfgaxisPt; + nPtBins = axisPt.binEdges.size() - 1; + fPtAxis = new TAxis(nPtBins, &(axisPt.binEdges)[0]); + + o2::framework::AxisSpec axisXiPt = cfgaxisPtXi; + nXiPtBins = axisXiPt.binEdges.size() - 1; + fXiPtAxis = new TAxis(nXiPtBins, &(axisXiPt.binEdges)[0]); + + o2::framework::AxisSpec axisV0Pt = cfgaxisPtV0; + nV0PtBins = axisV0Pt.binEdges.size() - 1; + fV0PtAxis = new TAxis(nV0PtBins, &(axisV0Pt.binEdges)[0]); + + o2::framework::AxisSpec axisMult = axisMultiplicity; + nMultBins = axisMult.binEdges.size() - 1; + fMultAxis = new TAxis(nMultBins, &(axisMult.binEdges)[0]); + + fOmegaMass = new TAxis(cfgOmegaMassbins, 1.63, 1.71); + + fXiMass = new TAxis(cfgXiMassbins, 1.3, 1.37); + + fK0sMass = new TAxis(cfgK0sMassbins, 0.4, 0.6); + + fLambdaMass = new TAxis(cfgLambdaMassbins, 1.08, 1.16); + fGFW->AddRegion("reffull", -0.8, 0.8, 1, 1); // ("name", etamin, etamax, ptbinnum, bitmask)eta region -0.8 to 0.8 // with (-0.5, 0.5) eta gap fGFW->AddRegion("refN10", -0.8, -0.5, 1, 1); From 91852903675f606f9beb92335f2e61664920cacb Mon Sep 17 00:00:00 2001 From: navneetkumar231295 <71565461+navneetkumar231295@users.noreply.github.com> Date: Fri, 25 Oct 2024 19:41:51 +0530 Subject: [PATCH 3/3] PWGLF: To add the namspace for abs (#8144) Co-authored-by: Navneet --- PWGLF/Tasks/Resonances/k892pmanalysis.cxx | 22 +++++++++++----------- 1 file changed, 11 insertions(+), 11 deletions(-) diff --git a/PWGLF/Tasks/Resonances/k892pmanalysis.cxx b/PWGLF/Tasks/Resonances/k892pmanalysis.cxx index 0f161bfc694..16963b77e6b 100644 --- a/PWGLF/Tasks/Resonances/k892pmanalysis.cxx +++ b/PWGLF/Tasks/Resonances/k892pmanalysis.cxx @@ -352,9 +352,9 @@ struct k892pmanalysis { } // apply the competing V0 rejection cut (excluding Lambda0 candidates, massLambdaPDG = 1115.683 MeV/c2) - if (abs(v0.mLambda() - massLambda0) < cV0MassWindow) + if (std::abs(v0.mLambda() - massLambda0) < cV0MassWindow) continue; - if (abs(v0.mAntiLambda() - massAntiLambda0) < cV0MassWindow) + if (std::abs(v0.mAntiLambda() - massAntiLambda0) < cV0MassWindow) continue; if (!IsMix && !IsV0QAFilled) { @@ -382,7 +382,7 @@ struct k892pmanalysis { } // Checking whether the mid-rapidity condition is met - if (abs(lResonance.Rapidity()) > 0.5) { + if (std::abs(lResonance.Rapidity()) > 0.5) { continue; } @@ -401,7 +401,7 @@ struct k892pmanalysis { histos.fill(HIST("k892pmMassPtMult3d"), lResonance.M(), lResonance.Pt(), multiplicity); if constexpr (IsMC) { // LOG(info) << "track PDG:\t" << trk.pdgCode() << "\tV0 PDG:\t" << v0.pdgCode(); - if (abs(trk.pdgCode()) != 211 || abs(v0.pdgCode()) != 310) // Skip to next iteration if daughters are not charged pion + K0s/AntiK0s + if (std::abs(trk.pdgCode()) != 211 || std::abs(v0.pdgCode()) != 310) // Skip to next iteration if daughters are not charged pion + K0s/AntiK0s continue; if (trk.motherPDG() != v0.motherPDG()) continue; @@ -444,17 +444,17 @@ struct k892pmanalysis { void processMCTrue(aod::ResoMCParents& resoParents) { for (auto& part : resoParents) { // loop over all pre-filtered MC particles - if (abs(part.pdgCode()) != 323) // K*892(pm) + if (std::abs(part.pdgCode()) != 323) // K*892(pm) continue; - if (abs(part.y()) > 0.5) // rapidity cut + if (std::abs(part.y()) > 0.5) // rapidity cut continue; bool pass1 = false; bool pass2 = false; /*// Sanity check: looking for K*0 resonances for sanity check - if (abs(part.pdgCode()) == 323) { + if (std::abs(part.pdgCode()) == 323) { LOG(info) << "Found charged K*: " << part.pdgCode() << ". Daughters' PDG are " << part.daughterPDG1() << " and " << part.daughterPDG2(); } - if (abs(part.pdgCode()) == 313) { + if (std::abs(part.pdgCode()) == 313) { LOG(info) << "Found non-charged K*: " << part.pdgCode() << ". Daughters' PDG are " << part.daughterPDG1() << " and " << part.daughterPDG2(); }*/ @@ -466,11 +466,11 @@ struct k892pmanalysis { pass2 = true; histos.fill(HIST("hK892pmCounter"), 1.5); } - /*if (abs(part.daughterPDG1()) == 211) + /*if (std::abs(part.daughterPDG1()) == 211) histos.fill(HIST("hDaughterCounter"), 0.5); - if (abs(part.daughterPDG2()) == 310) + if (std::abs(part.daughterPDG2()) == 310) histos.fill(HIST("hDaughterCounter"), 1.5); - if (abs(part.daughterPDG1()) == 211 && abs(part.daughterPDG2()) == 310) + if (std::abs(part.daughterPDG1()) == 211 && std::abs(part.daughterPDG2()) == 310) histos.fill(HIST("hDaughterCounter"), 2.5);*/ // if (!pass1 || !pass2) // Go on only if we have both decay products, else skip to next iteration if (!pass1 && !pass2) // Go on only if we have both decay products, else skip to next iteration