- Timestamp:
- Dec 22, 2010, 3:52:27 PM (14 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/source/geometry/navigation/src/G4VIntersectionLocator.cc
r1337 r1347 24 24 // ******************************************************************** 25 25 // 26 // $Id: G4VIntersectionLocator.cc,v 1. 7 2009/11/27 15:21:59 japostExp $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 $ 28 28 // 29 29 // Class G4VIntersectionLocator implementation … … 83 83 84 84 G4double step_len = CurrentFT.GetCurveLength() - StartFT.GetCurveLength(); 85 85 G4int oldprc; // cout/cerr precision settings 86 86 87 if( ((stepNo == 0) && (verboseLevel <3)) || (verboseLevel >= 3) ) 87 88 { 88 static G4int noPrecision= 4; 89 G4cout.precision(noPrecision); 90 // G4cout.setf(ios_base::fixed,ios_base::floatfield); 89 oldprc = G4cout.precision(4); 91 90 G4cout << std::setw( 6) << " " 92 91 << std::setw( 25) << " Current Position and Direction" << " " … … 100 99 << std::setw( 7) << " N_y " << " " 101 100 << 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|" << " " 106 102 << std::setw( 9) << "StepLen" << " " 107 103 << std::setw(12) << "StartSafety" << " " 108 104 << std::setw( 9) << "PhsStep" << " "; 109 110 105 G4cout << G4endl; 106 G4cout.precision(oldprc); 111 107 } 112 108 if((stepNo == 0) && (verboseLevel <=3)) … … 126 122 G4cout << std::setw( 5) << "Start" ; 127 123 } 128 G4cout.precision(8);124 oldprc = G4cout.precision(8); 129 125 G4cout << std::setw(10) << CurrentFT.GetCurveLength() << " "; 130 G4cout.precision(8);131 126 G4cout << std::setw(10) << CurrentPosition.x() << " " 132 127 << std::setw(10) << CurrentPosition.y() << " " … … 136 131 << std::setw( 7) << CurrentUnitVelocity.y() << " " 137 132 << 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 161 153 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 } 170 161 } 171 162
Note: See TracChangeset
for help on using the changeset viewer.