Skip to content

Commit 5085e63

Browse files
Added cut labels to counters
1 parent e033a1e commit 5085e63

File tree

1 file changed

+43
-20
lines changed

1 file changed

+43
-20
lines changed

PWGUD/Tasks/exclusiveRhoTo4Pi.cxx

Lines changed: 43 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -394,6 +394,10 @@ struct ExclusiveRhoTo4Pi {
394394
// Run Numbers
395395
static int runNos[113];
396396
static int numRunNums;
397+
static std::string eventLabels[12];
398+
static std::string trackLabels[14];
399+
static int numTrackCuts;
400+
static int numEventCuts;
397401
// Derived Data
398402
Produces<aod::SignalData> sigFromData;
399403
Produces<aod::BkgroundData> bkgFromData;
@@ -443,8 +447,8 @@ struct ExclusiveRhoTo4Pi {
443447
void init(InitContext const&)
444448
{
445449
// QA plots: Event and Track Counter
446-
histosCounter.add("EventsCounts_vs_runNo", "Number of Selected 4-Pion Events per Run; Run Number; Number of Events", kTH2F, {{113, 0, 113}, {20, 0, 20}});
447-
histosCounter.add("TracksCounts_vs_runNo", "Number of Selected Tracks per Run; Run Number; Number of Tracks", kTH2F, {{113, 0, 113}, {20, 0, 20}});
450+
histosCounter.add("EventsCounts_vs_runNo", "Number of Selected 4-Pion Events per Run; Run Number; Number of Events", kTH2F, {{113, 0, 113}, {12, 0, 12}});
451+
histosCounter.add("TracksCounts_vs_runNo", "Number of Selected Tracks per Run; Run Number; Number of Tracks", kTH2F, {{113, 0, 113}, {14, 0, 14}});
448452
histosCounter.add("fourPionCounts_0c", "Four Pion Counts; Run Number; Events", kTH1F, {{113, 0, 113}});
449453
histosCounter.add("fourPionCounts_0c_within_rap", "Four Pion Counts; Run Number; Events", kTH1F, {{113, 0, 113}});
450454
histosCounter.add("fourPionCounts_0c_selected", "Four Pion Counts; Run Number; Events", kTH1F, {{113, 0, 113}});
@@ -827,8 +831,8 @@ struct ExclusiveRhoTo4Pi {
827831
} else if ((mDiff24 < mDiff13) && (mDiff24 < mDiff14) && (mDiff24 < mDiff23)) {
828832
histosData.fill(HIST("CSphi_vs_CScosTheta"), fourPiPhiPair4, fourPiCosThetaPair4);
829833
}
830-
}
831-
}
834+
} // End of Pt selection for rho mass
835+
} // End of Pt selection for rho mass
832836
if (p1234.Pt() > rhoPtCut && p1234.Pt() < zeroPointEight) {
833837
histosData.fill(HIST("fourpion_mass_0_charge_domB"), p1234.M());
834838
}
@@ -1001,74 +1005,75 @@ struct ExclusiveRhoTo4Pi {
10011005

10021006
void processTrackCounter(soa::Filtered<UDCollisions>::iterator const& collision, UDtracks const& tracks)
10031007
{
1008+
int runIndex = getRunNumberIndex(collision.runNumber());
10041009
// Check if the Event is reconstructed in UPC mode
10051010
if (ifCheckUPCmode && (collision.flags() != 1)) {
10061011
return;
10071012
}
10081013
for (const auto& track : tracks) {
1009-
histosCounter.fill(HIST("TracksCounts_vs_runNo"), collision.runNumber(), 0);
1014+
histosCounter.fill(HIST("TracksCounts_vs_runNo"), runIndex, 0);
10101015
PxPyPzMVector trackVector(track.px(), track.py(), track.pz(), o2::constants::physics::MassPionCharged);
10111016
// is PV contributor
10121017
if (track.isPVContributor() != useOnlyPVtracks) {
10131018
continue;
10141019
}
1015-
histosCounter.fill(HIST("TracksCounts_vs_runNo"), collision.runNumber(), 1);
1020+
histosCounter.fill(HIST("TracksCounts_vs_runNo"), runIndex, 1);
10161021
// pt cut
10171022
if (trackVector.Pt() < pTcut) {
10181023
continue;
10191024
}
1020-
histosCounter.fill(HIST("TracksCounts_vs_runNo"), collision.runNumber(), 2);
1025+
histosCounter.fill(HIST("TracksCounts_vs_runNo"), runIndex, 2);
10211026
// eta cut
10221027
if (std::abs(trackVector.Eta()) > etaCut) {
10231028
continue;
10241029
}
1025-
histosCounter.fill(HIST("TracksCounts_vs_runNo"), collision.runNumber(), 3);
1030+
histosCounter.fill(HIST("TracksCounts_vs_runNo"), runIndex, 3);
10261031
// DCA Z cut
10271032
if (std::abs(track.dcaZ()) > dcaZcut) {
10281033
continue;
10291034
}
1030-
histosCounter.fill(HIST("TracksCounts_vs_runNo"), collision.runNumber(), 4);
1035+
histosCounter.fill(HIST("TracksCounts_vs_runNo"), runIndex, 4);
10311036
// DCA XY cut
10321037
float maxDCAxy = 0.0105 + 0.035 / std::pow(trackVector.Pt(), 1.1);
10331038
if (dcaXYcut == 0 && (std::fabs(track.dcaXY()) > maxDCAxy)) {
10341039
continue;
10351040
} else if (dcaXYcut != 0 && (std::fabs(track.dcaXY()) > dcaXYcut)) {
10361041
continue;
10371042
}
1038-
histosCounter.fill(HIST("TracksCounts_vs_runNo"), collision.runNumber(), 5);
1043+
histosCounter.fill(HIST("TracksCounts_vs_runNo"), runIndex, 5);
10391044
// ITS Track only
10401045
if (useITStracksOnly && !track.hasITS()) {
10411046
continue;
10421047
}
1043-
histosCounter.fill(HIST("TracksCounts_vs_runNo"), collision.runNumber(), 6);
1048+
histosCounter.fill(HIST("TracksCounts_vs_runNo"), runIndex, 6);
10441049
// TPC Track only
10451050
if (useTPCtracksOnly && !track.hasTPC()) {
10461051
continue;
10471052
}
1048-
histosCounter.fill(HIST("TracksCounts_vs_runNo"), collision.runNumber(), 7);
1053+
histosCounter.fill(HIST("TracksCounts_vs_runNo"), runIndex, 7);
10491054
// ITS Chi2 N Clusters cut
10501055
if (track.hasITS() && track.itsChi2NCl() > itsChi2NClsCut) {
10511056
continue;
10521057
}
1053-
histosCounter.fill(HIST("TracksCounts_vs_runNo"), collision.runNumber(), 8);
1058+
histosCounter.fill(HIST("TracksCounts_vs_runNo"), runIndex, 8);
10541059
// TPC Chi2 N Clusters cut
10551060
if (track.hasTPC() && track.tpcChi2NCl() > tpcChi2NClsCut) {
10561061
continue;
10571062
}
1058-
histosCounter.fill(HIST("TracksCounts_vs_runNo"), collision.runNumber(), 9);
1063+
histosCounter.fill(HIST("TracksCounts_vs_runNo"), runIndex, 9);
10591064
// TPC N Clusters Findable cut
10601065
if (track.hasTPC() && track.tpcNClsFindable() < tpcNClsFindableCut) {
10611066
continue;
10621067
}
1063-
histosCounter.fill(HIST("TracksCounts_vs_runNo"), collision.runNumber(), 10);
1068+
histosCounter.fill(HIST("TracksCounts_vs_runNo"), runIndex, 10);
10641069
// Selection PID Pion
10651070
if (selectionPIDPion(track, useTOF, nSigmaTPCcut, nSigmaTOFcut)) {
1066-
histosCounter.fill(HIST("TracksCounts_vs_runNo"), collision.runNumber(), 11);
1071+
histosCounter.fill(HIST("TracksCounts_vs_runNo"), runIndex, 11);
10671072
if (track.sign() == 1) {
1068-
histosCounter.fill(HIST("TracksCounts_vs_runNo"), collision.runNumber(), 12);
1073+
histosCounter.fill(HIST("TracksCounts_vs_runNo"), runIndex, 12);
10691074
}
10701075
if (track.sign() == -1) {
1071-
histosCounter.fill(HIST("TracksCounts_vs_runNo"), collision.runNumber(), 13);
1076+
histosCounter.fill(HIST("TracksCounts_vs_runNo"), runIndex, 13);
10721077
}
10731078
} // End of Selection PID Pion
10741079
} // End of loop over tracks
@@ -1114,8 +1119,6 @@ struct ExclusiveRhoTo4Pi {
11141119
XYZVectorF beam2CM{(boosTo4PiCM(pTargCM).Vect()).Unit()};
11151120
// Axes
11161121
XYZVectorF zaxisCS{((beam1CM.Unit() - beam2CM.Unit()).Unit())};
1117-
XYZVectorF yaxisCS{(beam1CM.Cross(beam2CM)).Unit()};
1118-
XYZVectorF xaxisCS{(yaxisCS.Cross(zaxisCS)).Unit()};
11191122
double cosThetaCS = zaxisCS.Dot(twoPionVectorCM);
11201123
return cosThetaCS;
11211124
}
@@ -1207,6 +1210,12 @@ struct ExclusiveRhoTo4Pi {
12071210
h7->GetXaxis()->SetBinLabel(i + 1, std::to_string(runNos[i]).c_str());
12081211
h8->GetXaxis()->SetBinLabel(i + 1, std::to_string(runNos[i]).c_str());
12091212
}
1213+
for (int i = 0; i < numEventCuts; ++i) {
1214+
h1->GetYaxis()->SetBinLabel(i + 1, eventLabels[i].c_str());
1215+
}
1216+
for (int i = 0; i < numTrackCuts; ++i) {
1217+
h2->GetYaxis()->SetBinLabel(i + 1, trackLabels[i].c_str());
1218+
}
12101219
} // end of setHistBinLabels function
12111220

12121221
}; // End of Struct exclusiveRhoTo4Pi
@@ -1224,8 +1233,22 @@ int ExclusiveRhoTo4Pi::runNos[113] = {
12241233
545066, 545086, 545103, 545117, 545171, 545184, 545185, 545210, 545222, 545223,
12251234
545246, 545249, 545262, 545289, 545291, 545294, 545295, 545296, 545311, 545312,
12261235
545332, 545345, 545367};
1236+
12271237
int ExclusiveRhoTo4Pi::numRunNums = 113;
12281238

1239+
std::string ExclusiveRhoTo4Pi::eventLabels[12] = {
1240+
"No Cuts", "UPC mode", "vtxITSTPC=1", "sbp=1", "itsROFb=1", "tfb=1",
1241+
"FT0A <= 50", "FT0C <= 50", "FV0A <= 50", "ZDC <= 0", "n PV Contrib = 4", "V_{z} < 10cm"};
1242+
1243+
int ExclusiveRhoTo4Pi::numEventCuts = 20;
1244+
1245+
std::string ExclusiveRhoTo4Pi::trackLabels[14] = {
1246+
"No Cuts", "isPVContributor", "pT > 0.15 GeV/c", "|#eta| < 0.9", "DCA Z < 2 cm", "DCA XY cut",
1247+
"hasITS", "hasTPC", "itsChi2NCl < 36", "tpcChi2NCl < 4", "tpcNClsFindable < 70", "#pi tracks",
1248+
"#pi^{+} tracks", "#pi^{-} tracks"};
1249+
1250+
int ExclusiveRhoTo4Pi::numTrackCuts = 14;
1251+
12291252
WorkflowSpec defineDataProcessing(ConfigContext const& cfgc)
12301253
{
12311254
return WorkflowSpec{

0 commit comments

Comments
 (0)