Skip to content

Commit 6ab8317

Browse files
authored
[PWGHF] AddedTHnSparse for isolate electron study (#11334)
1 parent 85edada commit 6ab8317

File tree

1 file changed

+28
-16
lines changed

1 file changed

+28
-16
lines changed

PWGHF/HFL/Tasks/taskElectronWeakBoson.cxx

Lines changed: 28 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -81,6 +81,10 @@ struct HfTaskElectronWeakBoson {
8181
Configurable<float> energyIsolationMax{"energyIsolationMax", 0.1, "isolation cut on energy"};
8282
Configurable<int> trackIsolationMax{"trackIsolationMax", 3, "Maximum number of tracks in isolation cone"};
8383

84+
// flag for THn
85+
Configurable<bool> isTHnElectron{"isTHnElectron", true, "Enables THn for electrons"};
86+
Configurable<float> ptTHnThresh{"ptTHnThresh", 5.0, "Threshold for THn make"};
87+
8488
// Skimmed dataset processing configurations
8589
Configurable<bool> cfgSkimmedProcessing{"cfgSkimmedProcessing", true, "Enables processing of skimmed datasets"};
8690
Configurable<std::string> cfgTriggerName{"cfgTriggerName", "fGammaHighPtEMCAL", "Trigger of interest (comma separated for multiple)"};
@@ -193,18 +197,19 @@ struct HfTaskElectronWeakBoson {
193197
registry.add("hIsolationTrack", "Isolation Track", kTH2F, {{axisE}, {axisIsoTrack}});
194198
registry.add("hInvMassZeeLs", "invariant mass for Z LS pair", kTH2F, {{axisPt}, {axisInvMassZ}});
195199
registry.add("hInvMassZeeUls", "invariant mass for Z ULS pair", kTH2F, {{axisPt}, {axisInvMassZ}});
200+
registry.add("hTHnElectrons", "electron info", HistType::kTHnSparseF, {axisPt, axisNsigma, axisM02, axisM02, axisEop, axisIsoEnergy});
196201

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

201-
bool isIsolatedCluster(const o2::aod::EMCALCluster& cluster,
202-
const SelectedClusters& clusters)
206+
double calIsolatedCluster(const o2::aod::EMCALCluster& cluster,
207+
const SelectedClusters& clusters)
203208
{
204-
float energySum = 0.0;
205-
float isoEnergy = 10.0;
206-
float etaAssCluster = cluster.eta();
207-
float phiAssCluster = cluster.phi();
209+
double energySum = 0.0;
210+
double isoEnergy = 10.0;
211+
double etaAssCluster = cluster.eta();
212+
double phiAssCluster = cluster.phi();
208213

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

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

232-
return (isoEnergy < energyIsolationMax);
237+
return (isoEnergy);
233238
}
234-
bool isIsolatedTrack(double etaEle,
239+
int calIsolatedTrack(double etaEle,
235240
double phiEle,
236241
float ptEle,
237242
TrackEle const& tracks)
@@ -256,7 +261,7 @@ struct HfTaskElectronWeakBoson {
256261

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

259-
return (trackCount <= trackIsolationMax);
264+
return (trackCount);
260265
}
261266

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

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

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

419+
double isoEnergy = calIsolatedCluster(cluster, emcClusters);
420+
421+
int trackCount = calIsolatedTrack(track.phi(), track.eta(), track.pt(), tracks);
422+
423+
if (match.track_as<TrackEle>().pt() > ptTHnThresh && isTHnElectron) {
424+
registry.fill(HIST("hTHnElectrons"), match.track_as<TrackEle>().pt(), match.track_as<TrackEle>().tpcNSigmaEl(), m02Emc, m20Emc, eop, isoEnergy);
425+
}
416426
// LOG(info) << "E/p" << eop;
417427
registry.fill(HIST("hEopNsigTPC"), match.track_as<TrackEle>().tpcNSigmaEl(), eop);
418428
registry.fill(HIST("hM02"), match.track_as<TrackEle>().tpcNSigmaEl(), m02Emc);
419429
registry.fill(HIST("hM20"), match.track_as<TrackEle>().tpcNSigmaEl(), m20Emc);
430+
if (match.emcalcluster_as<SelectedClusters>().m02() < m02Min || match.emcalcluster_as<SelectedClusters>().m02() > m02Max)
431+
continue;
432+
420433
if (match.track_as<TrackEle>().tpcNSigmaEl() > nsigTpcMin && match.track_as<TrackEle>().tpcNSigmaEl() < nsigTpcMax) {
421434
registry.fill(HIST("hEop"), match.track_as<TrackEle>().pt(), eop);
422-
423-
if (eop > eopMin && eop < eopMax) {
424-
isIsolated = isIsolatedCluster(cluster, emcClusters);
425-
isIsolatedTr = isIsolatedTrack(track.phi(), track.eta(), track.pt(), tracks);
426-
}
435+
if (eop > eopMin && eop < eopMax && isoEnergy < energyIsolationMax)
436+
isIsolated = true;
437+
if (eop > eopMin && eop < eopMax && trackCount < trackIsolationMax)
438+
isIsolatedTr = true;
427439

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

0 commit comments

Comments
 (0)