Skip to content

Commit 67283a1

Browse files
authored
Add mc gen for hadron
1 parent 2bebe35 commit 67283a1

1 file changed

Lines changed: 24 additions & 4 deletions

File tree

PWGHF/HFC/TableProducer/correlatorHfeHadrons.cxx

Lines changed: 24 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -108,7 +108,10 @@ struct HfCorrelatorHfeHadrons {
108108
registry.add("hULSEHCorrel", "Sparse for Delta phi and Delta eta UnLike sign Electron pair with Hadron;p_{T}^{e} (GeV#it{/c});p_{T}^{h} (GeV#it{/c});#Delta#varphi;#Delta#eta;", {HistType::kTHnSparseF, {{axisPt}, {axisPt}, {axisDeltaPhi}, {axisDeltaEta}}});
109109
registry.add("hMCgenNonHfEHCorrel", "Sparse for Delta phi and Delta eta for McGen Non Hf Electron with Hadron;p_{T}^{e} (GeV#it{/c});p_{T}^{h} (GeV#it{/c});#Delta#varphi;#Delta#eta;", {HistType::kTHnSparseF, {{axisPt}, {axisPt}, {axisDeltaPhi}, {axisDeltaEta}}});
110110
registry.add("hMCgenInclusiveEHCorrl", "Sparse for Delta phi and Delta eta for McGen Electron pair with Hadron;p_{T}^{e} (GeV#it{/c});p_{T}^{h} (GeV#it{/c});#Delta#varphi;#Delta#eta;", {HistType::kTHnSparseF, {{axisPt}, {axisPt}, {axisDeltaPhi}, {axisDeltaEta}}});
111-
registry.add("hptElectron", "hptElectron", {HistType::kTH1D, {axisPt}});
111+
registry.add("hptElectron", "hptElectronMcGen", {HistType::kTH1D, {axisPt}});
112+
registry.add("hptHadron", "hptHadron", {HistType::kTH1D, {axisPt}});
113+
registry.add("hMCgenptHadron", "hMCgenptHadron", {HistType::kTH1D, {axisPt}});
114+
registry.add("hMCgenptHadronprimary", "hMCgenptHadronprimary", {HistType::kTH1D, {axisPt}});
112115

113116
registry.add("hMixEventInclusiveEHCorrl", "Sparse for mix event Delta phi and Delta eta Inclusive Electron with Hadron;p_{T}^{e} (GeV#it{/c});p_{T}^{h} (GeV#it{/c});#Delta#varphi;#Delta#eta;", {HistType::kTHnSparseF, {{axisPt}, {axisPt}, {axisDeltaPhi}, {axisDeltaEta}}});
114117
registry.add("hMixEventLSEHCorrel", "Sparse for mix event Delta phi and Delta eta Like sign Electron pair with Hadron;p_{T}^{e} (GeV#it{/c});p_{T}^{h} (GeV#it{/c});#Delta#varphi;#Delta#eta;", {HistType::kTHnSparseF, {{axisPt}, {axisPt}, {axisDeltaPhi}, {axisDeltaEta}}});
@@ -158,6 +161,7 @@ struct HfCorrelatorHfeHadrons {
158161
continue;
159162
}
160163
registry.fill(HIST("hTracksBin"), poolBin);
164+
registry.fill(HIST("hptHadron"), hTrack.pt());
161165
entryHadron(hTrack.phi(), hTrack.eta(), hTrack.pt(), poolBin, gCollisionId, timeStamp);
162166
}
163167

@@ -313,7 +317,7 @@ struct HfCorrelatorHfeHadrons {
313317
fillCorrelation(collision, electron, tracks, bc);
314318
}
315319

316-
PROCESS_SWITCH(HfCorrelatorHfeHadrons, processData, "Process for Data", true);
320+
PROCESS_SWITCH(HfCorrelatorHfeHadrons, processData, "Process for Data", false);
317321

318322
// ======= Process starts for McRec, Same event ============
319323

@@ -332,9 +336,25 @@ struct HfCorrelatorHfeHadrons {
332336
BinningTypeMcGen corrBinningMcGen{{zBins, multBinsMcGen}, true};
333337
int poolBin = corrBinningMcGen.getBin(std::make_tuple(mcCollision.posZ(), mcCollision.multMCFT0A()));
334338

339+
for (const auto& particleMc : mcParticles) {
340+
if (particleMc.eta() < etaTrackMin || particleMc.eta() > etaTrackMax) {
341+
continue;
342+
}
343+
if (particleMc.pt() < ptTrackMin) {
344+
continue;
345+
}
346+
347+
registry.fill(HIST("hMCgenptHadron"), particleMc.pt());
348+
if (particleMc.isPhysicalPrimary()) {
349+
350+
registry.fill(HIST("hMCgenptHadronprimary"), particleMc.pt());
351+
}
352+
}
353+
335354
double ptElectron = 0;
336355
double phiElectron = 0;
337356
double etaElectron = 0;
357+
338358
for (const auto& electronMc : electron) {
339359
double ptHadron = 0;
340360
double phiHadron = 0;
@@ -382,7 +402,7 @@ struct HfCorrelatorHfeHadrons {
382402
}
383403
}
384404
}
385-
PROCESS_SWITCH(HfCorrelatorHfeHadrons, processMcGen, "Process MC Gen mode", false);
405+
PROCESS_SWITCH(HfCorrelatorHfeHadrons, processMcGen, "Process MC Gen mode", true);
386406
// ====================== Implement Event mixing on Data ===============================
387407

388408
// ====================== Implement Event mixing on Data ===================================
@@ -465,7 +485,7 @@ struct HfCorrelatorHfeHadrons {
465485
}
466486
}
467487
}
468-
PROCESS_SWITCH(HfCorrelatorHfeHadrons, processMcGenMixedEvent, "Process Mixed Event MC Gen mode", false);
488+
PROCESS_SWITCH(HfCorrelatorHfeHadrons, processMcGenMixedEvent, "Process Mixed Event MC Gen mode", true);
469489
};
470490
WorkflowSpec defineDataProcessing(ConfigContext const& cfgc)
471491
{

0 commit comments

Comments
 (0)