Geant4 10.7.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)
 
G4String GetRegionName () const
 

Detailed Description

Definition at line 52 of file G4MaterialScanner.hh.

Constructor & Destructor Documentation

◆ G4MaterialScanner()

G4MaterialScanner::G4MaterialScanner ( )

Definition at line 49 of file G4MaterialScanner.cc.

50{
51 theRayShooter = new G4RayShooter();
52 theMessenger = new G4MatScanMessenger(this);
53 theEventManager = G4EventManager::GetEventManager();
54
55 theUserEventAction = 0;
56 theUserStackingAction = 0;
57 theUserTrackingAction = 0;
58 theUserSteppingAction = 0;
59
60 theMatScannerEventAction = 0;
61 theMatScannerStackingAction = 0;
62 theMatScannerTrackingAction = 0;
63 theMatScannerSteppingAction = 0;
64
65 eyePosition = G4ThreeVector(0., 0., 0.);
66 nTheta = 91;
67 thetaMin = 0. * deg;
68 thetaSpan = 90. * deg;
69 nPhi = 37;
70 phiMin = 0. * deg;
71 phiSpan = 360. * deg;
72
73 regionSensitive = false;
74 regionName = "notDefined";
75 theRegion = 0;
76}
CLHEP::Hep3Vector G4ThreeVector
static G4EventManager * GetEventManager()

◆ ~G4MaterialScanner()

G4MaterialScanner::~G4MaterialScanner ( )

Definition at line 78 of file G4MaterialScanner.cc.

79{
80 delete theRayShooter;
81 delete theMatScannerSteppingAction;
82 delete theMessenger;
83}

Member Function Documentation

◆ GetEyePosition()

G4ThreeVector G4MaterialScanner::GetEyePosition ( ) const
inline

Definition at line 104 of file G4MaterialScanner.hh.

104{ return eyePosition; }

Referenced by G4MatScanMessenger::GetCurrentValue().

◆ GetNPhi()

G4int G4MaterialScanner::GetNPhi ( ) const
inline

Definition at line 112 of file G4MaterialScanner.hh.

112{ return nPhi; }

Referenced by G4MatScanMessenger::GetCurrentValue(), and G4MatScanMessenger::SetNewValue().

◆ GetNTheta()

G4int G4MaterialScanner::GetNTheta ( ) const
inline

Definition at line 106 of file G4MaterialScanner.hh.

106{ return nTheta; }

Referenced by G4MatScanMessenger::GetCurrentValue(), and G4MatScanMessenger::SetNewValue().

◆ GetPhiMin()

G4double G4MaterialScanner::GetPhiMin ( ) const
inline

Definition at line 114 of file G4MaterialScanner.hh.

114{ return phiMin; }

Referenced by G4MatScanMessenger::GetCurrentValue(), and G4MatScanMessenger::SetNewValue().

◆ GetPhiSpan()

G4double G4MaterialScanner::GetPhiSpan ( ) const
inline

Definition at line 116 of file G4MaterialScanner.hh.

116{ return phiSpan; }

Referenced by G4MatScanMessenger::GetCurrentValue(), and G4MatScanMessenger::SetNewValue().

◆ GetRegionName()

G4String G4MaterialScanner::GetRegionName ( ) const
inline

Definition at line 120 of file G4MaterialScanner.hh.

120{ return regionName; }

Referenced by G4MatScanMessenger::GetCurrentValue().

◆ GetRegionSensitive()

G4bool G4MaterialScanner::GetRegionSensitive ( ) const
inline

Definition at line 118 of file G4MaterialScanner.hh.

118{ return regionSensitive; }

Referenced by G4MatScanMessenger::GetCurrentValue().

◆ GetThetaMin()

G4double G4MaterialScanner::GetThetaMin ( ) const
inline

Definition at line 108 of file G4MaterialScanner.hh.

108{ return thetaMin; }

Referenced by G4MatScanMessenger::GetCurrentValue(), and G4MatScanMessenger::SetNewValue().

◆ GetThetaSpan()

G4double G4MaterialScanner::GetThetaSpan ( ) const
inline

Definition at line 110 of file G4MaterialScanner.hh.

110{ return thetaSpan; }

Referenced by G4MatScanMessenger::GetCurrentValue(), and G4MatScanMessenger::SetNewValue().

◆ Scan()

void G4MaterialScanner::Scan ( )

Definition at line 85 of file G4MaterialScanner.cc.

86{
88 G4ApplicationState currentState = theStateMan->GetCurrentState();
89 if(currentState != G4State_Idle)
90 {
91 G4cerr << "Illegal application state - Scan() ignored." << G4endl;
92 return;
93 }
94
95 if(!theMatScannerSteppingAction)
96 {
97 theMatScannerSteppingAction = new G4MSSteppingAction();
98 }
99 StoreUserActions();
100 DoScan();
101 RestoreUserActions();
102}
G4ApplicationState
@ G4State_Idle
G4GLOB_DLL std::ostream G4cerr
#define G4endl
Definition: G4ios.hh:57
const G4ApplicationState & GetCurrentState() const
static G4StateManager * GetStateManager()

Referenced by G4MatScanMessenger::SetNewValue().

◆ SetEyePosition()

void G4MaterialScanner::SetEyePosition ( const G4ThreeVector val)
inline

Definition at line 103 of file G4MaterialScanner.hh.

103{ eyePosition = val; }

Referenced by G4MatScanMessenger::SetNewValue().

◆ SetNPhi()

void G4MaterialScanner::SetNPhi ( G4int  val)
inline

Definition at line 111 of file G4MaterialScanner.hh.

111{ nPhi = val; }

Referenced by G4MatScanMessenger::SetNewValue().

◆ SetNTheta()

void G4MaterialScanner::SetNTheta ( G4int  val)
inline

Definition at line 105 of file G4MaterialScanner.hh.

105{ nTheta = val; }

Referenced by G4MatScanMessenger::SetNewValue().

◆ SetPhiMin()

void G4MaterialScanner::SetPhiMin ( G4double  val)
inline

Definition at line 113 of file G4MaterialScanner.hh.

113{ phiMin = val; }

Referenced by G4MatScanMessenger::SetNewValue().

◆ SetPhiSpan()

void G4MaterialScanner::SetPhiSpan ( G4double  val)
inline

Definition at line 115 of file G4MaterialScanner.hh.

115{ phiSpan = val; }

Referenced by G4MatScanMessenger::SetNewValue().

◆ SetRegionName()

G4bool G4MaterialScanner::SetRegionName ( const G4String val)

Definition at line 220 of file G4MaterialScanner.cc.

221{
223 if(aRegion)
224 {
225 theRegion = aRegion;
226 regionName = val;
227 return true;
228 }
229 else
230 {
231 G4cerr << "Region <" << val << "> not found. Command ignored." << G4endl;
232 G4cerr << "Defined regions are : " << G4endl;
233 for(size_t i = 0; i < G4RegionStore::GetInstance()->size(); i++)
234 {
235 G4cerr << " " << (*(G4RegionStore::GetInstance()))[i]->GetName();
236 }
237 G4cerr << G4endl;
238 return false;
239 }
240}
static G4RegionStore * GetInstance()
G4Region * GetRegion(const G4String &name, G4bool verbose=true) const

Referenced by G4MatScanMessenger::SetNewValue().

◆ SetRegionSensitive()

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

Definition at line 117 of file G4MaterialScanner.hh.

117{ regionSensitive = val; }

Referenced by G4MatScanMessenger::SetNewValue().

◆ SetThetaMin()

void G4MaterialScanner::SetThetaMin ( G4double  val)
inline

Definition at line 107 of file G4MaterialScanner.hh.

107{ thetaMin = val; }

Referenced by G4MatScanMessenger::SetNewValue().

◆ SetThetaSpan()

void G4MaterialScanner::SetThetaSpan ( G4double  val)
inline

Definition at line 109 of file G4MaterialScanner.hh.

109{ thetaSpan = val; }

Referenced by G4MatScanMessenger::SetNewValue().


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