From f0e4c8dab95dd85beee0db7ef142256d94136625 Mon Sep 17 00:00:00 2001 From: miedema-11 <1260971129@qq.com> Date: Mon, 27 Jul 2026 16:44:31 +0800 Subject: [PATCH 1/2] add POI --- PWGUD/Tasks/flowCumulantsUpc.cxx | 28 ++++++++++++++++++++++++++++ 1 file changed, 28 insertions(+) diff --git a/PWGUD/Tasks/flowCumulantsUpc.cxx b/PWGUD/Tasks/flowCumulantsUpc.cxx index 52df93c8f24..4b7b11b8106 100644 --- a/PWGUD/Tasks/flowCumulantsUpc.cxx +++ b/PWGUD/Tasks/flowCumulantsUpc.cxx @@ -341,10 +341,24 @@ struct FlowCumulantsUpc { fGFW->AddRegion("refP", 0.4, maxEta, 1, 1); fGFW->AddRegion("refM", -0.4, 0.4, 1, 1); fGFW->AddRegion("poiN", minEta, -0.4, 1 + fPtAxis->GetNbins(), 2); + fGFW->AddRegion("poiN00", minEta, 0., 1 + fPtAxis->GetNbins(), 2); + fGFW->AddRegion("poiN02", minEta, -0.1, 1 + fPtAxis->GetNbins(), 2); + fGFW->AddRegion("poiN04", minEta, -0.2, 1 + fPtAxis->GetNbins(), 2); + fGFW->AddRegion("poiN06", minEta, -0.3, 1 + fPtAxis->GetNbins(), 2); + fGFW->AddRegion("poiN08", minEta, -0.4, 1 + fPtAxis->GetNbins(), 2); fGFW->AddRegion("poiN10", minEta, -0.5, 1 + fPtAxis->GetNbins(), 2); + fGFW->AddRegion("poiN12", minEta, -0.6, 1 + fPtAxis->GetNbins(), 2); + fGFW->AddRegion("poiN14", minEta, -0.7, 1 + fPtAxis->GetNbins(), 2); fGFW->AddRegion("poifull", minEta, maxEta, 1 + fPtAxis->GetNbins(), 2); fGFW->AddRegion("olN", minEta, -0.4, 1 + fPtAxis->GetNbins(), 4); + fGFW->AddRegion("olN00", minEta, 0., 1 + fPtAxis->GetNbins(), 4); + fGFW->AddRegion("olN02", minEta, -0.1, 1 + fPtAxis->GetNbins(), 4); + fGFW->AddRegion("olN04", minEta, -0.2, 1 + fPtAxis->GetNbins(), 4); + fGFW->AddRegion("olN06", minEta, -0.3, 1 + fPtAxis->GetNbins(), 4); + fGFW->AddRegion("olN08", minEta, -0.4, 1 + fPtAxis->GetNbins(), 4); fGFW->AddRegion("olN10", minEta, -0.5, 1 + fPtAxis->GetNbins(), 4); + fGFW->AddRegion("olN12", minEta, -0.6, 1 + fPtAxis->GetNbins(), 4); + fGFW->AddRegion("olN14", minEta, -0.7, 1 + fPtAxis->GetNbins(), 4); fGFW->AddRegion("olfull", minEta, maxEta, 1 + fPtAxis->GetNbins(), 4); // eta region for MC, can be different from data to study the effect of acceptance @@ -369,10 +383,24 @@ struct FlowCumulantsUpc { fGFWMC->AddRegion("refP", 0.4, maxEta, 1, 1); fGFWMC->AddRegion("refM", -0.4, 0.4, 1, 1); fGFWMC->AddRegion("poiN", minEta, -0.4, 1 + fPtAxis->GetNbins(), 2); + fGFWMC->AddRegion("poiN00", minEta, 0., 1 + fPtAxis->GetNbins(), 2); + fGFWMC->AddRegion("poiN02", minEta, -0.1, 1 + fPtAxis->GetNbins(), 2); + fGFWMC->AddRegion("poiN04", minEta, -0.2, 1 + fPtAxis->GetNbins(), 2); + fGFWMC->AddRegion("poiN06", minEta, -0.3, 1 + fPtAxis->GetNbins(), 2); + fGFWMC->AddRegion("poiN08", minEta, -0.4, 1 + fPtAxis->GetNbins(), 2); fGFWMC->AddRegion("poiN10", minEta, -0.5, 1 + fPtAxis->GetNbins(), 2); + fGFWMC->AddRegion("poiN12", minEta, -0.6, 1 + fPtAxis->GetNbins(), 2); + fGFWMC->AddRegion("poiN14", minEta, -0.7, 1 + fPtAxis->GetNbins(), 2); fGFWMC->AddRegion("poifull", minEta, maxEta, 1 + fPtAxis->GetNbins(), 2); fGFWMC->AddRegion("olN", minEta, -0.4, 1 + fPtAxis->GetNbins(), 4); + fGFWMC->AddRegion("olN00", minEta, 0., 1 + fPtAxis->GetNbins(), 4); + fGFWMC->AddRegion("olN02", minEta, -0.1, 1 + fPtAxis->GetNbins(), 4); + fGFWMC->AddRegion("olN04", minEta, -0.2, 1 + fPtAxis->GetNbins(), 4); + fGFWMC->AddRegion("olN06", minEta, -0.3, 1 + fPtAxis->GetNbins(), 4); + fGFWMC->AddRegion("olN08", minEta, -0.4, 1 + fPtAxis->GetNbins(), 4); fGFWMC->AddRegion("olN10", minEta, -0.5, 1 + fPtAxis->GetNbins(), 4); + fGFWMC->AddRegion("olN12", minEta, -0.6, 1 + fPtAxis->GetNbins(), 4); + fGFWMC->AddRegion("olN14", minEta, -0.7, 1 + fPtAxis->GetNbins(), 4); fGFWMC->AddRegion("olfull", minEta, maxEta, 1 + fPtAxis->GetNbins(), 4); corrconfigs.push_back(fGFW->GetCorrelatorConfig("full {2 -2}", "ChFull22", kFALSE)); From a2d31fa6724a0fd72c3159acee33dd645cb35348 Mon Sep 17 00:00:00 2001 From: miedema-11 <1260971129@qq.com> Date: Thu, 30 Jul 2026 09:24:13 +0800 Subject: [PATCH 2/2] add zdc time cut --- PWGUD/Tasks/flowCorrelationsUpc.cxx | 64 ++++++++++++++++++++++++++++- 1 file changed, 63 insertions(+), 1 deletion(-) diff --git a/PWGUD/Tasks/flowCorrelationsUpc.cxx b/PWGUD/Tasks/flowCorrelationsUpc.cxx index 9159bb73607..1c8273dbe0a 100644 --- a/PWGUD/Tasks/flowCorrelationsUpc.cxx +++ b/PWGUD/Tasks/flowCorrelationsUpc.cxx @@ -92,6 +92,8 @@ struct FlowCorrelationsUpc { O2_DEFINE_CONFIGURABLE(cfgRctFlagEnabled, bool, false, "use run condition table flag") O2_DEFINE_CONFIGURABLE(cfgRctFlagIndex, int, 1, "1: isCBTOk; 2:isCBTZdcOk; 3: isCBTHadronOk; 4:isCBTHadronZdcOk ") O2_DEFINE_CONFIGURABLE(cfgIRMaxCut, double, 50, "maximum interaction rate for UPC events") + O2_DEFINE_CONFIGURABLE(cfgZdcTime, bool, false, "choose zdc time cut") + O2_DEFINE_CONFIGURABLE(cfgZdcTimeCut, float, 2.0, "zdc time cut") ConfigurableAxis axisVertex{"axisVertex", {10, -10, 10}, "vertex axis for histograms"}; ConfigurableAxis axisEta{"axisEta", {40, -1., 1.}, "eta axis for histograms"}; @@ -161,13 +163,16 @@ struct FlowCorrelationsUpc { registry.add("Trig_hist", "", {HistType::kTHnSparseF, {{axisSample, axisVertex, axisIndependent, axisPtTrigger}}}); - registry.add("eventcont", "bin", {HistType::kTH1F, {{10, 0, 10, "bin"}}}); // histogram to see how many events are in the same and mixed event + registry.add("eventcont", "bin", {HistType::kTH1F, {{10, 0, 10, "bin"}}}); // histogram to see how many events are in the same and mixed event registry.get(HIST("eventcont"))->GetXaxis()->SetBinLabel(4, "same"); registry.get(HIST("eventcont"))->GetXaxis()->SetBinLabel(5, "mix pair"); registry.add("deltaPhi_deltaEta_same", "deltaphi-deltaeta", {HistType::kTH2D, {axisDeltaPhi, axisDeltaEta}}); // histogram to check the delta eta and delta phi distribution registry.add("deltaPhi_deltaEta_mixed", "deltaphi-deltaeta", {HistType::kTH2D, {axisDeltaPhi, axisDeltaEta}}); // histogram to check the delta eta and delta phi distribution registry.add("Nch_raw_vs_independent", "Raw vs Independent", {HistType::kTH2D, {axisMultiplicity, axisIndependent}}); registry.add("interactionRate", "kHz", {HistType::kTH1F, {{50, 0, 50, "kHz"}}}); + registry.add("ZDCEnergy", "ZNA; ZNC; Count", {HistType::kTH2D, {{100, 0, 100}, {100, 0, 100}}}); + registry.add("ZDCTime", "ZNA; ZNC; Count", {HistType::kTH2D, {{100, -10, 10}, {100, -10, 10}}}); + registry.add("neutronClass", "ZNA; ZNC; Count", {HistType::kTH2D, {{2, 0, 2}, {2, 0, 2}}}); if (cfgUseNchRoughMCCorrected) { fnchRoughMCFunc = new TF1("fnchRoughMCFunc", cfgNchRoughMCFunction->c_str(), 0, 100); @@ -226,6 +231,59 @@ struct FlowCorrelationsUpc { } } + template + // zdc time cut + bool zdcTimeCut(const C& collision) + { + if (!cfgZdcTime) { + return true; + } + int neutronClass = -1; + float energyCommonZNA = collision.energyCommonZNA(), energyCommonZNC = collision.energyCommonZNC(); + float timeZNA = collision.timeZNA(), timeZNC = collision.timeZNC(); + if (std::isinf(energyCommonZNA)) + energyCommonZNA = -999; + if (std::isinf(energyCommonZNC)) + energyCommonZNC = -999; + if (std::isinf(timeZNA)) + timeZNA = -999; + if (std::isinf(timeZNC)) + timeZNC = -999; + registry.fill(HIST("ZDCEnergy"), energyCommonZNC, energyCommonZNA); + registry.fill(HIST("ZDCTime"), timeZNC, timeZNA); + if (std::abs(timeZNA) > cfgZdcTimeCut && std::abs(timeZNC) > cfgZdcTimeCut) { + neutronClass = 0; + registry.fill(HIST("neutronClass"), 0, 0); + } + if (std::abs(timeZNA) <= cfgZdcTimeCut && std::abs(timeZNC) > cfgZdcTimeCut) { + neutronClass = 1; + registry.fill(HIST("neutronClass"), 0, 1); + } + if (std::abs(timeZNA) > cfgZdcTimeCut && std::abs(timeZNC) <= cfgZdcTimeCut) { + neutronClass = 2; + registry.fill(HIST("neutronClass"), 1, 0); + } + if (std::abs(timeZNA) <= cfgZdcTimeCut && std::abs(timeZNC) <= cfgZdcTimeCut) { + neutronClass = 3; + registry.fill(HIST("neutronClass"), 1, 1); + } + if (cfgZdcTime) { + // reject 0n0n and XnXn + if (neutronClass == 0 || neutronClass == 3) { // o2-linter: disable=magic-number (ZDC time cut) + return false; + } + // if A or C gap is requested, keep corresponding neutron class + if (cfgGapSide == 0 || cfgGapSide == 1) { + if ((cfgGapSide == 0 && neutronClass == 1) || (cfgGapSide == 1 && neutronClass == 2)) { // o2-linter: disable=magic-number (ZDC time cut) + // accepted + } else { + return false; + } + } + } + return true; + } + template bool eventSelected(const C& collision) { @@ -257,6 +315,10 @@ struct FlowCorrelationsUpc { return false; } + if (!zdcTimeCut(collision)) { + return false; + } + return true; }