laura is hosted by Hepforge, IPPP Durham
Laura++  v3r0p1
A maximum likelihood fitting package for performing Dalitz-plot analysis.
LauParticlePDG.hh
Go to the documentation of this file.
1 
2 // Copyright University of Warwick 2008 - 2013.
3 // Distributed under the Boost Software License, Version 1.0.
4 // (See accompanying file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
5 
6 // Authors:
7 // Thomas Latham
8 // John Back
9 // Paul Harrison
10 
21 #ifndef LAU_PARTICLE_PDG
22 #define LAU_PARTICLE_PDG
23 
24 #include "TMath.h"
25 #include "TString.h"
26 
27 class TParticlePDG;
28 
30 
31  public:
33  virtual ~LauParticlePDG();
34 
36 
39  const LauParticlePDG* antiParticle() const { return antiParticle_; }
40 
42 
45  Int_t code() const;
46 
48 
51  Int_t conjugateCode() const;
52 
54 
57  Int_t type() const { return TMath::Abs( this->code() ); }
58 
60 
63  Int_t charge() const;
64 
66 
69  Double_t mass() const { return mass_; }
70 
72 
75  Double_t massSq() const { return mass_*mass_; }
76 
78 
81  Bool_t isKaon() const { return kaon_; }
82 
84 
87  Bool_t isPion() const { return pion_; }
88 
90 
93  Bool_t isKs() const { return ks_; }
94 
96 
99  Bool_t isPi0() const { return pi0_; }
100 
102 
105  Bool_t isD() const { return D_; }
106 
108 
111  Bool_t isB() const { return B_; }
112 
114 
117  TString string() const;
118 
120 
123  TString stringAlphaNum() const;
124 
125  protected:
126 
127  private:
129  friend class LauDatabasePDG;
130 
132 
135  explicit LauParticlePDG(const TParticlePDG* particle);
136 
138  LauParticlePDG(const LauParticlePDG& rhs);
139 
142 
144 
147  void setAntiParticle( const LauParticlePDG* antiPart ) { antiParticle_ = antiPart; }
148 
150  const TParticlePDG* theParticle_;
151 
154 
156  Double_t mass_;
157 
159  Bool_t kaon_;
161  Bool_t pion_;
163  Bool_t ks_;
165  Bool_t pi0_;
167  Bool_t D_;
169  Bool_t B_;
170 
171  ClassDef(LauParticlePDG,0)
172 
173 };
174 
175 #endif
TString string() const
Particle name.
Class for storing particle properties.
virtual ~LauParticlePDG()
Destructor.
Double_t mass() const
The mass of the particle.
Bool_t pion_
Flag whether the particle is a pion.
Int_t charge() const
The charge of the particle.
Bool_t kaon_
Flag whether the particle is a kaon.
const TParticlePDG * theParticle_
The particle.
Bool_t ks_
Flag whether the particle is a KS.
Bool_t isKaon() const
Check whether the particle is a kaon (K+, K-, K0, K0bar, KS or KL)
Bool_t isPion() const
Check whether the particle is a pion (pi+, pi- or pi0)
Bool_t pi0_
Flag whether the particle is a pi0.
LauParticlePDG(const TParticlePDG *particle)
Constructor.
Bool_t isPi0() const
Check whether the particle is a pi0.
LauParticlePDG & operator=(const LauParticlePDG &rhs)
Copy assignment operator (not implemented)
Double_t massSq() const
The mass square of the particle.
const LauParticlePDG * antiParticle_
The antiparticle.
const LauParticlePDG * antiParticle() const
Method to access the record for the charge conjugate of this particle.
Bool_t isKs() const
Check whether the particle is a KS.
Bool_t isB() const
Check whether the particle is a B.
TString stringAlphaNum() const
Particle name, containing only alphanumeric characters.
Singleton class that provides access to particle property records.
Double_t mass_
The mass of the particle.
Bool_t isD() const
Check whether the particle is a D.
Bool_t B_
Flag whether the particle is a B.
static const LauParticlePDG * particle(Int_t code)
Get particle object based on the PDG code.
Int_t type() const
The PDG code for the particle/antiparticle.
void setAntiParticle(const LauParticlePDG *antiPart)
Set the antiparticle.
Bool_t D_
Flag whether the particle is a D.
Int_t conjugateCode() const
The anti-particle PDG code.
Int_t code() const
The particle PDG code.