Ignore:
Timestamp:
Nov 25, 2009, 5:13:58 PM (16 years ago)
Author:
garnier
Message:

update CVS release candidate geant4.9.3.01

Location:
trunk/source/track/src
Files:
6 edited

Legend:

Unmodified
Added
Removed
  • trunk/source/track/src/G4ParticleChange.cc

    r1058 r1196  
    2525//
    2626//
    27 // $Id: G4ParticleChange.cc,v 1.30 2007/03/30 01:03:53 kurasige Exp $
    28 // GEANT4 tag $Name: geant4-09-02-ref-02 $
     27// $Id: G4ParticleChange.cc,v 1.31 2009/04/02 02:22:30 kurasige Exp $
     28// GEANT4 tag $Name: geant4-09-03-cand-01 $
    2929//
    3030//
     
    454454  G4bool itsOKforMomentum = true; 
    455455  if ( theEnergyChange >0.) {
    456     accuracy = std::abs(theMomentumDirectionChange.mag2()-1.0);
     456    accuracy = std::fabs(theMomentumDirectionChange.mag2()-1.0);
    457457    if (accuracy > accuracyForWarning) {
    458458#ifdef G4VERBOSE
  • trunk/source/track/src/G4ParticleChangeForLoss.cc

    r1058 r1196  
    2525//
    2626//
    27 // $Id: G4ParticleChangeForLoss.cc,v 1.16 2006/08/28 16:10:29 vnivanch Exp $
    28 // GEANT4 tag $Name: geant4-09-02-ref-02 $
     27// $Id: G4ParticleChangeForLoss.cc,v 1.17 2009/05/26 13:19:41 vnivanch Exp $
     28// GEANT4 tag $Name: geant4-09-03-cand-01 $
    2929//
    3030//
     
    4949#include "G4ExceptionSeverity.hh"
    5050
    51 G4ParticleChangeForLoss::G4ParticleChangeForLoss():G4VParticleChange()
     51G4ParticleChangeForLoss::G4ParticleChangeForLoss()
     52  :G4VParticleChange(), lowEnergyLimit(1.0*eV)
    5253{
    5354  theSteppingControlFlag = NormalCondition;
  • trunk/source/track/src/G4ParticleChangeForMSC.cc

    r1058 r1196  
    2525//
    2626//
    27 // $Id: G4ParticleChangeForMSC.cc,v 1.13 2006/06/29 21:15:09 gunter Exp $
    28 // GEANT4 tag $Name: geant4-09-02-ref-02 $
     27// $Id: G4ParticleChangeForMSC.cc,v 1.14 2009/04/02 02:22:30 kurasige Exp $
     28// GEANT4 tag $Name: geant4-09-03-cand-01 $
    2929//
    3030//
     
    165165
    166166  // MomentumDirection should be unit vector
    167   accuracy = std::abs(theMomentumDirection.mag2()-1.0);
     167  accuracy = std::fabs(theMomentumDirection.mag2()-1.0);
    168168  if (accuracy > accuracyForWarning) {
    169169#ifdef G4VERBOSE
  • trunk/source/track/src/G4Track.cc

    r1058 r1196  
    2525//
    2626//
    27 // $Id: G4Track.cc,v 1.30 2007/10/02 00:46:21 kurasige Exp $
    28 // GEANT4 tag $Name: geant4-09-02-ref-02 $
     27// $Id: G4Track.cc,v 1.32 2009/04/08 08:07:24 kurasige Exp $
     28// GEANT4 tag $Name: geant4-09-03-cand-01 $
    2929//
    3030//
     
    3838//   Modification for G4TouchableHandle             22 Oct. 2001  R.Chytracek//
    3939//   Fix GetVelocity (bug report #741)   Horton-Smith Apr 14 2005
     40//   Remove massless check in  GetVelocity   02 Apr. 09 H.Kurashige
    4041
    4142#include "G4Track.hh"
     
    170171  G4double mass = fpDynamicParticle->GetMass();
    171172
    172   // mass less particle 
    173   if( mass == 0. ){
    174     velocity = c_light ;
    175 
    176     // special case for photons
    177     if ( (fOpticalPhoton !=0)  &&
    178          (fpDynamicParticle->GetDefinition()==fOpticalPhoton) ){
    179 
    180        G4Material* mat=0;
    181        G4bool update_groupvel = false;
    182        if ( this->GetStep() ){
    183           mat= this->GetMaterial();         //   Fix for repeated volumes
    184        }else{
    185           if (fpTouchable!=0){
    186             mat=fpTouchable->GetVolume()->GetLogicalVolume()->GetMaterial();
    187           }
    188         }
    189        // check if previous step is in the same volume
    190        //  and get new GROUPVELOVITY table if necessary
    191        if ((mat != prev_mat)||(groupvel==0)) {
    192          groupvel = 0;
    193          if(mat->GetMaterialPropertiesTable() != 0)
    194            groupvel = mat->GetMaterialPropertiesTable()->GetProperty("GROUPVEL");
    195          update_groupvel = true;
    196        }
    197        prev_mat = mat;
    198        
    199        if  (groupvel != 0 ) {
    200          // light velocity = c/(rindex+d(rindex)/d(log(E_phot)))
    201          // values stored in GROUPVEL material properties vector
    202          velocity =  prev_velocity;
     173  velocity = c_light ;
     174
     175  // special case for photons
     176  if (  (fOpticalPhoton !=0)  &&
     177        (fpDynamicParticle->GetDefinition()==fOpticalPhoton) ){
     178
     179    G4Material* mat=0;
     180    G4bool update_groupvel = false;
     181    if ( this->GetStep() ){
     182      mat= this->GetMaterial();         //   Fix for repeated volumes
     183    }else{
     184      if (fpTouchable!=0){
     185        mat=fpTouchable->GetVolume()->GetLogicalVolume()->GetMaterial();
     186      }
     187    }
     188    // check if previous step is in the same volume
     189    //  and get new GROUPVELOVITY table if necessary
     190    if ((mat != prev_mat)||(groupvel==0)) {
     191        groupvel = 0;
     192        if(mat->GetMaterialPropertiesTable() != 0)
     193          groupvel = mat->GetMaterialPropertiesTable()->GetProperty("GROUPVEL");
     194        update_groupvel = true;
     195    }
     196    prev_mat = mat;
     197     
     198    if  (groupvel != 0 ) {
     199        // light velocity = c/(rindex+d(rindex)/d(log(E_phot)))
     200        // values stored in GROUPVEL material properties vector
     201        velocity =  prev_velocity;
    203202         
    204          // check if momentum is same as in the previous step
    205          //  and calculate group velocity if necessary
    206          if( update_groupvel || (fpDynamicParticle->GetTotalMomentum() != prev_momentum) ) {
    207            velocity =
    208              groupvel->GetProperty(fpDynamicParticle->GetTotalMomentum());
     203        // check if momentum is same as in the previous step
     204        //  and calculate group velocity if necessary
     205        if( update_groupvel || (fpDynamicParticle->GetTotalMomentum() != prev_momentum) ) {
     206          velocity =
     207            groupvel->GetProperty(fpDynamicParticle->GetTotalMomentum());
    209208           prev_velocity = velocity;
    210            prev_momentum = fpDynamicParticle->GetTotalMomentum();
    211          }
    212        }
    213      }
     209          prev_momentum = fpDynamicParticle->GetTotalMomentum();
     210        }
     211    }
    214212
    215213  } else {
    216     G4double T = fpDynamicParticle->GetKineticEnergy();
    217     velocity = c_light*std::sqrt(T*(T+2.*mass))/(T+mass);
     214    if (mass<DBL_MIN) {
     215      velocity = c_light;
     216    } else {
     217      G4double T = fpDynamicParticle->GetKineticEnergy();
     218      velocity = c_light*std::sqrt(T*(T+2.*mass))/(T+mass);
     219    }
    218220  }
    219221                                                                               
  • trunk/source/track/src/G4VParticleChange.cc

    r1058 r1196  
    2525//
    2626//
    27 // $Id: G4VParticleChange.cc,v 1.20 2007/03/25 22:54:52 kurasige Exp $
    28 // GEANT4 tag $Name: geant4-09-02-ref-02 $
     27// $Id: G4VParticleChange.cc,v 1.21 2009/04/02 02:22:30 kurasige Exp $
     28// GEANT4 tag $Name: geant4-09-03-cand-01 $
    2929//
    3030//
     
    288288  // MomentumDirection should be unit vector
    289289  G4bool itsOKforMomentum = true; 
    290   accuracy = std::abs((aTrack.GetMomentumDirection()).mag2()-1.0);
     290  accuracy = std::fabs((aTrack.GetMomentumDirection()).mag2()-1.0);
    291291  if (accuracy > accuracyForWarning) {
    292292#ifdef G4VERBOSE
  • trunk/source/track/src/G4VUserTrackInformation.cc

    r1058 r1196  
    2525//
    2626//
    27 // $Id: G4VUserTrackInformation.cc,v 1.2 2006/06/29 21:15:21 gunter Exp $
    28 // GEANT4 tag $Name: geant4-09-02-ref-02 $
     27// $Id: G4VUserTrackInformation.cc,v 1.3 2009/10/19 09:37:00 kurasige Exp $
     28// GEANT4 tag $Name: geant4-09-03-cand-01 $
    2929//
    3030//
     
    3434
    3535G4VUserTrackInformation::G4VUserTrackInformation()
     36  : fType("NONE")
    3637{;}
     38
     39G4VUserTrackInformation::G4VUserTrackInformation(const G4String& infoType)
     40  : fType(infoType)
     41{;}
     42
    3743G4VUserTrackInformation::~G4VUserTrackInformation()
    3844{;}
Note: See TracChangeset for help on using the changeset viewer.