Skip to content

Commit b342dc8

Browse files
authored
[PWGHF/HFL] Z task: Add charge in histograms (#12068)
1 parent 1121d55 commit b342dc8

File tree

1 file changed

+15
-10
lines changed

1 file changed

+15
-10
lines changed

PWGHF/HFL/Tasks/taskElectronWeakBoson.cxx

Lines changed: 15 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -213,12 +213,13 @@ struct HfTaskElectronWeakBoson {
213213
const AxisSpec axisTrigger{3, -0.5, 2.5, "Trigger status of zorro"};
214214
const AxisSpec axisDPhiZh{64, -o2::constants::math::PIHalf, 3 * o2::constants::math::PIHalf, "#Delta#phi(Z-h)"};
215215
const AxisSpec axisPtHadron{50, 0, 50, "p_{T,hadron} (GeV/c)"};
216-
const AxisSpec axisZpt{150, 0, 150, "p_{T,Z} (GeV/c)"};
216+
const AxisSpec axisPtZ{150, 0, 150, "p_{T,Z} (GeV/c)"};
217+
const AxisSpec axisSign{2, -2, 2, "charge sign"};
217218

218219
// create registrygrams
219-
registry.add("hZvtx", "Z vertex", kTH1F, {axisZvtx});
220-
registry.add("hEventCounterInit", "hEventCounterInit", kTH1F, {axisCounter});
221-
registry.add("hEventCounter", "hEventCounter", kTH1F, {axisCounter});
220+
registry.add("hZvtx", "Z vertex", kTH1D, {axisZvtx});
221+
registry.add("hEventCounterInit", "hEventCounterInit", kTH1D, {axisCounter});
222+
registry.add("hEventCounter", "hEventCounter", kTH1D, {axisCounter});
222223
registry.add("hITSchi2", "ITS #chi^{2}", kTH1F, {axisChi2});
223224
registry.add("hTPCchi2", "TPC #chi^{2}", kTH1F, {axisChi2});
224225
registry.add("hTPCnCls", "TPC NCls", kTH1F, {axisCluster});
@@ -248,11 +249,11 @@ struct HfTaskElectronWeakBoson {
248249
registry.add("hTHnTrMatch", "Track EMC Match", HistType::kTHnSparseF, {axisPt, axisdPhi, axisdEta});
249250

250251
// Z-hadron correlation histograms
251-
registry.add("hZHadronDphi", "Z-hadron #Delta#phi correlation", kTH2F, {{axisZpt}, {axisDPhiZh}});
252-
registry.add("hZptSpectrum", "Z boson p_{T} spectrum", kTH1F, {axisZpt});
252+
registry.add("hZHadronDphi", "Z-hadron #Delta#phi correlation", HistType::kTHnSparseF, {axisSign, axisPtZ, axisDPhiZh});
253+
registry.add("hZptSpectrum", "Z boson p_{T} spectrum", kTH2F, {{axisSign}, {axisPtZ}});
253254

254255
// hisotgram for EMCal trigger
255-
registry.add("hEMCalTrigger", "EMCal trigger", kTH1F, {axisTrigger});
256+
registry.add("hEMCalTrigger", "EMCal trigger", kTH1D, {axisTrigger});
256257
}
257258

258259
double getIsolatedCluster(const o2::aod::EMCALCluster& cluster,
@@ -351,6 +352,9 @@ struct HfTaskElectronWeakBoson {
351352
if (zeeKF.GetNDF() < 1) {
352353
continue;
353354
}
355+
if (zeeKF.GetChi2() < 0) {
356+
continue;
357+
}
354358
if (chiSqNdf > chiSqNdfMax) {
355359
continue;
356360
}
@@ -605,9 +609,10 @@ struct HfTaskElectronWeakBoson {
605609
if (reconstructedZ.size() > 0) {
606610
for (const auto& zBoson : reconstructedZ) {
607611
// Z boson selection
608-
if (zBoson.mass < massZMin || zBoson.mass > massZMax)
612+
if (zBoson.mass < massZMin || zBoson.mass > massZMax) {
609613
continue;
610-
registry.fill(HIST("hZptSpectrum"), zBoson.pt);
614+
}
615+
registry.fill(HIST("hZptSpectrum"), zBoson.charge, zBoson.pt);
611616
for (const auto& trackAss : selectedElectronsAss) {
612617
if (std::abs(trackAss.pt - zBoson.ptchild0) < ptMatch) {
613618
continue;
@@ -617,7 +622,7 @@ struct HfTaskElectronWeakBoson {
617622
}
618623
// calculate Z-h correlation
619624
double deltaPhi = RecoDecay::constrainAngle(trackAss.phi - zBoson.phi, -o2::constants::math::PIHalf);
620-
registry.fill(HIST("hZHadronDphi"), zBoson.pt, deltaPhi);
625+
registry.fill(HIST("hZHadronDphi"), zBoson.charge, zBoson.pt, deltaPhi);
621626
}
622627
}
623628
} // end of Z-hadron correlation

0 commit comments

Comments
 (0)