File indexing completed on 2025-09-18 09:15:03
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 inline void SetVerbosity(G4int v) { verbosity = v; };
0081
0082 private:
0083 void DoScan();
0084
0085
0086 void StoreUserActions();
0087 void RestoreUserActions();
0088
0089
0090 private:
0091 G4RayShooter* theRayShooter = nullptr;
0092 G4MatScanMessenger* theMessenger = nullptr;
0093
0094 G4EventManager* theEventManager = nullptr;
0095
0096 G4UserEventAction* theUserEventAction = nullptr;
0097 G4UserStackingAction* theUserStackingAction = nullptr;
0098 G4UserTrackingAction* theUserTrackingAction = nullptr;
0099 G4UserSteppingAction* theUserSteppingAction = nullptr;
0100
0101 G4UserEventAction* theMatScannerEventAction = nullptr;
0102 G4UserStackingAction* theMatScannerStackingAction = nullptr;
0103 G4UserTrackingAction* theMatScannerTrackingAction = nullptr;
0104 G4MSSteppingAction* theMatScannerSteppingAction = nullptr;
0105
0106 G4ThreeVector eyePosition;
0107 G4int nTheta = 91;
0108 G4double thetaMin = 0.0;
0109 G4double thetaSpan = 0.0;
0110 G4int nPhi = 37;
0111 G4double phiMin = 0.0;
0112 G4double phiSpan = 0.0;
0113
0114 G4ThreeVector eyeDirection;
0115
0116 G4bool regionSensitive = false;
0117 G4String regionName = "notDefined";
0118 G4Region* theRegion = nullptr;
0119
0120
0121
0122
0123
0124 G4int verbosity = 0;
0125 };
0126
0127 #endif