@@ -37,7 +37,7 @@ namespace o2::aod
3737// Ds+ → K− K+ π+ (todo)
3838
3939// composite species
40- // B0 → D− π+ (todo)
40+ // B0 → D− π+
4141// B+ → D0 π+
4242// D*+ → D0 π+ (todo)
4343
@@ -203,6 +203,16 @@ DECLARE_SOA_COLUMN(FlagMcDecayChanGen, flagMcDecayChanGen, int8_t); //! resonant
203203 hf_track_index::Prong2Id, \
204204 o2::soa::Marker<Marker##_hf_type_>);
205205
206+ // Declares the table with global indices for 4-prong candidates (Ids).
207+ #define DECLARE_TABLE_CAND_ID_4P (_hf_type_, _hf_description_ ) \
208+ DECLARE_SOA_TABLE_STAGED (Hf##_hf_type_##Ids, " HF" _hf_description_ " ID" , \
209+ hf_cand::CollisionId, \
210+ hf_track_index::Prong0Id, \
211+ hf_track_index::Prong1Id, \
212+ hf_track_index::Prong2Id, \
213+ hf_track_index::Prong3Id, \
214+ o2::soa::Marker<Marker##_hf_type_>);
215+
206216// Declares the table with candidate selection flags (Sels).
207217#define DECLARE_TABLE_CAND_SEL (_hf_type_, _hf_description_ ) \
208218 DECLARE_SOA_TABLE_STAGED (Hf##_hf_type_##Sels, " HF" _hf_description_ " SEL" , \
@@ -266,6 +276,44 @@ DECLARE_SOA_COLUMN(FlagMcDecayChanGen, flagMcDecayChanGen, int8_t); //! resonant
266276 DECLARE_TABLES_COMMON (_hf_type_, _hf_description_, _hf_namespace_) \
267277 DECLARE_TABLE_CAND_ID_3P (_hf_type_, _hf_description_)
268278
279+ #define DECLARE_TABLES_4P (_hf_type_, _hf_description_, _hf_namespace_, _marker_number_ ) \
280+ constexpr uint Marker##_hf_type_ = _marker_number_; \
281+ DECLARE_TABLES_COMMON (_hf_type_, _hf_description_, _hf_namespace_) \
282+ DECLARE_TABLE_CAND_ID_4P (_hf_type_, _hf_description_)
283+
284+ // Workaround for the existing B0 macro in termios.h
285+ #define DECLARE_TABLES_B0 (_hf_type_, _hf_description_, _hf_namespace_, _marker_number_ ) \
286+ constexpr uint Marker##_hf_type_ = _marker_number_; \
287+ DECLARE_TABLES_COLL (B0, _hf_description_) \
288+ DECLARE_TABLES_MCCOLL (B0, _hf_description_, _hf_namespace_) \
289+ DECLARE_TABLE_CAND_BASE (B0, _hf_description_, _hf_namespace_) \
290+ DECLARE_TABLE_CAND_SEL (B0, _hf_description_) \
291+ DECLARE_TABLE_MCPARTICLE_BASE (B0, _hf_description_, _hf_namespace_) \
292+ DECLARE_TABLE_MCPARTICLE_ID (B0, _hf_description_) \
293+ DECLARE_TABLE_CAND_ID_4P (B0, _hf_description_)
294+
295+ // Debugging start
296+
297+ #define DECLARE_TABLES_4P_GOOD (_hf_type_, _hf_description_, _hf_namespace_, _marker_number_ ) \
298+ constexpr uint Marker##_hf_type_ = _marker_number_; \
299+ DECLARE_SOA_TABLE_STAGED (Hf##_hf_type_##CollBases, " HF" _hf_description_ " COLLBASE" , \
300+ collision::PosX, \
301+ o2::soa::Marker<Marker##_hf_type_>);
302+
303+ #define DECLARE_TABLES_TEST (_hf_type_, _hf_description_ ) \
304+ DECLARE_SOA_TABLE_STAGED (Hf##_hf_type_##CollBases, " HF" _hf_description_ " COLLBASE" , \
305+ collision::PosX, \
306+ o2::soa::Marker<Marker##_hf_type_>);
307+
308+ #define DECLARE_TABLES_4P_BAD (_hf_type_, _hf_description_, _hf_namespace_, _marker_number_ ) \
309+ constexpr uint Marker##_hf_type_ = _marker_number_; \
310+ DECLARE_TABLES_TEST (_hf_type_, _hf_description_) // macro B0 gets expanded here!
311+
312+ // DECLARE_TABLES_4P_GOOD(B0, "B0", b0, 6); // compiles
313+ // DECLARE_TABLES_4P_BAD(B0, "B0", b0, 6); // fails with "'Marker0000000' was not declared in this scope"
314+
315+ // Debugging end
316+
269317// ================
270318// Declarations of common tables for individual species
271319// ================
@@ -274,6 +322,13 @@ DECLARE_TABLES_2P(D0, "D0", d0, 2);
274322DECLARE_TABLES_3P (Lc, " LC" , lc, 3 );
275323DECLARE_TABLES_3P (Dplus, " DP" , dplus, 4 );
276324DECLARE_TABLES_3P (Bplus, " BP" , bplus, 5 );
325+ // Workaround for the existing B0 macro in termios.h
326+ #pragma push_macro("B0")
327+ #undef B0
328+ DECLARE_TABLES_4P (B0, " B0" , b0, 6 );
329+ #pragma pop_macro("B0")
330+ // Otherwise, avoid macro nesting and give the explicit string as argument:
331+ // DECLARE_TABLES_B0(B0, "B0", b0, 6);
277332
278333// ================
279334// Additional species-specific candidate tables
@@ -580,6 +635,86 @@ DECLARE_SOA_TABLE_STAGED(HfBplusMcs, "HFBPMC", //! Table with MC candidate info
580635 hf_cand_mc::OriginMcRec,
581636 o2::soa::Marker<MarkerBplus>);
582637
638+ // ----------------
639+ // B0
640+ // ----------------
641+
642+ // candidates for removal:
643+ // PxProng0, PyProng0, PzProng0,... (same for 1, 2), we can keep Pt, Eta, Phi instead
644+ // XY: CpaXY, DecayLengthXY, ErrorDecayLengthXY
645+ // normalised: DecayLengthNormalised, DecayLengthXYNormalised, ImpactParameterNormalised0
646+ DECLARE_SOA_TABLE_STAGED (HfB0Pars, " HFB0PAR" , // ! Table with candidate properties used for selection
647+ hf_cand::Chi2PCA,
648+ hf_cand_par::Cpa,
649+ hf_cand_par::CpaXY,
650+ hf_cand_par::DecayLength,
651+ hf_cand_par::DecayLengthXY,
652+ hf_cand_par::DecayLengthNormalised,
653+ hf_cand_par::DecayLengthXYNormalised,
654+ hf_cand_par::PtProng0,
655+ hf_cand_par::PtProng1,
656+ hf_cand::ImpactParameter0,
657+ hf_cand::ImpactParameter1,
658+ hf_cand_par::ImpactParameterNormalised0,
659+ hf_cand_par::ImpactParameterNormalised1,
660+ hf_cand_par::NSigTpcPiExpPi,
661+ hf_cand_par::NSigTofPiExpPi,
662+ hf_cand_par::NSigTpcTofPiExpPi,
663+ hf_cand_par::NSigTpcKaExpPi,
664+ hf_cand_par::NSigTofKaExpPi,
665+ hf_cand_par::NSigTpcTofKaExpPi,
666+ hf_cand_par::MaxNormalisedDeltaIP,
667+ hf_cand_par::ImpactParameterProduct,
668+ o2::soa::Marker<MarkerB0>);
669+
670+ DECLARE_SOA_TABLE_STAGED (HfB0ParDpluss, " HFB0PARDP" , // ! Table with D+ candidate properties used for selection of B0
671+ hf_cand_par_charm::CpaCharm,
672+ hf_cand_par_charm::DecayLengthCharm,
673+ hf_cand_par_charm::ImpactParameter0Charm,
674+ hf_cand_par_charm::ImpactParameter1Charm,
675+ hf_cand_par_charm::ImpactParameterProductCharm,
676+ hf_cand_par_charm::NSigTpcPiExpPiCharm,
677+ hf_cand_par_charm::NSigTofPiExpPiCharm,
678+ hf_cand_par_charm::NSigTpcTofPiExpPiCharm,
679+ hf_cand_par_charm::NSigTpcKaExpPiCharm,
680+ hf_cand_par_charm::NSigTofKaExpPiCharm,
681+ hf_cand_par_charm::NSigTpcTofKaExpPiCharm,
682+ hf_cand_par_charm::NSigTpcPiExpKaCharm,
683+ hf_cand_par_charm::NSigTofPiExpKaCharm,
684+ hf_cand_par_charm::NSigTpcTofPiExpKaCharm,
685+ hf_cand_par_charm::NSigTpcKaExpKaCharm,
686+ hf_cand_par_charm::NSigTofKaExpKaCharm,
687+ hf_cand_par_charm::NSigTpcTofKaExpKaCharm);
688+
689+ DECLARE_SOA_TABLE_STAGED (HfB0ParEs, " HFB0PARE" , // ! Table with additional candidate properties used for selection
690+ hf_cand::XSecondaryVertex,
691+ hf_cand::YSecondaryVertex,
692+ hf_cand::ZSecondaryVertex,
693+ hf_cand::ErrorDecayLength,
694+ hf_cand::ErrorDecayLengthXY,
695+ hf_cand_par::RSecondaryVertex,
696+ hf_cand_par::PProng1,
697+ hf_cand::PxProng1,
698+ hf_cand::PyProng1,
699+ hf_cand::PzProng1,
700+ hf_cand::ErrorImpactParameter1,
701+ hf_cand_par::CosThetaStar,
702+ hf_cand_par::Ct,
703+ o2::soa::Marker<MarkerB0>);
704+
705+ DECLARE_SOA_TABLE_STAGED (HfB0Mls, " HFB0ML" , // ! Table with candidate selection ML scores
706+ hf_cand_mc::MlScoreSig,
707+ o2::soa::Marker<MarkerB0>);
708+
709+ DECLARE_SOA_TABLE_STAGED (HfB0MlDpluss, " HFB0MLDP" , // ! Table with D+ candidate selection ML scores
710+ hf_cand_mc_charm::MlScoresCharm,
711+ o2::soa::Marker<MarkerB0>);
712+
713+ DECLARE_SOA_TABLE_STAGED (HfB0Mcs, " HFB0MC" , // ! Table with MC candidate info
714+ hf_cand_mc::FlagMcMatchRec,
715+ hf_cand_mc::OriginMcRec,
716+ o2::soa::Marker<MarkerB0>);
717+
583718// ----------------
584719// Lc
585720// ----------------
0 commit comments