Skip to content
Merged
Changes from all commits
Commits
Show all changes
32 commits
Select commit Hold shift + click to select a range
a30b72e
[PWGHF] added a function to isolation e
sashingo Dec 3, 2024
e880f2a
[PWGHF] added a function to isolation e (fixed o2 linter)
sashingo Dec 11, 2024
48a7947
Merge branch 'AliceO2Group:master' into master
sashingo Dec 16, 2024
e1db786
Merge branch 'AliceO2Group:master' into master
sashingo Dec 17, 2024
47e7853
Merge branch 'AliceO2Group:master' into master
sashingo Jan 7, 2025
87b0365
Merge branch 'AliceO2Group:master' into master
sashingo Jan 8, 2025
089bed5
PWGHF:added isolation cut based on track and apply the cuts on E/p
sashingo Jan 8, 2025
93a746b
PWGHF:fixed a warning
sashingo Jan 8, 2025
aee502e
Merge branch 'AliceO2Group:master' into master
sashingo Jan 20, 2025
0b9ecfd
Merge branch 'AliceO2Group:master' into master
sashingo Jan 23, 2025
af1eb6e
Merge branch 'AliceO2Group:master' into master
sashingo Jan 24, 2025
962b2f2
Merge branch 'AliceO2Group:master' into master
sashingo Jan 28, 2025
6311ea6
Merge branch 'AliceO2Group:master' into master
sashingo Jan 29, 2025
299ede0
Merge branch 'AliceO2Group:master' into master
sashingo Feb 6, 2025
6a7d9ca
Merge branch 'AliceO2Group:master' into master
sashingo Feb 7, 2025
25dd365
Merge branch 'AliceO2Group:master' into master
sashingo Feb 14, 2025
0bb2c34
Merge branch 'AliceO2Group:master' into master
sashingo Feb 23, 2025
7434e75
PWGHF:updated to calculate mass of Zee
sashingo Feb 23, 2025
fa894c5
fixed clang format
sashingo Feb 23, 2025
7281b97
fixed O2 linter erros
sashingo Feb 23, 2025
3d3308a
fixed O2 linter
sashingo Feb 23, 2025
030db91
fixed O2 linter
sashingo Feb 23, 2025
d361234
fixed magelinter error
sashingo Feb 23, 2025
b3aa11a
fixed MegaLinter error
sashingo Feb 23, 2025
f0b4201
fixed MegaLinter error
sashingo Feb 23, 2025
e697d1b
Merge branch 'AliceO2Group:master' into master
sashingo Feb 24, 2025
b22dd6a
Merge branch 'AliceO2Group:master' into master
sashingo Feb 27, 2025
8150615
minor modification
sashingo Feb 27, 2025
2974d1a
Merge branch 'AliceO2Group:master' into master
sashingo Feb 27, 2025
51b22c3
updated with Vit's suggestions
sashingo Mar 3, 2025
74b90fc
updated with Vit's suggestions
sashingo Mar 4, 2025
f19edcf
small modification
sashingo Mar 5, 2025
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
72 changes: 72 additions & 0 deletions PWGHF/HFL/Tasks/taskElectronWeakBoson.cxx
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@
/// \file taskElectronWeakBoson.cxx
/// \brief task for WeakBoson (W/Z) based on electron in mid-rapidity
/// \author S. Sakai & S. Ito (Univ. of Tsukuba)
#include <vector>

#include "Framework/runDataProcessing.h"
#include "Framework/AnalysisTask.h"
Expand All @@ -30,6 +31,7 @@
#include "Common/DataModel/PIDResponse.h"

#include "PWGJE/DataModel/EMCALClusters.h"
#include "PWGHF/Core/HfHelper.h"

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

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

struct HfElectronCandidate {
float pt, eta, phi, energy;
int charge;
HfElectronCandidate(float ptr, float e, float ph, float en, int ch)
: pt(ptr), eta(e), phi(ph), energy(en), charge(ch) {}

int sign() const { return charge; }
};
std::vector<HfElectronCandidate> selectedElectronsIso;
std::vector<HfElectronCandidate> selectedElectronsAss;

using SelectedClusters = o2::aod::EMCALClusters;
// PbPb
using TrackEle = o2::soa::Join<o2::aod::Tracks, o2::aod::FullTracks, o2::aod::TracksExtra, o2::aod::TracksDCA, o2::aod::TrackSelection, o2::aod::pidTPCFullEl>;
Expand Down Expand Up @@ -118,6 +132,8 @@ struct HfTaskElectronWeakBoson {
const AxisSpec axisEMCtime{200, -100.0, 100, "EMC time"};
const AxisSpec axisIsoEnergy{100, 0, 1, "Isolation energy(GeV/C)"};
const AxisSpec axisIsoTrack{20, -0.5, 19.5, "Isolation Track"};
const AxisSpec axisInvMassZ{200, 0, 200, "M_{ee} (GeV/c^{2})"};
const AxisSpec axisInvMassDy{200, 0, 2, "M_{ee} (GeV/c^{2})"};

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

float energyTrk = 0.0;

if (track.tpcNSigmaEl() > nsigTpcMinLose && track.tpcNSigmaEl() < nsigTpcMax) {
selectedElectronsAss.emplace_back(
track.pt(),
track.eta(),
track.phi(),
energyTrk,
track.sign());
}

// track - match

// continue;
Expand Down Expand Up @@ -279,6 +310,7 @@ struct HfTaskElectronWeakBoson {
// LOG(info) << "tr phi0 = " << match.track_as<TrackEle>().phi();
// LOG(info) << "tr phi1 = " << track.phi();
// LOG(info) << "emc phi = " << phiEmc;

if (nMatch == 0) {
double dEta = match.track_as<TrackEle>().trackEtaEmcal() - etaEmc;
double dPhi = match.track_as<TrackEle>().trackPhiEmcal() - phiEmc;
Expand All @@ -303,6 +335,7 @@ struct HfTaskElectronWeakBoson {
const auto& cluster = match.emcalcluster_as<SelectedClusters>();

double eop = energyEmc / match.track_as<TrackEle>().p();

// LOG(info) << "E/p" << eop;
registry.fill(HIST("hEopNsigTPC"), match.track_as<TrackEle>().tpcNSigmaEl(), eop);
registry.fill(HIST("hM02"), match.track_as<TrackEle>().tpcNSigmaEl(), m02Emc);
Expand All @@ -317,6 +350,13 @@ struct HfTaskElectronWeakBoson {

if (isIsolated) {
registry.fill(HIST("hEopIsolation"), match.track_as<TrackEle>().pt(), eop);

selectedElectronsIso.emplace_back(
match.track_as<TrackEle>().pt(),
match.track_as<TrackEle>().eta(),
match.track_as<TrackEle>().phi(),
energyEmc,
match.track_as<TrackEle>().sign());
}

if (isIsolatedTr) {
Expand All @@ -335,6 +375,38 @@ struct HfTaskElectronWeakBoson {
}

} // end of track loop

// calculate inv. mass
if (selectedElectronsIso.size() > 1) {
for (size_t i = 0; i < selectedElectronsIso.size(); i++) {
const auto& e1 = selectedElectronsIso[i];
for (size_t j = 0; j < selectedElectronsAss.size(); j++) {
const auto& e2 = selectedElectronsAss[j];

float ptIso = e1.pt;
float ptAss = e2.pt;
if (ptIso == ptAss)
continue;
auto arr1 = RecoDecayPtEtaPhi::pVector(e1.pt, e1.eta, e1.phi);
auto arr2 = RecoDecayPtEtaPhi::pVector(e2.pt, e2.eta, e2.phi);
double mass = RecoDecay::m(std::array{arr1, arr2}, std::array{o2::constants::physics::MassElectron, o2::constants::physics::MassElectron});
if (e1.sign() * e2.sign() > 0) {
registry.fill(HIST("hInvMassDyLs"), ptIso, mass);
} else {
registry.fill(HIST("hInvMassDyUls"), ptIso, mass);
}

if (ptAss < 20.0 && ptIso < 20.0)
continue;

if (e1.sign() * e2.sign() > 0) {
registry.fill(HIST("hInvMassZeeLs"), ptIso, mass);
} else {
registry.fill(HIST("hInvMassZeeUls"), ptIso, mass);
}
}
}
} // end of inv. mass calculation
}
};

Expand Down
Loading