ROOTPWA
TPDGEntry.h
Go to the documentation of this file.
1 
2 //
3 // Copyright 2009 Sebastian Neubert
4 //
5 // This file is part of rootpwa
6 //
7 // rootpwa is free software: you can redistribute it and/or modify
8 // it under the terms of the GNU General Public License as published by
9 // the Free Software Foundation, either version 3 of the License, or
10 // (at your option) any later version.
11 //
12 // rootpwa is distributed in the hope that it will be useful,
13 // but WITHOUT ANY WARRANTY; without even the implied warranty of
14 // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
15 // GNU General Public License for more details.
16 //
17 // You should have received a copy of the GNU General Public License
18 // along with rootpwa. If not, see <http://www.gnu.org/licenses/>.
19 //
21 //-----------------------------------------------------------
22 // Description:
23 // Data class reading extended PDG table
24 // PDG table files available from
25 // http://pdg.lbl.gov/2008/html/computer_read.html
26 //
27 //
28 // Author List:
29 // Sebastian Neubert TUM (original author)
30 //
31 //
32 //-----------------------------------------------------------
33 
34 #ifndef TPDGENTRY_HH
35 #define TPDGENTRY_HH
36 
37 // Base Class Headers ----------------
38 #include "TObject.h"
39 
40 // Collaborating Class Headers -------
41 #include <ostream> // remove if you do not need streaming op
42 #include <istream>
43 #include "TString.h"
44 
45 // Collaborating Class Declarations --
46 
47 
48 class TPDGEntry : public TObject {
49 public:
50 
51  enum PDG_AntiparticleFlag { B , F , blank };
53 
54  // Codes in pdg docu: F S D R
56 
57 
58  // Constructors/Destructors ---------
60  virtual ~TPDGEntry(){};
61 
62  // Operators
63  friend bool operator== (const TPDGEntry& lhs, const TPDGEntry& rhs);
64  friend std::istream& operator>> (std::istream& s, TPDGEntry& me);
65 
66  // Accessors -----------------------
67  double mass() const {return _mass;}
68  double mass_er() const {return 0.5*(_mass_en+_mass_ep);}
69  void mass_errors(double& lower, double& upper) const
70  {upper=_mass_ep;lower=_mass_en;}
71  double width() const {return _width;}
72  double width_er() const {return 0.5*(_width_en+_width_ep);}
73  void width_errors(double& lower, double& upper) const
74  {upper=_width_ep;lower=_width_en;}
75  double I() const {return _I;}
76  double J() const {return _J;}
77  int G() const {return _G;}
78  int P() const {return _P;}
79  int C() const {return _C;}
80  PDG_AntiparticleFlag aflag() const {return _aflag;}
81  int pdgID() const {return _pdgID;}
82  double q() const {return _q;}
83  PDG_BaryonRank R() const {return _R;}
84  PDG_Status status() const {return _status;}
85  TString name() const {return _name;}
86  TString quarks() const {return _quark_content;}
87  bool isLightMeson() const;
88  bool isExotic() const;
89 
90  // Modifiers -----------------------
91 
92 
93  // Operations ----------------------
94  virtual void Print(const Option_t* = 0) const;
95 
96 private:
97 
98  // Private Data Members ------------
99  double _mass; // mass
100  double _mass_en; // negative error for mass
101  double _mass_ep; // positive error for mass
102  double _width;
103  double _width_en;
104  double _width_ep;
105  double _I; // Isospin
106  int _G; // G-Parity
107  double _J; // Total Spin
108  int _P; // Space Parity
109  int _C; // Charge Conjugation Parity
110  PDG_AntiparticleFlag _aflag; // see pdg docu for details
111  int _pdgID; // Monte Carlo ID
112  double _q; // electric charge
113  PDG_BaryonRank _R; // 4: Existance Certain ... 1: Evidence is poor
114  PDG_Status _status; // particle status
115  TString _name;
116  TString _quark_content;
117 
118  // Private Methods -----------------
119  // for printing
120  TString Istr() const;
121  TString Gstr() const;
122  TString Jstr() const;
123  TString Pstr() const;
124  TString Cstr() const;
125  TString Statstr() const;
126 
127 
128 public:
129  ClassDef(TPDGEntry,1)
130 
131 };
132 
133 #endif
134 
135 //--------------------------------------------------------------
136 // $Log$
137 //--------------------------------------------------------------