Ignore:
Timestamp:
Dec 22, 2010, 3:52:27 PM (14 years ago)
Author:
garnier
Message:

geant4 tag 9.4

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/source/geometry/navigation/src/G4VIntersectionLocator.cc

    r1337 r1347  
    2424// ********************************************************************
    2525//
    26 // $Id: G4VIntersectionLocator.cc,v 1.7 2009/11/27 15:21:59 japost Exp $
    27 // GEANT4 tag $Name: geant4-09-04-beta-01 $
     26// $Id: G4VIntersectionLocator.cc,v 1.8 2010/07/13 15:59:42 gcosmo Exp $
     27// GEANT4 tag $Name: geant4-09-04-ref-00 $
    2828//
    2929// Class G4VIntersectionLocator implementation
     
    8383
    8484  G4double step_len = CurrentFT.GetCurveLength() - StartFT.GetCurveLength();
    85      
     85  G4int oldprc;  // cout/cerr precision settings
     86
    8687  if( ((stepNo == 0) && (verboseLevel <3)) || (verboseLevel >= 3) )
    8788  {
    88     static G4int noPrecision= 4;
    89     G4cout.precision(noPrecision);
    90     // G4cout.setf(ios_base::fixed,ios_base::floatfield);
     89    oldprc = G4cout.precision(4);
    9190    G4cout << std::setw( 6)  << " "
    9291           << std::setw( 25) << " Current Position  and  Direction" << " "
     
    10099           << std::setw( 7) << " N_y " << " "
    101100           << std::setw( 7) << " N_z " << " " ;
    102     //            << G4endl;
    103     G4cout     // << " >>> "
    104            << std::setw( 7) << " Delta|N|" << " "
    105       //   << std::setw( 7) << " Delta(N_z) " << " "
     101    G4cout << std::setw( 7) << " Delta|N|" << " "
    106102           << std::setw( 9) << "StepLen" << " " 
    107103           << std::setw(12) << "StartSafety" << " " 
    108104           << std::setw( 9) << "PhsStep" << " "; 
    109  
    110105    G4cout << G4endl;
     106    G4cout.precision(oldprc);
    111107  }
    112108  if((stepNo == 0) && (verboseLevel <=3))
     
    126122       G4cout << std::setw( 5) << "Start" ;
    127123    }
    128     G4cout.precision(8);
     124    oldprc = G4cout.precision(8);
    129125    G4cout << std::setw(10) << CurrentFT.GetCurveLength() << " ";
    130     G4cout.precision(8);
    131126    G4cout << std::setw(10) << CurrentPosition.x() << " "
    132127           << std::setw(10) << CurrentPosition.y() << " "
     
    136131           << std::setw( 7) << CurrentUnitVelocity.y() << " "
    137132           << std::setw( 7) << CurrentUnitVelocity.z() << " ";
    138      //  G4cout << G4endl;
    139      //     G4cout << " >>> " ;
    140      G4cout.precision(3);
    141      G4cout << std::setw( 7)
    142             << CurrentFT.GetMomentum().mag()- StartFT.GetMomentum().mag()
    143             << " ";
    144      //   << std::setw( 7)
    145      //   << CurrentUnitVelocity.z() - InitialUnitVelocity.z() << " ";
    146      G4cout << std::setw( 9) << step_len << " ";
    147      G4cout << std::setw(12) << safety << " ";
    148      if( requestStep != -1.0 )
    149      {
    150        G4cout << std::setw( 9) << requestStep << " ";
    151      }
    152      else
    153      {
    154        G4cout << std::setw( 9) << "Init/NotKnown" << " ";
    155      }
    156      G4cout << G4endl;
    157    }
    158    else // if( verboseLevel > 3 )
    159    {
    160      //  Multi-line output
     133    G4cout.precision(3);
     134    G4cout << std::setw( 7)
     135           << CurrentFT.GetMomentum().mag()- StartFT.GetMomentum().mag()
     136           << " ";
     137    G4cout << std::setw( 9) << step_len << " ";
     138    G4cout << std::setw(12) << safety << " ";
     139    if( requestStep != -1.0 )
     140    {
     141      G4cout << std::setw( 9) << requestStep << " ";
     142    }
     143    else
     144    {
     145      G4cout << std::setw( 9) << "Init/NotKnown" << " ";
     146    }
     147    G4cout << G4endl;
     148    G4cout.precision(oldprc);
     149  }
     150  else // if( verboseLevel > 3 )
     151  {
     152    //  Multi-line output
    161153       
    162      G4cout << "Step taken was " << step_len 
    163             << " out of PhysicalStep= " <<  requestStep << G4endl;
    164      G4cout << "Final safety is: " << safety << G4endl;
    165 
    166      G4cout << "Chord length = " << (CurrentPosition-StartPosition).mag()
    167             << G4endl;
    168      G4cout << G4endl;
    169    }
     154    G4cout << "Step taken was " << step_len 
     155           << " out of PhysicalStep= " <<  requestStep << G4endl;
     156    G4cout << "Final safety is: " << safety << G4endl;
     157    G4cout << "Chord length = " << (CurrentPosition-StartPosition).mag()
     158           << G4endl;
     159    G4cout << G4endl;
     160  }
    170161}
    171162
Note: See TracChangeset for help on using the changeset viewer.