@@ -37,6 +37,8 @@ struct HfTaskLcToK0sP {
3737 Configurable<int > selectionFlagLcToK0sP{" selectionFlagLcToK0sP" , 1 , " Selection Flag for Lc" };
3838 Configurable<int > selectionFlagLcbarToK0sP{" selectionFlagLcbarToK0sP" , 1 , " Selection Flag for Lcbar" };
3939 Configurable<double > etaCandMax{" etaCandMax" , -1 ., " max. cand. pseudorapidity" };
40+ Configurable<double > yCandGenMax{" yCandGenMax" , 0.5 , " max. gen particle rapidity" };
41+ Configurable<double > yCandRecoMax{" yCandRecoMax" , 0.8 , " max. cand. rapidity" };
4042 Configurable<std::vector<double >> binsPt{" binsPt" , std::vector<double >{hf_cuts_lc_to_k0s_p::vecBinsPt}, " pT bin limits" };
4143
4244 HfHelper hfHelper;
@@ -129,6 +131,8 @@ struct HfTaskLcToK0sP {
129131 // add MC histograms
130132 if (context.mOptions .get <bool >(" processMc" )) {
131133 registry.add (" MC/Rec/hPtCandRecSig" , " cascade candidates;candidate #it{p}_{T} (GeV/#it{c});entries" , {HistType::kTH1F , {axisPt}});
134+ registry.add (" MC/Rec/hPtCandRecSigPrompt" , " cascade candidates;candidate #it{p}_{T} (GeV/#it{c});entries" , {HistType::kTH1F , {axisPt}});
135+ registry.add (" MC/Rec/hPtCandRecSigNonPrompt" , " cascade candidates;candidate #it{p}_{T} (GeV/#it{c});entries" , {HistType::kTH1F , {axisPt}});
132136 registry.add (" MC/Rec/hPtCandRecBg" , " cascade candidates;candidate #it{p}_{T} (GeV/#it{c});entries" , {HistType::kTH1F , {axisPt}});
133137 registry.add (" MC/Rec/hEtaCandRecSig" , " cascade candidates;candidate #it{#eta};entries" , {HistType::kTH1F , {axisEta}});
134138 registry.add (" MC/Rec/hEtaCandVsPtCandRecSig" , " cascade candidates;candidate #it{#eta};p_{T}" , {HistType::kTH2F , {axisEta, axisBinsPt}});
@@ -139,6 +143,8 @@ struct HfTaskLcToK0sP {
139143 registry.add (" MC/Rec/hPhiCandRecBg" , " cascade candidates;candidate #it{#phi};entries" , {HistType::kTH1F , {axisPhi}});
140144 registry.add (" MC/Rec/hPhiCandVsPtCandRecBg" , " cascade candidates;candidate #it{#phi};p_{T}" , {HistType::kTH2F , {axisPhi, axisBinsPt}});
141145 registry.add (" MC/Gen/hPtCandGen" , " cascade candidates;candidate #it{p}_{T} (GeV/#it{c});entries" , {HistType::kTH1F , {axisPt}});
146+ registry.add (" MC/Gen/hPtCandGenPrompt" , " cascade candidates;candidate #it{p}_{T} (GeV/#it{c});entries" , {HistType::kTH1F , {axisPt}});
147+ registry.add (" MC/Gen/hPtCandGenNonPrompt" , " cascade candidates;candidate #it{p}_{T} (GeV/#it{c});entries" , {HistType::kTH1F , {axisPt}});
142148 registry.add (" MC/Gen/hEtaCandGen" , " cascade candidates;candidate #it{#eta};entries" , {HistType::kTH1F , {axisEta}});
143149 registry.add (" MC/Gen/hEtaCandVsPtCandGen" , " cascade candidates;candidate #it{#eta};p_{T}" , {HistType::kTH2F , {axisEta, axisBinsPt}});
144150 registry.add (" MC/Gen/hPhiCandGen" , " cascade candidates;candidate #it{#phi};entries" , {HistType::kTH1F , {axisPhi}});
@@ -261,6 +267,10 @@ struct HfTaskLcToK0sP {
261267 continue ;
262268 }
263269
270+ if (yCandRecoMax >= 0 . && std::abs (hfHelper.yLc (candidate)) > yCandRecoMax) {
271+ continue ;
272+ }
273+
264274 auto ptCand = candidate.pt ();
265275 auto eta = candidate.eta ();
266276 auto phi = candidate.phi ();
@@ -364,6 +374,10 @@ struct HfTaskLcToK0sP {
364374 continue ;
365375 }
366376
377+ if (yCandRecoMax >= 0 . && std::abs (hfHelper.yLc (candidate)) > yCandRecoMax) {
378+ continue ;
379+ }
380+
367381 auto ptCand = candidate.pt ();
368382 auto eta = candidate.eta ();
369383 auto phi = candidate.phi ();
@@ -396,6 +410,12 @@ struct HfTaskLcToK0sP {
396410 auto pBach = bach.p ();
397411
398412 if (std::abs (candidate.flagMcMatchRec ()) == 1 ) {
413+ if (candidate.originMcRec () == RecoDecay::OriginType::Prompt) {
414+ registry.fill (HIST (" MC/Rec/hPtCandRecSigPrompt" ), ptCand);
415+ }
416+ if (candidate.originMcRec () == RecoDecay::OriginType::NonPrompt) {
417+ registry.fill (HIST (" MC/Rec/hPtCandRecSigNonPrompt" ), ptCand);
418+ }
399419 registry.fill (HIST (" MC/Rec/hPtCandRecSig" ), ptCand);
400420 registry.fill (HIST (" MC/Rec/hEtaCandRecSig" ), eta);
401421 registry.fill (HIST (" MC/Rec/hEtaCandVsPtCandRecSig" ), eta, ptCand);
@@ -522,6 +542,11 @@ struct HfTaskLcToK0sP {
522542 }
523543
524544 if (std::abs (particle.flagMcMatchGen ()) == 1 ) {
545+
546+ auto yGen = RecoDecay::y (particle.pVector (), o2::constants::physics::MassLambdaCPlus);
547+ if (yCandGenMax >= 0 . && std::abs (yGen) > yCandGenMax) {
548+ continue ;
549+ }
525550 auto ptCand = particle.pt ();
526551 auto eta = particle.eta ();
527552 auto phi = particle.phi ();
@@ -530,6 +555,13 @@ struct HfTaskLcToK0sP {
530555 registry.fill (HIST (" MC/Gen/hEtaCandVsPtCandGen" ), eta, ptCand);
531556 registry.fill (HIST (" MC/Gen/hPhiCandGen" ), phi);
532557 registry.fill (HIST (" MC/Gen/hPhiCandVsPtCandGen" ), phi, ptCand);
558+
559+ if (particle.originMcGen () == RecoDecay::OriginType::Prompt) {
560+ registry.fill (HIST (" MC/Gen/hPtCandGenPrompt" ), ptCand);
561+ }
562+ if (particle.originMcGen () == RecoDecay::OriginType::NonPrompt) {
563+ registry.fill (HIST (" MC/Gen/hPtCandGenNonPrompt" ), ptCand);
564+ }
533565 }
534566 }
535567 }
0 commit comments