Geant4  10.03.p02
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
G4ParticlePropertyData.cc
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 // $Id: G4ParticlePropertyData.cc 67971 2013-03-13 10:13:24Z gcosmo $
27 //
28 // class G4ParticlePropertyData
29 //
30 // Implementation
31 //
32 // History:
33 // first implementation by H Kurashige 9 June 2003
34 // Add magnetic moment by H Kurashige Mar 2007
35 
36 #include "G4ios.hh"
37 #include "globals.hh"
38 #include "G4PhysicalConstants.hh"
39 #include "G4SystemOfUnits.hh"
41 
42 
45 {
46 }
47 
50  theParticleName(particleName),
51  thePDGMass(0.0),
52  thePDGWidth(0.0),
53  thePDGCharge(0.0),
54  thePDGiSpin(0),
55  thePDGiParity(0),
56  thePDGiConjugation(0),
57  thePDGiGParity(0),
58  thePDGiIsospin(0),
59  thePDGiIsospin3(0),
60  thePDGMagneticMoment(0.0),
61  theLeptonNumber(0),
62  theBaryonNumber(0),
63  thePDGEncoding(0),
64  theAntiPDGEncoding(0),
65  thePDGLifeTime(-1.0),
66  fPDGMassModified(false),
67  fPDGWidthModified(false),
68  fPDGChargeModified(false),
69  fPDGiSpinModified(false),
70  fPDGiParityModified(false),
71  fPDGiConjugationModified(false),
72  fPDGiGParityModified(false),
73  fPDGiIsospinModified(false),
74  fPDGiIsospin3Modified(false),
75  fPDGIsospinModified(false),
76  fPDGIsospin3Modified(false),
77  fPDGMagneticMomentModified(false),
78  fLeptonNumberModified(false),
79  fBaryonNumberModified(false),
80  fPDGEncodingModified(false),
81  fAntiPDGEncodingModified(false),
82  fQuarkContentModified(false),
83  fAntiQuarkContentModified(false),
84  fPDGLifeTimeModified(false),
85  verboseLevel(1)
86 {
87  for (size_t flv=0; flv<NumberOfQuarkFlavor; ++flv) {
88  theQuarkContent[flv] =0;
89  theAntiQuarkContent[flv]=0;
90  }
91 }
92 
93 
96  fPDGMassModified(false),
97  fPDGWidthModified(false),
98  fPDGChargeModified(false),
99  fPDGiSpinModified(false),
100  fPDGiParityModified(false),
101  fPDGiConjugationModified(false),
102  fPDGiGParityModified(false),
103  fPDGiIsospinModified(false),
104  fPDGiIsospin3Modified(false),
105  fPDGIsospinModified(false),
106  fPDGIsospin3Modified(false),
107  fPDGMagneticMomentModified(false),
108  fLeptonNumberModified(false),
109  fBaryonNumberModified(false),
110  fPDGEncodingModified(false),
111  fAntiPDGEncodingModified(false),
112  fQuarkContentModified(false),
113  fAntiQuarkContentModified(false),
114  fPDGLifeTimeModified(false)
115 {
116  verboseLevel = right.verboseLevel;
117  theParticleName = right.theParticleName;
118  thePDGMass = right.thePDGMass;
119  thePDGWidth = right. thePDGWidth;
120  thePDGCharge = right.thePDGCharge;
121  thePDGiSpin = right.thePDGiSpin;
122  thePDGiParity = right.thePDGiParity;
123  thePDGiConjugation = right.thePDGiConjugation;
124  thePDGiGParity = right.thePDGiGParity;
125  thePDGiIsospin = right.thePDGiIsospin;
126  thePDGiIsospin3 = right.thePDGiIsospin3;
127  thePDGMagneticMoment = right.thePDGMagneticMoment;
128  theLeptonNumber = right.theLeptonNumber;
129  theBaryonNumber = right.theBaryonNumber;
130  thePDGEncoding = right.thePDGEncoding;
131  theAntiPDGEncoding = right.theAntiPDGEncoding;
132  for (size_t flv=0; flv<NumberOfQuarkFlavor; ++flv) {
133  theQuarkContent[flv] = right.theQuarkContent[flv];
134  theAntiQuarkContent[flv]= right.theAntiQuarkContent[flv];
135  }
136  thePDGLifeTime = right.thePDGLifeTime;
137 }
138 
141 {
142  if (this != &right) {
143  verboseLevel = right.verboseLevel;
144  theParticleName = right.theParticleName;
145  thePDGMass = right.thePDGMass;
146  thePDGWidth = right. thePDGWidth;
147  thePDGCharge = right.thePDGCharge;
148  thePDGiSpin = right.thePDGiSpin;
149  thePDGiParity = right.thePDGiParity;
150  thePDGiConjugation = right.thePDGiConjugation;
151  thePDGiGParity = right.thePDGiGParity;
152  thePDGiIsospin = right.thePDGiIsospin;
153  thePDGiIsospin3 = right.thePDGiIsospin3;
154  thePDGMagneticMoment = right.thePDGMagneticMoment;
155  theLeptonNumber = right.theLeptonNumber;
156  theBaryonNumber = right.theBaryonNumber;
157  thePDGEncoding = right.thePDGEncoding;
158  theAntiPDGEncoding = right.theAntiPDGEncoding;
159  for (size_t flv=0; flv<NumberOfQuarkFlavor; ++flv) {
160  theQuarkContent[flv] = right.theQuarkContent[flv];
161  theAntiQuarkContent[flv]= right.theAntiQuarkContent[flv];
162  }
163  thePDGLifeTime = right.thePDGLifeTime;
164  fPDGMassModified = true;
165  fPDGWidthModified = true;
166  fPDGChargeModified = true;
167  fPDGiSpinModified = true;
168  fPDGiParityModified = true;
169  fPDGiConjugationModified = true;
170  fPDGiGParityModified = true;
171  fPDGiIsospinModified = true;
172  fPDGiIsospin3Modified = true;
173  fPDGIsospinModified = true;
174  fPDGIsospin3Modified = true;
175  fPDGMagneticMomentModified = true;
176  fLeptonNumberModified = true;
177  fBaryonNumberModified = true;
178  fPDGEncodingModified = true;
179  fAntiPDGEncodingModified = true;
180  fQuarkContentModified = true;
181  fAntiQuarkContentModified = true;
182  fPDGLifeTimeModified = true;
183  }
184  return *this;
185 }
186 
189 {
190  return (this == &right);
191 }
192 
195 {
196  return (this != &right);
197 }
198 
201 {
202 #ifdef G4VERBOSE
203  G4cout << " Particle Name : " << theParticleName << G4endl;
204  G4cout << " PDG particle code : " << thePDGEncoding;
205  G4cout << " [PDG anti-particle code: " << this->GetAntiPDGEncoding() << "]"<< G4endl;
206  G4cout << " Mass [GeV/c2] : " << thePDGMass/GeV ;
207  G4cout << " Width : " << thePDGWidth/GeV << G4endl;
208  G4cout << " Lifetime [nsec] : " << thePDGLifeTime/ns << G4endl;
209  G4cout << " Charge [e]: " << thePDGCharge/eplus << G4endl;
210  G4cout << " Spin : " << thePDGiSpin << "/2" << G4endl;
211  G4cout << " Parity : " << thePDGiParity << G4endl;
212  G4cout << " Charge conjugation : " << thePDGiConjugation << G4endl;
213  G4cout << " Isospin : (I,Iz): (" << thePDGiIsospin <<"/2";
214  G4cout << " , " << thePDGiIsospin3 << "/2 ) " << G4endl;
215  G4cout << " GParity : " << thePDGiGParity << G4endl;
216  G4cout << " MagneticMoment [MeV/T]: ";
217  if (thePDGMagneticMoment != 0.0) {
218  G4cout << thePDGMagneticMoment/MeV*tesla << G4endl;
219  }else {
220  G4cout << "not defined " << G4endl;
221  }
222  G4cout << " Lepton number : " << theLeptonNumber;
223  G4cout << " Baryon number : " << theBaryonNumber << G4endl;
224  G4cout << " Quark contents (d,u,s,c,b,t) : " << theQuarkContent[0];
225  G4cout << ", " << theQuarkContent[1];
226  G4cout << ", " << theQuarkContent[2];
227  G4cout << ", " << theQuarkContent[3];
228  G4cout << ", " << theQuarkContent[4];
229  G4cout << ", " << theQuarkContent[5] << G4endl;
230  G4cout << " AntiQuark contents : " << theAntiQuarkContent[0];
231  G4cout << ", " << theAntiQuarkContent[1];
232  G4cout << ", " << theAntiQuarkContent[2];
233  G4cout << ", " << theAntiQuarkContent[3];
234  G4cout << ", " << theAntiQuarkContent[4];
235  G4cout << ", " << theAntiQuarkContent[5] << G4endl;
236 #endif
237 }
238 
239 
240 
241 
242 
243 
244 
245 
246 
static constexpr double tesla
Definition: G4SIunits.hh:268
G4ParticlePropertyData & operator=(const G4ParticlePropertyData &right)
int G4int
Definition: G4Types.hh:78
G4ParticlePropertyData(const G4String &particleName="")
G4int operator!=(const G4ParticlePropertyData &right) const
G4int operator==(const G4ParticlePropertyData &right) const
G4GLOB_DLL std::ostream G4cout
static constexpr double eplus
Definition: G4SIunits.hh:199
static constexpr double GeV
Definition: G4SIunits.hh:217
#define G4endl
Definition: G4ios.hh:61
static constexpr double MeV
Definition: G4SIunits.hh:214
#define ns
Definition: xmlparse.cc:614