Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
64 changes: 63 additions & 1 deletion PWGUD/Tasks/flowCorrelationsUpc.cxx
Original file line number Diff line number Diff line change
Expand Up @@ -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"};
Expand Down Expand Up @@ -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<TH1>(HIST("eventcont"))->GetXaxis()->SetBinLabel(4, "same");
registry.get<TH1>(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);
Expand Down Expand Up @@ -226,6 +231,59 @@ struct FlowCorrelationsUpc {
}
}

template <typename C>
// 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 <typename C>
bool eventSelected(const C& collision)
{
Expand Down Expand Up @@ -257,6 +315,10 @@ struct FlowCorrelationsUpc {
return false;
}

if (!zdcTimeCut(collision)) {
return false;
}

return true;
}

Expand Down
28 changes: 28 additions & 0 deletions PWGUD/Tasks/flowCumulantsUpc.cxx
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand All @@ -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));
Expand Down
Loading