Skip to content

Commit f7dace1

Browse files
rashiguptrashi234
andauthored
[PWGHF] Add configurable for mixed event pair in correlatorHfeHadrons (#11591)
Co-authored-by: Rashi Gupta <rashi.gupta@cern.ch>
1 parent b901a1f commit f7dace1

File tree

2 files changed

+11
-4
lines changed

2 files changed

+11
-4
lines changed

PWGHF/HFC/TableProducer/correlatorHfeHadrons.cxx

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -54,6 +54,7 @@ struct HfCorrelatorHfeHadrons {
5454
Configurable<float> zPvPosMax{"zPvPosMax", 10., "Maximum z of the primary vertex (cm)"};
5555
Configurable<bool> isRun3{"isRun3", true, "Data is from Run3 or Run2"};
5656

57+
Configurable<int> numberEventsMixed{"numberEventsMixed", 5, "number of events mixed in ME process"};
5758
// Associated Hadron selection
5859
Configurable<float> ptTrackMin{"ptTrackMin", 0.1f, "Transverse momentum range for associated hadron tracks"};
5960
Configurable<float> etaTrackMax{"etaTrackMax", 0.8f, "Eta range for associated hadron tracks"};
@@ -377,7 +378,7 @@ struct HfCorrelatorHfeHadrons {
377378
void processDataMixedEvent(TableCollisions const& collision, aod::HfCorrSelEl const& electron, TableTracks const& tracks)
378379
{
379380
auto tracksTuple = std::make_tuple(electron, tracks);
380-
Pair<TableCollisions, aod::HfCorrSelEl, TableTracks, BinningType> pair{corrBinning, 5, -1, collision, tracksTuple, &cache};
381+
Pair<TableCollisions, aod::HfCorrSelEl, TableTracks, BinningType> pair{corrBinning, numberEventsMixed, -1, collision, tracksTuple, &cache};
381382

382383
// loop over the rows of the new table
383384
for (const auto& [c1, tracks1, c2, tracks2] : pair) {
@@ -392,7 +393,7 @@ struct HfCorrelatorHfeHadrons {
392393
void processMcRecMixedEvent(McTableCollisions const& mccollision, aod::HfCorrSelEl const& electron, McTableTracks const& mcTracks)
393394
{
394395
auto tracksTuple = std::make_tuple(electron, mcTracks);
395-
Pair<McTableCollisions, aod::HfCorrSelEl, McTableTracks, BinningType> pairMcRec{corrBinning, 5, -1, mccollision, tracksTuple, &cache};
396+
Pair<McTableCollisions, aod::HfCorrSelEl, McTableTracks, BinningType> pairMcRec{corrBinning, numberEventsMixed, -1, mccollision, tracksTuple, &cache};
396397

397398
// loop over the rows of the new table
398399
for (const auto& [c1, tracks1, c2, tracks2] : pairMcRec) {

PWGHF/HFL/TableProducer/electronSelectionWithTpcEmcal.cxx

Lines changed: 8 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -202,8 +202,9 @@ struct HfElectronSelectionWithTpcEmcal {
202202

203203
registry.add("hAfterPIDEtaPhi", "PID Info after PID Cuts Eta vs Phi ; #eta; #varphi; ", {HistType::kTH2F, {{axisEta}, {axisPhi}}});
204204
registry.add("hEPRatioAfterPID", "E/P Ratio after PID Cuts apply only trackwodca filter", {HistType::kTH2F, {{axisPt}, {axisEmcEnergy}}});
205-
registry.add("hPIDAfterPIDCuts", "PID Info after PID cuts; E/P;#it{p}_{T} (GeV#it{/c});n#sigma;m02; m20;", {HistType::kTHnSparseF, {{binsEoP}, {binsPt}, {binsnSigma}, {binsM02}, {binsM20}}});
206-
registry.add("hEmcClsTrkEtaPhiDiffTime", "EmcClsTrkEtaPhiDiffTime;#Delta#eta;#Delta#varphi;Sec;", {HistType::kTH3F, {{binsDeltaEta}, {binsDeltaPhi}, {binsEmcClsTime}}});
205+
206+
registry.add("hPIDAfterPIDCuts", "PID Info after PID cuts; E/P;#it{p}_{T} (GeV#it{/c});n#sigma;m02; m20;", {HistType::kTHnSparseF, {{axisEoP}, {axisPt}, {axisnSigma}, {axisM02}, {axisM20}}});
207+
registry.add("hEmcClsTrkEtaPhiDiffTime", "EmcClsTrkEtaPhiDiffTime;#Delta#eta;#Delta#varphi;Sec;", {HistType::kTH3F, {{axisDeltaEta}, {axisDeltaPhi}, {axisEmcClsTime}}});
207208
}
208209
// Track Selection Cut
209210
template <typename T>
@@ -365,6 +366,11 @@ struct HfElectronSelectionWithTpcEmcal {
365366
return;
366367

367368
registry.fill(HIST("hNevents"), 1);
369+
370+
// skip events with no clusters
371+
if (emcClusters.size() == 0) {
372+
return;
373+
}
368374
registry.fill(HIST("hZvertex"), collision.posZ());
369375

370376
/////////////////////////////////

0 commit comments

Comments
 (0)