Skip to content

Commit a92037d

Browse files
authored
[PWGHF/HFL] W/Z: Add isolation cut based on track and apply the cuts on E/p (AliceO2Group#9217)
1 parent af2fdcc commit a92037d

File tree

1 file changed

+44
-1
lines changed

1 file changed

+44
-1
lines changed

PWGHF/HFL/Tasks/taskElectronWeakBoson.cxx

Lines changed: 44 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -65,9 +65,12 @@ struct HfTaskElectronWeakBoson {
6565
Configurable<float> m02Min{"m02Min", 0.1, "Minimum M02"};
6666
Configurable<float> m02Max{"m02Max", 0.9, "Maximum M02"};
6767
Configurable<float> rMatchMax{"rMatchMax", 0.05, "cluster - track matching cut"};
68+
Configurable<float> eopMin{"eopMin", 0.9, "Minimum eop"};
69+
Configurable<float> eopMax{"eopMax", 1.3, "Maximum eop"};
6870

6971
Configurable<float> rIsolation{"rIsolation", 0.3, "cone radius for isolation cut"};
7072
Configurable<float> energyIsolationMax{"energyIsolationMax", 0.1, "isolation cut on energy"};
73+
Configurable<int> trackIsolationMax{"trackIsolationMax", 3, "Maximum number of tracks in isolation cone"};
7174

7275
using SelectedClusters = o2::aod::EMCALClusters;
7376
// PbPb
@@ -114,6 +117,7 @@ struct HfTaskElectronWeakBoson {
114117
const AxisSpec axisITSNCls{20, 0.0, 20, "counts"};
115118
const AxisSpec axisEMCtime{200, -100.0, 100, "EMC time"};
116119
const AxisSpec axisIsoEnergy{100, 0, 1, "Isolation energy(GeV/C)"};
120+
const AxisSpec axisIsoTrack{20, -0.5, 19.5, "Isolation Track"};
117121

118122
// create registrygrams
119123
registry.add("hZvtx", "Z vertex", kTH1F, {axisZvtx});
@@ -135,9 +139,11 @@ struct HfTaskElectronWeakBoson {
135139
registry.add("hMatchEta", "Match in Eta", kTH2F, {{axisEta}, {axisEta}});
136140
registry.add("hEop", "energy momentum match", kTH2F, {{axisPt}, {axisEop}});
137141
registry.add("hEopIsolation", "energy momentum match after isolation", kTH2F, {{axisPt}, {axisEop}});
142+
registry.add("hEopIsolationTr", "energy momentum match after isolationTr", kTH2F, {{axisPt}, {axisEop}});
138143
registry.add("hEopNsigTPC", "Eop vs. Nsigma", kTH2F, {{axisNsigma}, {axisEop}});
139144
registry.add("hEMCtime", "EMC timing", kTH1F, {axisEMCtime});
140145
registry.add("hIsolationEnergy", "Isolation Energy", kTH2F, {{axisE}, {axisIsoEnergy}});
146+
registry.add("hIsolationTrack", "Isolation Track", kTH2F, {{axisE}, {axisIsoTrack}});
141147
}
142148
bool isIsolatedCluster(const o2::aod::EMCALCluster& cluster,
143149
const SelectedClusters& clusters)
@@ -172,6 +178,33 @@ struct HfTaskElectronWeakBoson {
172178

173179
return (isoEnergy < energyIsolationMax);
174180
}
181+
bool isIsolatedTrack(double etaEle,
182+
double phiEle,
183+
float ptEle,
184+
TrackEle const& tracks)
185+
{
186+
int trackCount = 0;
187+
188+
for (const auto& track : tracks) {
189+
// skip the reference track
190+
if (std::abs(track.pt() - ptEle) < 1e-4)
191+
continue;
192+
193+
double dEta = track.eta() - etaEle;
194+
double dPhi = track.phi() - phiEle;
195+
dPhi = RecoDecay::constrainAngle(dPhi, -o2::constants::math::PI);
196+
197+
double deltaR = std::sqrt(dEta * dEta + dPhi * dPhi);
198+
199+
if (deltaR < rIsolation) {
200+
trackCount++;
201+
}
202+
}
203+
204+
registry.fill(HIST("hIsolationTrack"), ptEle, trackCount);
205+
206+
return (trackCount <= trackIsolationMax);
207+
}
175208

176209
void process(soa::Filtered<aod::Collisions>::iterator const& collision,
177210
SelectedClusters const& emcClusters,
@@ -226,6 +259,8 @@ struct HfTaskElectronWeakBoson {
226259
double rMin = 999.9;
227260
double dPhiMin = 999.9;
228261
double dEtaMin = 999.9;
262+
bool isIsolated = false;
263+
bool isIsolatedTr = false;
229264

230265
if (tracksofcluster.size()) {
231266
int nMatch = 0;
@@ -266,7 +301,6 @@ struct HfTaskElectronWeakBoson {
266301
continue;
267302

268303
const auto& cluster = match.emcalcluster_as<SelectedClusters>();
269-
bool isIsolated = isIsolatedCluster(cluster, emcClusters);
270304

271305
double eop = energyEmc / match.track_as<TrackEle>().p();
272306
// LOG(info) << "E/p" << eop;
@@ -276,9 +310,18 @@ struct HfTaskElectronWeakBoson {
276310
if (match.track_as<TrackEle>().tpcNSigmaEl() > nsigTpcMin && match.track_as<TrackEle>().tpcNSigmaEl() < nsigTpcMax) {
277311
registry.fill(HIST("hEop"), match.track_as<TrackEle>().pt(), eop);
278312

313+
if (eop > eopMin && eop < eopMax) {
314+
isIsolated = isIsolatedCluster(cluster, emcClusters);
315+
isIsolatedTr = isIsolatedTrack(track.phi(), track.eta(), track.pt(), tracks);
316+
}
317+
279318
if (isIsolated) {
280319
registry.fill(HIST("hEopIsolation"), match.track_as<TrackEle>().pt(), eop);
281320
}
321+
322+
if (isIsolatedTr) {
323+
registry.fill(HIST("hEopIsolationTr"), match.track_as<TrackEle>().pt(), eop);
324+
}
282325
}
283326
}
284327

0 commit comments

Comments
 (0)