@@ -37,14 +37,16 @@ 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;
4345
44- Filter filterSelectCandidates = (aod::hf_sel_candidate_lc_to_k0s_p::isSelLcToK0sP >= selectionFlagLcToK0sP || aod::hf_sel_candidate_lc_to_k0s_p::isSelLcToK0sP >= selectionFlagLcbarToK0sP);
45-
4646 using TracksWPid = soa::Join<aod::TracksWExtra, aod::TracksPidPr>;
4747
48+ Filter filterSelectCandidates = (aod::hf_sel_candidate_lc_to_k0s_p::isSelLcToK0sP >= selectionFlagLcToK0sP || aod::hf_sel_candidate_lc_to_k0s_p::isSelLcToK0sP >= selectionFlagLcbarToK0sP);
49+
4850 HistogramRegistry registry{" registry" };
4951
5052 void init (InitContext& context)
@@ -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,11 @@ 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+ } else if (candidate.originMcRec () == RecoDecay::OriginType::NonPrompt) {
416+ registry.fill (HIST (" MC/Rec/hPtCandRecSigNonPrompt" ), ptCand);
417+ }
399418 registry.fill (HIST (" MC/Rec/hPtCandRecSig" ), ptCand);
400419 registry.fill (HIST (" MC/Rec/hEtaCandRecSig" ), eta);
401420 registry.fill (HIST (" MC/Rec/hEtaCandVsPtCandRecSig" ), eta, ptCand);
@@ -522,6 +541,11 @@ struct HfTaskLcToK0sP {
522541 }
523542
524543 if (std::abs (particle.flagMcMatchGen ()) == 1 ) {
544+
545+ auto yGen = RecoDecay::y (particle.pVector (), o2::constants::physics::MassLambdaCPlus);
546+ if (yCandGenMax >= 0 . && std::abs (yGen) > yCandGenMax) {
547+ continue ;
548+ }
525549 auto ptCand = particle.pt ();
526550 auto eta = particle.eta ();
527551 auto phi = particle.phi ();
@@ -530,6 +554,12 @@ struct HfTaskLcToK0sP {
530554 registry.fill (HIST (" MC/Gen/hEtaCandVsPtCandGen" ), eta, ptCand);
531555 registry.fill (HIST (" MC/Gen/hPhiCandGen" ), phi);
532556 registry.fill (HIST (" MC/Gen/hPhiCandVsPtCandGen" ), phi, ptCand);
557+
558+ if (particle.originMcGen () == RecoDecay::OriginType::Prompt) {
559+ registry.fill (HIST (" MC/Gen/hPtCandGenPrompt" ), ptCand);
560+ } else if (particle.originMcGen () == RecoDecay::OriginType::NonPrompt) {
561+ registry.fill (HIST (" MC/Gen/hPtCandGenNonPrompt" ), ptCand);
562+ }
533563 }
534564 }
535565 }
0 commit comments