2323using namespace o2 ;
2424using namespace o2 ::framework;
2525using namespace o2 ::framework::expressions;
26+ using namespace o2 ::aod::hf_cand;
2627using namespace o2 ::aod::hf_cand_prong3;
28+ using namespace o2 ::analysis::hf_cuts_lc_topkpi;
2729
2830void customize (std::vector<o2::framework::ConfigParamSpec>& workflowOptions)
2931{
30- ConfigParamSpec optionDoMC{" doMC" , VariantType::Bool, true , {" Fill MC histograms." }};
32+ ConfigParamSpec optionDoMC{" doMC" , VariantType::Bool, false , {" Fill MC histograms." }};
3133 workflowOptions.push_back (optionDoMC);
3234}
3335
@@ -62,7 +64,7 @@ struct TaskLc {
6264 registry.add (" hselectionstatus" , " 3-prong candidates;selection status;entries" , {HistType::kTH2F , {{5 , -0.5 , 4.5 }, {vbins, " #it{p}_{T} (GeV/#it{c})" }}});
6365 registry.add (" hImpParErr" , " 3-prong candidates;impact parameter error (cm);entries" , {HistType::kTH2F , {{100 , -1 ., 1 .}, {vbins, " #it{p}_{T} (GeV/#it{c})" }}});
6466 registry.add (" hDecLenErr" , " 3-prong candidates;decay length error (cm);entries" , {HistType::kTH2F , {{100 , 0 ., 1 .}, {vbins, " #it{p}_{T} (GeV/#it{c})" }}});
65- registry.add (" hdca2" , " 3-prong candidates;prong DCA to sec. vertex (cm);entries" , {HistType::kTH2F , {{100 , 0 ., 1 . }, {vbins, " #it{p}_{T} (GeV/#it{c})" }}});
67+ registry.add (" hdca2" , " 3-prong candidates;prong Chi2PCA to sec. vertex (cm);entries" , {HistType::kTH2F , {{100 , 0 ., 0.5 }, {vbins, " #it{p}_{T} (GeV/#it{c})" }}});
6668 }
6769
6870 // void process(aod::HfCandProng3 const& candidates)
@@ -107,18 +109,21 @@ struct TaskLc {
107109struct TaskLcMC {
108110 HistogramRegistry registry{
109111 " registry" ,
110- {{" hPtRecSig" , " 3-prong candidates (rec. matched);#it{p}_{T} (GeV/#it{c});entries" , {HistType::kTH1F , {{100 , 0 ., 10 .}}}},
111- {" hPtRecBg" , " 3-prong candidates (rec. unmatched);#it{p}_{T} (GeV/#it{c});entries" , {HistType::kTH1F , {{100 , 0 ., 10 .}}}},
112- {" hPtGen" , " 3-prong candidates (gen. matched);#it{p}_{T} (GeV/#it{c});entries" , {HistType::kTH1F , {{100 , 0 ., 10 .}}}},
113- {" hPtGenSig" , " 3-prong candidates (rec. matched);#it{p}_{T} (GeV/#it{c});entries" , {HistType::kTH1F , {{100 , 0 ., 10 .}}}},
114- {" hCPARecSig" , " 3-prong candidates (rec. matched);cosine of pointing angle;entries" , {HistType::kTH1F , {{110 , -1.1 , 1.1 }}}},
115- {" hCPARecBg" , " 3-prong candidates (rec. unmatched);cosine of pointing angle;entries" , {HistType::kTH1F , {{110 , -1.1 , 1.1 }}}},
116- {" hEtaRecSig" , " 3-prong candidates (rec. matched);#it{#eta};entries" , {HistType::kTH1F , {{100 , -2 ., 2 .}}}},
117- {" hEtaRecBg" , " 3-prong candidates (rec. unmatched);#it{#eta};entries" , {HistType::kTH1F , {{100 , -2 ., 2 .}}}},
118- {" hEtaGen" , " 3-prong candidates (gen. matched);#it{#eta};entries" , {HistType::kTH1F , {{100 , -2 ., 2 .}}}}}};
112+ {{" hPtRecSig" , " 3-prong candidates (matched);#it{p}_{T}^{rec.} (GeV/#it{c});entries" , {HistType::kTH1F , {{100 , 0 ., 10 .}}}},
113+ {" hPtRecSigPrompt" , " 3-prong candidates (matched, prompt);#it{p}_{T}^{rec.} (GeV/#it{c});entries" , {HistType::kTH1F , {{100 , 0 ., 10 .}}}},
114+ {" hPtRecSigNonPrompt" , " 3-prong candidates (matched, non-prompt);#it{p}_{T}^{rec.} (GeV/#it{c});entries" , {HistType::kTH1F , {{100 , 0 ., 10 .}}}},
115+ {" hPtRecBg" , " 3-prong candidates (unmatched);#it{p}_{T}^{rec.} (GeV/#it{c});entries" , {HistType::kTH1F , {{100 , 0 ., 10 .}}}},
116+ {" hPtGen" , " MC particles (matched);#it{p}_{T}^{gen.} (GeV/#it{c});entries" , {HistType::kTH1F , {{100 , 0 ., 10 .}}}},
117+ {" hPtGenPrompt" , " MC particles (matched, prompt);#it{p}_{T}^{gen.} (GeV/#it{c});entries" , {HistType::kTH1F , {{100 , 0 ., 10 .}}}},
118+ {" hPtGenNonPrompt" , " MC particles (matched, non-prompt);#it{p}_{T}^{gen.} (GeV/#it{c});entries" , {HistType::kTH1F , {{100 , 0 ., 10 .}}}},
119+ {" hPtGenSig" , " 3-prong candidates (matched);#it{p}_{T}^{gen.} (GeV/#it{c});entries" , {HistType::kTH1F , {{100 , 0 ., 10 .}}}},
120+ {" hCPARecSig" , " 3-prong candidates (matched);cosine of pointing angle;entries" , {HistType::kTH1F , {{110 , -1.1 , 1.1 }}}},
121+ {" hCPARecBg" , " 3-prong candidates (unmatched);cosine of pointing angle;entries" , {HistType::kTH1F , {{110 , -1.1 , 1.1 }}}},
122+ {" hEtaRecSig" , " 3-prong candidates (matched);#it{#eta};entries" , {HistType::kTH1F , {{100 , -2 ., 2 .}}}},
123+ {" hEtaRecBg" , " 3-prong candidates (unmatched);#it{#eta};entries" , {HistType::kTH1F , {{100 , -2 ., 2 .}}}},
124+ {" hEtaGen" , " MC particles (matched);#it{#eta};entries" , {HistType::kTH1F , {{100 , -2 ., 2 .}}}}}};
119125
120126 Configurable<int > d_selectionFlagLc{" d_selectionFlagLc" , 1 , " Selection Flag for Lc" };
121- Configurable<int > d_selectionFlagLcbar{" d_selectionFlagLcbar" , 1 , " Selection Flag for Lcbar" };
122127 Configurable<double > cutYCandMax{" cutYCandMax" , -1 ., " max. cand. rapidity" };
123128
124129 Filter filterSelectCandidates = (aod::hf_selcandidate_lc::isSelLcpKpi >= d_selectionFlagLc || aod::hf_selcandidate_lc::isSelLcpiKp >= d_selectionFlagLc);
@@ -140,7 +145,13 @@ struct TaskLcMC {
140145 auto indexMother = RecoDecay::getMother (particlesMC, candidate.index0_as <aod::BigTracksMC>().mcParticle_as <soa::Join<aod::McParticles, aod::HfCandProng3MCGen>>(), pdg::Code::kLambdaCPlus , true );
141146 auto particleMother = particlesMC.iteratorAt (indexMother);
142147 registry.fill (HIST (" hPtGenSig" ), particleMother.pt ()); // gen. level pT
143- registry.fill (HIST (" hPtRecSig" ), candidate.pt ()); // rec. level pT
148+ auto ptRec = candidate.pt ();
149+ registry.fill (HIST (" hPtRecSig" ), ptRec); // rec. level pT
150+ if (candidate.originMCRec () == OriginType::Prompt) {
151+ registry.fill (HIST (" hPtRecSigPrompt" ), ptRec); // rec. level pT, prompt
152+ } else {
153+ registry.fill (HIST (" hPtRecSigNonPrompt" ), ptRec); // rec. level pT, non-prompt
154+ }
144155 registry.fill (HIST (" hCPARecSig" ), candidate.cpa ());
145156 registry.fill (HIST (" hEtaRecSig" ), candidate.eta ());
146157 } else {
@@ -156,7 +167,13 @@ struct TaskLcMC {
156167 if (cutYCandMax >= 0 . && std::abs (RecoDecay::Y (array{particle.px (), particle.py (), particle.pz ()}, RecoDecay::getMassPDG (particle.pdgCode ()))) > cutYCandMax) {
157168 continue ;
158169 }
159- registry.fill (HIST (" hPtGen" ), particle.pt ());
170+ auto ptGen = particle.pt ();
171+ registry.fill (HIST (" hPtGen" ), ptGen);
172+ if (particle.originMCGen () == OriginType::Prompt) {
173+ registry.fill (HIST (" hPtGenPrompt" ), ptGen);
174+ } else {
175+ registry.fill (HIST (" hPtGenNonPrompt" ), ptGen);
176+ }
160177 registry.fill (HIST (" hEtaGen" ), particle.eta ());
161178 }
162179 }
0 commit comments