Skip to content

Commit 8a9aab4

Browse files
committed
included charge info in histogrmas for Z measurement
1 parent c934352 commit 8a9aab4

File tree

1 file changed

+10
-5
lines changed

1 file changed

+10
-5
lines changed

PWGHF/HFL/Tasks/taskElectronWeakBoson.cxx

Lines changed: 10 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -214,6 +214,7 @@ struct HfTaskElectronWeakBoson {
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)"};
216216
const AxisSpec axisZpt{150, 0, 150, "p_{T,Z} (GeV/c)"};
217+
const AxisSpec axisSign{2, -2, 2, "charge sign"};
217218

218219
// create registrygrams
219220
registry.add("hZvtx", "Z vertex", kTH1F, {axisZvtx});
@@ -248,8 +249,8 @@ 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, axisZpt, axisDPhiZh});
253+
registry.add("hZptSpectrum", "Z boson p_{T} spectrum", kTH2F, {{axisSign}, {axisZpt}});
253254

254255
// hisotgram for EMCal trigger
255256
registry.add("hEMCalTrigger", "EMCal trigger", kTH1F, {axisTrigger});
@@ -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)