Skip to content
Merged
Changes from all commits
Commits
Show all changes
49 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
ec95512
Merge branch 'AliceO2Group:master' into master
sashingo Mar 6, 2025
f10e45e
Merge branch 'AliceO2Group:master' into master
sashingo Mar 10, 2025
16d2127
added minimum pT cut to calculate Zee mass
sashingo Mar 10, 2025
2080ad2
Merge branch 'AliceO2Group:master' into master
sashingo Mar 19, 2025
f89d0d0
Merge branch 'AliceO2Group:master' into master
sashingo Mar 28, 2025
1a9ecd6
Merge branch 'AliceO2Group:master' into master
sashingo Apr 3, 2025
2854a0d
Merge branch 'AliceO2Group:master' into master
sashingo Apr 25, 2025
3bfea57
Merge branch 'AliceO2Group:master' into master
sashingo May 6, 2025
9c426e1
Merge branch 'AliceO2Group:master' into master
sashingo May 12, 2025
bc0f1da
added software trigger
sashingo May 12, 2025
78f09a5
modified O2 linte error
sashingo May 12, 2025
149197d
fixed linter errors
sashingo May 13, 2025
19d7c83
modified hierarchy order of includes
sashingo May 14, 2025
4288b3e
Merge branch 'AliceO2Group:master' into master
sashingo May 19, 2025
0d7e8b8
Merge branch 'AliceO2Group:master' into master
sashingo May 23, 2025
a56768d
added THnSparse for isolate electron study
sashingo May 23, 2025
18b9768
added THnSparse for isolate electron study
sashingo May 23, 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
44 changes: 28 additions & 16 deletions PWGHF/HFL/Tasks/taskElectronWeakBoson.cxx
Original file line number Diff line number Diff line change
Expand Up @@ -81,6 +81,10 @@ struct HfTaskElectronWeakBoson {
Configurable<float> energyIsolationMax{"energyIsolationMax", 0.1, "isolation cut on energy"};
Configurable<int> trackIsolationMax{"trackIsolationMax", 3, "Maximum number of tracks in isolation cone"};

// flag for THn
Configurable<bool> isTHnElectron{"isTHnElectron", true, "Enables THn for electrons"};
Configurable<float> ptTHnThresh{"ptTHnThresh", 5.0, "Threshold for THn make"};

// Skimmed dataset processing configurations
Configurable<bool> cfgSkimmedProcessing{"cfgSkimmedProcessing", true, "Enables processing of skimmed datasets"};
Configurable<std::string> cfgTriggerName{"cfgTriggerName", "fGammaHighPtEMCAL", "Trigger of interest (comma separated for multiple)"};
Expand Down Expand Up @@ -193,18 +197,19 @@ struct HfTaskElectronWeakBoson {
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("hTHnElectrons", "electron info", HistType::kTHnSparseF, {axisPt, axisNsigma, axisM02, axisM02, axisEop, axisIsoEnergy});

// hisotgram for EMCal trigger
registry.add("hEMCalTrigger", "EMCal trigger", kTH1F, {axisTrigger});
}

bool isIsolatedCluster(const o2::aod::EMCALCluster& cluster,
const SelectedClusters& clusters)
double calIsolatedCluster(const o2::aod::EMCALCluster& cluster,
const SelectedClusters& clusters)
{
float energySum = 0.0;
float isoEnergy = 10.0;
float etaAssCluster = cluster.eta();
float phiAssCluster = cluster.phi();
double energySum = 0.0;
double isoEnergy = 10.0;
double etaAssCluster = cluster.eta();
double phiAssCluster = cluster.phi();

for (const auto& associateCluster : clusters) {
// Calculate angular distances
Expand All @@ -229,9 +234,9 @@ struct HfTaskElectronWeakBoson {

registry.fill(HIST("hIsolationEnergy"), cluster.energy(), isoEnergy);

return (isoEnergy < energyIsolationMax);
return (isoEnergy);
}
bool isIsolatedTrack(double etaEle,
int calIsolatedTrack(double etaEle,
Comment on lines -234 to +239

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

What does cal mean? Use meaningful names and document methods.

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

it means "calculate".
Since it's already approved, I will modify it in the next commit.

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

OK, please do. Thanks.

double phiEle,
float ptEle,
TrackEle const& tracks)
Expand All @@ -256,7 +261,7 @@ struct HfTaskElectronWeakBoson {

registry.fill(HIST("hIsolationTrack"), ptEle, trackCount);

return (trackCount <= trackIsolationMax);
return (trackCount);
}

void process(soa::Filtered<aod::Collisions>::iterator const& collision,
Expand Down Expand Up @@ -375,8 +380,6 @@ struct HfTaskElectronWeakBoson {
for (const auto& match : tracksofcluster) {
if (match.emcalcluster_as<SelectedClusters>().time() < timeEmcMin || match.emcalcluster_as<SelectedClusters>().time() > timeEmcMax)
continue;
if (match.emcalcluster_as<SelectedClusters>().m02() < m02Min || match.emcalcluster_as<SelectedClusters>().m02() > m02Max)
continue;

float m20Emc = match.emcalcluster_as<SelectedClusters>().m20();
float m02Emc = match.emcalcluster_as<SelectedClusters>().m02();
Expand Down Expand Up @@ -413,17 +416,26 @@ struct HfTaskElectronWeakBoson {

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

double isoEnergy = calIsolatedCluster(cluster, emcClusters);

int trackCount = calIsolatedTrack(track.phi(), track.eta(), track.pt(), tracks);

if (match.track_as<TrackEle>().pt() > ptTHnThresh && isTHnElectron) {
registry.fill(HIST("hTHnElectrons"), match.track_as<TrackEle>().pt(), match.track_as<TrackEle>().tpcNSigmaEl(), m02Emc, m20Emc, eop, isoEnergy);
}
// 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);
registry.fill(HIST("hM20"), match.track_as<TrackEle>().tpcNSigmaEl(), m20Emc);
if (match.emcalcluster_as<SelectedClusters>().m02() < m02Min || match.emcalcluster_as<SelectedClusters>().m02() > m02Max)
continue;

if (match.track_as<TrackEle>().tpcNSigmaEl() > nsigTpcMin && match.track_as<TrackEle>().tpcNSigmaEl() < nsigTpcMax) {
registry.fill(HIST("hEop"), match.track_as<TrackEle>().pt(), eop);

if (eop > eopMin && eop < eopMax) {
isIsolated = isIsolatedCluster(cluster, emcClusters);
isIsolatedTr = isIsolatedTrack(track.phi(), track.eta(), track.pt(), tracks);
}
if (eop > eopMin && eop < eopMax && isoEnergy < energyIsolationMax)
isIsolated = true;
if (eop > eopMin && eop < eopMax && trackCount < trackIsolationMax)
isIsolatedTr = true;

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