@@ -30,12 +30,6 @@ using namespace o2::aod::hf_cand;
3030using namespace o2 ::aod::hf_cand_prong3;
3131using namespace o2 ::analysis::hf_cuts_lc_topkpi;
3232
33- void customize (std::vector<o2::framework::ConfigParamSpec>& workflowOptions)
34- {
35- ConfigParamSpec optionDoMC{" doMC" , VariantType::Bool, true , {" Fill MC histograms." }};
36- workflowOptions.push_back (optionDoMC);
37- }
38-
3933#include " Framework/runDataProcessing.h"
4034
4135// / Λc± → p± K∓ π± analysis task
@@ -46,7 +40,12 @@ struct TaskLc {
4640 {" hptprong0" , " 3-prong candidates;prong 0 #it{p}_{T} (GeV/#it{c});entries" , {HistType::kTH1F , {{100 , 0 ., 10 .}}}},
4741 {" hptprong1" , " 3-prong candidates;prong 1 #it{p}_{T} (GeV/#it{c});entries" , {HistType::kTH1F , {{100 , 0 ., 10 .}}}},
4842 {" hptprong2" , " 3-prong candidates;prong 2 #it{p}_{T} (GeV/#it{c});entries" , {HistType::kTH1F , {{100 , 0 ., 10 .}}}},
49- {" hMultiplicity" , " multiplicity;multiplicity;entries" , {HistType::kTH1F , {{10000 , 0 ., 10000 .}}}}}};
43+ {" hMultiplicity" , " multiplicity;multiplicity;entries" , {HistType::kTH1F , {{10000 , 0 ., 10000 .}}}},
44+ {" hCPARecSig" , " 3-prong candidates (matched);cosine of pointing angle;entries" , {HistType::kTH1F , {{110 , -1.1 , 1.1 }}}},
45+ {" hCPARecBg" , " 3-prong candidates (unmatched);cosine of pointing angle;entries" , {HistType::kTH1F , {{110 , -1.1 , 1.1 }}}},
46+ {" hEtaRecSig" , " 3-prong candidates (matched);#it{#eta};entries" , {HistType::kTH1F , {{100 , -2 ., 2 .}}}},
47+ {" hEtaRecBg" , " 3-prong candidates (unmatched);#it{#eta};entries" , {HistType::kTH1F , {{100 , -2 ., 2 .}}}},
48+ {" hEtaGen" , " MC particles (matched);#it{#eta};entries" , {HistType::kTH1F , {{100 , -2 ., 2 .}}}}}};
5049
5150 Configurable<int > d_selectionFlagLc{" d_selectionFlagLc" , 1 , " Selection Flag for Lc" };
5251 Configurable<double > cutYCandMax{" cutYCandMax" , -1 ., " max. cand. rapidity" };
@@ -69,6 +68,15 @@ struct TaskLc {
6968 registry.add (" hImpParErr" , " 3-prong candidates;impact parameter error (cm);entries" , {HistType::kTH2F , {{100 , -1 ., 1 .}, {vbins, " #it{p}_{T} (GeV/#it{c})" }}});
7069 registry.add (" hDecLenErr" , " 3-prong candidates;decay length error (cm);entries" , {HistType::kTH2F , {{100 , 0 ., 1 .}, {vbins, " #it{p}_{T} (GeV/#it{c})" }}});
7170 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})" }}});
71+
72+ registry.add (" hPtRecSig" , " 3-prong candidates (matched);#it{p}_{T}^{rec.} (GeV/#it{c});entries" , {HistType::kTH1F , {{vbins, " #it{p}_{T} (GeV/#it{c})" }}});
73+ registry.add (" hPtRecSigPrompt" , " 3-prong candidates (matched, prompt);#it{p}_{T}^{rec.} (GeV/#it{c});entries" , {HistType::kTH1F , {{vbins, " #it{p}_{T} (GeV/#it{c})" }}});
74+ registry.add (" hPtRecSigNonPrompt" , " 3-prong candidates (matched, non-prompt);#it{p}_{T}^{rec.} (GeV/#it{c});entries" , {HistType::kTH1F , {{vbins, " #it{p}_{T} (GeV/#it{c})" }}});
75+ registry.add (" hPtRecBg" , " 3-prong candidates (unmatched);#it{p}_{T}^{rec.} (GeV/#it{c});entries" , {HistType::kTH1F , {{vbins, " #it{p}_{T} (GeV/#it{c})" }}});
76+ registry.add (" hPtGen" , " MC particles (matched);#it{p}_{T}^{gen.} (GeV/#it{c});entries" , {HistType::kTH1F , {{vbins, " #it{p}_{T} (GeV/#it{c})" }}});
77+ registry.add (" hPtGenPrompt" , " MC particles (matched, prompt);#it{p}_{T}^{gen.} (GeV/#it{c});entries" , {HistType::kTH1F , {{vbins, " #it{p}_{T} (GeV/#it{c})" }}});
78+ registry.add (" hPtGenNonPrompt" , " MC particles (matched, non-prompt);#it{p}_{T}^{gen.} (GeV/#it{c});entries" , {HistType::kTH1F , {{vbins, " #it{p}_{T} (GeV/#it{c})" }}});
79+ registry.add (" hPtGenSig" , " 3-prong candidates (matched);#it{p}_{T}^{gen.} (GeV/#it{c});entries" , {HistType::kTH1F , {{vbins, " #it{p}_{T} (GeV/#it{c})" }}});
7280 }
7381
7482 // FIXME: Add ALICE 2/3 switch!
@@ -122,39 +130,10 @@ struct TaskLc {
122130 registry.fill (HIST (" hDecLenErr" ), candidate.chi2PCA (), candidate.pt ());
123131 }
124132 }
125- };
126133
127- // / Fills MC histograms.
128- struct TaskLcMC {
129- HistogramRegistry registry{
130- " registry" ,
131- {{" hCPARecSig" , " 3-prong candidates (matched);cosine of pointing angle;entries" , {HistType::kTH1F , {{110 , -1.1 , 1.1 }}}},
132- {" hCPARecBg" , " 3-prong candidates (unmatched);cosine of pointing angle;entries" , {HistType::kTH1F , {{110 , -1.1 , 1.1 }}}},
133- {" hEtaRecSig" , " 3-prong candidates (matched);#it{#eta};entries" , {HistType::kTH1F , {{100 , -2 ., 2 .}}}},
134- {" hEtaRecBg" , " 3-prong candidates (unmatched);#it{#eta};entries" , {HistType::kTH1F , {{100 , -2 ., 2 .}}}},
135- {" hEtaGen" , " MC particles (matched);#it{#eta};entries" , {HistType::kTH1F , {{100 , -2 ., 2 .}}}}}};
136-
137- Configurable<int > d_selectionFlagLc{" d_selectionFlagLc" , 1 , " Selection Flag for Lc" };
138- Configurable<double > cutYCandMax{" cutYCandMax" , -1 ., " max. cand. rapidity" };
139- Configurable<std::vector<double >> bins{" pTBins" , std::vector<double >{hf_cuts_lc_topkpi::pTBins_v}, " pT bin limits" };
140-
141- Filter filterSelectCandidates = (aod::hf_selcandidate_lc::isSelLcpKpi >= d_selectionFlagLc || aod::hf_selcandidate_lc::isSelLcpiKp >= d_selectionFlagLc);
142-
143- void init (o2::framework::InitContext&)
144- {
145- auto vbins = (std::vector<double >)bins;
146- registry.add (" hPtRecSig" , " 3-prong candidates (matched);#it{p}_{T}^{rec.} (GeV/#it{c});entries" , {HistType::kTH1F , {{vbins, " #it{p}_{T} (GeV/#it{c})" }}});
147- registry.add (" hPtRecSigPrompt" , " 3-prong candidates (matched, prompt);#it{p}_{T}^{rec.} (GeV/#it{c});entries" , {HistType::kTH1F , {{vbins, " #it{p}_{T} (GeV/#it{c})" }}});
148- registry.add (" hPtRecSigNonPrompt" , " 3-prong candidates (matched, non-prompt);#it{p}_{T}^{rec.} (GeV/#it{c});entries" , {HistType::kTH1F , {{vbins, " #it{p}_{T} (GeV/#it{c})" }}});
149- registry.add (" hPtRecBg" , " 3-prong candidates (unmatched);#it{p}_{T}^{rec.} (GeV/#it{c});entries" , {HistType::kTH1F , {{vbins, " #it{p}_{T} (GeV/#it{c})" }}});
150- registry.add (" hPtGen" , " MC particles (matched);#it{p}_{T}^{gen.} (GeV/#it{c});entries" , {HistType::kTH1F , {{vbins, " #it{p}_{T} (GeV/#it{c})" }}});
151- registry.add (" hPtGenPrompt" , " MC particles (matched, prompt);#it{p}_{T}^{gen.} (GeV/#it{c});entries" , {HistType::kTH1F , {{vbins, " #it{p}_{T} (GeV/#it{c})" }}});
152- registry.add (" hPtGenNonPrompt" , " MC particles (matched, non-prompt);#it{p}_{T}^{gen.} (GeV/#it{c});entries" , {HistType::kTH1F , {{vbins, " #it{p}_{T} (GeV/#it{c})" }}});
153- registry.add (" hPtGenSig" , " 3-prong candidates (matched);#it{p}_{T}^{gen.} (GeV/#it{c});entries" , {HistType::kTH1F , {{vbins, " #it{p}_{T} (GeV/#it{c})" }}});
154- }
155-
156- void process (soa::Filtered<soa::Join<aod::HfCandProng3, aod::HFSelLcCandidate, aod::HfCandProng3MCRec>> const & candidates,
157- soa::Join<aod::McParticles, aod::HfCandProng3MCGen> const & particlesMC, aod::BigTracksMC const & tracks)
134+ // / Fills MC histograms.
135+ void processMC (soa::Filtered<soa::Join<aod::HfCandProng3, aod::HFSelLcCandidate, aod::HfCandProng3MCRec>> const & candidates,
136+ soa::Join<aod::McParticles, aod::HfCandProng3MCGen> const & particlesMC, aod::BigTracksMC const & /* tracks*/ )
158137 {
159138 // MC rec.
160139 // Printf("MC Candidates: %d", candidates.size());
@@ -203,15 +182,11 @@ struct TaskLcMC {
203182 }
204183 }
205184 }
185+
186+ PROCESS_SWITCH (TaskLc, processMC, " Process MC" , false );
206187};
207188
208189WorkflowSpec defineDataProcessing (ConfigContext const & cfgc)
209190{
210- WorkflowSpec workflow{
211- adaptAnalysisTask<TaskLc>(cfgc, TaskName{" hf-task-lc" })};
212- const bool doMC = cfgc.options ().get <bool >(" doMC" );
213- if (doMC) {
214- workflow.push_back (adaptAnalysisTask<TaskLcMC>(cfgc, TaskName{" hf-task-lc-mc" }));
215- }
216- return workflow;
191+ return WorkflowSpec{adaptAnalysisTask<TaskLc>(cfgc, TaskName{" hf-task-lc" })};
217192}
0 commit comments