Geant4 10.7.0
Toolkit for the simulation of the passage of particles through matter
Loading...
Searching...
No Matches
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{
57 verboseLevel = right.verboseLevel;
58 theParticleName = right.theParticleName;
59 thePDGMass = right.thePDGMass;
60 thePDGWidth = right. thePDGWidth;
61 thePDGCharge = right.thePDGCharge;
62 thePDGiSpin = right.thePDGiSpin;
63 thePDGiParity = right.thePDGiParity;
64 thePDGiConjugation = right.thePDGiConjugation;
65 thePDGiGParity = right.thePDGiGParity;
66 thePDGiIsospin = right.thePDGiIsospin;
67 thePDGiIsospin3 = right.thePDGiIsospin3;
68 thePDGMagneticMoment = right.thePDGMagneticMoment;
69 theLeptonNumber = right.theLeptonNumber;
70 theBaryonNumber = right.theBaryonNumber;
71 thePDGEncoding = right.thePDGEncoding;
72 theAntiPDGEncoding = right.theAntiPDGEncoding;
73 for (std::size_t flv=0; flv<NumberOfQuarkFlavor; ++flv)
74 {
75 theQuarkContent[flv] = right.theQuarkContent[flv];
76 theAntiQuarkContent[flv]= right.theAntiQuarkContent[flv];
77 }
78 thePDGLifeTime = right.thePDGLifeTime;
79}
80
81// --------------------------------------------------------------------
84{
85 if (this != &right)
86 {
87 verboseLevel = right.verboseLevel;
88 theParticleName = right.theParticleName;
89 thePDGMass = right.thePDGMass;
90 thePDGWidth = right. thePDGWidth;
91 thePDGCharge = right.thePDGCharge;
92 thePDGiSpin = right.thePDGiSpin;
93 thePDGiParity = right.thePDGiParity;
94 thePDGiConjugation = right.thePDGiConjugation;
95 thePDGiGParity = right.thePDGiGParity;
96 thePDGiIsospin = right.thePDGiIsospin;
97 thePDGiIsospin3 = right.thePDGiIsospin3;
98 thePDGMagneticMoment = right.thePDGMagneticMoment;
99 theLeptonNumber = right.theLeptonNumber;
100 theBaryonNumber = right.theBaryonNumber;
101 thePDGEncoding = right.thePDGEncoding;
102 theAntiPDGEncoding = right.theAntiPDGEncoding;
103 for (std::size_t flv=0; flv<NumberOfQuarkFlavor; ++flv)
104 {
105 theQuarkContent[flv] = right.theQuarkContent[flv];
106 theAntiQuarkContent[flv]= right.theAntiQuarkContent[flv];
107 }
108 thePDGLifeTime = right.thePDGLifeTime;
109 fPDGMassModified = true;
110 fPDGWidthModified = true;
111 fPDGChargeModified = true;
112 fPDGiSpinModified = true;
113 fPDGiParityModified = true;
114 fPDGiConjugationModified = true;
115 fPDGiGParityModified = true;
116 fPDGiIsospinModified = true;
117 fPDGiIsospin3Modified = true;
118 fPDGIsospinModified = true;
119 fPDGIsospin3Modified = true;
120 fPDGMagneticMomentModified = true;
121 fLeptonNumberModified = true;
122 fBaryonNumberModified = true;
123 fPDGEncodingModified = true;
124 fAntiPDGEncodingModified = true;
125 fQuarkContentModified = true;
126 fAntiQuarkContentModified = 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 {
167 G4cout << thePDGMagneticMoment/MeV*tesla << G4endl;
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}
bool G4bool
Definition: G4Types.hh:86
#define G4endl
Definition: G4ios.hh:57
G4GLOB_DLL std::ostream G4cout
G4ParticlePropertyData & operator=(const G4ParticlePropertyData &right)
G4bool operator==(const G4ParticlePropertyData &right) const
G4ParticlePropertyData(const G4String &particleName="")
G4bool operator!=(const G4ParticlePropertyData &right) const
#define ns
Definition: xmlparse.cc:614