Ignore:
Timestamp:
Nov 5, 2010, 3:45:55 PM (14 years ago)
Author:
garnier
Message:

update ti head

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/source/processes/hadronic/models/cascade/cascade/src/G4CascadParticle.cc

    r1337 r1340  
    2424// ********************************************************************
    2525//
    26 // $Id: G4CascadParticle.cc,v 1.15 2010/06/25 09:44:00 gunter Exp $
    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 $
    2828//
    2929// 20100112  M. Kelsey -- Remove G4CascadeMomentum, use G4LorentzVector directly
    3030// 20100114  M. Kelsey -- Replace vector<G4Double> position with G4ThreeVector
     31// 20101012  M. Kelsey -- Check for negative d2 in getPathToTheNextZone()
    3132
    3233#include "G4CascadParticle.hh"
     
    4546                                                G4double rz_out) {
    4647  if (verboseLevel > 3) {
    47     G4cout << " >>> G4CascadParticle::getPathToTheNextZone" << G4endl;
     48    G4cout << " >>> G4CascadParticle::getPathToTheNextZone rz_in " << rz_in
     49           << " rz_out " << rz_out << G4endl;
    4850  }
    4951
     
    5961  G4double ds;
    6062  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
    6269  if (current_zone == 0 || rp > 0.0) {
    6370    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    }
    6679  } else {
    6780    d2 = rz_in * rz_in - ra;
     
    7588    }
    7689  }
     90
     91  if (verboseLevel > 3) G4cout << " ds " << ds << " d2 " << d2 << G4endl;
    7792
    7893  path = ds * std::sqrt(d2) - rp / pp;
Note: See TracChangeset for help on using the changeset viewer.