Changeset 1196 for trunk/source/particles/management/src
- Timestamp:
- Nov 25, 2009, 5:13:58 PM (15 years ago)
- Location:
- trunk/source/particles/management/src
- Files:
-
- 30 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/source/particles/management/src/G4DalitzDecayChannel.cc
r992 r1196 25 25 // 26 26 // 27 // $Id: G4DalitzDecayChannel.cc,v 1. 8 2006/06/29 19:24:58 gunterExp $28 // GEANT4 tag $Name: geant4-09-0 2-ref-02$27 // $Id: G4DalitzDecayChannel.cc,v 1.9 2009/08/17 14:52:19 kurasige Exp $ 28 // GEANT4 tag $Name: geant4-09-03-cand-01 $ 29 29 // 30 30 // … … 52 52 :G4VDecayChannel("Dalitz Decay",1) 53 53 { 54 //#ifdef G4VERBOSE55 //if (GetVerboseLevel()>1) {56 // G4cout << "G4DalitzDecayChannel:: constructor ";57 // G4cout << "addr[" << this << "]" << G4endl;58 //}59 //#endif60 54 // set names for daughter particles 61 55 SetParent(theParentName); … … 66 60 SetDaughter(idLepton, theLeptonName); 67 61 SetDaughter(idAntiLepton, theAntiLeptonName); 68 //69 //#ifdef G4VERBOSE70 //if (GetVerboseLevel()>1) DumpInfo();71 //#endif72 62 } 73 63 -
trunk/source/particles/management/src/G4DecayProducts.cc
r992 r1196 25 25 // 26 26 // 27 // $Id: G4DecayProducts.cc,v 1.1 6 2007/10/06 06:49:29kurasige Exp $28 // GEANT4 tag $Name: geant4-09-0 2-ref-02$27 // $Id: G4DecayProducts.cc,v 1.17 2009/04/02 02:24:53 kurasige Exp $ 28 // GEANT4 tag $Name: geant4-09-03-cand-01 $ 29 29 // 30 30 // … … 240 240 G4ThreeVector parent_momentum = direction*(theParentParticle->GetTotalMomentum()); 241 241 // check momentum dirction is a unit vector 242 if ( (parent_momentum.mag() >0.0) && (std:: abs(direction.mag()-1.0) >1.0e-6 ) ) {242 if ( (parent_momentum.mag() >0.0) && (std::fabs(direction.mag()-1.0) >1.0e-6 ) ) { 243 243 #ifdef G4VERBOSE 244 244 G4cout << " Momentum Direction Vector of Parent is not normalized "; … … 261 261 momentum = direction*(theProductVector[index]->GetTotalMomentum()); 262 262 // check momentum dirction is a unit vector 263 if ( (momentum.mag()>0.0) && (std:: abs(direction.mag()-1.0) > 1.0e-6)) {263 if ( (momentum.mag()>0.0) && (std::fabs(direction.mag()-1.0) > 1.0e-6)) { 264 264 #ifdef G4VERBOSE 265 265 G4cout << " Momentum Direction Vector of Daughter [" << index; … … 280 280 } 281 281 // check energy/momentum conservation 282 if ( (std:: abs(total_energy) >1.0e-6) || (total_momentum.mag() >1.0e-6) ){282 if ( (std::fabs(total_energy) >1.0e-9*MeV) || (total_momentum.mag() >1.0e-9*MeV ) ){ 283 283 #ifdef G4VERBOSE 284 284 G4cout << " Energy/Momentum is not conserved "<< G4endl; -
trunk/source/particles/management/src/G4DecayTable.cc
r992 r1196 26 26 // 27 27 // $Id: G4DecayTable.cc,v 1.8 2006/06/29 19:25:02 gunter Exp $ 28 // GEANT4 tag $Name: geant4-09-0 2-ref-02$28 // GEANT4 tag $Name: geant4-09-03-cand-01 $ 29 29 // 30 30 // -
trunk/source/particles/management/src/G4DecayTableMessenger.cc
r992 r1196 26 26 // 27 27 // $Id: G4DecayTableMessenger.cc,v 1.6 2006/06/29 19:25:04 gunter Exp $ 28 // GEANT4 tag $Name: geant4-09-0 2-ref-02$28 // GEANT4 tag $Name: geant4-09-03-cand-01 $ 29 29 // 30 30 // -
trunk/source/particles/management/src/G4DynamicParticle.cc
r992 r1196 25 25 // 26 26 // 27 // $Id: G4DynamicParticle.cc,v 1.2 5 2007/03/11 07:17:35kurasige Exp $28 // GEANT4 tag $Name: geant4-09-0 2-ref-02$27 // $Id: G4DynamicParticle.cc,v 1.26 2009/08/17 14:52:19 kurasige Exp $ 28 // GEANT4 tag $Name: geant4-09-03-cand-01 $ 29 29 // 30 30 // … … 173 173 G4double totalenergy = aParticleMomentum.t(); 174 174 G4double mass2 = totalenergy*totalenergy - pModule2; 175 if(mass2 < 0.0001*MeV*MeV) {175 if(mass2 < EnergyMomentumRelationAllowance*EnergyMomentumRelationAllowance) { 176 176 theDynamicalMass = 0.; 177 177 SetKineticEnergy(totalenergy); … … 213 213 214 214 G4double mass2 = totalEnergy*totalEnergy - pModule2; 215 if(mass2 < 0.0001*MeV*MeV) {215 if(mass2 < EnergyMomentumRelationAllowance*EnergyMomentumRelationAllowance) { 216 216 theDynamicalMass = 0.; 217 217 SetKineticEnergy(totalEnergy); … … 309 309 // remove preassigned decay 310 310 if (thePreAssignedDecayProducts != 0) { 311 G4cout << " G4DynamicParticle::SetDefinition()::"; 312 G4cout << "!!! Pre-assigned decay products is attached !!!! " << G4endl; 313 DumpInfo(0); 314 G4cout << "!!! New Definition is " << aParticleDefinition->GetParticleName() << " !!! " << G4endl; 315 G4cout << "!!! Pre-assigned decay products will be deleted !!!! " << G4endl; 311 #ifdef G4VERBOSE 312 if (verboseLevel>0) { 313 G4cout << " G4DynamicParticle::SetDefinition()::"; 314 G4cout << "!!! Pre-assigned decay products is attached !!!! " << G4endl; 315 DumpInfo(0); 316 G4cout << "!!! New Definition is " << aParticleDefinition->GetParticleName() 317 << " !!! " << G4endl; 318 G4cout << "!!! Pre-assigned decay products will be deleted !!!! " << G4endl; 319 } 320 #endif 316 321 delete thePreAssignedDecayProducts; 317 322 } … … 414 419 void G4DynamicParticle::DumpInfo(G4int mode) const 415 420 { 421 #ifdef G4VERBOSE 416 422 if (theParticleDefinition == 0) { 417 423 G4cout << " G4DynamicParticle::DumpInfo():: !!!Particle type not defined !!!! " << G4endl; … … 438 444 } 439 445 } 446 #endif 440 447 } 441 448 -
trunk/source/particles/management/src/G4ElectronOccupancy.cc
r992 r1196 26 26 // 27 27 // $Id: G4ElectronOccupancy.cc,v 1.9 2006/06/29 19:25:24 gunter Exp $ 28 // GEANT4 tag $Name: geant4-09-0 2-ref-02$28 // GEANT4 tag $Name: geant4-09-03-cand-01 $ 29 29 // 30 30 // -
trunk/source/particles/management/src/G4HyperNucleiProperties.cc
r992 r1196 25 25 // 26 26 // $Id: G4HyperNucleiProperties.cc,v 1.4 2008/10/22 12:35:46 kurasige Exp $ 27 // GEANT4 tag $Name: geant4-09-0 2-ref-02$27 // GEANT4 tag $Name: geant4-09-03-cand-01 $ 28 28 // 29 29 // ------------------------------------------------------------ -
trunk/source/particles/management/src/G4IonTable.cc
r992 r1196 25 25 // 26 26 // 27 // $Id: G4IonTable.cc,v 1. 54 2009/01/28 13:49:04 gcosmoExp $28 // GEANT4 tag $Name: geant4-09-0 2-ref-02$27 // $Id: G4IonTable.cc,v 1.60 2009/09/23 12:13:48 kurasige Exp $ 28 // GEANT4 tag $Name: geant4-09-03-cand-01 $ 29 29 // 30 30 // … … 129 129 } 130 130 #endif 131 131 return 0; 132 132 } 133 133 … … 137 137 G4double mu = 0.0; 138 138 139 G4IsotopeProperty* fProperty = FindIsotope(Z, A, E, J);139 const G4IsotopeProperty* fProperty = FindIsotope(Z, A, E, J); 140 140 if (fProperty !=0 ){ 141 141 E = fProperty->GetEnergy(); … … 167 167 168 168 #ifdef G4VERBOSE 169 if (GetVerboseLevel()>1) { 170 G4cout << "G4IonTable::CreateIon() : create ion of " << name << G4endl; 169 if (GetVerboseLevel()>1) { 170 G4cout << "G4IonTable::CreateIon() : create ion of " << name 171 << " " << Z << ", " << A 172 << " encoding=" << encoding << G4endl; 171 173 } 172 174 #endif … … 174 176 // Add process manager to the ion 175 177 AddProcessManager(name); 176 177 if (fProperty !=0) delete fProperty; 178 178 179 return ion; 179 180 } … … 243 244 #ifdef G4VERBOSE 244 245 if (GetVerboseLevel()>1) { 245 G4cout << "G4IonTable::CreateIon() : create ion of " << name << G4endl; 246 G4cout << "G4IonTable::CreateIon() : create hyper ion of " << name 247 << " encoding=" << encoding << G4endl; 246 248 } 247 249 #endif … … 369 371 370 372 // -- loop over all particles in Ion table 371 G4IonList::iterator idx; 372 for (idx = fIonList->begin(); idx!= fIonList->end(); ++idx) { 373 ion = *idx; 374 375 // Z = Atomic Number 376 G4int anAtomicNumber = ion->GetAtomicNumber(); 377 // A = baryon number 378 G4int anAtomicMass = ion->GetAtomicMass(); 373 G4int encoding=GetNucleusEncoding(Z, A, 0); 374 G4IonList::iterator i = fIonList->find(encoding); 375 for( ;i != fIonList->end() ; i++) { 376 ion = i->second; 377 if ( ( ion->GetAtomicNumber() != Z) || (ion->GetAtomicMass()!=A) ) break; 378 379 379 // excitation level 380 380 G4double anExcitaionEnergy = ((const G4Ions*)(ion))->GetExcitationEnergy(); 381 382 if ( (A == anAtomicMass) && 383 (Z == anAtomicNumber ) && 384 ( std::abs(E - anExcitaionEnergy ) < EnergyTorelance ) ) { 381 if ( ( std::fabs(E - anExcitaionEnergy ) < EnergyTorelance ) ) { 385 382 isFound = true; 386 383 break; … … 421 418 422 419 // -- loop over all particles in Ion table 423 G4IonList::iterator idx; 424 for (idx = fIonList->begin(); idx!= fIonList->end(); ++idx) { 425 ion = *idx; 426 427 // Z = Atomic Number 428 G4int anAtomicNumber = ion->GetAtomicNumber(); 429 // A = baryon number 430 G4int anAtomicMass = ion->GetAtomicMass(); 431 // L = lambda number 432 G4int lambdaNumber = ion->GetQuarkContent(3); 420 G4int encoding=GetNucleusEncoding(Z, A, L); 421 G4IonList::iterator i = fIonList->find(encoding); 422 for( ;i != fIonList->end() ; i++) { 423 ion = i->second; 424 if ( ( ion->GetAtomicNumber() != Z) || (ion->GetAtomicMass()!=A) ) break; 425 if( ion->GetQuarkContent(3) != L) break; 426 433 427 // excitation level 434 428 G4double anExcitaionEnergy = ((const G4Ions*)(ion))->GetExcitationEnergy(); 435 429 436 if ( (A == anAtomicMass) && 437 (Z == anAtomicNumber ) && 438 (L == lambdaNumber ) && 439 ( std::abs(E - anExcitaionEnergy ) < EnergyTorelance ) ) { 430 if ( ( std::fabs(E - anExcitaionEnergy ) < EnergyTorelance ) ) { 440 431 isFound = true; 441 432 break; … … 454 445 G4int G4IonTable::GetNucleusEncoding(G4int Z, G4int A, G4double E, G4int ) 455 446 { 456 // PDG code for Ions 457 // Nuclear codes are given as 10-digit numbers +-100ZZZAAAI. 458 //For a nucleus consisting of np protons and nn neutrons 459 // A = np + nn and Z = np. 460 // I gives the isomer level, with I = 0 corresponding 461 // to the ground state and I >0 to excitations 462 463 //!!! I = 1 is assigned fo all excitation states !!! 464 447 // PDG code for Ions 448 // Nuclear codes are given as 10-digit numbers +-100ZZZAAAI. 449 //For a nucleus consisting of np protons and nn neutrons 450 // A = np + nn and Z = np. 451 // I gives the isomer level, with I = 0 corresponding 452 // to the ground state and I >0 to excitations 453 454 //!!! I = 1 is assigned fo all excitation states !!! 455 const G4double EnergyTorelance = 0.1 * keV; 456 if ( Z==1 && A==1 && E< EnergyTorelance ) { 457 //proton 458 return 2212; 459 } 460 465 461 G4int encoding = 1000000000; 466 462 encoding += Z * 10000; … … 502 498 // anti particle 503 499 return false; 504 } 500 } 501 if (encoding == 2212) { 502 // proton 503 Z = 1; 504 A = 1; 505 E=0.0; 506 J=0; 507 return true; 508 } 509 505 510 if (encoding % 10 != 0) { 506 511 //!!!not supported for excitation states !!! … … 586 591 587 592 ///////////////// 588 G4bool G4IonTable::IsIon( G4ParticleDefinition* particle)593 G4bool G4IonTable::IsIon(const G4ParticleDefinition* particle) 589 594 { 590 595 // return true if the particle is ion … … 593 598 static G4String proton("proton"); 594 599 600 // neutron is not ion 601 if ((particle->GetAtomicMass() >0) && (particle->GetAtomicNumber()>0)) return true; 602 595 603 // particles derived from G4VIon and G4Ions 596 G4bool value = (particle->GetParticleType() == nucleus);604 if (particle->GetParticleType() == nucleus) return true; 597 605 598 606 // proton (Hydrogen nucleus) 599 value = value || (particle->GetParticleName() == proton);600 601 return value;607 if (particle->GetParticleName() == proton) return true; 608 609 return false; 602 610 } 603 611 … … 702 710 void G4IonTable::Insert(G4ParticleDefinition* particle) 703 711 { 712 if (!IsIon(particle)) return; 713 if (Contains(particle)) return; 714 715 G4int Z = particle->GetAtomicNumber(); 716 G4int A = particle->GetAtomicMass(); 717 G4int L = particle->GetQuarkContent(3); //strangeness 718 G4int encoding=GetNucleusEncoding(Z, A, L); 719 720 fIonList->insert( std::pair<G4int, G4ParticleDefinition*>(encoding, particle) ); 721 722 } 723 724 ///////////////// 725 void G4IonTable::Remove(G4ParticleDefinition* particle) 726 { 704 727 if (IsIon(particle)) { 705 fIonList->push_back(particle); 706 } 707 } 708 709 ///////////////// 710 void G4IonTable::Remove(G4ParticleDefinition* particle) 711 { 712 if (IsIon(particle)) { 713 G4IonList::iterator idx; 714 for (idx = fIonList->begin(); idx!= fIonList->end(); ++idx) { 715 if ( particle == *idx) { 716 fIonList->erase(idx); 717 break; 728 G4int Z = particle->GetAtomicNumber(); 729 G4int A = particle->GetAtomicMass(); 730 G4int L = particle->GetQuarkContent(3); //strangeness 731 G4int encoding=GetNucleusEncoding(Z, A, L); 732 if (encoding !=0 ) { 733 G4IonList::iterator i = fIonList->find(encoding); 734 for( ;i != fIonList->end() ; i++) { 735 if (particle == i->second) { 736 fIonList->erase(i); 737 break; 738 } 718 739 } 719 740 } … … 739 760 G4IonList::iterator idx; 740 761 for (idx = fIonList->begin(); idx!= fIonList->end(); ++idx) { 741 ion = *idx;762 ion = idx->second; 742 763 if (( particle_name == "ALL" ) || (particle_name == "all")){ 743 764 ion->DumpTable(); … … 860 881 861 882 862 863 864 865 866 867 868 869 870 871 872 873 883 //////////////////// 884 void G4IonTable::CreateAllIon() 885 { 886 G4int Z; 887 G4int A; 888 G4double E=0.0; 889 G4int J=0; 890 891 for (Z=1; Z<=120; Z++) { 892 for (A=Z;A<999 && A<Z*3+10; A++) { 893 if (G4NucleiProperties::IsInStableTable(A,Z)){ 894 GetIon(Z,A,E,J); 895 } 896 } 897 } 898 } 899 900 //////////////////// 901 G4ParticleDefinition* G4IonTable::GetParticle(G4int index) const 902 { 903 if ( (index >=0) && (index < Entries()) ) { 904 G4IonList::iterator idx = fIonList->begin(); 905 G4int counter = 0; 906 while( idx != fIonList->end() ){ 907 if ( counter == index ) return idx->second; 908 counter++; 909 idx++; 910 } 911 } 912 #ifdef G4VERBOSE 913 if (GetVerboseLevel()>1){ 914 G4cout << " G4IonTable::GetParticle"; 915 G4cout << " invalid index (=" << index << ")" 916 << " entries = " << Entries() << G4endl; 917 } 918 #endif 919 return 0; 920 } 921 922 923 924 925 926 927 928 929 930 931 -
trunk/source/particles/management/src/G4Ions.cc
r992 r1196 25 25 // 26 26 // 27 // $Id: G4Ions.cc,v 1.1 3 2008/06/08 12:43:19kurasige Exp $28 // GEANT4 tag $Name: geant4-09-0 2-ref-02$27 // $Id: G4Ions.cc,v 1.16 2009/08/06 15:53:42 kurasige Exp $ 28 // GEANT4 tag $Name: geant4-09-03-cand-01 $ 29 29 // 30 30 // … … 66 66 theExcitationEnergy = excitation; 67 67 68 SetAtomicNumber( G4int(GetPDGCharge()/eplus) );69 SetAtomicMass( GetBaryonNumber() );70 71 //G4cout << "G4Ions::" << GetParticleName() << G4endl;68 if (GetAtomicNumber() == 0 ) { 69 SetAtomicNumber( G4int(GetPDGCharge()/eplus) ); 70 SetAtomicMass( GetBaryonNumber() ); 71 } 72 72 } 73 73 -
trunk/source/particles/management/src/G4IsotopeProperty.cc
r992 r1196 25 25 // 26 26 // 27 // $Id: G4IsotopeProperty.cc,v 1. 7 2007/03/16 05:25:08kurasige Exp $28 // GEANT4 tag $Name: geant4-09-0 2-ref-02$27 // $Id: G4IsotopeProperty.cc,v 1.8 2009/08/17 14:52:19 kurasige Exp $ 28 // GEANT4 tag $Name: geant4-09-03-cand-01 $ 29 29 // 30 30 // … … 107 107 void G4IsotopeProperty::DumpInfo() const 108 108 { 109 #ifdef G4VERBOSE 109 110 G4cout << "AtomicNumber: " << fAtomicNumber << G4endl; 110 111 G4cout << "AtomicMass: " << fAtomicMass << G4endl; … … 122 123 G4cout << "Decay Table is not defined !" << G4endl; 123 124 } 125 #endif 124 126 } 125 127 -
trunk/source/particles/management/src/G4KL3DecayChannel.cc
r992 r1196 25 25 // 26 26 // 27 // $Id: G4KL3DecayChannel.cc,v 1. 8 2006/06/29 19:25:32 gunterExp $28 // GEANT4 tag $Name: geant4-09-0 2-ref-02$27 // $Id: G4KL3DecayChannel.cc,v 1.9 2009/08/17 14:52:19 kurasige Exp $ 28 // GEANT4 tag $Name: geant4-09-03-cand-01 $ 29 29 // 30 30 // … … 55 55 thePionName,theLeptonName,theNutrinoName) 56 56 { 57 //#ifdef G4VERBOSE 58 //if (GetVerboseLevel()>1) { 59 // G4cout << "G4KL3DecayChannel:: constructor "; 60 // G4cout << "addr[" << this << "]" << G4endl; 61 //} 62 //#endif 57 static const G4String K_plus("kaon+"); 58 static const G4String K_minus("kaon-"); 59 static const G4String K_L("kaon0L"); 60 static const G4String Mu_plus("mu+"); 61 static const G4String Mu_minus("mu-"); 62 static const G4String E_plus("e+"); 63 static const G4String E_minus("e-"); 64 63 65 // check modes 64 if ( ((theParentName == "kaon+")&&(theLeptonName == "e+")) ||65 ((theParentName == "kaon-")&&(theLeptonName == "e-")) ) {66 if ( ((theParentName == K_plus)&&(theLeptonName == E_plus)) || 67 ((theParentName == K_minus)&&(theLeptonName == E_minus)) ) { 66 68 // K+- (Ke3) 67 69 pLambda = 0.0286; 68 70 pXi0 = -0.35; 69 } else if ( ((theParentName == "kaon+")&&(theLeptonName == "mu+")) ||70 ((theParentName == "kaon-")&&(theLeptonName == "mu-")) ) {71 } else if ( ((theParentName == K_plus)&&(theLeptonName == Mu_plus)) || 72 ((theParentName == K_minus)&&(theLeptonName == Mu_minus)) ) { 71 73 // K+- (Kmu3) 72 74 pLambda = 0.033; 73 75 pXi0 = -0.35; 74 } else if ( (theParentName == "kaon0L") &&75 ((theLeptonName == "e+") ||(theLeptonName == "e-")) ){76 } else if ( (theParentName == K_L) && 77 ((theLeptonName == E_plus) ||(theLeptonName == E_minus)) ){ 76 78 // K0L (Ke3) 77 79 pLambda = 0.0300; 78 80 pXi0 = -0.11; 79 } else if ( (theParentName == "kaon0L") &&80 ((theLeptonName == "mu+") ||(theLeptonName == "mu-")) ){81 } else if ( (theParentName == K_L) && 82 ((theLeptonName == Mu_plus) ||(theLeptonName == Mu_minus)) ){ 81 83 // K0L (Kmu3) 82 84 pLambda = 0.034; 83 85 pXi0 = -0.11; 84 86 } else { 85 //#ifdef G4VERBOSE86 //if (GetVerboseLevel()>0) {87 //G4cout << "G4KL3DecayChannel:: constructor :";88 //G4cout << "illegal arguments " << G4endl;;89 //DumpInfo();90 //}91 //#endif87 #ifdef G4VERBOSE 88 if (GetVerboseLevel()>2) { 89 G4cout << "G4KL3DecayChannel:: constructor :"; 90 G4cout << "illegal arguments " << G4endl;; 91 DumpInfo(); 92 } 93 #endif 92 94 // set values for K0L (Ke3) temporarily 93 95 pLambda = 0.0300; … … 108 110 if (GetVerboseLevel()>1) G4cout << "G4KL3DecayChannel::DecayIt " << G4endl; 109 111 #endif 112 110 113 // fill parent particle and its mass 111 114 if (parent == 0) { -
trunk/source/particles/management/src/G4MuonDecayChannel.cc
r992 r1196 26 26 // 27 27 // $Id: G4MuonDecayChannel.cc,v 1.17 2006/06/29 19:25:34 gunter Exp $ 28 // GEANT4 tag $Name: geant4-09-0 2-ref-02$28 // GEANT4 tag $Name: geant4-09-03-cand-01 $ 29 29 // 30 30 // -
trunk/source/particles/management/src/G4MuonRadiativeDecayChannelWithSpin.cc
r824 r1196 144 144 rn3dim(xx,yy,zz,x); 145 145 146 if(std:: abs((xx*xx)+(yy*yy)+(zz*zz)-(x*x))>0.001){146 if(std::fabs((xx*xx)+(yy*yy)+(zz*zz)-(x*x))>0.001){ 147 147 G4cout << "Norm of x not correct" << G4endl; 148 148 } … … 173 173 rn3dim(xx,yy,zz,y); 174 174 175 if(std:: abs((xx*xx)+(yy*yy)+(zz*zz)-(y*y))>0.001){175 if(std::fabs((xx*xx)+(yy*yy)+(zz*zz)-(y*y))>0.001){ 176 176 G4cout << " Norm of y not correct " << G4endl; 177 177 } … … 200 200 //// if (cthetaE > 0.01)goto leap2; 201 201 //// if (cthetaG > 0.01)goto leap2; 202 //// if (std:: abs(x-0.5) > 0.5 )goto leap2;203 //// if (std:: abs(y-0.5) > 0.5 )goto leap2;202 //// if (std::fabs(x-0.5) > 0.5 )goto leap2; 203 //// if (std::fabs(y-0.5) > 0.5 )goto leap2; 204 204 // 205 205 //----------------------------------------------------------------------- … … 330 330 (energy2+ 331 331 (daughtermomentum[0]+daughtermomentum[1]))); 332 G4double beta = -1.0*(daughtermomentum[0]+daughtermomentum[1])/energy2; 332 G4double beta = (daughtermomentum[0]+daughtermomentum[1])/energy2; 333 beta = -1.0 * std::min(beta,0.99); 333 334 334 335 G4double costhetan = 2.*G4UniformRand()-1.0; … … 346 347 347 348 // boost to the muon rest frame 348 G4LorentzVector p4; 349 p4 = daughterparticle2->Get4Momentum(); 350 351 p4.boost( (direction0.x()+direction1.x())*beta, 352 (direction0.y()+direction1.y())*beta, 353 (direction0.z()+direction1.z())*beta); 354 349 350 G4ThreeVector direction34(direction0.x()+direction1.x(), 351 direction0.y()+direction1.y(), 352 direction0.z()+direction1.z()); 353 direction34 = direction34.unit(); 354 355 G4LorentzVector p4 = daughterparticle2->Get4Momentum(); 356 p4.boost(direction34.x()*beta,direction34.y()*beta,direction34.z()*beta); 355 357 daughterparticle2->Set4Momentum(p4); 358 356 359 p4 = daughterparticle3->Get4Momentum(); 357 358 p4.boost( (direction0.x()+direction1.x())*beta, 359 (direction0.y()+direction1.y())*beta, 360 (direction0.z()+direction1.z())*beta); 360 p4.boost(direction34.x()*beta,direction34.y()*beta,direction34.z()*beta); 361 361 daughterparticle3->Set4Momentum(p4); 362 362 -
trunk/source/particles/management/src/G4NeutronBetaDecayChannel.cc
r992 r1196 26 26 // 27 27 // $Id: G4NeutronBetaDecayChannel.cc,v 1.7 2006/06/29 19:25:38 gunter Exp $ 28 // GEANT4 tag $Name: geant4-09-0 2-ref-02$28 // GEANT4 tag $Name: geant4-09-03-cand-01 $ 29 29 // 30 30 // -
trunk/source/particles/management/src/G4NucleiProperties.cc
r992 r1196 25 25 // 26 26 // 27 // $Id: G4NucleiProperties.cc,v 1. 18 2008/11/06 13:17:36kurasige Exp $28 // GEANT4 tag $Name: geant4-09-0 2-ref-02$27 // $Id: G4NucleiProperties.cc,v 1.21 2009/05/02 11:58:17 kurasige Exp $ 28 // GEANT4 tag $Name: geant4-09-03-cand-01 $ 29 29 // 30 30 // … … 39 39 // Added Shell-Pairing corrections to the Cameron mass 40 40 // excess formula by V.Lara (9 May 99) 41 41 // 090331 Migrate to AME03 by Koi, Tatsumi 42 42 43 43 #include "G4NucleiProperties.hh" 44 44 45 G4bool G4NucleiProperties::isIntialized = false;46 45 47 46 G4double G4NucleiProperties::mass_proton = -1.; … … 51 50 G4double G4NucleiProperties::mass_alpha = -1.; 52 51 G4double G4NucleiProperties::mass_He3 = -1.; 53 G4double G4NucleiProperties::electronMass[MaxZ]; 52 53 G4double G4NucleiProperties::GetNuclearMass(const G4double A, const G4double Z) 54 { 55 G4double mass=0.0; 56 57 if (std::fabs(A - G4int(A)) > 1.e-10) { 58 mass = NuclearMass(A,Z); 59 60 } else { 61 // use mass table 62 G4int iZ = G4int(Z); 63 G4int iA = G4int(A); 64 mass =GetNuclearMass(iA,iZ); 65 } 66 67 return mass; 68 } 69 70 G4double G4NucleiProperties::GetNuclearMass(const G4int A, const G4int Z) 71 { 72 if (mass_proton <= 0.0 ) { 73 G4ParticleDefinition * nucleus = 0; 74 nucleus = G4ParticleTable::GetParticleTable()->FindParticle("proton"); // proton 75 if (nucleus!=0) mass_proton = nucleus->GetPDGMass(); 76 nucleus = G4ParticleTable::GetParticleTable()->FindParticle("neutron"); // neutron 77 if (nucleus!=0) mass_neutron = nucleus->GetPDGMass(); 78 nucleus = G4ParticleTable::GetParticleTable()->FindParticle("deuteron"); // deuteron 79 if (nucleus!=0) mass_deuteron = nucleus->GetPDGMass(); 80 nucleus = G4ParticleTable::GetParticleTable()->FindParticle("triton"); // triton 81 if (nucleus!=0) mass_triton = nucleus->GetPDGMass(); 82 nucleus = G4ParticleTable::GetParticleTable()->FindParticle("alpha"); // alpha 83 if (nucleus!=0) mass_alpha = nucleus->GetPDGMass(); 84 nucleus = G4ParticleTable::GetParticleTable()->FindParticle("He3"); // He3 85 if (nucleus!=0) mass_He3 = nucleus->GetPDGMass(); 86 87 } 88 89 if (A < 1 || Z < 0 || Z > A) { 90 #ifdef G4VERBOSE 91 if (G4ParticleTable::GetParticleTable()->GetVerboseLevel()>0) { 92 G4cout << "G4NucleiProperties::GetNuclearMass: Wrong values for A = " << A 93 << " and Z = " << Z << G4endl; 94 } 95 #endif 96 return 0.0; 97 } 98 99 G4double mass= -1.; 100 if ( (Z<=2) ) { 101 // light nuclei 102 if ( (Z==1)&&(A==1) ) { 103 mass = mass_proton; 104 } else if ( (Z==0)&&(A==1) ) { 105 mass = mass_neutron; 106 } else if ( (Z==1)&&(A==2) ) { 107 mass = mass_deuteron; 108 } else if ( (Z==1)&&(A==3) ) { 109 mass = mass_triton; 110 } else if ( (Z==2)&&(A==4) ) { 111 mass = mass_alpha; 112 } else if ( (Z==2)&&(A==3) ) { 113 mass = mass_He3; 114 } 115 } 116 117 if (mass < 0.) { 118 if (G4NucleiPropertiesTableAME03::IsInTable(Z,A)) { 119 // AME 03 table 120 mass = G4NucleiPropertiesTableAME03::GetNuclearMass(Z,A); 121 } else if (G4NucleiPropertiesTheoreticalTable::IsInTable(Z,A)){ 122 // Theoretical table 123 mass = G4NucleiPropertiesTheoreticalTable::GetNuclearMass(Z,A); 124 } else { 125 mass = NuclearMass(G4double(A),G4double(Z)); 126 } 127 } 128 129 if (mass < 0.) mass = 0.0; 130 return mass; 131 } 132 133 G4bool G4NucleiProperties::IsInStableTable(const G4double A, const G4double Z) 134 { 135 G4int iA = G4int(A); 136 G4int iZ = G4int(Z); 137 return IsInStableTable(iA, iZ); 138 } 139 140 G4bool G4NucleiProperties::IsInStableTable(const G4int A, const int Z) 141 { 142 if (A < 1 || Z < 0 || Z > A) { 143 #ifdef G4VERBOSE 144 if (G4ParticleTable::GetParticleTable()->GetVerboseLevel()>0) { 145 G4cout << "G4NucleiProperties::IsInStableTable: Wrong values for A = " 146 << A << " and Z = " << Z << G4endl; 147 } 148 #endif 149 return false; 150 } 151 152 return G4NucleiPropertiesTableAME03::IsInTable(Z,A); 153 154 } 155 156 G4double G4NucleiProperties::GetMassExcess(const G4double A, const G4double Z) 157 { 158 G4int iA = G4int(A); 159 G4int iZ = G4int(Z); 160 return GetMassExcess(iA,iZ); 161 } 162 163 G4double G4NucleiProperties::GetMassExcess(const G4int A, const G4int Z) 164 { 165 if (A < 1 || Z < 0 || Z > A) { 166 #ifdef G4VERBOSE 167 if (G4ParticleTable::GetParticleTable()->GetVerboseLevel()>0) { 168 G4cout << "G4NucleiProperties::GetMassExccess: Wrong values for A = " 169 << A << " and Z = " << Z << G4endl; 170 } 171 #endif 172 return 0.0; 173 174 } else { 175 176 if (G4NucleiPropertiesTableAME03::IsInTable(Z,A)){ 177 return G4NucleiPropertiesTableAME03::GetMassExcess(Z,A); 178 } else if (G4NucleiPropertiesTheoreticalTable::IsInTable(Z,A)){ 179 return G4NucleiPropertiesTheoreticalTable::GetMassExcess(Z,A); 180 } else { 181 return MassExcess(A,Z); 182 } 183 } 184 185 } 186 187 188 G4double G4NucleiProperties::GetAtomicMass(const G4double A, const G4double Z) 189 { 190 if (A < 1 || Z < 0 || Z > A) { 191 #ifdef G4VERBOSE 192 if (G4ParticleTable::GetParticleTable()->GetVerboseLevel()>0) { 193 G4cout << "G4NucleiProperties::GetAtomicMass: Wrong values for A = " 194 << A << " and Z = " << Z << G4endl; 195 } 196 #endif 197 return 0.0; 198 199 } else if (std::fabs(A - G4int(A)) > 1.e-10) { 200 return AtomicMass(A,Z); 201 202 } else { 203 G4int iA = G4int(A); 204 G4int iZ = G4int(Z); 205 if (G4NucleiPropertiesTableAME03::IsInTable(iZ,iA)) { 206 return G4NucleiPropertiesTableAME03::GetAtomicMass(iZ,iA); 207 } else if (G4NucleiPropertiesTheoreticalTable::IsInTable(iZ,iA)){ 208 return G4NucleiPropertiesTheoreticalTable::GetAtomicMass(iZ,iA); 209 } else { 210 return AtomicMass(A,Z); 211 } 212 } 213 } 214 215 G4double G4NucleiProperties::GetBindingEnergy(const G4double A, const G4double Z) 216 { 217 G4int iA = G4int(A); 218 G4int iZ = G4int(Z); 219 return GetBindingEnergy(iA,iZ); 220 } 221 222 G4double G4NucleiProperties::GetBindingEnergy(const G4int A, const G4int Z) 223 { 224 if (A < 1 || Z < 0 || Z > A) { 225 #ifdef G4VERBOSE 226 if (G4ParticleTable::GetParticleTable()->GetVerboseLevel()>0) { 227 G4cout << "G4NucleiProperties::GetMassExccess: Wrong values for A = " 228 << A << " and Z = " << Z << G4endl; 229 } 230 #endif 231 return 0.0; 232 233 } else { 234 if (G4NucleiPropertiesTableAME03::IsInTable(Z,A)) { 235 return G4NucleiPropertiesTableAME03::GetBindingEnergy(Z,A); 236 } else if (G4NucleiPropertiesTheoreticalTable::IsInTable(Z,A)) { 237 return G4NucleiPropertiesTheoreticalTable::GetBindingEnergy(Z,A); 238 }else { 239 return BindingEnergy(A,Z); 240 } 241 242 } 243 } 244 245 246 G4double G4NucleiProperties::MassExcess(G4double A, G4double Z) 247 { 248 return GetAtomicMass(A,Z) - A*amu_c2; 249 } 54 250 55 251 G4double G4NucleiProperties::AtomicMass(G4double A, G4double Z) 56 252 { 57 const G4double hydrogen_mass_excess = G4NucleiPropertiesTable ::GetMassExcess(1,1);58 const G4double neutron_mass_excess = G4NucleiPropertiesTable ::GetMassExcess(0,1);253 const G4double hydrogen_mass_excess = G4NucleiPropertiesTableAME03::GetMassExcess(1,1); 254 const G4double neutron_mass_excess = G4NucleiPropertiesTableAME03::GetMassExcess(0,1); 59 255 60 256 G4double mass = 61 257 (A-Z)*neutron_mass_excess + Z*hydrogen_mass_excess - BindingEnergy(A,Z) + A*amu_c2; 258 259 return mass; 260 } 261 262 G4double G4NucleiProperties::NuclearMass(G4double A, G4double Z) 263 { 264 if (A < 1 || Z < 0 || Z > A) { 265 #ifdef G4VERBOSE 266 if (G4ParticleTable::GetParticleTable()->GetVerboseLevel()>0) { 267 G4cout << "G4NucleiProperties::NuclearMass: Wrong values for A = " 268 << A << " and Z = " << Z << G4endl; 269 } 270 #endif 271 return 0.0; 272 } 273 274 G4double mass = AtomicMass(A,Z); 275 // atomic mass is converted to nuclear mass according formula in AME03 276 mass -= Z*electron_mass_c2; 277 mass += ( 14.4381*std::pow ( Z , 2.39 ) + 1.55468*1e-6*std::pow ( Z , 5.35 ) )*eV; 62 278 63 279 return mass; … … 81 297 } 82 298 83 84 G4double G4NucleiProperties::GetNuclearMass(const G4double A, const G4double Z)85 {86 if (!isIntialized) {87 isIntialized = true;88 G4ParticleDefinition * nucleus = 0;89 nucleus = G4ParticleTable::GetParticleTable()->FindParticle("proton"); // proton90 if (nucleus!=0) mass_proton = nucleus->GetPDGMass();91 nucleus = G4ParticleTable::GetParticleTable()->FindParticle("neutron"); // neutron92 if (nucleus!=0) mass_neutron = nucleus->GetPDGMass();93 nucleus = G4ParticleTable::GetParticleTable()->FindParticle("deuteron"); // deuteron94 if (nucleus!=0) mass_deuteron = nucleus->GetPDGMass();95 nucleus = G4ParticleTable::GetParticleTable()->FindParticle("triton"); // triton96 if (nucleus!=0) mass_triton = nucleus->GetPDGMass();97 nucleus = G4ParticleTable::GetParticleTable()->FindParticle("alpha"); // alpha98 if (nucleus!=0) mass_alpha = nucleus->GetPDGMass();99 nucleus = G4ParticleTable::GetParticleTable()->FindParticle("He3"); // He3100 if (nucleus!=0) mass_He3 = nucleus->GetPDGMass();101 102 for (int iz=1; iz<MaxZ; iz+=1){103 electronMass[iz] = iz*electron_mass_c2104 - 1.433e-5*MeV*std::pow(G4double(iz),2.39); ;105 }106 }107 108 if (A < 1 || Z < 0 || Z > A) {109 #ifdef G4VERBOSE110 if (G4ParticleTable::GetParticleTable()->GetVerboseLevel()>0) {111 G4cout << "G4NucleiProperties::GetNuclearMass: Wrong values for A = " << A112 << " and Z = " << Z << G4endl;113 }114 #endif115 return 0.0;116 } else {117 G4double mass= -1.;118 if ( (Z<=2) ) {119 if ( (Z==1)&&(A==1) ) {120 mass = mass_proton;121 } else if ( (Z==0)&&(A==1) ) {122 mass = mass_neutron;123 } else if ( (Z==1)&&(A==2) ) {124 mass = mass_deuteron;125 } else if ( (Z==1)&&(A==3) ) {126 mass = mass_triton;127 } else if ( (Z==2)&&(A==4) ) {128 mass = mass_alpha;129 } else if ( (Z==2)&&(A==3) ) {130 mass = mass_He3;131 }132 }133 if (mass < 0.) {134 if (Z >= MaxZ) {135 mass = GetAtomicMass(A,Z) - Z*electron_mass_c2 + 1.433e-5*MeV*std::pow(Z,2.39);136 } else {137 mass = GetAtomicMass(A,Z) - electronMass[G4int(Z)];138 }139 }140 if (mass < 0.) mass = 0.0;141 return mass;142 }143 }144 145 G4bool G4NucleiProperties::IsInStableTable(const G4double A, const G4double Z)146 {147 if (Z < 0 || Z > A) {148 #ifdef G4VERBOSE149 if (G4ParticleTable::GetParticleTable()->GetVerboseLevel()>0) {150 G4cout << "G4NucleiProperties::IsInStableTable: Wrong values for A = "151 << A << " and Z = " << Z << G4endl;152 }153 #endif154 return false;155 156 } else {157 G4int iA = G4int(A);158 G4int iZ = G4int(Z);159 return G4NucleiPropertiesTable::IsInTable(iZ,iA);160 }161 }162 163 G4double G4NucleiProperties::GetMassExcess(const G4double A, const G4double Z)164 {165 G4int iA = G4int(A);166 G4int iZ = G4int(Z);167 return GetMassExcess(iA,iZ);168 }169 170 G4double G4NucleiProperties::GetMassExcess(const G4int A, const G4int Z)171 {172 if (A < 1 || Z < 0 || Z > A) {173 #ifdef G4VERBOSE174 if (G4ParticleTable::GetParticleTable()->GetVerboseLevel()>0) {175 G4cout << "G4NucleiProperties::GetMassExccess: Wrong values for A = "176 << A << " and Z = " << Z << G4endl;177 }178 #endif179 return 0.0;180 181 } else {182 183 if (G4NucleiPropertiesTable::IsInTable(Z,A)){184 return G4NucleiPropertiesTable::GetMassExcess(Z,A);185 } else if (G4NucleiPropertiesTheoreticalTable::IsInTable(Z,A)){186 return G4NucleiPropertiesTheoreticalTable::GetMassExcess(Z,A);187 } else {188 return MassExcess(A,Z);189 }190 }191 192 }193 194 195 G4double G4NucleiProperties::GetAtomicMass(const G4double A, const G4double Z)196 {197 if (Z < 0 || Z > A) {198 #ifdef G4VERBOSE199 if (G4ParticleTable::GetParticleTable()->GetVerboseLevel()>0) {200 G4cout << "G4NucleiProperties::GetAtomicMass: Wrong values for A = "201 << A << " and Z = " << Z << G4endl;202 }203 #endif204 return 0.0;205 206 } else if (std::abs(A - G4int(A)) > 1.e-10) {207 return AtomicMass(A,Z);208 209 } else {210 G4int iA = G4int(A);211 G4int iZ = G4int(Z);212 if (G4NucleiPropertiesTable::IsInTable(iZ,iA)) {213 return G4NucleiPropertiesTable::GetAtomicMass(iZ,iA);214 } else if (G4NucleiPropertiesTheoreticalTable::IsInTable(iZ,iA)){215 return G4NucleiPropertiesTheoreticalTable::GetAtomicMass(iZ,iA);216 } else {217 return AtomicMass(A,Z);218 }219 }220 }221 222 G4double G4NucleiProperties::GetBindingEnergy(const G4double A, const G4double Z)223 {224 G4int iA = G4int(A);225 G4int iZ = G4int(Z);226 return GetBindingEnergy(iA,iZ);227 }228 229 G4double G4NucleiProperties::GetBindingEnergy(const G4int A, const G4int Z)230 {231 if (A < 1 || Z < 0 || Z > A) {232 #ifdef G4VERBOSE233 if (G4ParticleTable::GetParticleTable()->GetVerboseLevel()>0) {234 G4cout << "G4NucleiProperties::GetMassExccess: Wrong values for A = "235 << A << " and Z = " << Z << G4endl;236 }237 #endif238 return 0.0;239 240 } else {241 if (G4NucleiPropertiesTable::IsInTable(Z,A)) {242 return G4NucleiPropertiesTable::GetBindingEnergy(Z,A);243 } else if (G4NucleiPropertiesTheoreticalTable::IsInTable(Z,A)) {244 return G4NucleiPropertiesTheoreticalTable::GetBindingEnergy(Z,A);245 }else {246 return BindingEnergy(A,Z);247 }248 249 }250 }251 252 253 G4double G4NucleiProperties::MassExcess(G4double A, G4double Z)254 {255 return GetAtomicMass(A,Z) - A*amu_c2;256 }257 -
trunk/source/particles/management/src/G4NucleiPropertiesTheoreticalTableA.cc
r992 r1196 26 26 // 27 27 // $Id: G4NucleiPropertiesTheoreticalTableA.cc,v 1.8 2006/06/29 19:25:46 gunter Exp $ 28 // GEANT4 tag $Name: geant4-09-0 2-ref-02$28 // GEANT4 tag $Name: geant4-09-03-cand-01 $ 29 29 // 30 30 // -
trunk/source/particles/management/src/G4PDGCodeChecker.cc
r992 r1196 25 25 // 26 26 // 27 // $Id: G4PDGCodeChecker.cc,v 1.1 1 2008/06/08 12:43:19kurasige Exp $28 // GEANT4 tag $Name: geant4-09-0 2-ref-02$27 // $Id: G4PDGCodeChecker.cc,v 1.12 2009/04/02 02:24:53 kurasige Exp $ 28 // GEANT4 tag $Name: geant4-09-03-cand-01 $ 29 29 // 30 30 // … … 343 343 } 344 344 345 if (std:: abs(totalCharge-thePDGCharge)>0.1*eplus) {345 if (std::fabs(totalCharge-thePDGCharge)>0.1*eplus) { 346 346 #ifdef G4VERBOSE 347 347 if (verboseLevel>0) { -
trunk/source/particles/management/src/G4ParticleDefinition.cc
r992 r1196 25 25 // 26 26 // 27 // $Id: G4ParticleDefinition.cc,v 1.3 1 2008/06/08 12:43:19kurasige Exp $28 // GEANT4 tag $Name: geant4-09-0 2-ref-02$27 // $Id: G4ParticleDefinition.cc,v 1.34 2009/09/21 04:08:24 kurasige Exp $ 28 // GEANT4 tag $Name: geant4-09-03-cand-01 $ 29 29 // 30 30 // … … 54 54 #include "G4ParticleDefinition.hh" 55 55 #include "G4ParticleTable.hh" 56 #include "G4IonTable.hh" 56 57 #include "G4DecayTable.hh" 57 58 #include "G4PDGCodeChecker.hh" 59 #include "G4StateManager.hh" 58 60 59 61 G4ParticleDefinition::G4ParticleDefinition( … … 110 112 fApplyCutsFlag(false) 111 113 { 112 // check name and register this particle into ParticleTable 113 theParticleTable = G4ParticleTable::GetParticleTable(); 114 theParticleTable->Insert(this); 114 static G4String nucleus("nucleus"); 115 theParticleTable = G4ParticleTable::GetParticleTable(); 115 116 116 117 //set verboseLevel equal to ParticleTable … … 128 129 #endif 129 130 } 131 132 // check initialization is in Pre_Init state except for ions 133 G4ApplicationState currentState = G4StateManager::GetStateManager()->GetCurrentState(); 134 135 if ( (theParticleType!=nucleus) && (currentState!=G4State_PreInit)){ 136 #ifdef G4VERBOSE 137 if (GetVerboseLevel()>0) { 138 G4cout << "G4ParticleDefintion (other than ions) should be created in Pre_Init state "; 139 G4cout << aName << G4endl; 140 } 141 #endif 142 G4Exception( "G4ParticleDefintion::G4ParticleDefintion", 143 "Illegal operation", JustWarning, 144 "G4ParticleDefinition should be created in PreInit state"); 145 } 146 147 148 if (theParticleTable->GetIonTable()->IsIon(this)) { 149 SetAtomicNumber( G4int(GetPDGCharge()/eplus) ); 150 SetAtomicMass( GetBaryonNumber() ); 151 } 152 153 154 // check name and register this particle into ParticleTable 155 theParticleTable->Insert(this); 156 130 157 } 131 158 -
trunk/source/particles/management/src/G4ParticleMessenger.cc
r992 r1196 25 25 // 26 26 // 27 // $Id: G4ParticleMessenger.cc,v 1.1 0 2008/06/08 12:43:19kurasige Exp $28 // GEANT4 tag $Name: geant4-09-0 2-ref-02$27 // $Id: G4ParticleMessenger.cc,v 1.11 2009/07/31 06:39:22 kurasige Exp $ 28 // GEANT4 tag $Name: geant4-09-03-cand-01 $ 29 29 // 30 30 // … … 53 53 #include "G4UIcmdWithAString.hh" 54 54 #include "G4UIcmdWithAnInteger.hh" 55 #include "G4UIcmdWithoutParameter.hh" 55 56 #include "G4ParticleTable.hh" 57 #include "G4IonTable.hh" 56 58 #include "G4ParticleDefinition.hh" 57 59 #include "G4ParticlePropertyMessenger.hh" … … 75 77 selectCmd->SetDefaultValue("none"); 76 78 selectCmd->SetParameterName("particle name", false); 79 selectCmd->AvailableForStates(G4State_PreInit,G4State_Idle); 77 80 78 81 //Commnad /particle/list … … 83 86 listCmd->SetDefaultValue("all"); 84 87 listCmd->SetCandidates("all lepton baryon meson nucleus quarks"); 88 listCmd->AvailableForStates(G4State_PreInit,G4State_Idle); 85 89 86 90 //Commnad /particle/find … … 89 93 findCmd->SetDefaultValue(0); 90 94 findCmd->SetParameterName("encoding", false); 95 findCmd->AvailableForStates(G4State_PreInit,G4State_Idle); 96 97 //Commnad /particle/createAllIon 98 createAllCmd = new G4UIcmdWithoutParameter("/particle/createAllIon",this); 99 createAllCmd->SetGuidance("Create All ions"); 100 createAllCmd->AvailableForStates(G4State_Idle); 91 101 92 102 // -- particle/property/Verbose --- … … 114 124 delete selectCmd; 115 125 delete findCmd; 126 delete createAllCmd; 116 127 delete verboseCmd; 117 128 … … 158 169 G4cout << "Unknown particle [" << newValues << "]. Command ignored." << G4endl; 159 170 } 171 160 172 } else if( command==findCmd ){ 161 173 //Commnad /particle/find … … 167 179 tmp->DumpTable(); 168 180 } 181 182 } else if( command==createAllCmd ) { 183 //Commnad /particle/createAllIon 184 theParticleTable->GetIonTable()->CreateAllIon(); 185 169 186 } else if( command==verboseCmd ) { 170 187 //Commnad /particle/verbose -
trunk/source/particles/management/src/G4ParticlePropertyData.cc
r824 r1196 24 24 // ******************************************************************** 25 25 // 26 // $Id: G4ParticlePropertyData.cc,v 1. 3 2007/03/11 07:17:35kurasige Exp $26 // $Id: G4ParticlePropertyData.cc,v 1.4 2009/08/17 14:52:19 kurasige Exp $ 27 27 // 28 28 // class G4ParticlePropertyData … … 197 197 void G4ParticlePropertyData::Print() const 198 198 { 199 #ifdef G4VERBOSE 199 200 G4cout << " Particle Name : " << theParticleName << G4endl; 200 201 G4cout << " PDG particle code : " << thePDGEncoding; … … 230 231 G4cout << ", " << theAntiQuarkContent[4]; 231 232 G4cout << ", " << theAntiQuarkContent[5] << G4endl; 232 } 233 234 235 236 237 238 239 240 241 233 #endif 234 } 235 236 237 238 239 240 241 242 243 -
trunk/source/particles/management/src/G4ParticlePropertyMessenger.cc
r992 r1196 26 26 // 27 27 // $Id: G4ParticlePropertyMessenger.cc,v 1.7 2006/06/29 19:25:59 gunter Exp $ 28 // GEANT4 tag $Name: geant4-09-0 2-ref-02$28 // GEANT4 tag $Name: geant4-09-03-cand-01 $ 29 29 // 30 30 // -
trunk/source/particles/management/src/G4ParticleTable.cc
r992 r1196 25 25 // 26 26 // 27 // $Id: G4ParticleTable.cc,v 1.3 3 2008/06/08 12:55:45kurasige Exp $28 // GEANT4 tag $Name: geant4-09-0 2-ref-02$27 // $Id: G4ParticleTable.cc,v 1.35 2009/08/17 14:52:19 kurasige Exp $ 28 // GEANT4 tag $Name: geant4-09-03-cand-01 $ 29 29 // 30 30 // class G4ParticleTable … … 235 235 #ifdef G4VERBOSE 236 236 if (verboseLevel>0){ 237 G4cout << "The particle has same name "<< G4endl; 237 G4cout << "The particle " << particle->GetParticleName() 238 << "has been already registered in the Particle Table "<< G4endl; 238 239 } 239 240 if (verboseLevel>1){ … … 454 455 void G4ParticleTable::CheckReadiness() 455 456 { 456 if(!readyToUse) 457 { 457 if(!readyToUse) { 458 458 G4String msg; 459 459 msg = " Access to G4ParticleTable for finding a particle or equivalent\n"; -
trunk/source/particles/management/src/G4PhaseSpaceDecayChannel.cc
r992 r1196 26 26 // 27 27 // $Id: G4PhaseSpaceDecayChannel.cc,v 1.13 2007/10/06 06:49:29 kurasige Exp $ 28 // GEANT4 tag $Name: geant4-09-0 2-ref-02$28 // GEANT4 tag $Name: geant4-09-03-cand-01 $ 29 29 // 30 30 // -
trunk/source/particles/management/src/G4PrimaryParticle.cc
r992 r1196 26 26 // 27 27 // $Id: G4PrimaryParticle.cc,v 1.5 2007/10/06 06:49:29 kurasige Exp $ 28 // GEANT4 tag $Name: geant4-09-0 2-ref-02$28 // GEANT4 tag $Name: geant4-09-03-cand-01 $ 29 29 // 30 30 -
trunk/source/particles/management/src/G4PrimaryVertex.cc
r992 r1196 26 26 // 27 27 // $Id: G4PrimaryVertex.cc,v 1.4 2007/10/06 06:49:29 kurasige Exp $ 28 // GEANT4 tag $Name: geant4-09-0 2-ref-02$28 // GEANT4 tag $Name: geant4-09-03-cand-01 $ 29 29 // 30 30 -
trunk/source/particles/management/src/G4ShortLivedTable.cc
r992 r1196 25 25 // 26 26 // 27 // $Id: G4ShortLivedTable.cc,v 1.1 6 2008/06/08 12:55:45kurasige Exp $28 // GEANT4 tag $Name: geant4-09-0 2-ref-02$27 // $Id: G4ShortLivedTable.cc,v 1.17 2009/08/17 14:52:19 kurasige Exp $ 28 // GEANT4 tag $Name: geant4-09-03-cand-01 $ 29 29 // 30 30 // … … 53 53 54 54 // No need to delete here because all particles are dynamic objects 55 //56 // remove all contents in the short lived List and delete all particles57 //G4ShortLivedList::iterator i;58 //for (i = fShortLivedList->begin(); i!= fShortLivedList->end(); ++i) {59 // delete (*i);60 //}61 55 62 56 fShortLivedList->clear(); -
trunk/source/particles/management/src/G4TauLeptonicDecayChannel.cc
r992 r1196 26 26 // 27 27 // $Id: G4TauLeptonicDecayChannel.cc,v 1.5 2006/06/29 19:26:18 gunter Exp $ 28 // GEANT4 tag $Name: geant4-09-0 2-ref-02$28 // GEANT4 tag $Name: geant4-09-03-cand-01 $ 29 29 // 30 30 // -
trunk/source/particles/management/src/G4VDecayChannel.cc
r992 r1196 25 25 // 26 26 // 27 // $Id: G4VDecayChannel.cc,v 1.1 8 2006/06/29 19:26:20 gunterExp $28 // GEANT4 tag $Name: geant4-09-0 2-ref-02$27 // $Id: G4VDecayChannel.cc,v 1.19 2009/08/17 14:52:19 kurasige Exp $ 28 // GEANT4 tag $Name: geant4-09-03-cand-01 $ 29 29 // 30 30 // … … 166 166 G4VDecayChannel::~G4VDecayChannel() 167 167 { 168 ClearDaughtersName(); 168 169 if (parent_name != 0) delete parent_name; 169 ClearDaughtersName();170 parent_name = 0; 170 171 if (daughters_mass != 0) delete [] daughters_mass; 172 daughters_mass =0; 171 173 } 172 174 … … 177 179 #ifdef G4VERBOSE 178 180 if (verboseLevel>1) { 179 G4c out << "G4VDecayChannel::ClearDaughtersName ";180 G4cout << "clear all daughters "<< G4endl;181 G4cerr << "G4VDecayChannel::ClearDaughtersName " 182 << " for " << *parent_name << G4endl; 181 183 } 182 184 #endif -
trunk/source/particles/management/src/G4VUserPrimaryParticleInformation.cc
r992 r1196 26 26 // 27 27 // $Id: G4VUserPrimaryParticleInformation.cc,v 1.2 2006/06/29 19:26:22 gunter Exp $ 28 // GEANT4 tag $Name: geant4-09-0 2-ref-02$28 // GEANT4 tag $Name: geant4-09-03-cand-01 $ 29 29 // 30 30 #include "G4VUserPrimaryParticleInformation.hh" -
trunk/source/particles/management/src/G4VUserPrimaryVertexInformation.cc
r992 r1196 26 26 // 27 27 // $Id: G4VUserPrimaryVertexInformation.cc,v 1.2 2006/06/29 19:26:24 gunter Exp $ 28 // GEANT4 tag $Name: geant4-09-0 2-ref-02$28 // GEANT4 tag $Name: geant4-09-03-cand-01 $ 29 29 // 30 30 //
Note: See TracChangeset
for help on using the changeset viewer.