Fork me on GitHub

source: svn/trunk/interface/PdgParticle.h@ 392

Last change on this file since 392 was 386, checked in by Xavier Rouby, 15 years ago

new file PDG

File size: 1.1 KB
Line 
1#ifndef _PDGPARTICLE_H_
2#define _PDGPARTICLE_H_
3
4#include <string>
5#include <map>
6
7class PdgParticle {
8 public:
9 PdgParticle(): _pid(-999), _mass(0), _charge(0), _gamma_tot(0), _tau(0), _name("Unknown") {};
10 PdgParticle(const int pid, const std::string& name, const float m, const float q, const float gamma, const float tau);
11 PdgParticle(const PdgParticle& p);
12 PdgParticle& operator=(const PdgParticle& p);
13 ~PdgParticle() {};
14 int pid() const {return _pid;};
15 float mass() const {return _mass;};
16 float charge() const {return _charge;};
17 float gamma_tot() const {return _gamma_tot;};
18 float tau() const {return _tau;};
19 std::string name() const {return _name;};
20
21 private:
22 int _pid;
23 float _mass; // GeV
24 float _charge; // in e+
25 float _gamma_tot;
26 float _tau;
27 std::string _name;
28};
29
30class PdgTable {
31 public:
32 PdgTable(){};
33 PdgTable(const PdgTable& table);
34 PdgTable& operator=(const PdgTable& table);
35 ~PdgTable(){};
36 void insert(const int pid, const PdgParticle &p);
37 void print() const;
38 PdgParticle operator[](const int pid) const;
39 private:
40 std::map<int, PdgParticle> _table;
41};
42
43#endif
Note: See TracBrowser for help on using the repository browser.