Skip to content

Commit fd09f35

Browse files
authored
[PWGEM,PWGEM-36] PhotonMeson/taskPi0FlowEMC: Update processM02 to use… (#16804)
1 parent 8cd759e commit fd09f35

1 file changed

Lines changed: 16 additions & 34 deletions

File tree

PWGEM/PhotonMeson/Tasks/taskPi0FlowEMC.cxx

Lines changed: 16 additions & 34 deletions
Original file line numberDiff line numberDiff line change
@@ -121,7 +121,6 @@ struct TaskPi0FlowEMC {
121121
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)"};
122122
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)"};
123123
Configurable<int> cfgDistanceToEdge{"cfgDistanceToEdge", 1, "Distance to edge in cells required for rotated cluster to be accepted"};
124-
Configurable<bool> cfgDoM02{"cfgDoM02", false, "Flag to enable flow vs M02 for single photons"};
125124
Configurable<bool> cfgDoPlaneQA{"cfgDoPlaneQA", false, "Flag to enable QA plots comparing in and out of plane"};
126125
Configurable<float> cfgMaxQVector{"cfgMaxQVector", 20.f, "Maximum allowed absolute QVector value."};
127126

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

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

414-
registry.add("hSparseBkgMixFlow", "<v_n> vs m_{inv} vs p_T vs cent for mixed event", HistType::kTProfile3D, {thnAxisInvMass, thnAxisPt, thnAxisCent});
415-
registry.add("hSparseBkgMix", "m_{inv} vs p_T vs cent for mixed event", HistType::kTH3D, {thnAxisInvMass, thnAxisPt, thnAxisCent});
414+
registry.add("hSparseBkgMixFlow", "<v_n> vs m_{inv} vs p_T vs cent for mixed event", HistType::kTProfile3D, {thnAxisInvMass, thnAxisPt, thnAxisCent});
415+
registry.add("hSparseBkgMix", "m_{inv} vs p_T vs cent for mixed event", HistType::kTH3D, {thnAxisInvMass, thnAxisPt, thnAxisCent});
416+
417+
registry.add("h3DMixingCount", "THn Event Mixing QA", HistType::kTH3D, {thnAxisMixingVtx, thnAxisMixingCent, thnAxisMixingEP});
418+
}
416419

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

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

467-
if (cfgDoM02.value) {
468-
registry.add("p3DM02Flow", "<v_n> vs M_{02} vs p_T vs cent", HistType::kTProfile3D, {thnAxisM02, thnAxisPt, thnAxisCent});
469-
registry.add("h3DSparsePi0", "M_{02} vs p_T vs cent", HistType::kTH3D, {thnAxisM02, thnAxisPt, thnAxisCent});
469+
if (doprocessM02) {
470+
registry.add("hSparsePhotonFlow", "<v_n> vs M_{02} vs p_T vs cent", HistType::kTProfile3D, {thnAxisM02, thnAxisPt, thnAxisCent});
471+
registry.add("hSparsePhoton", "M_{02} vs p_T vs cent", HistType::kTH3D, {thnAxisM02, thnAxisPt, thnAxisCent});
470472
}
471473

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

14111413
for (const auto& collision : collisions) {
1412-
o2::aod::pwgem::photonmeson::utils::eventhistogram::fillEventInfo<0>(&registry, collision);
1413-
if (!(fEMEventCut.IsSelected(collision))) {
1414-
// general event selection
1415-
continue;
1416-
}
1417-
if (!(eventcuts.cfgFT0COccupancyMin <= collision.ft0cOccupancyInTimeRange() && collision.ft0cOccupancyInTimeRange() < eventcuts.cfgFT0COccupancyMax)) {
1418-
// occupancy selection
1419-
continue;
1420-
}
14211414
float cent = getCentrality(collision);
1422-
if (cent < eventcuts.cfgMinCent || cent > eventcuts.cfgMaxCent) {
1423-
// event selection
1424-
continue;
1425-
}
1426-
if (!isQvecGood(getAllQvec(collision))) {
1427-
// selection based on QVector
1415+
if (!isFullEventSelected(collision, true)) {
14281416
continue;
14291417
}
14301418
runNow = collision.runNumber();
14311419
if (runNow != runBefore) {
14321420
initCCDB(collision);
14331421
runBefore = runNow;
14341422
}
1435-
o2::aod::pwgem::photonmeson::utils::eventhistogram::fillEventInfo<1>(&registry, collision);
1436-
registry.fill(HIST("Event/before/hCollisionCounter"), 12.0); // accepted
1437-
registry.fill(HIST("Event/after/hCollisionCounter"), 12.0); // accepted
14381423

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

14411426
for (const auto& photon : photonsPerCollision) {
14421427
if (emccuts.cfgEnableQA.value) {
1443-
registry.fill(HIST("clusterQA/hEClusterBefore"), photon.e()); // before cuts
1428+
registry.fill(HIST("clusterQA/hEClusterBefore"), photon.corrE()); // before cuts
14441429
registry.fill(HIST("clusterQA/hClusterEtaPhiBefore"), photon.phi(), photon.eta()); // before cuts
14451430
}
14461431
if (!(emcFlags.test(photon.globalIndex()))) {
@@ -1450,7 +1435,7 @@ struct TaskPi0FlowEMC {
14501435
continue;
14511436
}
14521437
if (emccuts.cfgEnableQA.value) {
1453-
registry.fill(HIST("clusterQA/hEClusterAfter"), photon.e()); // accepted after cuts
1438+
registry.fill(HIST("clusterQA/hEClusterAfter"), photon.corrE()); // accepted after cuts
14541439
registry.fill(HIST("clusterQA/hClusterEtaPhiAfter"), photon.phi(), photon.eta()); // after cuts
14551440
}
14561441

@@ -1465,11 +1450,8 @@ struct TaskPi0FlowEMC {
14651450
if (correctionConfig.cfgApplySPresolution.value) {
14661451
scalprodCand = scalprodCand / h1SPResolution->GetBinContent(h1SPResolution->FindBin(cent + epsilon));
14671452
}
1468-
if (cfgDoM02.value) {
1469-
registry.fill(HIST("p3DM02Flow"), photon.m02(), photon.pt(), cent, scalprodCand);
1470-
registry.fill(HIST("h3DSparsePi0"), photon.m02(), photon.pt(), cent);
1471-
}
1472-
continue;
1453+
registry.fill(HIST("hSparsePhotonFlow"), photon.m02(), photon.corrPt(), cent, scalprodCand);
1454+
registry.fill(HIST("hSparsePhoton"), photon.m02(), photon.corrPt(), cent);
14731455
} // end of loop over single cluster
14741456
} // end of loop over collisions
14751457
} // processM02

0 commit comments

Comments
 (0)