85 : theParticleName(aName),
90 thePDGSpin(iSpin*0.5),
91 thePDGiParity(iParity),
92 thePDGiConjugation(iConjugation),
93 thePDGiGParity(gParity),
94 thePDGiIsospin(iIsospin),
95 thePDGiIsospin3(iIsospin3),
96 thePDGIsospin(iIsospin*0.5),
97 thePDGIsospin3(iIsospin3*0.5),
98 thePDGMagneticMoment(magneticMoment),
99 theLeptonNumber(lepton),
100 theBaryonNumber(baryon),
101 theParticleType(pType),
102 theParticleSubType(subType),
105 fShortLivedFlag(shortlived),
106 thePDGStable(stable),
107 thePDGLifeTime(lifetime),
108 theDecayTable(decaytable),
109 theProcessManager(0),
113 fApplyCutsFlag(false)
121 if (anti_encoding !=0) theAntiPDGEncoding = anti_encoding;
126 if (verboseLevel>0) {
128 G4cerr <<
"Particle " << aName <<
" has a strange PDGEncoding " <<
G4endl;
131 G4Exception(
"G4ParticleDefintion::G4ParticleDefintion",
133 "Strange PDGEncoding ");
139 if ( !fShortLivedFlag && (theParticleType!=nucleus) && (currentState!=
G4State_PreInit)){
142 G4cerr <<
"G4ParticleDefintion (other than ions and shortlived) should be created in Pre_Init state "
146 G4Exception(
"G4ParticleDefintion::G4ParticleDefintion",
148 "G4ParticleDefinition should be created in PreInit state");
163 theParticleTable->
Insert(
this);
169 G4Exception(
"G4ParticleDefinition::G4ParticleDefinition()",
171 "Illegal call of copy Constructor for G4ParticleDefinition ");
176 G4Exception(
"G4ParticleDefinition::G4ParticleDefinition()",
178 "Illegal call of default Constructor for G4ParticleDefinition ");
188 G4String msg =
"Request of deletion for ";
190 msg +=
" has No effects because readyToUse is true.";
191 G4Exception(
"G4ParticleDefinition::~G4ParticleDefinition()",
198 <<
" will be deleted " <<
G4endl;
204 if (theDecayTable!= 0)
delete theDecayTable;
210 if (
this != &right) {
217 return (this->theParticleName == right.theParticleName);
222 return (this->theParticleName != right.theParticleName);
249 if ((theParticleType ==
"meson")||(theParticleType ==
"baryon")) {
253 G4Exception(
"G4ParticleDefintion::G4ParticleDefintion",
255 "Inconsistent charge against PDG code ");
257 if (verboseLevel>0) {
258 G4cerr <<
"G4ParticleDefinition::FillQuarkContents : "
259 <<
" illegal charge (" << thePDGCharge/eplus
260 <<
" PDG code=" << thePDGEncoding <<
G4endl;
265 if (checker.
GetSpin() != thePDGiSpin) {
267 G4Exception(
"G4ParticleDefintion::G4ParticleDefintion",
269 "Inconsistent spin against PDG code ");
271 if (verboseLevel>0) {
272 G4cerr <<
"G4ParticleDefinition::FillQuarkContents : "
273 <<
" illegal SPIN (" << thePDGiSpin <<
"/2"
274 <<
" PDG code=" << thePDGEncoding <<
G4endl;
287 G4cout <<
" Particle Name : " << theParticleName <<
G4endl;
288 G4cout <<
" PDG particle code : " << thePDGEncoding;
290 G4cout <<
" Mass [GeV/c2] : " << thePDGMass/GeV ;
293 G4cout <<
" Charge [e]: " << thePDGCharge/eplus <<
G4endl;
296 G4cout <<
" Charge conjugation : " << thePDGiConjugation <<
G4endl;
297 G4cout <<
" Isospin : (I,Iz): (" << thePDGiIsospin <<
"/2";
298 G4cout <<
" , " << thePDGiIsospin3 <<
"/2 ) " <<
G4endl;
300 if (thePDGMagneticMoment != 0.0) {
301 G4cout <<
" MagneticMoment [MeV/T] : " << thePDGMagneticMoment/MeV*tesla <<
G4endl;
315 G4cout <<
" Lepton number : " << theLeptonNumber;
316 G4cout <<
" Baryon number : " << theBaryonNumber <<
G4endl;
317 G4cout <<
" Particle type : " << theParticleType ;
325 if ( fShortLivedFlag ){
332 if( theDecayTable != 0 ){
343 if(theParticleName==
"gamma"
344 || theParticleName==
"e-"
345 || theParticleName==
"e+"
346 || theParticleName==
"proton")
347 { fApplyCutsFlag = flg; }
351 <<
"G4ParticleDefinition::SetApplyCutsFlag() for " << theParticleName
354 <<
"becomes obsolete. Production threshold is applied only for "
355 <<
"gamma, e- ,e+ and proton." <<
G4endl;
G4DLLIMPORT std::ostream G4cerr
G4DLLIMPORT std::ostream G4cout
static G4bool IsIon(const G4ParticleDefinition *)
static G4bool IsAntiIon(const G4ParticleDefinition *)
G4int GetQuarkContent(G4int flavor) const
G4bool CheckCharge(G4double charge) const
G4int GetAntiQuarkContent(G4int flavor) const
void SetVerboseLevel(G4int verbose)
G4int CheckPDGCode(G4int code, G4String type)
G4int GetAtomicNumber() const
G4int GetAntiPDGEncoding() const
G4int theAntiQuarkContent[NumberOfQuarkFlavor]
G4int GetVerboseLevel() const
G4int operator==(const G4ParticleDefinition &right) const
G4int operator!=(const G4ParticleDefinition &right) const
G4int GetAtomicMass() const
virtual ~G4ParticleDefinition()
G4double GetPDGCharge() const
void SetApplyCutsFlag(G4bool)
G4int theQuarkContent[NumberOfQuarkFlavor]
void SetAtomicMass(G4int)
G4int GetBaryonNumber() const
G4int FillQuarkContents()
const G4String & GetParticleName() const
void SetAtomicNumber(G4int)
G4int GetVerboseLevel() const
static G4ParticleTable * GetParticleTable()
G4ParticleDefinition * Insert(G4ParticleDefinition *particle)
G4IonTable * GetIonTable()
G4ApplicationState GetCurrentState() const
static G4StateManager * GetStateManager()
void G4Exception(const char *originOfException, const char *exceptionCode, G4ExceptionSeverity severity, const char *comments)