@@ -33,27 +33,15 @@ using namespace o2::framework::expressions;
3333
3434// / Omegac0 analysis task
3535
36- struct HfTaskOmegac0 {
37- Configurable<double > yCandGenMax{" yCandGenMax" , 0.5 , " max. gen particle rapidity" };
38- Configurable<double > yCandRecoMax{" yCandRecoMax" , 0.8 , " max. cand. rapidity" };
39- Configurable<int > selectionFlagOmegac0{" selectionFlagOmegac0" , 1 , " Selection Flag for Omegac0 candidates" };
40-
36+ struct HfTaskOmegac0ToOmegapi {
4137 // ML inference
4238 Configurable<bool > applyMl{" applyMl" , false , " Flag to apply ML selections" };
43-
44- // ThnSparse for ML outputScores and Vars
45- ConfigurableAxis thnConfigAxisPromptScore{" thnConfigAxisPromptScore" , {50 , 0 , 1 }, " Prompt score bins" };
46- ConfigurableAxis thnConfigAxisMass{" thnConfigAxisMass" , {120 , 2.4 , 3.1 }, " Cand. inv-mass bins" };
47- ConfigurableAxis thnConfigAxisPtB{" thnConfigAxisPtB" , {1000 , 0 , 100 }, " Cand. beauty mother pTB bins" };
48- ConfigurableAxis thnConfigAxisPt{" thnConfigAxisPt" , {100 , 0 , 20 }, " Cand. pT bins" };
49- ConfigurableAxis thnConfigAxisY{" thnConfigAxisY" , {20 , -1 , 1 }, " Cand. rapidity bins" };
50- ConfigurableAxis thnConfigAxisOrigin{" thnConfigAxisOrigin" , {3 , -0.5 , 2.5 }, " Cand. origin type" };
51- ConfigurableAxis thnConfigAxisCandType{" thnConfigAxisCandType" , {6 , -0.5 , 5.5 }, " Omegac0 type" };
52- ConfigurableAxis thnConfigAxisGenPtD{" thnConfigAxisGenPtD" , {500 , 0 , 50 }, " Gen Pt D" };
53- ConfigurableAxis thnConfigAxisGenPtB{" thnConfigAxisGenPtB" , {1000 , 0 , 100 }, " Gen Pt B" };
54- ConfigurableAxis thnConfigAxisNumPvContr{" thnConfigAxisNumPvContr" , {200 , -0.5 , 199.5 }, " Number of PV contributors" };
39+ Configurable<bool > selectionFlagOmegac0{" selectionFlagOmegac0" , false , " Selection Flag for Omegac0 candidates" };
40+ Configurable<double > yCandGenMax{" yCandGenMax" , 0.5 , " max. gen particle rapidity" };
41+ Configurable<double > yCandRecoMax{" yCandRecoMax" , 0.8 , " max. cand. rapidity" };
5542
5643 HfHelper hfHelper;
44+ SliceCache cache;
5745 using MyTracksWMc = soa::Join<aod::Tracks, aod::TracksIU, aod::McTrackLabels>;
5846
5947 using Omegac0Candidates = soa::Join<aod::HfCandToOmegaPi, aod::HfSelToOmegaPi>;
@@ -67,11 +55,20 @@ struct HfTaskOmegac0 {
6755 using Collisions = soa::Join<aod::Collisions, aod::EvSels>;
6856 using CollisionsWithMcLabels = soa::Join<aod::Collisions, aod::McCollisionLabels, aod::EvSels>;
6957 PresliceUnsorted<CollisionsWithMcLabels> colPerMcCollision = aod::mccollisionlabel::mcCollisionId;
70- SliceCache cache;
7158
72- Partition<Omegac0CandidatesKF> selectedOmegac0CandidatesKF = aod::hf_sel_toomegapi::resultSelections >= selectionFlagOmegac0;
73- Partition<Omegac0CandidatesMlKF> selectedOmegac0CandidatesMlKF = aod::hf_sel_toomegapi::resultSelections >= selectionFlagOmegac0;
59+ Partition<Omegac0CandidatesKF> selectedOmegac0CandidatesKF = aod::hf_sel_toomegapi::resultSelections && ! selectionFlagOmegac0;
60+ Partition<Omegac0CandidatesMlKF> selectedOmegac0CandidatesMlKF = aod::hf_sel_toomegapi::resultSelections && ! selectionFlagOmegac0;
7461
62+ // ThnSparse for ML outputScores and Vars
63+ ConfigurableAxis thnConfigAxisPromptScore{" thnConfigAxisPromptScore" , {50 , 0 , 1 }, " Prompt score bins" };
64+ ConfigurableAxis thnConfigAxisMass{" thnConfigAxisMass" , {120 , 2.4 , 3.1 }, " Cand. inv-mass bins" };
65+ ConfigurableAxis thnConfigAxisPtB{" thnConfigAxisPtB" , {1000 , 0 , 100 }, " Cand. beauty mother pTB bins" };
66+ ConfigurableAxis thnConfigAxisPt{" thnConfigAxisPt" , {100 , 0 , 20 }, " Cand. pT bins" };
67+ ConfigurableAxis thnConfigAxisY{" thnConfigAxisY" , {20 , -1 , 1 }, " Cand. rapidity bins" };
68+ ConfigurableAxis thnConfigAxisOrigin{" thnConfigAxisOrigin" , {3 , -0.5 , 2.5 }, " Cand. origin type" };
69+ ConfigurableAxis thnConfigAxisGenPtD{" thnConfigAxisGenPtD" , {500 , 0 , 50 }, " Gen Pt D" };
70+ ConfigurableAxis thnConfigAxisGenPtB{" thnConfigAxisGenPtB" , {1000 , 0 , 100 }, " Gen Pt B" };
71+ ConfigurableAxis thnConfigAxisNumPvContr{" thnConfigAxisNumPvContr" , {200 , -0.5 , 199.5 }, " Number of PV contributors" };
7572 HistogramRegistry registry{
7673 " registry" ,
7774 {}};
@@ -147,15 +144,15 @@ struct HfTaskOmegac0 {
147144 {
148145 processData<false >(selectedOmegac0CandidatesKF, collisions);
149146 }
150- PROCESS_SWITCH (HfTaskOmegac0 , processDataWithKFParticle, " process taskOmegac0 with KFParticle" , false );
151- // TODO: add processKFParticleCent
147+ PROCESS_SWITCH (HfTaskOmegac0ToOmegapi , processDataWithKFParticle, " process HfTaskOmegac0ToOmegapi with KFParticle" , false );
148+ // TODO: add processKFParticle
152149
153150 void processDataWithKFParticleMl (Omegac0CandidatesMlKF const &, Collisions const & collisions)
154151 {
155152 processData<true >(selectedOmegac0CandidatesMlKF, collisions);
156153 }
157- PROCESS_SWITCH (HfTaskOmegac0 , processDataWithKFParticleMl, " process taskOmegac0 with KFParticle and ML selections" , false );
158- // TODO: add processKFParticleMlCent
154+ PROCESS_SWITCH (HfTaskOmegac0ToOmegapi , processDataWithKFParticleMl, " process HfTaskOmegac0ToOmegapi with KFParticle and ML selections" , false );
155+ // TODO: add processKFParticleMl
159156
160157 template <bool applyMl, typename CandType, typename CollType>
161158 void processMc (const CandType& candidates,
@@ -178,7 +175,7 @@ struct HfTaskOmegac0 {
178175 massOmegac0 = candidate.invMassCharmBaryon ();
179176 auto ptCandidate = candidate.ptCharmBaryon ();
180177 auto rapidityCandidate = candidate.kfRapOmegac ();
181- if (candidate.resultSelections () >= selectionFlagOmegac0)
178+ if (candidate.resultSelections () && ! selectionFlagOmegac0)
182179 if (candidate.flagMcMatchRec () == (1 << aod::hf_cand_xic0_omegac0::DecayType::OmegaczeroToOmegaPi)) {
183180 if constexpr (applyMl) {
184181 registry.fill (HIST (" hBdtScoreVsMassVsPtVsPtBVsYVsOriginVsOmegac0Type" ), candidate.mlProbOmegac ()[0 ], massOmegac0, ptCandidate, rapidityCandidate, candidate.ptBhadMotherPart (), candidate.originRec (), numPvContributors);
@@ -223,8 +220,8 @@ struct HfTaskOmegac0 {
223220 {
224221 processMc<false >(omegaC0CandidatesMcKF, mcParticles, tracks, collisions, mcCollisions);
225222 }
226- PROCESS_SWITCH (HfTaskOmegac0 , processMcWithKFParticle, " Process MC with KFParticle" , false );
227- // TODO: add the processMcWithKFParticleCent
223+ PROCESS_SWITCH (HfTaskOmegac0ToOmegapi , processMcWithKFParticle, " Process MC with KFParticle" , false );
224+ // TODO: add the processMcWithKFParticle
228225
229226 void processMcWithKFParticleMl (Omegac0CandidatesMlMcKF const & omegac0CandidatesMlMcKF,
230227 soa::Join<aod::McParticles, aod::HfToOmegaPiMCGen> const & mcParticles,
@@ -234,11 +231,11 @@ struct HfTaskOmegac0 {
234231 {
235232 processMc<true >(omegac0CandidatesMlMcKF, mcParticles, tracks, collisions, mcCollisions);
236233 }
237- PROCESS_SWITCH (HfTaskOmegac0 , processMcWithKFParticleMl, " Process MC with KFParticle and ML selections" , false );
238- // TODO: add the processMcWithKFParticleMlCent
234+ PROCESS_SWITCH (HfTaskOmegac0ToOmegapi , processMcWithKFParticleMl, " Process MC with KFParticle and ML selections" , false );
235+ // TODO: add the processMcWithKFParticleMl
239236};
240237
241238WorkflowSpec defineDataProcessing (ConfigContext const & cfgc)
242239{
243- return WorkflowSpec{adaptAnalysisTask<HfTaskOmegac0 >(cfgc)};
240+ return WorkflowSpec{adaptAnalysisTask<HfTaskOmegac0ToOmegapi >(cfgc)};
244241}
0 commit comments