Changeset 1340 for trunk/source/particles/management/src
- Timestamp:
- Nov 5, 2010, 3:45:55 PM (14 years ago)
- Location:
- trunk/source/particles/management/src
- Files:
-
- 15 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/source/particles/management/src/G4DecayProducts.cc
r1337 r1340 25 25 // 26 26 // 27 // $Id: G4DecayProducts.cc,v 1.1 8 2010/05/20 01:01:07kurasige Exp $28 // GEANT4 tag $Name: geant4-09-04-beta-01$27 // $Id: G4DecayProducts.cc,v 1.19 2010/10/30 07:55:00 kurasige Exp $ 28 // GEANT4 tag $Name: particles-V09-03-15 $ 29 29 // 30 30 // … … 51 51 :numberOfProducts(0),theParentParticle(0) 52 52 { 53 53 //clear theProductVector 54 for (size_t i=0;i<MaxNumberOfProducts; i+=1){ 55 theProductVector[i]=0; 56 } 54 57 } 55 58 56 59 G4DecayProducts::G4DecayProducts(const G4DynamicParticle &aParticle) 57 60 :numberOfProducts(0),theParentParticle(0) 58 61 { 59 62 theParentParticle = new G4DynamicParticle(aParticle); 63 //clear theProductVector 64 for (size_t i=0;i<MaxNumberOfProducts; i+=1){ 65 theProductVector[i]=0; 66 } 60 67 } 61 68 … … 63 70 :numberOfProducts(0) 64 71 { 72 //clear theProductVector 73 for (size_t i=0;i<MaxNumberOfProducts; i+=1){ 74 theProductVector[i]=0; 75 } 76 65 77 // copy parent (Deep Copy) 66 78 theParentParticle = new G4DynamicParticle(*right.theParentParticle); -
trunk/source/particles/management/src/G4DynamicParticle.cc
r1337 r1340 25 25 // 26 26 // 27 // $Id: G4DynamicParticle.cc,v 1. 29 2010/05/20 01:01:07kurasige Exp $28 // GEANT4 tag $Name: geant4-09-04-beta-01$27 // $Id: G4DynamicParticle.cc,v 1.30 2010/08/10 15:47:42 kurasige Exp $ 28 // GEANT4 tag $Name: particles-V09-03-15 $ 29 29 // 30 30 // … … 94 94 // -- constructors ---- 95 95 //////////////////// 96 G4DynamicParticle::G4DynamicParticle( G4ParticleDefinition * aParticleDefinition,96 G4DynamicParticle::G4DynamicParticle(const G4ParticleDefinition * aParticleDefinition, 97 97 const G4ThreeVector& aMomentumDirection, 98 98 G4double aKineticEnergy): … … 113 113 114 114 //////////////////// 115 G4DynamicParticle::G4DynamicParticle( G4ParticleDefinition * aParticleDefinition,115 G4DynamicParticle::G4DynamicParticle(const G4ParticleDefinition * aParticleDefinition, 116 116 const G4ThreeVector& aParticleMomentum): 117 117 theParticleDefinition(aParticleDefinition), … … 134 134 135 135 //////////////////// 136 G4DynamicParticle::G4DynamicParticle( G4ParticleDefinition * aParticleDefinition,136 G4DynamicParticle::G4DynamicParticle(const G4ParticleDefinition * aParticleDefinition, 137 137 const G4LorentzVector &aParticleMomentum): 138 138 theParticleDefinition(aParticleDefinition), … … 154 154 } 155 155 156 G4DynamicParticle::G4DynamicParticle( G4ParticleDefinition * aParticleDefinition,156 G4DynamicParticle::G4DynamicParticle(const G4ParticleDefinition * aParticleDefinition, 157 157 G4double totalEnergy, 158 158 const G4ThreeVector &aParticleMomentum): … … 267 267 268 268 //////////////////// 269 void G4DynamicParticle::SetDefinition( G4ParticleDefinition * aParticleDefinition)269 void G4DynamicParticle::SetDefinition(const G4ParticleDefinition * aParticleDefinition) 270 270 { 271 271 // remove preassigned decay … … 318 318 void G4DynamicParticle::AllocateElectronOccupancy() 319 319 { 320 G4ParticleDefinition* particle = GetDefinition();320 const G4ParticleDefinition* particle = GetDefinition(); 321 321 322 322 if (G4IonTable::IsIon(particle)) { -
trunk/source/particles/management/src/G4IonTable.cc
r1337 r1340 25 25 // 26 26 // 27 // $Id: G4IonTable.cc,v 1.6 1 2010/05/20 01:01:07kurasige Exp $28 // GEANT4 tag $Name: geant4-09-04-beta-01$27 // $Id: G4IonTable.cc,v 1.65 2010/10/16 06:04:51 kurasige Exp $ 28 // GEANT4 tag $Name: particles-V09-03-15 $ 29 29 // 30 30 // … … 367 367 // Search ions with A, Z ,E 368 368 // !! J is omitted now !! 369 G4ParticleDefinition* ion=0;369 const G4ParticleDefinition* ion=0; 370 370 G4bool isFound = false; 371 371 … … 386 386 387 387 if ( isFound ){ 388 return ion;388 return const_cast<G4ParticleDefinition*>(ion); 389 389 } else { 390 390 return 0; … … 414 414 // Search ions with A, Z ,E 415 415 // !! J is omitted now !! 416 G4ParticleDefinition* ion=0;416 const G4ParticleDefinition* ion=0; 417 417 G4bool isFound = false; 418 418 … … 435 435 436 436 if ( isFound ){ 437 return ion;437 return const_cast<G4ParticleDefinition*>(ion); 438 438 } else { 439 439 return 0; … … 599 599 600 600 // neutron is not ion 601 if ((particle->GetAtomicMass() >0) && (particle->GetAtomicNumber()>0)) return true; 601 if ((particle->GetAtomicMass()>0) && 602 (particle->GetAtomicNumber()>0) ){ 603 if (particle->GetBaryonNumber()>0) return true; 604 else return false; 605 } 606 602 607 603 // particles derived from G4 VIon and G4Ions608 // particles derived from G4Ions 604 609 if (particle->GetParticleType() == nucleus) return true; 605 610 … … 611 616 612 617 ///////////////// 618 G4bool G4IonTable::IsAntiIon(const G4ParticleDefinition* particle) 619 { 620 // return true if the particle is ion 621 622 static G4String anti_nucleus("anti_nucleus"); 623 static G4String anti_proton("anti_proton"); 624 625 // anti_neutron is not ion 626 if ((particle->GetAtomicMass()>0) && 627 (particle->GetAtomicNumber()>0) ){ 628 if (particle->GetBaryonNumber()<0) return true; 629 else return false; 630 } 631 632 // particles derived from G4Ions 633 if (particle->GetParticleType() == anti_nucleus) return true; 634 635 // anti_proton (Anti_Hydrogen nucleus) 636 if (particle->GetParticleName() == anti_proton) return true; 637 638 return false; 639 } 640 641 ///////////////// 613 642 #include <algorithm> 614 643 615 G4bool G4IonTable::IsLightIon( G4ParticleDefinition* particle) const616 { 617 static const std::string names[] = { "proton", " neutron", "alpha", "deuteron",618 "triton", "He3" , "GenericIon"};644 G4bool G4IonTable::IsLightIon(const G4ParticleDefinition* particle) const 645 { 646 static const std::string names[] = { "proton", "alpha", "deuteron", 647 "triton", "He3"}; 619 648 620 649 // return true if the particle is pre-defined ion 621 return std::find(names, names+7, particle->GetParticleName())!=names+7; 650 return std::find(names, names+5, particle->GetParticleName())!=names+5; 651 } 652 653 G4bool G4IonTable::IsLightAntiIon(const G4ParticleDefinition* particle) const 654 { 655 static const std::string names[] = { "anti_proton", "anti_alpha", "anti_deuteron", 656 "anti_triton", "anti_He3"}; 657 658 // return true if the particle is pre-defined ion 659 return std::find(names, names+5, particle->GetParticleName())!=names+5; 622 660 } 623 661 … … 627 665 // returns pointer to pre-defined ions 628 666 static G4bool isInitialized = false; 629 static G4ParticleDefinition* p_proton=0; 630 static G4ParticleDefinition* p_neutron=0; 631 static G4ParticleDefinition* p_deuteron=0; 632 static G4ParticleDefinition* p_triton=0; 633 static G4ParticleDefinition* p_alpha=0; 634 static G4ParticleDefinition* p_He3=0; 667 static const G4ParticleDefinition* p_proton=0; 668 static const G4ParticleDefinition* p_deuteron=0; 669 static const G4ParticleDefinition* p_triton=0; 670 static const G4ParticleDefinition* p_alpha=0; 671 static const G4ParticleDefinition* p_He3=0; 635 672 636 673 if (!isInitialized) { 637 674 p_proton = G4ParticleTable::GetParticleTable()->FindParticle("proton"); // proton 638 p_neutron = G4ParticleTable::GetParticleTable()->FindParticle("neutron"); // neutron639 675 p_deuteron = G4ParticleTable::GetParticleTable()->FindParticle("deuteron"); // deuteron 640 676 p_triton = G4ParticleTable::GetParticleTable()->FindParticle("triton"); // tritoon … … 644 680 } 645 681 646 G4ParticleDefinition* ion=0;682 const G4ParticleDefinition* ion=0; 647 683 if ( (Z<=2) ) { 648 684 if ( (Z==1)&&(A==1) ) { 649 685 ion = p_proton; 650 } else if ( (Z==0)&&(A==1) ) {651 ion = p_neutron;652 686 } else if ( (Z==1)&&(A==2) ) { 653 687 ion = p_deuteron; … … 660 694 } 661 695 } 662 return ion; 663 } 696 return const_cast<G4ParticleDefinition*>(ion); 697 } 698 699 ///////////////// 700 G4ParticleDefinition* G4IonTable::GetLightAntiIon(G4int Z, G4int A) const 701 { 702 // returns pointer to pre-defined ions 703 static G4bool isInitialized = false; 704 static const G4ParticleDefinition* p_proton=0; 705 static const G4ParticleDefinition* p_deuteron=0; 706 static const G4ParticleDefinition* p_triton=0; 707 static const G4ParticleDefinition* p_alpha=0; 708 static const G4ParticleDefinition* p_He3=0; 709 710 if (!isInitialized) { 711 p_proton = G4ParticleTable::GetParticleTable()->FindParticle("anti_proton"); // proton 712 p_deuteron = G4ParticleTable::GetParticleTable()->FindParticle("anti_deuteron"); // deuteron 713 p_triton = G4ParticleTable::GetParticleTable()->FindParticle("anti_triton"); // tritoon 714 p_alpha = G4ParticleTable::GetParticleTable()->FindParticle("anti_alpha"); // alpha 715 p_He3 = G4ParticleTable::GetParticleTable()->FindParticle("anti_He3"); // He3 716 isInitialized = true; 717 } 718 719 const G4ParticleDefinition* ion=0; 720 if ( (Z<=2) ) { 721 if ( (Z==1)&&(A==1) ) { 722 ion = p_proton; 723 } else if ( (Z==1)&&(A==2) ) { 724 ion = p_deuteron; 725 } else if ( (Z==1)&&(A==3) ) { 726 ion = p_triton; 727 } else if ( (Z==2)&&(A==4) ) { 728 ion = p_alpha; 729 } else if ( (Z==2)&&(A==3) ) { 730 ion = p_He3; 731 } 732 } 733 return const_cast<G4ParticleDefinition*>(ion); 734 } 735 664 736 665 737 ///////////////// … … 683 755 if (L == 0) { 684 756 // calculate nucleus mass 685 G4ParticleDefinition* ion=GetLightIon(Z, A);757 const G4ParticleDefinition* ion=GetLightIon(Z, A); 686 758 687 759 if (ion!=0) { … … 708 780 // -- Methods for handling conatiner --- 709 781 ///////////////// 710 void G4IonTable::Insert( G4ParticleDefinition* particle)782 void G4IonTable::Insert(const G4ParticleDefinition* particle) 711 783 { 712 784 if (!IsIon(particle)) return; … … 718 790 G4int encoding=GetNucleusEncoding(Z, A, L); 719 791 720 fIonList->insert( std::pair< G4int,G4ParticleDefinition*>(encoding, particle) );721 722 } 723 724 ///////////////// 725 void G4IonTable::Remove( G4ParticleDefinition* particle)792 fIonList->insert( std::pair<const G4int, const G4ParticleDefinition*>(encoding, particle) ); 793 794 } 795 796 ///////////////// 797 void G4IonTable::Remove(const G4ParticleDefinition* particle) 726 798 { 727 799 if (IsIon(particle)) { … … 757 829 void G4IonTable::DumpTable(const G4String &particle_name) const 758 830 { 759 G4ParticleDefinition* ion;831 const G4ParticleDefinition* ion; 760 832 G4IonList::iterator idx; 761 833 for (idx = fIonList->begin(); idx!= fIonList->end(); ++idx) { … … 905 977 G4int counter = 0; 906 978 while( idx != fIonList->end() ){ 907 if ( counter == index ) return idx->second; 979 if ( counter == index ) { 980 return const_cast<G4ParticleDefinition*>(idx->second); 981 } 908 982 counter++; 909 983 idx++; -
trunk/source/particles/management/src/G4Ions.cc
r1337 r1340 25 25 // 26 26 // 27 // $Id: G4Ions.cc,v 1.1 6 2009/08/06 15:53:42 kurasige Exp $28 // GEANT4 tag $Name: geant4-09-04-beta-01$27 // $Id: G4Ions.cc,v 1.17 2010/10/09 10:36:02 kurasige Exp $ 28 // GEANT4 tag $Name: particles-V09-03-15 $ 29 29 // 30 30 // … … 67 67 68 68 if (GetAtomicNumber() == 0 ) { 69 SetAtomicNumber( G4int(GetPDGCharge()/eplus) ); 70 SetAtomicMass( GetBaryonNumber() ); 69 // AtomicNumber/Mass is positve even for anti_nulceus 70 SetAtomicNumber( abs(G4int(GetPDGCharge()/eplus)) ); 71 SetAtomicMass( abs(GetBaryonNumber()) ); 71 72 } 72 73 } -
trunk/source/particles/management/src/G4KL3DecayChannel.cc
r1337 r1340 25 25 // 26 26 // 27 // $Id: G4KL3DecayChannel.cc,v 1. 9 2009/08/17 14:52:19kurasige Exp $28 // GEANT4 tag $Name: geant4-09-04-beta-01$27 // $Id: G4KL3DecayChannel.cc,v 1.10 2010/10/30 07:55:00 kurasige Exp $ 28 // GEANT4 tag $Name: particles-V09-03-15 $ 29 29 // 30 30 // … … 62 62 static const G4String E_plus("e+"); 63 63 static const G4String E_minus("e-"); 64 64 65 massK = 0.0; 66 daughterM[idPi] = 0.0; 67 daughterM[idLepton] = 0.0; 68 daughterM[idNutrino] = 0.0; 69 65 70 // check modes 66 71 if ( ((theParentName == K_plus)&&(theLeptonName == E_plus)) || -
trunk/source/particles/management/src/G4MuonDecayChannelWithSpin.cc
r824 r1340 43 43 44 44 #include "Randomize.hh" 45 45 46 #include "G4DecayProducts.hh" 46 47 #include "G4LorentzVector.hh" … … 50 51 : G4MuonDecayChannel(theParentName,theBR) 51 52 { 53 EMMU = 0.*MeV; 54 EMASS = 0.*MeV; 52 55 } 53 56 -
trunk/source/particles/management/src/G4MuonRadiativeDecayChannelWithSpin.cc
r1337 r1340 74 74 #endif 75 75 } 76 EMMU = 0.*MeV; 77 EMASS = 0.*MeV; 76 78 } 77 79 -
trunk/source/particles/management/src/G4NucleiProperties.cc
r1337 r1340 25 25 // 26 26 // 27 // $Id: G4NucleiProperties.cc,v 1.2 2 2010/05/20 01:01:07kurasige Exp $28 // GEANT4 tag $Name: geant4-09-04-beta-01$27 // $Id: G4NucleiProperties.cc,v 1.23 2010/08/10 15:47:42 kurasige Exp $ 28 // GEANT4 tag $Name: particles-V09-03-15 $ 29 29 // 30 30 // … … 72 72 { 73 73 if (mass_proton <= 0.0 ) { 74 G4ParticleDefinition * nucleus = 0;74 const G4ParticleDefinition * nucleus = 0; 75 75 nucleus = G4ParticleTable::GetParticleTable()->FindParticle("proton"); // proton 76 76 if (nucleus!=0) mass_proton = nucleus->GetPDGMass(); -
trunk/source/particles/management/src/G4NucleiPropertiesTableAME03.cc
r1337 r1340 25 25 // 26 26 // 27 // $Id: G4NucleiPropertiesTableAME03.cc,v 1. 3 2009/05/02 11:58:17kurasige Exp $28 // GEANT4 tag $Name: geant4-09-04-beta-01$27 // $Id: G4NucleiPropertiesTableAME03.cc,v 1.4 2010/10/30 07:55:00 kurasige Exp $ 28 // GEANT4 tag $Name: particles-V09-03-15 $ 29 29 // 30 30 // ------------------------------------------------------------------- … … 64 64 "Illegal arguemnt", 65 65 EventMustBeAborted,"Nucleon number larger than 293!"); 66 return -1; 66 67 } else if(A<1) { 67 68 G4Exception("G4NucleiPropertiesTableAME03::GetIndex", 68 69 "Illegal arguemnt", 69 70 EventMustBeAborted," Nucleon number is negative!"); 71 return -1; 70 72 } else if(Z>A) { 71 73 G4Exception("G4NucleiPropertiesTableAME03::GetIndex", 72 74 "Illegal arguemnt", 73 75 EventMustBeAborted, "Nucleon number smaller than Z!"); 76 return -1; 74 77 } 75 78 -
trunk/source/particles/management/src/G4PDGCodeChecker.cc
r1337 r1340 25 25 // 26 26 // 27 // $Id: G4PDGCodeChecker.cc,v 1.1 2 2009/04/02 02:24:53kurasige Exp $28 // GEANT4 tag $Name: geant4-09-04-beta-01$27 // $Id: G4PDGCodeChecker.cc,v 1.15 2010/10/30 07:55:00 kurasige Exp $ 28 // GEANT4 tag $Name: particles-V09-03-15 $ 29 29 // 30 30 // … … 43 43 ///////////// 44 44 G4PDGCodeChecker::G4PDGCodeChecker() 45 { 46 code = 0; 45 :code(0),theParticleType(""), 46 thePDGiSpin(0),higherSpin(0), 47 exotic(0),radial(0),multiplet(0), 48 quark1(0),quark2(0),quark3(0),spin(0) 49 { 47 50 verboseLevel = 1; 48 }49 50 /////////////51 G4int G4PDGCodeChecker::CheckPDGCode( G4int PDGcode,52 G4String particleType)53 {54 code = PDGcode;55 theParticleType = particleType;56 57 51 // clear QuarkContents 58 52 G4int flavor; … … 61 55 theAntiQuarkContent[flavor] =0; 62 56 } 57 } 58 59 ///////////// 60 G4int G4PDGCodeChecker::CheckPDGCode( G4int PDGcode, 61 G4String particleType) 62 { 63 code = PDGcode; 64 theParticleType = particleType; 65 66 // clear QuarkContents 67 G4int flavor; 68 for (flavor=0; flavor<NumberOfQuarkFlavor; flavor++){ 69 theQuarkContent[flavor] =0; 70 theAntiQuarkContent[flavor] =0; 71 } 63 72 64 73 // check code for nuclei 65 if ( theParticleType == "nucleus"){74 if ((theParticleType == "nucleus")||(theParticleType == "anti_nucleus")) { 66 75 return CheckForNuclei(); 67 76 } … … 359 368 G4int G4PDGCodeChecker::CheckForNuclei() 360 369 { 361 G4int pcode = code;370 G4int pcode = abs(code); 362 371 if (pcode < 1000000000) { 363 // anti particle372 // non-nuclei 364 373 return 0; 365 374 } … … 388 397 389 398 // Fill Quark contents 390 theQuarkContent[0] = n_up; 391 theQuarkContent[1] = n_down; 392 theQuarkContent[2] = n_s; 393 399 if (code>0) { 400 theQuarkContent[0] = n_up; 401 theQuarkContent[1] = n_down; 402 theQuarkContent[2] = n_s; 403 } else { 404 // anti_nucleus 405 theAntiQuarkContent[0] = n_up; 406 theAntiQuarkContent[1] = n_down; 407 theAntiQuarkContent[2] = n_s; 408 } 394 409 return code; 395 410 } -
trunk/source/particles/management/src/G4ParticleDefinition.cc
r1337 r1340 25 25 // 26 26 // 27 // $Id: G4ParticleDefinition.cc,v 1.3 6 2010/05/20 01:01:07kurasige Exp $28 // GEANT4 tag $Name: geant4-09-04-beta-01$27 // $Id: G4ParticleDefinition.cc,v 1.37 2010/10/11 03:33:56 kurasige Exp $ 28 // GEANT4 tag $Name: particles-V09-03-15 $ 29 29 // 30 30 // … … 151 151 } 152 152 153 if (theParticleTable->GetIonTable()->IsAntiIon(this)) { 154 SetAtomicNumber( abs(G4int(GetPDGCharge()/eplus)) ); 155 SetAtomicMass( abs(GetBaryonNumber()) ); 156 } 153 157 154 158 // check name and register this particle into ParticleTable … … 284 288 G4cout << " [" << theParticleSubType << "]" << G4endl; 285 289 290 if ( (theParticleTable->GetIonTable()->IsIon(this)) 291 || (theParticleTable->GetIonTable()->IsAntiIon(this)) ) { 292 G4cout << " Atomic Number : " << GetAtomicNumber(); 293 G4cout << " Atomic Mass : " << GetAtomicMass() << G4endl; 294 } 286 295 if ( fShortLivedFlag ){ 287 296 G4cout << " ShortLived : ON" << G4endl; … … 316 325 } 317 326 } 318 319 320 321 322 323 324 325 326 327 328 329 330 -
trunk/source/particles/management/src/G4ParticlePropertyData.cc
r1196 r1340 24 24 // ******************************************************************** 25 25 // 26 // $Id: G4ParticlePropertyData.cc,v 1. 4 2009/08/17 14:52:19kurasige Exp $26 // $Id: G4ParticlePropertyData.cc,v 1.5 2010/10/30 07:55:00 kurasige Exp $ 27 27 // 28 28 // class G4ParticlePropertyData … … 61 61 thePDGEncoding(0), 62 62 theAntiPDGEncoding(0), 63 thePDGLifeTime(-1.0), 63 64 fPDGMassModified(false), 64 65 fPDGWidthModified(false), -
trunk/source/particles/management/src/G4ParticleTable.cc
r1337 r1340 25 25 // 26 26 // 27 // $Id: G4ParticleTable.cc,v 1.3 6 2010/05/20 01:01:07kurasige Exp $28 // GEANT4 tag $Name: geant4-09-04-beta-01$27 // $Id: G4ParticleTable.cc,v 1.37 2010/10/30 07:55:00 kurasige Exp $ 28 // GEANT4 tag $Name: particles-V09-03-15 $ 29 29 // 30 30 // class G4ParticleTable … … 116 116 //////////////////// 117 117 G4ParticleTable::G4ParticleTable(const G4ParticleTable &right) 118 :verboseLevel(1),fParticleMessenger(0), 119 noName(" "), 120 readyToUse(false) 118 121 { 119 122 G4Exception("G4ParticleTable::G4ParticleTable()", -
trunk/source/particles/management/src/G4PrimaryParticle.cc
r1337 r1340 25 25 // 26 26 // 27 // $Id: G4PrimaryParticle.cc,v 1. 5 2007/10/06 06:49:29kurasige Exp $28 // GEANT4 tag $Name: geant4-09-04-beta-01$27 // $Id: G4PrimaryParticle.cc,v 1.7 2010/08/11 17:14:02 kurasige Exp $ 28 // GEANT4 tag $Name: particles-V09-03-15 $ 29 29 // 30 30 … … 74 74 } 75 75 76 G4PrimaryParticle::G4PrimaryParticle( G4ParticleDefinition* Gcode)76 G4PrimaryParticle::G4PrimaryParticle(const G4ParticleDefinition* Gcode) 77 77 :G4code(Gcode),Px(0.),Py(0.),Pz(0.), 78 78 nextParticle(0),daughterParticle(0),trackID(-1), … … 81 81 { PDGcode = Gcode->GetPDGEncoding(); } 82 82 83 G4PrimaryParticle::G4PrimaryParticle( G4ParticleDefinition* Gcode,83 G4PrimaryParticle::G4PrimaryParticle(const G4ParticleDefinition* Gcode, 84 84 G4double px,G4double py,G4double pz) 85 85 :G4code(Gcode),Px(px),Py(py),Pz(pz), … … 89 89 { PDGcode = Gcode->GetPDGEncoding(); } 90 90 91 G4PrimaryParticle::G4PrimaryParticle( G4ParticleDefinition* Gcode,91 G4PrimaryParticle::G4PrimaryParticle(const G4ParticleDefinition* Gcode, 92 92 G4double px,G4double py,G4double pz,G4double E) 93 93 :G4code(Gcode),Px(px),Py(py),Pz(pz), … … 120 120 } 121 121 122 void G4PrimaryParticle::SetG4code(G4ParticleDefinition* Gcode) 122 void G4PrimaryParticle::SetG4code(const G4ParticleDefinition* Gcode) 123 { 124 SetParticleDefinition(Gcode); 125 } 126 127 void G4PrimaryParticle::SetParticleDefinition(const G4ParticleDefinition* Gcode) 123 128 { 124 129 G4code = Gcode; -
trunk/source/particles/management/src/G4ShortLivedTable.cc
r1337 r1340 25 25 // 26 26 // 27 // $Id: G4ShortLivedTable.cc,v 1.1 7 2009/08/17 14:52:19kurasige Exp $28 // GEANT4 tag $Name: geant4-09-04-beta-01$27 // $Id: G4ShortLivedTable.cc,v 1.18 2010/08/10 15:47:43 kurasige Exp $ 28 // GEANT4 tag $Name: particles-V09-03-15 $ 29 29 // 30 30 // … … 64 64 } 65 65 66 G4bool G4ShortLivedTable::IsShortLived( G4ParticleDefinition* particle) const66 G4bool G4ShortLivedTable::IsShortLived(const G4ParticleDefinition* particle) const 67 67 { 68 68 return particle->IsShortLived(); 69 69 } 70 70 71 void G4ShortLivedTable::Insert( G4ParticleDefinition* particle)71 void G4ShortLivedTable::Insert(const G4ParticleDefinition* particle) 72 72 { 73 73 if (IsShortLived(particle)) { … … 76 76 } 77 77 78 void G4ShortLivedTable::Remove( G4ParticleDefinition* particle)78 void G4ShortLivedTable::Remove(const G4ParticleDefinition* particle) 79 79 { 80 80 if (IsShortLived(particle)) { … … 99 99 void G4ShortLivedTable::DumpTable(const G4String &particle_name) const 100 100 { 101 G4ParticleDefinition* particle;101 const G4ParticleDefinition* particle; 102 102 103 103 G4ShortLivedList::iterator idx;
Note: See TracChangeset
for help on using the changeset viewer.