@@ -1882,6 +1882,107 @@ DECLARE_SOA_TABLE(HfCandB0McGen, "AOD", "HFCANDB0MCGEN",
18821882 hf_cand_b0::FlagMcMatchGen,
18831883 hf_cand_b0::OriginMcGen);
18841884
1885+ // specific Bs candidate properties
1886+ namespace hf_cand_bs
1887+ {
1888+ DECLARE_SOA_INDEX_COLUMN_FULL (Prong0, prong0, int , HfCand3Prong, " _0" ); // Ds index
1889+ // MC matching result:
1890+ DECLARE_SOA_COLUMN (FlagMcMatchRec, flagMcMatchRec, int8_t ); // reconstruction level
1891+ DECLARE_SOA_COLUMN (FlagMcMatchGen, flagMcMatchGen, int8_t ); // generator level
1892+ DECLARE_SOA_COLUMN (OriginMcRec, originMcRec, int8_t ); // particle origin, reconstruction level
1893+ DECLARE_SOA_COLUMN (OriginMcGen, originMcGen, int8_t ); // particle origin, generator level
1894+ DECLARE_SOA_COLUMN (DebugMcRec, debugMcRec, int8_t ); // debug flag for mis-association reconstruction level
1895+
1896+ // mapping of decay types
1897+ enum DecayType { BsToDsPi };
1898+
1899+ enum DecayTypeMc : uint8_t { BsToDsPiToKKPiPi = 0 ,
1900+ PartlyRecoDecay,
1901+ OtherDecay,
1902+ NDecayTypeMc};
1903+ // B0s(B0sbar) → Ds∓ π±
1904+ template <typename T>
1905+ auto ctBs (const T& candidate)
1906+ {
1907+ return candidate.ct (RecoDecay::getMassPDG (pdg::Code::kBS ));
1908+ }
1909+
1910+ template <typename T>
1911+ auto yBs (const T& candidate)
1912+ {
1913+ return candidate.y (RecoDecay::getMassPDG (pdg::Code::kBS ));
1914+ }
1915+
1916+ template <typename T>
1917+ auto eBs (const T& candidate)
1918+ {
1919+ return candidate.e (RecoDecay::getMassPDG (pdg::Code::kBS ));
1920+ }
1921+
1922+ template <typename T>
1923+ auto invMassBsToDsPi (const T& candidate)
1924+ {
1925+ return candidate.m (array{RecoDecay::getMassPDG (pdg::Code::kDSBar ), RecoDecay::getMassPDG (kPiPlus )});
1926+ }
1927+
1928+ template <typename T>
1929+ auto cosThetaStarBs (const T& candidate)
1930+ {
1931+ return candidate.cosThetaStar (array{RecoDecay::getMassPDG (pdg::Code::kDSBar ), RecoDecay::getMassPDG (kPiPlus )}, RecoDecay::getMassPDG (pdg::Code::kBS ), 1 );
1932+ }
1933+ } // namespace hf_cand_bs
1934+
1935+ // declare dedicated Bs decay candidate table
1936+ DECLARE_SOA_TABLE (HfCandBsBase, " AOD" , " HFCANDBSBASE" ,
1937+ // general columns
1938+ HFCAND_COLUMNS ,
1939+ // 2-prong specific columns
1940+ hf_cand::PxProng0, hf_cand::PyProng0, hf_cand::PzProng0,
1941+ hf_cand::PxProng1, hf_cand::PyProng1, hf_cand::PzProng1,
1942+ hf_cand::ImpactParameter0, hf_cand::ImpactParameter1,
1943+ hf_cand::ErrorImpactParameter0, hf_cand::ErrorImpactParameter1,
1944+ hf_cand_bs::Prong0Id, hf_track_index::Prong1Id,
1945+ hf_track_index::HFflag,
1946+ /* dynamic columns */
1947+ hf_cand_2prong::M<hf_cand::PxProng0, hf_cand::PyProng0, hf_cand::PzProng0, hf_cand::PxProng1, hf_cand::PyProng1, hf_cand::PzProng1>,
1948+ hf_cand_2prong::M2 <hf_cand::PxProng0, hf_cand::PyProng0, hf_cand::PzProng0, hf_cand::PxProng1, hf_cand::PyProng1, hf_cand::PzProng1>,
1949+ hf_cand_2prong::ImpactParameterProduct<hf_cand::ImpactParameter0, hf_cand::ImpactParameter1>,
1950+ hf_cand_2prong::CosThetaStar<hf_cand::PxProng0, hf_cand::PyProng0, hf_cand::PzProng0, hf_cand::PxProng1, hf_cand::PyProng1, hf_cand::PzProng1>,
1951+ hf_cand_2prong::ImpactParameterProngSqSum<hf_cand::ImpactParameter0, hf_cand::ImpactParameter1>,
1952+ /* dynamic columns that use candidate momentum components */
1953+ hf_cand::Pt<hf_cand_2prong::Px, hf_cand_2prong::Py>,
1954+ hf_cand::Pt2<hf_cand_2prong::Px, hf_cand_2prong::Py>,
1955+ hf_cand::P<hf_cand_2prong::Px, hf_cand_2prong::Py, hf_cand_2prong::Pz>,
1956+ hf_cand::P2 <hf_cand_2prong::Px, hf_cand_2prong::Py, hf_cand_2prong::Pz>,
1957+ hf_cand::PVector<hf_cand_2prong::Px, hf_cand_2prong::Py, hf_cand_2prong::Pz>,
1958+ hf_cand::CPA <collision::PosX, collision::PosY, collision::PosZ, hf_cand::XSecondaryVertex, hf_cand::YSecondaryVertex, hf_cand::ZSecondaryVertex, hf_cand_2prong::Px, hf_cand_2prong::Py, hf_cand_2prong::Pz>,
1959+ hf_cand::CPAXY <collision::PosX, collision::PosY, hf_cand::XSecondaryVertex, hf_cand::YSecondaryVertex, hf_cand_2prong::Px, hf_cand_2prong::Py>,
1960+ hf_cand::Ct<collision::PosX, collision::PosY, collision::PosZ, hf_cand::XSecondaryVertex, hf_cand::YSecondaryVertex, hf_cand::ZSecondaryVertex, hf_cand_2prong::Px, hf_cand_2prong::Py, hf_cand_2prong::Pz>,
1961+ hf_cand::ImpactParameterXY<collision::PosX, collision::PosY, collision::PosZ, hf_cand::XSecondaryVertex, hf_cand::YSecondaryVertex, hf_cand::ZSecondaryVertex, hf_cand_2prong::Px, hf_cand_2prong::Py, hf_cand_2prong::Pz>,
1962+ hf_cand_2prong::MaxNormalisedDeltaIP<collision::PosX, collision::PosY, hf_cand::XSecondaryVertex, hf_cand::YSecondaryVertex, hf_cand::ErrorDecayLengthXY, hf_cand_2prong::Px, hf_cand_2prong::Py, hf_cand::ImpactParameter0, hf_cand::ErrorImpactParameter0, hf_cand::ImpactParameter1, hf_cand::ErrorImpactParameter1, hf_cand::PxProng0, hf_cand::PyProng0, hf_cand::PxProng1, hf_cand::PyProng1>,
1963+ hf_cand::Eta<hf_cand_2prong::Px, hf_cand_2prong::Py, hf_cand_2prong::Pz>,
1964+ hf_cand::Phi<hf_cand_2prong::Px, hf_cand_2prong::Py>,
1965+ hf_cand::Y<hf_cand_2prong::Px, hf_cand_2prong::Py, hf_cand_2prong::Pz>,
1966+ hf_cand::E<hf_cand_2prong::Px, hf_cand_2prong::Py, hf_cand_2prong::Pz>,
1967+ hf_cand::E2 <hf_cand_2prong::Px, hf_cand_2prong::Py, hf_cand_2prong::Pz>);
1968+
1969+ // extended table with expression columns that can be used as arguments of dynamic columns
1970+ DECLARE_SOA_EXTENDED_TABLE_USER (HfCandBsExt, HfCandBsBase, " HFCANDBSEXT" ,
1971+ hf_cand_2prong::Px, hf_cand_2prong::Py, hf_cand_2prong::Pz);
1972+
1973+ using HfCandBs = HfCandBsExt;
1974+
1975+ // table with results of reconstruction level MC matching
1976+ DECLARE_SOA_TABLE (HfCandBsMcRec, " AOD" , " HFCANDBSMCREC" ,
1977+ hf_cand_bs::FlagMcMatchRec,
1978+ hf_cand_bs::OriginMcRec,
1979+ hf_cand_bs::DebugMcRec);
1980+
1981+ // table with results of generator level MC matching
1982+ DECLARE_SOA_TABLE (HfCandBsMcGen, " AOD" , " HFCANDBSMCGEN" ,
1983+ hf_cand_bs::FlagMcMatchGen,
1984+ hf_cand_bs::OriginMcGen);
1985+
18851986// specific Σc0,++ candidate properties
18861987namespace hf_cand_sigmac
18871988{
0 commit comments