Changeset 1347 for trunk/source/processes/hadronic/models/neutron_hp/src/G4NeutronHPInelasticCompFS.cc
- Timestamp:
- Dec 22, 2010, 3:52:27 PM (14 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/source/processes/hadronic/models/neutron_hp/src/G4NeutronHPInelasticCompFS.cc
r1340 r1347 41 41 // add two_body_reaction 42 42 // 100909 add safty 43 // 101111 add safty for _nat_ data case in Binary reaction, but break conservation 43 44 // 44 45 #include "G4NeutronHPInelasticCompFS.hh" … … 681 682 G4double AA = hadron->GetDefinition()->GetPDGMass() / proj->GetDefinition()->GetPDGMass(); 682 683 G4double E1 = proj->GetKineticEnergy(); 683 G4double beta = std::sqrt ( A*(A+1-AA)/AA*(1+(1+A)/A*Q/E1) ); 684 685 // 101111 686 // In _nat_ data (Q+E1) could become negative value, following line is safty for this case. 687 //if ( (Q+E1) < 0 ) 688 if ( ( 1 + (1+A)/A*Q/E1 ) < 0 ) 689 { 690 // 1.0e-6 eV is additional safty for numeric precision 691 Q = -( A/(1+A)*E1 ) + 1.0e-6*eV; 692 } 693 694 G4double beta = std::sqrt ( A*(A+1-AA)/AA*( 1 + (1+A)/A*Q/E1 ) ); 684 695 G4double gamma = AA/(A+1-AA)*beta; 685 696 G4double E3 = AA/std::pow((1+A),2)*(beta*beta+1+2*beta*mu)*E1;
Note: See TracChangeset
for help on using the changeset viewer.