Geant4 10.7.0
Toolkit for the simulation of the passage of particles through matter
Loading...
Searching...
No Matches
G4ParticlePropertyData.hh
Go to the documentation of this file.
1//
2// ********************************************************************
3// * License and Disclaimer *
4// * *
5// * The Geant4 software is copyright of the Copyright Holders of *
6// * the Geant4 Collaboration. It is provided under the terms and *
7// * conditions of the Geant4 Software License, included in the file *
8// * LICENSE and available at http://cern.ch/geant4/license . These *
9// * include a list of copyright holders. *
10// * *
11// * Neither the authors of this software system, nor their employing *
12// * institutes,nor the agencies providing financial support for this *
13// * work make any representation or warranty, express or implied, *
14// * regarding this software system or assume any liability for its *
15// * use. Please see the license in the file LICENSE and URL above *
16// * for the full disclaimer and the limitation of liability. *
17// * *
18// * This code implementation is the result of the scientific and *
19// * technical work of the GEANT4 collaboration. *
20// * By using, copying, modifying or distributing the software (or *
21// * any work based on the software) you agree to acknowledge its *
22// * use in resulting scientific publications, and indicate your *
23// * acceptance of all terms of the Geant4 Software license. *
24// ********************************************************************
25//
26// G4ParticlePropertyData
27//
28// Class description:
29//
30// This class contains properties of a particle which are a subset
31// of properties in G4ParticleDefinition.
32// This class is used only for G4ParticlePropertyTable.
33
34// Author: H.Kurashige, 9 June 2003
35// --------------------------------------------------------------------
36#ifndef G4ParticlePropertyData_hh
37#define G4ParticlePropertyData_hh 1
38
39#include "globals.hh"
40#include "G4ios.hh"
41
43
45{
47
48 public:
49
50 G4ParticlePropertyData(const G4String& particleName = "");
51 // The particle name should be assigned
52 // The name cannot be changed except by assignment operator
53
55
57
59
60 G4bool operator==(const G4ParticlePropertyData& right) const;
61 G4bool operator!=(const G4ParticlePropertyData& right) const;
62
63 // With the following accessors, one can get values
64 // for members which cannot be changed
65
66 const G4String& GetParticleName() const { return theParticleName; }
67
68 G4double GetPDGMass() const { return thePDGMass; }
69 G4double GetPDGWidth() const { return thePDGWidth; }
70 G4double GetPDGCharge() const { return thePDGCharge; }
71
72 G4int GetPDGiSpin() const { return thePDGiSpin; }
73 G4int GetPDGiParity() const { return thePDGiParity; }
74 G4int GetPDGiConjugation() const { return thePDGiConjugation; }
75 G4int GetPDGiIsospin() const { return thePDGiIsospin; }
76 G4int GetPDGiIsospin3() const { return thePDGiIsospin3; }
77 G4int GetPDGiGParity() const { return thePDGiGParity; }
78
79 G4double GetPDGMagneticMoment() const { return thePDGMagneticMoment; }
80
81 G4int GetLeptonNumber() const { return theLeptonNumber; }
82 G4int GetBaryonNumber() const { return theBaryonNumber; }
83
84 G4int GetPDGEncoding() const { return thePDGEncoding; }
85 G4int GetAntiPDGEncoding() const { return theAntiPDGEncoding; }
86
87 inline G4int GetQuarkContent(G4int flavor) const;
88 inline G4int GetAntiQuarkContent(G4int flavor) const;
89 // Return the number of quark with flavor contained in this particle.
90 // The value of flavor is assigned as follows:
91 // 1:d, 2:u, 3:s, 4:c, 5:b, 6:t
92
93 G4double GetPDGLifeTime() const { return thePDGLifeTime; }
94
95 // Modifiers
96
97 inline void SetPDGMass(G4double newMass);
98 inline void SetPDGWidth(G4double newWidth);
99 inline void SetPDGCharge(G4double newCharge);
100
101 inline void SetPDGiSpin(G4int newSpin);
102 inline void SetPDGiParity(G4int newParity);
103 inline void SetPDGiConjugation(G4int newConjugation);
104 inline void SetPDGiIsospin(G4int newIsospin);
105 inline void SetPDGiIsospin3(G4int newIsospin3);
106 inline void SetPDGiGParity(G4int newGParity);
107
108 inline void SetPDGMagneticMoment(G4double magneticMoment);
109
110 inline void SetLeptonNumber(G4int newLeptonNumber);
111 inline void SetBaryonNumber(G4int newBaryonNumber);
112
113 inline void SetPDGEncoding(G4int newEncoding);
114 inline void SetAntiPDGEncoding(G4int newAntiEncoding);
115
116 inline void SetQuarkContent(G4int flavor, G4int newContent);
117 inline void SetAntiQuarkContent(G4int flavor, G4int newContent);
118 inline void SetPDGLifeTime(G4double newLifeTime);
119
120 void Print() const;
121 // Prints information of data members
122
123 inline void SetVerboseLevel(G4int value);
124 inline G4int GetVerboseLevel() const;
125 // Control flag for output message
126 // 0: Silent
127 // 1: Warning message
128 // 2: More
129
130 private:
131
132 G4String theParticleName = "";
133 // The name of the particle.
134
135 G4double thePDGMass = 0.0;
136 // The mass of the particle, in units of equivalent energy.
137
138 G4double thePDGWidth = 0.0;
139 // The decay width of the particle, usually the width of a
140 // Breit-Wigner function, assuming that you are near the
141 // mass center anyway (in units of equivalent energy).
142
143 G4double thePDGCharge = 0.0;
144 // The charge of the particle (in units of Coulomb).
145
146 // ---- following members are quantum number
147 // i.e. discrete numbers can be allowed
148 // So, you can define only by using integer in constructor
149
150 G4int thePDGiSpin = 0;
151 // The total spin of the particle, also often denoted as
152 // capital J, in units of 1/2.
153
154 G4int thePDGiParity = 0;
155 // The parity quantum number, in units of 1. If the parity
156 // is not defined for this particle, we will set this to 0.
157
158 G4int thePDGiConjugation = 0;
159 // This charge conjugation quantum number in units of 1.
160
161 G4int thePDGiGParity = 0;
162 // The value of the G-parity quantum number.
163
164 G4int thePDGiIsospin = 0;
165 G4int thePDGiIsospin3 = 0;
166 // The isospin and its 3rd-component in units of 1/2.
167
168 G4double thePDGMagneticMoment = 0.0;
169 // The magnetic moment.
170
171 G4int theLeptonNumber = 0;
172 // The lepton quantum number.
173
174 G4int theBaryonNumber = 0;
175 // The baryon quantum number.
176
177 G4int thePDGEncoding = 0;
178 // The Particle Data Group integer identifier of this particle
179
180 G4int theAntiPDGEncoding = 0;
181 // The Particle Data Group integer identifier of the anti-particle
182
183 G4double thePDGLifeTime = -1.0;
184 // The Particle Life Time
185
186 enum { NumberOfQuarkFlavor = 6 };
187
188 G4int theQuarkContent[NumberOfQuarkFlavor];
189 G4int theAntiQuarkContent[NumberOfQuarkFlavor];
190 // The number of quark (minus Sign means anti-quark) contents
191
192 private:
193
194 G4bool fPDGMassModified = false;
195 G4bool fPDGWidthModified = false;
196 G4bool fPDGChargeModified = false;
197 G4bool fPDGiSpinModified = false;
198 G4bool fPDGiParityModified = false;
199 G4bool fPDGiConjugationModified = false;
200 G4bool fPDGiGParityModified = false;
201 G4bool fPDGiIsospinModified = false;
202 G4bool fPDGiIsospin3Modified = false;
203 G4bool fPDGIsospinModified = false;
204 G4bool fPDGIsospin3Modified = false;
205 G4bool fPDGMagneticMomentModified = false;
206 G4bool fLeptonNumberModified = false;
207 G4bool fBaryonNumberModified = false;
208 G4bool fPDGEncodingModified = false;
209 G4bool fAntiPDGEncodingModified = false;
210 G4bool fQuarkContentModified = false;
211 G4bool fAntiQuarkContentModified = false;
212 G4bool fPDGLifeTimeModified = false;
213
214 G4int verboseLevel = 1;
215};
216
217#include "G4ParticlePropertyData.icc"
218
219#endif
double G4double
Definition: G4Types.hh:83
bool G4bool
Definition: G4Types.hh:86
int G4int
Definition: G4Types.hh:85
void SetPDGEncoding(G4int newEncoding)
const G4String & GetParticleName() const
void SetPDGMass(G4double newMass)
void SetPDGiIsospin3(G4int newIsospin3)
void SetVerboseLevel(G4int value)
G4ParticlePropertyData & operator=(const G4ParticlePropertyData &right)
G4int GetQuarkContent(G4int flavor) const
void SetPDGCharge(G4double newCharge)
void SetPDGiSpin(G4int newSpin)
void SetPDGiGParity(G4int newGParity)
void SetPDGMagneticMoment(G4double magneticMoment)
void SetPDGiParity(G4int newParity)
G4int GetVerboseLevel() const
void SetAntiPDGEncoding(G4int newAntiEncoding)
G4int GetAntiQuarkContent(G4int flavor) const
G4bool operator==(const G4ParticlePropertyData &right) const
void SetQuarkContent(G4int flavor, G4int newContent)
void SetLeptonNumber(G4int newLeptonNumber)
void SetPDGLifeTime(G4double newLifeTime)
void SetPDGiIsospin(G4int newIsospin)
void SetPDGWidth(G4double newWidth)
void SetBaryonNumber(G4int newBaryonNumber)
G4bool operator!=(const G4ParticlePropertyData &right) const
void SetPDGiConjugation(G4int newConjugation)
G4double GetPDGMagneticMoment() const
void SetAntiQuarkContent(G4int flavor, G4int newContent)