Geant4 11.2.2
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 1708 of file G4ITNavigator1.cc.

Function Documentation

◆ operator<<()

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

Definition at line 2039 of file G4ITNavigator1.cc.

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