laura is hosted by Hepforge, IPPP Durham
Laura++  v3r5
A maximum likelihood fitting package for performing Dalitz-plot analysis.
LauParticlePDG.hh
Go to the documentation of this file.
1 
2 /*
3 Copyright 2008 University of Warwick
4 
5 Licensed under the Apache License, Version 2.0 (the "License");
6 you may not use this file except in compliance with the License.
7 You may obtain a copy of the License at
8 
9  http://www.apache.org/licenses/LICENSE-2.0
10 
11 Unless required by applicable law or agreed to in writing, software
12 distributed under the License is distributed on an "AS IS" BASIS,
13 WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
14 See the License for the specific language governing permissions and
15 limitations under the License.
16 */
17 
18 /*
19 Laura++ package authors:
20 John Back
21 Paul Harrison
22 Thomas Latham
23 */
24 
35 #ifndef LAU_PARTICLE_PDG
36 #define LAU_PARTICLE_PDG
37 
38 #include "TMath.h"
39 #include "TString.h"
40 
41 class TParticlePDG;
42 
44 
45  public:
47  virtual ~LauParticlePDG();
48 
50 
53  const LauParticlePDG* antiParticle() const { return antiParticle_; }
54 
56 
59  Int_t code() const;
60 
62 
65  Int_t conjugateCode() const;
66 
68 
71  Int_t type() const { return TMath::Abs( this->code() ); }
72 
74 
77  Int_t charge() const;
78 
80 
83  Double_t mass() const { return mass_; }
84 
86 
89  Double_t massSq() const { return mass_*mass_; }
90 
92 
95  Bool_t isKaon() const { return kaon_; }
96 
98 
101  Bool_t isPion() const { return pion_; }
102 
104 
107  Bool_t isKs() const { return ks_; }
108 
110 
113  Bool_t isPi0() const { return pi0_; }
114 
116 
119  Bool_t isD() const { return D_; }
120 
122 
125  Bool_t isB() const { return B_; }
126 
128 
131  TString string() const;
132 
134 
137  TString stringAlphaNum() const;
138 
139  protected:
140 
141  private:
143  friend class LauDatabasePDG;
144 
146 
149  explicit LauParticlePDG(const TParticlePDG* particle);
150 
152  LauParticlePDG(const LauParticlePDG& rhs);
153 
156 
158 
161  void setAntiParticle( const LauParticlePDG* antiPart ) { antiParticle_ = antiPart; }
162 
164  const TParticlePDG* theParticle_;
165 
168 
170  Double_t mass_;
171 
173  Bool_t kaon_;
175  Bool_t pion_;
177  Bool_t ks_;
179  Bool_t pi0_;
181  Bool_t D_;
183  Bool_t B_;
184 
185  ClassDef(LauParticlePDG,0)
186 
187 };
188 
189 #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.