Skip to content
Merged
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
50 changes: 16 additions & 34 deletions PWGEM/PhotonMeson/Tasks/taskPi0FlowEMC.cxx
Original file line number Diff line number Diff line change
Expand Up @@ -121,7 +121,6 @@ struct TaskPi0FlowEMC {
Configurable<int> cfgEMCalMapLevelBackground{"cfgEMCalMapLevelBackground", 4, "Different levels of correction for the background, the smaller number includes the level of the higher number (4: none, 3: only inside EMCal, 2: remove edges, 1: exclude bad channels)"};
Configurable<int> cfgEMCalMapLevelSameEvent{"cfgEMCalMapLevelSameEvent", 4, "Different levels of correction for the same event, the smaller number includes the level of the higher number (4: none, 3: only inside EMCal, 2: remove edges, 1: exclude bad channels)"};
Configurable<int> cfgDistanceToEdge{"cfgDistanceToEdge", 1, "Distance to edge in cells required for rotated cluster to be accepted"};
Configurable<bool> cfgDoM02{"cfgDoM02", false, "Flag to enable flow vs M02 for single photons"};
Configurable<bool> cfgDoPlaneQA{"cfgDoPlaneQA", false, "Flag to enable QA plots comparing in and out of plane"};
Configurable<float> cfgMaxQVector{"cfgMaxQVector", 20.f, "Maximum allowed absolute QVector value."};

Expand Down Expand Up @@ -408,18 +407,21 @@ struct TaskPi0FlowEMC {
const AxisSpec thnAxisMixingCent{mixingConfig.cfgCentBins, "Centrality (%)"};
const AxisSpec thnAxisMixingEP{mixingConfig.cfgEPBins, Form("cos(%d#varphi)", harmonic.value)};

registry.add("hSparsePi0Flow", "<v_n> vs m_{inv} vs p_T vs cent for same event", HistType::kTProfile3D, {thnAxisInvMass, thnAxisPt, thnAxisCent});
registry.add("hSparsePi0", "m_{inv} vs p_T vs cent for same event", HistType::kTH3D, {thnAxisInvMass, thnAxisPt, thnAxisCent});
if (!doprocessM02) {
registry.add("hSparsePi0Flow", "<v_n> vs m_{inv} vs p_T vs cent for same event", HistType::kTProfile3D, {thnAxisInvMass, thnAxisPt, thnAxisCent});
registry.add("hSparsePi0", "m_{inv} vs p_T vs cent for same event", HistType::kTH3D, {thnAxisInvMass, thnAxisPt, thnAxisCent});

registry.add("hSparseBkgMixFlow", "<v_n> vs m_{inv} vs p_T vs cent for mixed event", HistType::kTProfile3D, {thnAxisInvMass, thnAxisPt, thnAxisCent});
registry.add("hSparseBkgMix", "m_{inv} vs p_T vs cent for mixed event", HistType::kTH3D, {thnAxisInvMass, thnAxisPt, thnAxisCent});
registry.add("hSparseBkgMixFlow", "<v_n> vs m_{inv} vs p_T vs cent for mixed event", HistType::kTProfile3D, {thnAxisInvMass, thnAxisPt, thnAxisCent});
registry.add("hSparseBkgMix", "m_{inv} vs p_T vs cent for mixed event", HistType::kTH3D, {thnAxisInvMass, thnAxisPt, thnAxisCent});

registry.add("h3DMixingCount", "THn Event Mixing QA", HistType::kTH3D, {thnAxisMixingVtx, thnAxisMixingCent, thnAxisMixingEP});
}

if (rotationConfig.cfgDoRotation.value) {
registry.add("hSparseBkgRotFlow", "<v_n> vs m_{inv} vs p_T vs cent for rotation background", HistType::kTProfile3D, {thnAxisInvMass, thnAxisPt, thnAxisCent});
registry.add("hSparseBkgRot", "m_{inv} vs p_T vs cent for rotation background", HistType::kTH3D, {thnAxisInvMass, thnAxisPt, thnAxisCent});
}

registry.add("h3DMixingCount", "THn Event Mixing QA", HistType::kTH3D, {thnAxisMixingVtx, thnAxisMixingCent, thnAxisMixingEP});
if (cfgDoPlaneQA.value) {
registry.add("hSparsePi0FlowPlane", "THn for SP", HistType::kTHnSparseF, {thnAxisInvMass, thnAxisPt, thnAxisCent, thnAxisCosDeltaPhi});
}
Expand Down Expand Up @@ -464,9 +466,9 @@ struct TaskPi0FlowEMC {
registry.add("hSparseCalibBack", "THn for Calib background", HistType::kTHnSparseF, {thnAxisInvMass, thAxisEnergyCalib, thnAxisCent});
}

if (cfgDoM02.value) {
registry.add("p3DM02Flow", "<v_n> vs M_{02} vs p_T vs cent", HistType::kTProfile3D, {thnAxisM02, thnAxisPt, thnAxisCent});
registry.add("h3DSparsePi0", "M_{02} vs p_T vs cent", HistType::kTH3D, {thnAxisM02, thnAxisPt, thnAxisCent});
if (doprocessM02) {
registry.add("hSparsePhotonFlow", "<v_n> vs M_{02} vs p_T vs cent", HistType::kTProfile3D, {thnAxisM02, thnAxisPt, thnAxisCent});
registry.add("hSparsePhoton", "M_{02} vs p_T vs cent", HistType::kTH3D, {thnAxisM02, thnAxisPt, thnAxisCent});
}

ccdb->setURL(ccdbUrl);
Expand Down Expand Up @@ -1409,38 +1411,21 @@ struct TaskPi0FlowEMC {
fEMCCut.AreSelectedRunning(emcFlags, clusters, matchedPrims, matchedSeconds);

for (const auto& collision : collisions) {
o2::aod::pwgem::photonmeson::utils::eventhistogram::fillEventInfo<0>(&registry, collision);
if (!(fEMEventCut.IsSelected(collision))) {
// general event selection
continue;
}
if (!(eventcuts.cfgFT0COccupancyMin <= collision.ft0cOccupancyInTimeRange() && collision.ft0cOccupancyInTimeRange() < eventcuts.cfgFT0COccupancyMax)) {
// occupancy selection
continue;
}
float cent = getCentrality(collision);
if (cent < eventcuts.cfgMinCent || cent > eventcuts.cfgMaxCent) {
// event selection
continue;
}
if (!isQvecGood(getAllQvec(collision))) {
// selection based on QVector
if (!isFullEventSelected(collision, true)) {
continue;
}
runNow = collision.runNumber();
if (runNow != runBefore) {
initCCDB(collision);
runBefore = runNow;
}
o2::aod::pwgem::photonmeson::utils::eventhistogram::fillEventInfo<1>(&registry, collision);
registry.fill(HIST("Event/before/hCollisionCounter"), 12.0); // accepted
registry.fill(HIST("Event/after/hCollisionCounter"), 12.0); // accepted

auto photonsPerCollision = clusters.sliceBy(perCollisionEMC, collision.globalIndex());

for (const auto& photon : photonsPerCollision) {
if (emccuts.cfgEnableQA.value) {
registry.fill(HIST("clusterQA/hEClusterBefore"), photon.e()); // before cuts
registry.fill(HIST("clusterQA/hEClusterBefore"), photon.corrE()); // before cuts
registry.fill(HIST("clusterQA/hClusterEtaPhiBefore"), photon.phi(), photon.eta()); // before cuts
}
if (!(emcFlags.test(photon.globalIndex()))) {
Expand All @@ -1450,7 +1435,7 @@ struct TaskPi0FlowEMC {
continue;
}
if (emccuts.cfgEnableQA.value) {
registry.fill(HIST("clusterQA/hEClusterAfter"), photon.e()); // accepted after cuts
registry.fill(HIST("clusterQA/hEClusterAfter"), photon.corrE()); // accepted after cuts
registry.fill(HIST("clusterQA/hClusterEtaPhiAfter"), photon.phi(), photon.eta()); // after cuts
}

Expand All @@ -1465,11 +1450,8 @@ struct TaskPi0FlowEMC {
if (correctionConfig.cfgApplySPresolution.value) {
scalprodCand = scalprodCand / h1SPResolution->GetBinContent(h1SPResolution->FindBin(cent + epsilon));
}
if (cfgDoM02.value) {
registry.fill(HIST("p3DM02Flow"), photon.m02(), photon.pt(), cent, scalprodCand);
registry.fill(HIST("h3DSparsePi0"), photon.m02(), photon.pt(), cent);
}
continue;
registry.fill(HIST("hSparsePhotonFlow"), photon.m02(), photon.corrPt(), cent, scalprodCand);
registry.fill(HIST("hSparsePhoton"), photon.m02(), photon.corrPt(), cent);
} // end of loop over single cluster
} // end of loop over collisions
} // processM02
Expand Down
Loading