Changeset 1347 for trunk/source/processes/hadronic/models/util
- Timestamp:
- Dec 22, 2010, 3:52:27 PM (15 years ago)
- Location:
- trunk/source/processes/hadronic/models/util
- Files:
-
- 7 edited
-
History (modified) (2 diffs)
-
include/G4DecayStrongResonances.hh (modified) (2 diffs)
-
include/G4NuclearFermiDensity.hh (modified) (1 diff)
-
include/G4NuclearShellModelDensity.hh (modified) (1 diff)
-
src/G4KineticTrack.cc (modified) (4 diffs)
-
src/G4NuclearFermiDensity.cc (modified) (1 diff)
-
src/G4NuclearShellModelDensity.cc (modified) (1 diff)
Legend:
- Unmodified
- Added
- Removed
-
trunk/source/processes/hadronic/models/util/History
r1340 r1347 1 $Id: History,v 1.4 0 2010/09/28 17:03:26 vnivanchExp $1 $Id: History,v 1.45 2010/11/03 17:37:57 gunter Exp $ 2 2 ------------------------------------------------------------------- 3 3 … … 15 15 * Please list in reverse chronological order (last date on top) 16 16 --------------------------------------------------------------- 17 18 3 Nov 2010 Gunter Folger hadr-mod-util-V09-03-07 19 - G4Nuclear...Density: migrate to integer A&Z 20 21 3 Nov 2010 Gunter Folger hadr-mod-util-V09-03-06 22 - G4KineticTrack: fix coverity warnings of memory leak 23 24 02 Nov 2010 Vladimir Ivanchenko hadr-mod-util-V09-03-05 25 - G4Fragment - improved printout of negative excitation energy 26 - G4DecayStrongResonances - constructor and destructor moved to source, 27 fixed Coverity warning 17 28 18 29 27 Sep 2010 Vladimir Ivanchenko hadr-mod-util-V09-03-04 -
trunk/source/processes/hadronic/models/util/include/G4DecayStrongResonances.hh
r1340 r1347 24 24 // ******************************************************************** 25 25 // 26 // $Id: G4DecayStrongResonances.hh,v 1.9 2010/11/02 17:57:38 vnivanch Exp $ 27 // GEANT4 tag $Name: geant4-09-04-ref-00 $ 28 // 29 // ------------------------------------------------------------------- 30 // 31 // GEANT4 Class file 32 // 33 // File name: G4DecayStrongResonances 34 // 35 // Modified: 36 // 02.11.2010 V.Ivanchenko moved constructor and destructor to source; 37 // removed unused variable 26 38 27 39 #ifndef G4DecayStrongResonances_h … … 36 48 { 37 49 public: 38 G4DecayStrongResonances(){}39 ~G4DecayStrongResonances(){}50 G4DecayStrongResonances(); 51 ~G4DecayStrongResonances(); 40 52 41 53 private: 42 54 G4int operator==(G4DecayStrongResonances& right) {return (this == &right);} 43 55 G4int operator!=(G4DecayStrongResonances& right) {return (this != &right);} 44 45 G4double theEnergy;46 56 47 57 public: -
trunk/source/processes/hadronic/models/util/include/G4NuclearFermiDensity.hh
r1228 r1347 40 40 41 41 public: 42 G4NuclearFermiDensity(G4 double anA, G4doubleaZ);42 G4NuclearFermiDensity(G4int anA, G4int aZ); 43 43 ~G4NuclearFermiDensity(); 44 44 -
trunk/source/processes/hadronic/models/util/include/G4NuclearShellModelDensity.hh
r819 r1347 40 40 41 41 public: 42 G4NuclearShellModelDensity(G4 double anA, G4doubleaZ);42 G4NuclearShellModelDensity(G4int anA, G4int aZ); 43 43 ~G4NuclearShellModelDensity(); 44 44 -
trunk/source/processes/hadronic/models/util/src/G4KineticTrack.cc
r1196 r1347 493 493 G4cout << "DECAY Actual Mass " << theActualMass << G4endl; 494 494 */ 495 G4ParticleDefinition* thisDefinition = this->GetDefinition(); 496 if(!thisDefinition) 497 { 498 G4cerr << "Error condition encountered in G4KineticTrack::Decay()"<<G4endl; 499 G4cerr << " track has no particle definition associated."<<G4endl; 500 return 0; 501 } 502 G4DecayTable* theDecayTable = thisDefinition->GetDecayTable(); 503 if(!theDecayTable) 504 { 505 G4cerr << "Error condition encountered in G4KineticTrack::Decay()"<<G4endl; 506 G4cerr << " particle definiton has no decay table associated."<<G4endl; 507 G4cerr << " particle was "<<thisDefinition->GetParticleName()<<G4endl; 508 return 0; 509 } 495 510 496 511 G4int chargeBalance = G4lrint(theDefinition->GetPDGCharge() ); … … 512 527 // cout << "DECAY Total Width " << theTotalActualWidth << G4endl; 513 528 G4double r = theTotalActualWidth * G4UniformRand(); 514 G4ParticleDefinition* thisDefinition = this->GetDefinition(); 515 if(!thisDefinition) 516 { 517 G4cerr << "Error condition encountered in G4KineticTrack::Decay()"<<G4endl; 518 G4cerr << " track has no particle definition associated."<<G4endl; 519 return 0; 520 } 521 G4DecayTable* theDecayTable = thisDefinition->GetDecayTable(); 522 if(!theDecayTable) 523 { 524 G4cerr << "Error condition encountered in G4KineticTrack::Decay()"<<G4endl; 525 G4cerr << " particle definiton has no decay table associated."<<G4endl; 526 G4cerr << " particle was "<<thisDefinition->GetParticleName()<<G4endl; 527 return 0; 528 } 529 G4VDecayChannel* theDecayChannel=NULL; 529 G4VDecayChannel* theDecayChannel(0); 530 530 for (index = nChannels - 1; index >= 0; index--) 531 531 { … … 538 538 } 539 539 } 540 540 541 delete [] theCumActualWidth; 542 541 543 if(!theDecayChannel) 542 544 { … … 669 671 } 670 672 delete theDecayProducts; 671 delete [] theCumActualWidth;672 673 if(getenv("DecayEnergyBalanceCheck")) 673 674 std::cout << "DEBUGGING energy balance in cms and lab, charge baryon balance : " -
trunk/source/processes/hadronic/models/util/src/G4NuclearFermiDensity.cc
r819 r1347 29 29 #include "G4NuclearFermiDensity.hh" 30 30 31 G4NuclearFermiDensity::G4NuclearFermiDensity(G4 double anA, G4doubleaZ)32 : a(0.545 * fermi)31 G4NuclearFermiDensity::G4NuclearFermiDensity(G4int anA, G4int aZ) 32 : theA(anA), theZ(aZ), a(0.545 * fermi) 33 33 { 34 34 // const G4double r0=1.14*fermi; 35 const G4double r0=1.16 * ( 1. - 1.16 * std::pow(anA, -2./3.)) * fermi; 36 theA = G4int(anA); 37 theZ = G4int(aZ); 35 const G4double r0=1.16 * ( 1. - 1.16 * std::pow(G4double(anA), -2./3.)) * fermi; 38 36 theR= r0 * std::pow(anA, 1./3. ); 39 37 Setrho0(3./ (4. * pi * std::pow(r0,3.) * theA * ( 1. + sqr(a/theR)*pi2 ))); -
trunk/source/processes/hadronic/models/util/src/G4NuclearShellModelDensity.cc
r819 r1347 29 29 #include "G4NuclearShellModelDensity.hh" 30 30 31 G4NuclearShellModelDensity::G4NuclearShellModelDensity(G4double anA, G4double aZ) 31 G4NuclearShellModelDensity::G4NuclearShellModelDensity(G4int anA, G4int aZ) 32 : theA(anA), theZ(aZ) 32 33 { 33 34 const G4double r0sq=0.8133*fermi*fermi; 34 theA = G4int(anA);35 theZ = G4int(aZ);36 35 theRsquare= r0sq * std::pow(G4double(theA), 2./3. ); 37 36 Setrho0(std::pow(1./(pi*theRsquare),3./2.));
Note:
See TracChangeset
for help on using the changeset viewer.
