File indexing completed on 2025-01-18 09:58:39
0001
0002
0003
0004
0005
0006
0007
0008
0009
0010
0011
0012
0013
0014
0015
0016
0017
0018
0019
0020
0021
0022
0023
0024
0025
0026
0027
0028
0029
0030
0031
0032
0033
0034
0035 #ifndef G4MaterialScanner_hh
0036 #define G4MaterialScanner_hh 1
0037
0038 #include "G4ThreeVector.hh"
0039 #include "globals.hh"
0040
0041 class G4Event;
0042 class G4EventManager;
0043 class G4UserEventAction;
0044 class G4UserStackingAction;
0045 class G4UserTrackingAction;
0046 class G4UserSteppingAction;
0047 class G4MSSteppingAction;
0048 class G4MatScanMessenger;
0049 class G4RayShooter;
0050 class G4Region;
0051
0052 class G4MaterialScanner
0053 {
0054 public:
0055 G4MaterialScanner();
0056 ~G4MaterialScanner();
0057
0058
0059
0060 void Scan();
0061
0062 inline void SetEyePosition(const G4ThreeVector& val) { eyePosition = val; }
0063 inline G4ThreeVector GetEyePosition() const { return eyePosition; }
0064 inline void SetNTheta(G4int val) { nTheta = val; }
0065 inline G4int GetNTheta() const { return nTheta; }
0066 inline void SetThetaMin(G4double val) { thetaMin = val; }
0067 inline G4double GetThetaMin() const { return thetaMin; }
0068 inline void SetThetaSpan(G4double val) { thetaSpan = val; }
0069 inline G4double GetThetaSpan() const { return thetaSpan; }
0070 inline void SetNPhi(G4int val) { nPhi = val; }
0071 inline G4int GetNPhi() const { return nPhi; }
0072 inline void SetPhiMin(G4double val) { phiMin = val; }
0073 inline G4double GetPhiMin() const { return phiMin; }
0074 inline void SetPhiSpan(G4double val) { phiSpan = val; }
0075 inline G4double GetPhiSpan() const { return phiSpan; }
0076 inline void SetRegionSensitive(G4bool val = true) { regionSensitive = val; }
0077 inline G4bool GetRegionSensitive() const { return regionSensitive; }
0078 G4bool SetRegionName(const G4String& val);
0079 inline const G4String& GetRegionName() const { return regionName; }
0080
0081 private:
0082 void DoScan();
0083
0084
0085 void StoreUserActions();
0086 void RestoreUserActions();
0087
0088
0089 private:
0090 G4RayShooter* theRayShooter = nullptr;
0091 G4MatScanMessenger* theMessenger = nullptr;
0092
0093 G4EventManager* theEventManager = nullptr;
0094
0095 G4UserEventAction* theUserEventAction = nullptr;
0096 G4UserStackingAction* theUserStackingAction = nullptr;
0097 G4UserTrackingAction* theUserTrackingAction = nullptr;
0098 G4UserSteppingAction* theUserSteppingAction = nullptr;
0099
0100 G4UserEventAction* theMatScannerEventAction = nullptr;
0101 G4UserStackingAction* theMatScannerStackingAction = nullptr;
0102 G4UserTrackingAction* theMatScannerTrackingAction = nullptr;
0103 G4MSSteppingAction* theMatScannerSteppingAction = nullptr;
0104
0105 G4ThreeVector eyePosition;
0106 G4int nTheta = 91;
0107 G4double thetaMin = 0.0;
0108 G4double thetaSpan = 0.0;
0109 G4int nPhi = 37;
0110 G4double phiMin = 0.0;
0111 G4double phiSpan = 0.0;
0112
0113 G4ThreeVector eyeDirection;
0114
0115 G4bool regionSensitive = false;
0116 G4String regionName = "notDefined";
0117 G4Region* theRegion = nullptr;
0118 };
0119
0120 #endif