CbmRoot
Loading...
Searching...
No Matches
KfParticlePDG.h
Go to the documentation of this file.
1/* Copyright (C) 2024 GSI Helmholtzzentrum fuer Schwerionenforschung, Darmstadt
2 SPDX-License-Identifier: GPL-3.0-only
3 Authors: Sergei Zharko [committer] */
4
9
10#pragma once
11
12#include "KfDefs.h"
13
14namespace cbm::algo::kf
15{
18 class alignas(VcMemAlign) ParticlePDG {
23 constexpr ParticlePDG(int pid, double mass, bool bremsstr) : fMass(mass), fPid(pid), fbBremsstrahlung(bremsstr) {}
24
26 ParticlePDG() = delete;
27
29 constexpr double GetMass() const { return fMass; }
30
32 constexpr double GetMassSq() const { return fMass * fMass; }
33
35 constexpr int GetPid() const { return fPid; }
36
38 constexpr bool IfBremsstrahlung() const { return fbBremsstrahlung; }
39
40 private:
41 double fMass{};
42 int fPid{};
43 bool fbBremsstrahlung{false};
44 };
45
46 // Predefined particle definitions
47 namespace particle
48 {
49 constexpr auto Electron = ParticlePDG(11, defs::ElectronMass<double>, true);
50 constexpr auto Muon = ParticlePDG(13, defs::MuonMass<double>, false);
51 constexpr auto Pion = ParticlePDG(211, defs::PionMass<double>, false);
52 constexpr auto Kaon = ParticlePDG(321, defs::KaonMass<double>, false);
53 constexpr auto Proton = ParticlePDG(2212, defs::ProtonMass<double>, false);
54 } // namespace particle
55
56} // namespace cbm::algo::kf
Common constant definitions for the Kalman Filter library.
Properties of a tracked particle.
constexpr ParticlePDG(int pid, double mass, bool bremsstr)
Constructor from parameters.
constexpr double GetMassSq() const
Gets squared particle mass [(GeV/c2)2].
constexpr bool IfBremsstrahlung() const
Gets bremsstrahlung flag.
ParticlePDG()=delete
Default constructor.
constexpr double GetMass() const
Gets particle mass [GeV/c2].
constexpr int GetPid() const
Gets particle PID (NOTE: absolute value is used)
constexpr auto Electron