Geant4-11
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// G4ParticlePropertyData class implementation
27//
28// Author: H.Kurashige, 9 June 2003
29// --------------------------------------------------------------------
30
31#include "G4ios.hh"
32#include "globals.hh"
34#include "G4SystemOfUnits.hh"
36
37// --------------------------------------------------------------------
39{
40}
41
42// --------------------------------------------------------------------
44 : theParticleName(particleName)
45{
46 for (std::size_t flv=0; flv<NumberOfQuarkFlavor; ++flv)
47 {
48 theQuarkContent[flv] = 0;
49 theAntiQuarkContent[flv]= 0;
50 }
51}
52
53// --------------------------------------------------------------------
56{
59 thePDGMass = right.thePDGMass;
60 thePDGWidth = right. thePDGWidth;
73 for (std::size_t flv=0; flv<NumberOfQuarkFlavor; ++flv)
74 {
75 theQuarkContent[flv] = right.theQuarkContent[flv];
77 }
79}
80
81// --------------------------------------------------------------------
84{
85 if (this != &right)
86 {
89 thePDGMass = right.thePDGMass;
90 thePDGWidth = right. thePDGWidth;
103 for (std::size_t flv=0; flv<NumberOfQuarkFlavor; ++flv)
104 {
105 theQuarkContent[flv] = right.theQuarkContent[flv];
107 }
109 fPDGMassModified = true;
110 fPDGWidthModified = true;
111 fPDGChargeModified = true;
112 fPDGiSpinModified = true;
113 fPDGiParityModified = true;
116 fPDGiIsospinModified = true;
118 fPDGIsospinModified = true;
127 fPDGLifeTimeModified = true;
128 }
129 return *this;
130}
131
132// --------------------------------------------------------------------
133G4bool
135{
136 return (this == &right);
137}
138
139// --------------------------------------------------------------------
140G4bool
142{
143 return (this != &right);
144}
145
146// --------------------------------------------------------------------
148{
149#ifdef G4VERBOSE
150 G4cout << " Particle Name : " << theParticleName << G4endl;
151 G4cout << " PDG particle code : " << thePDGEncoding;
152 G4cout << " [PDG anti-particle code: " << this->GetAntiPDGEncoding() << "]"
153 << G4endl;
154 G4cout << " Mass [GeV/c2] : " << thePDGMass/GeV ;
155 G4cout << " Width : " << thePDGWidth/GeV << G4endl;
156 G4cout << " Lifetime [nsec] : " << thePDGLifeTime/ns << G4endl;
157 G4cout << " Charge [e]: " << thePDGCharge/eplus << G4endl;
158 G4cout << " Spin : " << thePDGiSpin << "/2" << G4endl;
159 G4cout << " Parity : " << thePDGiParity << G4endl;
160 G4cout << " Charge conjugation : " << thePDGiConjugation << G4endl;
161 G4cout << " Isospin : (I,Iz): (" << thePDGiIsospin <<"/2";
162 G4cout << " , " << thePDGiIsospin3 << "/2 ) " << G4endl;
163 G4cout << " GParity : " << thePDGiGParity << G4endl;
164 G4cout << " MagneticMoment [MeV/T]: ";
165 if (thePDGMagneticMoment != 0.0)
166 {
168 }
169 else
170 {
171 G4cout << "not defined " << G4endl;
172 }
173 G4cout << " Lepton number : " << theLeptonNumber;
174 G4cout << " Baryon number : " << theBaryonNumber << G4endl;
175 G4cout << " Quark contents (d,u,s,c,b,t) : " << theQuarkContent[0];
176 G4cout << ", " << theQuarkContent[1];
177 G4cout << ", " << theQuarkContent[2];
178 G4cout << ", " << theQuarkContent[3];
179 G4cout << ", " << theQuarkContent[4];
180 G4cout << ", " << theQuarkContent[5] << G4endl;
181 G4cout << " AntiQuark contents : " << theAntiQuarkContent[0];
182 G4cout << ", " << theAntiQuarkContent[1];
183 G4cout << ", " << theAntiQuarkContent[2];
184 G4cout << ", " << theAntiQuarkContent[3];
185 G4cout << ", " << theAntiQuarkContent[4];
186 G4cout << ", " << theAntiQuarkContent[5] << G4endl;
187#endif
188}
static constexpr double tesla
Definition: G4SIunits.hh:259
static constexpr double eplus
Definition: G4SIunits.hh:184
static constexpr double GeV
Definition: G4SIunits.hh:203
static constexpr double MeV
Definition: G4SIunits.hh:200
bool G4bool
Definition: G4Types.hh:86
#define G4endl
Definition: G4ios.hh:57
G4GLOB_DLL std::ostream G4cout
G4int theQuarkContent[NumberOfQuarkFlavor]
G4ParticlePropertyData & operator=(const G4ParticlePropertyData &right)
G4int theAntiQuarkContent[NumberOfQuarkFlavor]
G4bool operator==(const G4ParticlePropertyData &right) const
G4ParticlePropertyData(const G4String &particleName="")
G4bool operator!=(const G4ParticlePropertyData &right) const
#define ns
Definition: xmlparse.cc:614