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