Skip to content

Commit ae540ff

Browse files
authored
remove some condition on Hadron table for event mix
remove some condition on Hadron table
1 parent 0558894 commit ae540ff

1 file changed

Lines changed: 8 additions & 7 deletions

File tree

PWGHF/HFC/TableProducer/correlatorHfeHadrons.cxx

Lines changed: 8 additions & 7 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,8 +238,7 @@ struct HfCorrelatorHfeHadrons {
236238
entryElectronHadronPair(deltaPhi, deltaEta, ptElectron, ptHadron, poolBin, nElHadLSCorr, nElHadUSCorr);
237239

238240
} // end Hadron Track loop
239-
nElectron++;
240-
} // end Electron loop
241+
} // end Electron loop
241242
}
242243

243244
// mix event electron-hadron correlation

0 commit comments

Comments
 (0)