- 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/G4NeutronHPFinalState.cc
r968 r1347 27 27 //080721 Create adjust_final_state method by T. Koi 28 28 //080801 Residual reconstruction with theNDLDataA,Z (A, Z, and momentum are adjusted) by T. Koi 29 //101110 Set lower limit for gamma energy(1keV) by T. Koi 29 30 30 31 #include "G4NeutronHPFinalState.hh" … … 37 38 void G4NeutronHPFinalState::adjust_final_state ( G4LorentzVector init_4p_lab ) 38 39 { 40 41 G4double minimum_energy = 1*keV; 39 42 40 43 if ( adjustResult != true ) return; … … 175 178 176 179 // Adjust p 177 if ( dif_4p.v().mag() < 1*MeV ) 180 //if ( dif_4p.v().mag() < 1*MeV ) 181 if ( minimum_energy < dif_4p.v().mag() && dif_4p.v().mag() < 1*MeV ) 178 182 { 179 183 … … 184 188 else 185 189 { 186 //G4cout << "HP_DB Difference in dif_p is too large (>1MeV) to adjust, so that give up tuning" << G4endl;190 //G4cout << "HP_DB Difference in dif_p is too large (>1MeV) or too small(<1keV) to adjust, so that give up tuning" << G4endl; 187 191 } 188 192 … … 213 217 nSecondaries += 2; 214 218 G4double e1 = ( dif_4p.e() -dif_4p.v().mag() ) / 2; 215 G4double costh = 2.*G4UniformRand()-1.; 216 G4double phi = twopi*G4UniformRand(); 217 G4ThreeVector dir( std::sin(std::acos(costh))*std::cos(phi), 218 std::sin(std::acos(costh))*std::sin(phi), 219 costh); 220 theResult.AddSecondary ( new G4DynamicParticle ( G4Gamma::Gamma() , e1*dir ) ); 221 theResult.AddSecondary ( new G4DynamicParticle ( G4Gamma::Gamma() , -e1*dir ) ); 219 220 if ( minimum_energy < e1 ) 221 { 222 G4double costh = 2.*G4UniformRand()-1.; 223 G4double phi = twopi*G4UniformRand(); 224 G4ThreeVector dir( std::sin(std::acos(costh))*std::cos(phi), 225 std::sin(std::acos(costh))*std::sin(phi), 226 costh); 227 theResult.AddSecondary ( new G4DynamicParticle ( G4Gamma::Gamma() , e1*dir ) ); 228 theResult.AddSecondary ( new G4DynamicParticle ( G4Gamma::Gamma() , -e1*dir ) ); 229 } 230 else 231 { 232 //G4cout << "HP_DB Difference is too small(<1keV) to adjust, so that neglect it" << G4endl; 233 } 222 234 223 235 }
Note: See TracChangeset
for help on using the changeset viewer.