Skip to content

Commit cc75bcc

Browse files
authored
[PWGHF] Used DeltaEta and DeltaPhi from EMCalMatchedTracks Table for Track-Cluster Matching (#12369)
1 parent fb91fdd commit cc75bcc

File tree

2 files changed

+10
-8
lines changed

2 files changed

+10
-8
lines changed

PWGHF/HFC/TableProducer/correlatorHfeHadrons.cxx

Lines changed: 8 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -152,12 +152,17 @@ struct HfCorrelatorHfeHadrons {
152152
int gCollisionId = collision.globalIndex();
153153
int64_t timeStamp = bc.timestamp();
154154

155+
// Add hadron Table For Mix Event Electron Hadron correlation
156+
for (const auto& hTrack : tracks) {
157+
registry.fill(HIST("hTracksBin"), poolBin);
158+
entryHadron(hTrack.phi(), hTrack.eta(), hTrack.pt(), poolBin, gCollisionId, timeStamp);
159+
}
160+
155161
// Construct Deta Phi between electrons and hadrons
156162

157163
double ptElectron = -999;
158164
double phiElectron = -999;
159165
double etaElectron = -999;
160-
int nElectron = 0;
161166

162167
for (const auto& eTrack : electron) {
163168
ptElectron = eTrack.ptTrack();
@@ -209,10 +214,7 @@ struct HfCorrelatorHfeHadrons {
209214
if (ptCondition && (ptElectron < ptHadron)) {
210215
continue;
211216
}
212-
if (nElectron == 0) {
213-
registry.fill(HIST("hTracksBin"), poolBin);
214-
entryHadron(phiHadron, etaHadron, ptHadron, poolBin, gCollisionId, timeStamp);
215-
}
217+
216218
deltaPhi = RecoDecay::constrainAngle(phiElectron - phiHadron, -o2::constants::math::PIHalf);
217219
deltaEta = etaElectron - etaHadron;
218220
registry.fill(HIST("hInclusiveEHCorrel"), ptElectron, ptHadron, deltaPhi, deltaEta);
@@ -236,7 +238,7 @@ struct HfCorrelatorHfeHadrons {
236238
entryElectronHadronPair(deltaPhi, deltaEta, ptElectron, ptHadron, poolBin, nElHadLSCorr, nElHadUSCorr);
237239

238240
} // end Hadron Track loop
239-
nElectron++;
241+
240242
} // end Electron loop
241243
}
242244

PWGHF/HFL/TableProducer/electronSelectionWithTpcEmcal.cxx

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -468,8 +468,8 @@ struct HfElectronSelectionWithTpcEmcal {
468468
timeEmcCluster = emcCluster.time();
469469
cellEmcCluster = emcCluster.nCells();
470470

471-
deltaPhiMatch = matchTrack.trackPhiEmcal() - phiMatchEmcCluster;
472-
deltaEtaMatch = matchTrack.trackEtaEmcal() - etaMatchEmcCluster;
471+
deltaPhiMatch = ematchTrack.deltaPhi();
472+
deltaEtaMatch = ematchTrack.deltaEta();
473473

474474
// Track and EMCal cluster Matching
475475
if (std::abs(timeEmcCluster) > timeEmcClusterMax) {

0 commit comments

Comments
 (0)