PandaRoot
KFParticleDatabase.h
Go to the documentation of this file.
1 //****************************************************************************
2 //* This file is part of PandaRoot. *
3 //* *
4 //* PandaRoot is distributed under the terms of the *
5 //* GNU General Public License (GPL) version 3, *
6 //* copied verbatim in the file "LICENSE". *
7 //* *
8 //* Copyright (C) 2006 - 2024 FAIR GmbH and copyright holders of PandaRoot *
9 //* The copyright holders are listed in the file "COPYRIGHTHOLDERS". *
10 //* The authors are listed in the file "AUTHORS". *
11 //****************************************************************************
12 
13 #ifndef KFParticleDatabase_H
14 #define KFParticleDatabase_H
15 
16 #include <map>
17 
19  public:
21 
23 
24  float GetMass(int pdg)
25  {
26  std::map<int, float>::iterator it;
27  it = fMass.find(pdg);
28  if (it != fMass.end())
29  return it->second;
30  else
31  return 0.13957;
32  }
33 
34  static KFParticleDatabase *Instance() { return fDatabase; }
35 
36  private:
37  std::map<int, float> fMass;
38 
39  static KFParticleDatabase *fDatabase;
40 };
41 
42 #endif
float GetMass(int pdg)
static KFParticleDatabase * Instance()