Geant4 11.3.0
Toolkit for the simulation of the passage of particles through matter
Loading...
Searching...
No Matches
G4MaterialScanner Class Reference

#include <G4MaterialScanner.hh>

Public Member Functions

 G4MaterialScanner ()
 
 ~G4MaterialScanner ()
 
void Scan ()
 
void SetEyePosition (const G4ThreeVector &val)
 
G4ThreeVector GetEyePosition () const
 
void SetNTheta (G4int val)
 
G4int GetNTheta () const
 
void SetThetaMin (G4double val)
 
G4double GetThetaMin () const
 
void SetThetaSpan (G4double val)
 
G4double GetThetaSpan () const
 
void SetNPhi (G4int val)
 
G4int GetNPhi () const
 
void SetPhiMin (G4double val)
 
G4double GetPhiMin () const
 
void SetPhiSpan (G4double val)
 
G4double GetPhiSpan () const
 
void SetRegionSensitive (G4bool val=true)
 
G4bool GetRegionSensitive () const
 
G4bool SetRegionName (const G4String &val)
 
const G4StringGetRegionName () const
 
void SetVerbosity (G4int v)
 

Detailed Description

Definition at line 52 of file G4MaterialScanner.hh.

Constructor & Destructor Documentation

◆ G4MaterialScanner()

G4MaterialScanner::G4MaterialScanner ( )

Definition at line 50 of file G4MaterialScanner.cc.

51{
52 theRayShooter = new G4RayShooter();
53 theMessenger = new G4MatScanMessenger(this);
54 theEventManager = G4EventManager::GetEventManager();
55
56 eyePosition = G4ThreeVector(0., 0., 0.);
57 thetaSpan = 90. * deg;
58 phiSpan = 360. * deg;
59}
CLHEP::Hep3Vector G4ThreeVector
static G4EventManager * GetEventManager()

◆ ~G4MaterialScanner()

G4MaterialScanner::~G4MaterialScanner ( )

Definition at line 62 of file G4MaterialScanner.cc.

63{
64 delete theRayShooter;
65 delete theMatScannerSteppingAction;
66 delete theMessenger;
67}

Member Function Documentation

◆ GetEyePosition()

G4ThreeVector G4MaterialScanner::GetEyePosition ( ) const
inline

Definition at line 63 of file G4MaterialScanner.hh.

63{ return eyePosition; }

◆ GetNPhi()

G4int G4MaterialScanner::GetNPhi ( ) const
inline

Definition at line 71 of file G4MaterialScanner.hh.

71{ return nPhi; }

◆ GetNTheta()

G4int G4MaterialScanner::GetNTheta ( ) const
inline

Definition at line 65 of file G4MaterialScanner.hh.

65{ return nTheta; }

◆ GetPhiMin()

G4double G4MaterialScanner::GetPhiMin ( ) const
inline

Definition at line 73 of file G4MaterialScanner.hh.

73{ return phiMin; }

◆ GetPhiSpan()

G4double G4MaterialScanner::GetPhiSpan ( ) const
inline

Definition at line 75 of file G4MaterialScanner.hh.

75{ return phiSpan; }

◆ GetRegionName()

const G4String & G4MaterialScanner::GetRegionName ( ) const
inline

Definition at line 79 of file G4MaterialScanner.hh.

79{ return regionName; }

◆ GetRegionSensitive()

G4bool G4MaterialScanner::GetRegionSensitive ( ) const
inline

Definition at line 77 of file G4MaterialScanner.hh.

77{ return regionSensitive; }

◆ GetThetaMin()

G4double G4MaterialScanner::GetThetaMin ( ) const
inline

Definition at line 67 of file G4MaterialScanner.hh.

67{ return thetaMin; }

◆ GetThetaSpan()

G4double G4MaterialScanner::GetThetaSpan ( ) const
inline

Definition at line 69 of file G4MaterialScanner.hh.

69{ return thetaSpan; }

◆ Scan()

void G4MaterialScanner::Scan ( )

Definition at line 70 of file G4MaterialScanner.cc.

71{
72 G4StateManager* theStateMan = G4StateManager::GetStateManager();
73 G4ApplicationState currentState = theStateMan->GetCurrentState();
74 if (currentState != G4State_Idle) {
75 G4cerr << "Illegal application state - Scan() ignored." << G4endl;
76 return;
77 }
78
79 if (theMatScannerSteppingAction == nullptr) {
80 theMatScannerSteppingAction = new G4MSSteppingAction();
81 }
82 StoreUserActions();
83 DoScan();
84 RestoreUserActions();
85}
G4ApplicationState
@ G4State_Idle
G4GLOB_DLL std::ostream G4cerr
#define G4endl
Definition G4ios.hh:67
const G4ApplicationState & GetCurrentState() const
static G4StateManager * GetStateManager()

◆ SetEyePosition()

void G4MaterialScanner::SetEyePosition ( const G4ThreeVector & val)
inline

Definition at line 62 of file G4MaterialScanner.hh.

62{ eyePosition = val; }

◆ SetNPhi()

void G4MaterialScanner::SetNPhi ( G4int val)
inline

Definition at line 70 of file G4MaterialScanner.hh.

70{ nPhi = val; }

◆ SetNTheta()

void G4MaterialScanner::SetNTheta ( G4int val)
inline

Definition at line 64 of file G4MaterialScanner.hh.

64{ nTheta = val; }

◆ SetPhiMin()

void G4MaterialScanner::SetPhiMin ( G4double val)
inline

Definition at line 72 of file G4MaterialScanner.hh.

72{ phiMin = val; }

◆ SetPhiSpan()

void G4MaterialScanner::SetPhiSpan ( G4double val)
inline

Definition at line 74 of file G4MaterialScanner.hh.

74{ phiSpan = val; }

◆ SetRegionName()

G4bool G4MaterialScanner::SetRegionName ( const G4String & val)

Definition at line 196 of file G4MaterialScanner.cc.

197{
198 G4Region* aRegion = G4RegionStore::GetInstance()->GetRegion(val);
199 if (aRegion != nullptr) {
200 theRegion = aRegion;
201 regionName = val;
202 return true;
203 }
204
205 G4cerr << "Region <" << val << "> not found. Command ignored." << G4endl;
206 G4cerr << "Defined regions are : " << G4endl;
207 for (const auto& i : *G4RegionStore::GetInstance()) {
208 G4cerr << " " << i->GetName();
209 }
210 G4cerr << G4endl;
211 return false;
212}
static G4RegionStore * GetInstance()
G4Region * GetRegion(const G4String &name, G4bool verbose=true) const

◆ SetRegionSensitive()

void G4MaterialScanner::SetRegionSensitive ( G4bool val = true)
inline

Definition at line 76 of file G4MaterialScanner.hh.

76{ regionSensitive = val; }

◆ SetThetaMin()

void G4MaterialScanner::SetThetaMin ( G4double val)
inline

Definition at line 66 of file G4MaterialScanner.hh.

66{ thetaMin = val; }

◆ SetThetaSpan()

void G4MaterialScanner::SetThetaSpan ( G4double val)
inline

Definition at line 68 of file G4MaterialScanner.hh.

68{ thetaSpan = val; }

◆ SetVerbosity()

void G4MaterialScanner::SetVerbosity ( G4int v)
inline

Definition at line 80 of file G4MaterialScanner.hh.

80{ verbosity = v; };

The documentation for this class was generated from the following files: