Geant4 9.6.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 54 of file G4MaterialScanner.hh.

Constructor & Destructor Documentation

◆ G4MaterialScanner()

G4MaterialScanner::G4MaterialScanner ( )

Definition at line 51 of file G4MaterialScanner.cc.

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

◆ ~G4MaterialScanner()

G4MaterialScanner::~G4MaterialScanner ( )

Definition at line 80 of file G4MaterialScanner.cc.

81{
82 delete theRayShooter;
83 delete theMatScannerSteppingAction;
84 delete theMessenger;
85}

Member Function Documentation

◆ GetEyePosition()

G4ThreeVector G4MaterialScanner::GetEyePosition ( ) const
inline

Definition at line 106 of file G4MaterialScanner.hh.

106{ return eyePosition; }

Referenced by G4MatScanMessenger::GetCurrentValue().

◆ GetNPhi()

G4int G4MaterialScanner::GetNPhi ( ) const
inline

Definition at line 114 of file G4MaterialScanner.hh.

114{ return nPhi; }

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

◆ GetNTheta()

G4int G4MaterialScanner::GetNTheta ( ) const
inline

Definition at line 108 of file G4MaterialScanner.hh.

108{ return nTheta; }

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

◆ GetPhiMin()

G4double G4MaterialScanner::GetPhiMin ( ) const
inline

Definition at line 116 of file G4MaterialScanner.hh.

116{ return phiMin; }

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

◆ GetPhiSpan()

G4double G4MaterialScanner::GetPhiSpan ( ) const
inline

Definition at line 118 of file G4MaterialScanner.hh.

118{ return phiSpan; }

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

◆ GetRegionName()

G4String G4MaterialScanner::GetRegionName ( ) const
inline

Definition at line 122 of file G4MaterialScanner.hh.

122{ return regionName; }

Referenced by G4MatScanMessenger::GetCurrentValue().

◆ GetRegionSensitive()

G4bool G4MaterialScanner::GetRegionSensitive ( ) const
inline

Definition at line 120 of file G4MaterialScanner.hh.

120{ return regionSensitive; }

Referenced by G4MatScanMessenger::GetCurrentValue().

◆ GetThetaMin()

G4double G4MaterialScanner::GetThetaMin ( ) const
inline

Definition at line 110 of file G4MaterialScanner.hh.

110{ return thetaMin; }

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

◆ GetThetaSpan()

G4double G4MaterialScanner::GetThetaSpan ( ) const
inline

Definition at line 112 of file G4MaterialScanner.hh.

112{ return thetaSpan; }

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

◆ Scan()

void G4MaterialScanner::Scan ( )

Definition at line 87 of file G4MaterialScanner.cc.

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

Referenced by G4MatScanMessenger::SetNewValue().

◆ SetEyePosition()

void G4MaterialScanner::SetEyePosition ( const G4ThreeVector val)
inline

Definition at line 105 of file G4MaterialScanner.hh.

105{ eyePosition = val; }

Referenced by G4MatScanMessenger::SetNewValue().

◆ SetNPhi()

void G4MaterialScanner::SetNPhi ( G4int  val)
inline

Definition at line 113 of file G4MaterialScanner.hh.

113{ nPhi = val; }

Referenced by G4MatScanMessenger::SetNewValue().

◆ SetNTheta()

void G4MaterialScanner::SetNTheta ( G4int  val)
inline

Definition at line 107 of file G4MaterialScanner.hh.

107{ nTheta = val; }

Referenced by G4MatScanMessenger::SetNewValue().

◆ SetPhiMin()

void G4MaterialScanner::SetPhiMin ( G4double  val)
inline

Definition at line 115 of file G4MaterialScanner.hh.

115{ phiMin = val; }

Referenced by G4MatScanMessenger::SetNewValue().

◆ SetPhiSpan()

void G4MaterialScanner::SetPhiSpan ( G4double  val)
inline

Definition at line 117 of file G4MaterialScanner.hh.

117{ phiSpan = val; }

Referenced by G4MatScanMessenger::SetNewValue().

◆ SetRegionName()

G4bool G4MaterialScanner::SetRegionName ( const G4String val)

Definition at line 213 of file G4MaterialScanner.cc.

214{
216 if(aRegion)
217 {
218 theRegion = aRegion;
219 regionName = val;
220 return true;
221 }
222 else
223 {
224 G4cerr << "Region <" << val << "> not found. Command ignored." << G4endl;
225 G4cerr << "Defined regions are : " << G4endl;
226 for(size_t i=0;i<G4RegionStore::GetInstance()->size();i++)
227 { G4cerr << " " << (*(G4RegionStore::GetInstance()))[i]->GetName(); }
228 G4cerr << G4endl;
229 return false;
230 }
231}
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 119 of file G4MaterialScanner.hh.

119{ regionSensitive = val; }

Referenced by G4MatScanMessenger::SetNewValue().

◆ SetThetaMin()

void G4MaterialScanner::SetThetaMin ( G4double  val)
inline

Definition at line 109 of file G4MaterialScanner.hh.

109{ thetaMin = val; }

Referenced by G4MatScanMessenger::SetNewValue().

◆ SetThetaSpan()

void G4MaterialScanner::SetThetaSpan ( G4double  val)
inline

Definition at line 111 of file G4MaterialScanner.hh.

111{ thetaSpan = val; }

Referenced by G4MatScanMessenger::SetNewValue().


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