Geant4 10.7.0
Toolkit for the simulation of the passage of particles through matter
Loading...
Searching...
No Matches
G4ITNavigator1.cc File Reference
#include <iomanip>
#include "G4ITNavigator1.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 G4DEBUG_NAVIGATION   1
 
#define G4NEW_SAFETY   1
 

Functions

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

Macro Definition Documentation

◆ G4DEBUG_NAVIGATION

#define G4DEBUG_NAVIGATION   1

Definition at line 52 of file G4ITNavigator1.cc.

◆ G4NEW_SAFETY

#define G4NEW_SAFETY   1

Definition at line 1710 of file G4ITNavigator1.cc.

Function Documentation

◆ operator<<()

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

Definition at line 2041 of file G4ITNavigator1.cc.

2042{
2043 // Old version did only the following:
2044 // os << "Current History: " << G4endl << n.fHistory;
2045 // Old behaviour is recovered for fVerbose = 0
2046
2047 // Adapted from G4ITNavigator1::PrintState() const
2048
2049 G4int oldcoutPrec = os.precision(4);
2050 if( n.fVerbose >= 4 )
2051 {
2052 os << "The current state of G4ITNavigator1 is: " << G4endl;
2053 os << " ValidExitNormal= " << n.fValidExitNormal << G4endl
2054 << " ExitNormal = " << n.fExitNormal << G4endl
2055 << " Exiting = " << n.fExiting << G4endl
2056 << " Entering = " << n.fEntering << G4endl
2057 << " BlockedPhysicalVolume= " ;
2058 if (n.fBlockedPhysicalVolume==0)
2059 os << "None";
2060 else
2061 os << n.fBlockedPhysicalVolume->GetName();
2062 os << G4endl
2063 << " BlockedReplicaNo = " << n.fBlockedReplicaNo << G4endl
2064 << " LastStepWasZero = " << n.fLastStepWasZero << G4endl
2065 << G4endl;
2066 }
2067 if( ( 1 < n.fVerbose) && (n.fVerbose < 4) )
2068 {
2069 os << G4endl; // Make sure to line up
2070 os << std::setw(30) << " ExitNormal " << " "
2071 << std::setw( 5) << " Valid " << " "
2072 << std::setw( 9) << " Exiting " << " "
2073 << std::setw( 9) << " Entering" << " "
2074 << std::setw(15) << " Blocked:Volume " << " "
2075 << std::setw( 9) << " ReplicaNo" << " "
2076 << std::setw( 8) << " LastStepZero " << " "
2077 << G4endl;
2078 os << "( " << std::setw(7) << n.fExitNormal.x()
2079 << ", " << std::setw(7) << n.fExitNormal.y()
2080 << ", " << std::setw(7) << n.fExitNormal.z() << " ) "
2081 << std::setw( 5) << n.fValidExitNormal << " "
2082 << std::setw( 9) << n.fExiting << " "
2083 << std::setw( 9) << n.fEntering << " ";
2084 if ( n.fBlockedPhysicalVolume==0 )
2085 { os << std::setw(15) << "None"; }
2086 else
2087 { os << std::setw(15)<< n.fBlockedPhysicalVolume->GetName(); }
2088 os << std::setw( 9) << n.fBlockedReplicaNo << " "
2089 << std::setw( 8) << n.fLastStepWasZero << " "
2090 << G4endl;
2091 }
2092 if( n.fVerbose > 2 )
2093 {
2094 os.precision(8);
2095 os << " Current Localpoint = " << n.fLastLocatedPointLocal << G4endl;
2096 os << " PreviousSftOrigin = " << n.fPreviousSftOrigin << G4endl;
2097 os << " PreviousSafety = " << n.fPreviousSafety << G4endl;
2098 }
2099 if( n.fVerbose > 3 || n.fVerbose == 0 )
2100 {
2101 os << "Current History: " << G4endl << n.fHistory;
2102 }
2103
2104 os.precision(oldcoutPrec);
2105 return os;
2106}
int G4int
Definition: G4Types.hh:85
#define G4endl
Definition: G4ios.hh:57