Skip to content

Commit 9692f1f

Browse files
authored
[PWGHF/HFL] Calculate mass of Zee (AliceO2Group#10153)
1 parent 08d09c4 commit 9692f1f

File tree

1 file changed

+72
-0
lines changed

1 file changed

+72
-0
lines changed

PWGHF/HFL/Tasks/taskElectronWeakBoson.cxx

Lines changed: 72 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,7 @@
1212
/// \file taskElectronWeakBoson.cxx
1313
/// \brief task for WeakBoson (W/Z) based on electron in mid-rapidity
1414
/// \author S. Sakai & S. Ito (Univ. of Tsukuba)
15+
#include <vector>
1516

1617
#include "Framework/runDataProcessing.h"
1718
#include "Framework/AnalysisTask.h"
@@ -30,6 +31,7 @@
3031
#include "Common/DataModel/PIDResponse.h"
3132

3233
#include "PWGJE/DataModel/EMCALClusters.h"
34+
#include "PWGHF/Core/HfHelper.h"
3335

3436
using namespace o2;
3537
using namespace o2::framework;
@@ -54,6 +56,7 @@ struct HfTaskElectronWeakBoson {
5456
Configurable<float> nclItsMin{"nclItsMin", 2.0f, "its # of cluster cut"};
5557
Configurable<float> nclTpcMin{"nclTpcMin", 100.0f, "tpc # if cluster cut"};
5658
Configurable<float> nclcrossTpcMin{"nclcrossTpcMin", 100.0f, "tpc # of crossedRows cut"};
59+
Configurable<float> nsigTpcMinLose{"nsigTpcMinLose", -3.0, "tpc Nsig lose lower cut"};
5760
Configurable<float> nsigTpcMin{"nsigTpcMin", -1.0, "tpc Nsig lower cut"};
5861
Configurable<float> nsigTpcMax{"nsigTpcMax", 3.0, "tpc Nsig upper cut"};
5962

@@ -72,6 +75,17 @@ struct HfTaskElectronWeakBoson {
7275
Configurable<float> energyIsolationMax{"energyIsolationMax", 0.1, "isolation cut on energy"};
7376
Configurable<int> trackIsolationMax{"trackIsolationMax", 3, "Maximum number of tracks in isolation cone"};
7477

78+
struct HfElectronCandidate {
79+
float pt, eta, phi, energy;
80+
int charge;
81+
HfElectronCandidate(float ptr, float e, float ph, float en, int ch)
82+
: pt(ptr), eta(e), phi(ph), energy(en), charge(ch) {}
83+
84+
int sign() const { return charge; }
85+
};
86+
std::vector<HfElectronCandidate> selectedElectronsIso;
87+
std::vector<HfElectronCandidate> selectedElectronsAss;
88+
7589
using SelectedClusters = o2::aod::EMCALClusters;
7690
// PbPb
7791
using TrackEle = o2::soa::Join<o2::aod::Tracks, o2::aod::FullTracks, o2::aod::TracksExtra, o2::aod::TracksDCA, o2::aod::TrackSelection, o2::aod::pidTPCFullEl>;
@@ -118,6 +132,8 @@ struct HfTaskElectronWeakBoson {
118132
const AxisSpec axisEMCtime{200, -100.0, 100, "EMC time"};
119133
const AxisSpec axisIsoEnergy{100, 0, 1, "Isolation energy(GeV/C)"};
120134
const AxisSpec axisIsoTrack{20, -0.5, 19.5, "Isolation Track"};
135+
const AxisSpec axisInvMassZ{200, 0, 200, "M_{ee} (GeV/c^{2})"};
136+
const AxisSpec axisInvMassDy{200, 0, 2, "M_{ee} (GeV/c^{2})"};
121137

122138
// create registrygrams
123139
registry.add("hZvtx", "Z vertex", kTH1F, {axisZvtx});
@@ -144,6 +160,10 @@ struct HfTaskElectronWeakBoson {
144160
registry.add("hEMCtime", "EMC timing", kTH1F, {axisEMCtime});
145161
registry.add("hIsolationEnergy", "Isolation Energy", kTH2F, {{axisE}, {axisIsoEnergy}});
146162
registry.add("hIsolationTrack", "Isolation Track", kTH2F, {{axisE}, {axisIsoTrack}});
163+
registry.add("hInvMassZeeLs", "invariant mass for Z LS pair", kTH2F, {{axisPt}, {axisInvMassZ}});
164+
registry.add("hInvMassZeeUls", "invariant mass for Z ULS pair", kTH2F, {{axisPt}, {axisInvMassZ}});
165+
registry.add("hInvMassDyLs", "invariant mass for DY LS pair", kTH2F, {{axisPt}, {axisInvMassDy}});
166+
registry.add("hInvMassDyUls", "invariant mass for DY ULS pair", kTH2F, {{axisPt}, {axisInvMassDy}});
147167
}
148168
bool isIsolatedCluster(const o2::aod::EMCALCluster& cluster,
149169
const SelectedClusters& clusters)
@@ -247,6 +267,17 @@ struct HfTaskElectronWeakBoson {
247267
registry.fill(HIST("hPt"), track.pt());
248268
registry.fill(HIST("hTPCNsigma"), track.p(), track.tpcNSigmaEl());
249269

270+
float energyTrk = 0.0;
271+
272+
if (track.tpcNSigmaEl() > nsigTpcMinLose && track.tpcNSigmaEl() < nsigTpcMax) {
273+
selectedElectronsAss.emplace_back(
274+
track.pt(),
275+
track.eta(),
276+
track.phi(),
277+
energyTrk,
278+
track.sign());
279+
}
280+
250281
// track - match
251282

252283
// continue;
@@ -279,6 +310,7 @@ struct HfTaskElectronWeakBoson {
279310
// LOG(info) << "tr phi0 = " << match.track_as<TrackEle>().phi();
280311
// LOG(info) << "tr phi1 = " << track.phi();
281312
// LOG(info) << "emc phi = " << phiEmc;
313+
282314
if (nMatch == 0) {
283315
double dEta = match.track_as<TrackEle>().trackEtaEmcal() - etaEmc;
284316
double dPhi = match.track_as<TrackEle>().trackPhiEmcal() - phiEmc;
@@ -303,6 +335,7 @@ struct HfTaskElectronWeakBoson {
303335
const auto& cluster = match.emcalcluster_as<SelectedClusters>();
304336

305337
double eop = energyEmc / match.track_as<TrackEle>().p();
338+
306339
// LOG(info) << "E/p" << eop;
307340
registry.fill(HIST("hEopNsigTPC"), match.track_as<TrackEle>().tpcNSigmaEl(), eop);
308341
registry.fill(HIST("hM02"), match.track_as<TrackEle>().tpcNSigmaEl(), m02Emc);
@@ -317,6 +350,13 @@ struct HfTaskElectronWeakBoson {
317350

318351
if (isIsolated) {
319352
registry.fill(HIST("hEopIsolation"), match.track_as<TrackEle>().pt(), eop);
353+
354+
selectedElectronsIso.emplace_back(
355+
match.track_as<TrackEle>().pt(),
356+
match.track_as<TrackEle>().eta(),
357+
match.track_as<TrackEle>().phi(),
358+
energyEmc,
359+
match.track_as<TrackEle>().sign());
320360
}
321361

322362
if (isIsolatedTr) {
@@ -335,6 +375,38 @@ struct HfTaskElectronWeakBoson {
335375
}
336376

337377
} // end of track loop
378+
379+
// calculate inv. mass
380+
if (selectedElectronsIso.size() > 1) {
381+
for (size_t i = 0; i < selectedElectronsIso.size(); i++) {
382+
const auto& e1 = selectedElectronsIso[i];
383+
for (size_t j = 0; j < selectedElectronsAss.size(); j++) {
384+
const auto& e2 = selectedElectronsAss[j];
385+
386+
float ptIso = e1.pt;
387+
float ptAss = e2.pt;
388+
if (ptIso == ptAss)
389+
continue;
390+
auto arr1 = RecoDecayPtEtaPhi::pVector(e1.pt, e1.eta, e1.phi);
391+
auto arr2 = RecoDecayPtEtaPhi::pVector(e2.pt, e2.eta, e2.phi);
392+
double mass = RecoDecay::m(std::array{arr1, arr2}, std::array{o2::constants::physics::MassElectron, o2::constants::physics::MassElectron});
393+
if (e1.sign() * e2.sign() > 0) {
394+
registry.fill(HIST("hInvMassDyLs"), ptIso, mass);
395+
} else {
396+
registry.fill(HIST("hInvMassDyUls"), ptIso, mass);
397+
}
398+
399+
if (ptAss < 20.0 && ptIso < 20.0)
400+
continue;
401+
402+
if (e1.sign() * e2.sign() > 0) {
403+
registry.fill(HIST("hInvMassZeeLs"), ptIso, mass);
404+
} else {
405+
registry.fill(HIST("hInvMassZeeUls"), ptIso, mass);
406+
}
407+
}
408+
}
409+
} // end of inv. mass calculation
338410
}
339411
};
340412

0 commit comments

Comments
 (0)