- Timestamp:
- Nov 5, 2010, 3:45:55 PM (14 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/source/processes/hadronic/models/cascade/cascade/src/G4CascadParticle.cc
r1337 r1340 24 24 // ******************************************************************** 25 25 // 26 // $Id: G4CascadParticle.cc,v 1.1 5 2010/06/25 09:44:00 gunterExp $27 // Geant4 tag: $Name: geant4-09-04-beta-01$26 // $Id: G4CascadParticle.cc,v 1.18 2010/10/20 14:34:26 mkelsey Exp $ 27 // Geant4 tag: $Name: hadr-casc-V09-03-85 $ 28 28 // 29 29 // 20100112 M. Kelsey -- Remove G4CascadeMomentum, use G4LorentzVector directly 30 30 // 20100114 M. Kelsey -- Replace vector<G4Double> position with G4ThreeVector 31 // 20101012 M. Kelsey -- Check for negative d2 in getPathToTheNextZone() 31 32 32 33 #include "G4CascadParticle.hh" … … 45 46 G4double rz_out) { 46 47 if (verboseLevel > 3) { 47 G4cout << " >>> G4CascadParticle::getPathToTheNextZone" << G4endl; 48 G4cout << " >>> G4CascadParticle::getPathToTheNextZone rz_in " << rz_in 49 << " rz_out " << rz_out << G4endl; 48 50 } 49 51 … … 59 61 G4double ds; 60 62 G4double d2; 61 63 64 if (verboseLevel > 3) { 65 G4cout << " current_zone " << current_zone << " rr " << rr 66 << " rp " << rp << " pp " << pp << " ra " << ra << G4endl; 67 } 68 62 69 if (current_zone == 0 || rp > 0.0) { 63 70 d2 = rz_out * rz_out - ra; 64 ds = 1.0; 65 movingIn = false; 71 if (d2 > 0.0) { 72 ds = 1.0; 73 movingIn = false; 74 } else { 75 d2 = rz_in * rz_in - ra; 76 ds = -1.0; 77 movingIn = true; 78 } 66 79 } else { 67 80 d2 = rz_in * rz_in - ra; … … 75 88 } 76 89 } 90 91 if (verboseLevel > 3) G4cout << " ds " << ds << " d2 " << d2 << G4endl; 77 92 78 93 path = ds * std::sqrt(d2) - rp / pp;
Note: See TracChangeset
for help on using the changeset viewer.