Geant4 10.7.0
Toolkit for the simulation of the passage of particles through matter
Loading...
Searching...
No Matches
G4Navigator.cc File Reference
#include <iomanip>
#include "G4Navigator.hh"
#include "G4ios.hh"
#include "G4SystemOfUnits.hh"
#include "G4GeometryTolerance.hh"
#include "G4VPhysicalVolume.hh"
#include "G4VoxelSafety.hh"

Go to the source code of this file.

Macros

#define G4NEW_SAFETY   1
 

Functions

std::ostream & operator<< (std::ostream &os, const G4Navigator &n)
 

Macro Definition Documentation

◆ G4NEW_SAFETY

#define G4NEW_SAFETY   1

Definition at line 1799 of file G4Navigator.cc.

Function Documentation

◆ operator<<()

std::ostream & operator<< ( std::ostream &  os,
const G4Navigator n 
)

Definition at line 2340 of file G4Navigator.cc.

2341{
2342 // Old version did only the following:
2343 // os << "Current History: " << G4endl << n.fHistory;
2344 // Old behaviour is recovered for fVerbose = 0
2345
2346 // Adapted from G4Navigator::PrintState() const
2347
2348 G4int oldcoutPrec = os.precision(4);
2349 if( n.fVerbose >= 4 )
2350 {
2351 os << "The current state of G4Navigator is: " << G4endl;
2352 os << " ValidExitNormal= " << n.fValidExitNormal << G4endl
2353 << " ExitNormal = " << n.fExitNormal << G4endl
2354 << " Exiting = " << n.fExiting << G4endl
2355 << " Entering = " << n.fEntering << G4endl
2356 << " BlockedPhysicalVolume= " ;
2357 if (n.fBlockedPhysicalVolume==0)
2358 os << "None";
2359 else
2360 os << n.fBlockedPhysicalVolume->GetName();
2361 os << G4endl
2362 << " BlockedReplicaNo = " << n.fBlockedReplicaNo << G4endl
2363 << " LastStepWasZero = " << n.fLastStepWasZero << G4endl
2364 << G4endl;
2365 }
2366 if( ( 1 < n.fVerbose) && (n.fVerbose < 4) )
2367 {
2368 os << G4endl; // Make sure to line up
2369 os << std::setw(30) << " ExitNormal " << " "
2370 << std::setw( 5) << " Valid " << " "
2371 << std::setw( 9) << " Exiting " << " "
2372 << std::setw( 9) << " Entering" << " "
2373 << std::setw(15) << " Blocked:Volume " << " "
2374 << std::setw( 9) << " ReplicaNo" << " "
2375 << std::setw( 8) << " LastStepZero " << " "
2376 << G4endl;
2377 os << "( " << std::setw(7) << n.fExitNormal.x()
2378 << ", " << std::setw(7) << n.fExitNormal.y()
2379 << ", " << std::setw(7) << n.fExitNormal.z() << " ) "
2380 << std::setw( 5) << n.fValidExitNormal << " "
2381 << std::setw( 9) << n.fExiting << " "
2382 << std::setw( 9) << n.fEntering << " ";
2383 if ( n.fBlockedPhysicalVolume==0 )
2384 { os << std::setw(15) << "None"; }
2385 else
2386 { os << std::setw(15)<< n.fBlockedPhysicalVolume->GetName(); }
2387 os << std::setw( 9) << n.fBlockedReplicaNo << " "
2388 << std::setw( 8) << n.fLastStepWasZero << " "
2389 << G4endl;
2390 }
2391 if( n.fVerbose > 2 )
2392 {
2393 os.precision(8);
2394 os << " Current Localpoint = " << n.fLastLocatedPointLocal << G4endl;
2395 os << " PreviousSftOrigin = " << n.fPreviousSftOrigin << G4endl;
2396 os << " PreviousSafety = " << n.fPreviousSafety << G4endl;
2397 }
2398 if( n.fVerbose > 3 || n.fVerbose == 0 )
2399 {
2400 os << "Current History: " << G4endl << n.fHistory;
2401 }
2402
2403 os.precision(oldcoutPrec);
2404 return os;
2405}
int G4int
Definition: G4Types.hh:85
#define G4endl
Definition: G4ios.hh:57