File indexing completed on 2026-09-22 08:51:38
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 G4NAVIGATIONLOGGER_HH
0036 #define G4NAVIGATIONLOGGER_HH 1
0037
0038 #include "G4NavigationHistory.hh"
0039 #include "G4VPhysicalVolume.hh"
0040 #include "G4LogicalVolume.hh"
0041 #include "G4VSolid.hh"
0042 #include "G4ThreeVector.hh"
0043
0044
0045
0046
0047
0048
0049 class G4NavigationLogger
0050 {
0051 public:
0052
0053
0054
0055
0056 G4NavigationLogger(const G4String& id);
0057 ~G4NavigationLogger();
0058
0059
0060
0061
0062 void PreComputeStepLog (const G4VPhysicalVolume* motherPhysical,
0063 G4double motherSafety,
0064 const G4ThreeVector& localPoint) const;
0065
0066
0067
0068
0069 void AlongComputeStepLog(const G4VSolid* sampleSolid,
0070 const G4ThreeVector& samplePoint,
0071 const G4ThreeVector& sampleDirection,
0072 const G4ThreeVector& localDirection,
0073 G4double sampleSafety,
0074 G4double sampleStep) const;
0075
0076
0077
0078
0079 void CheckDaughterEntryPoint(const G4VSolid* sampleSolid,
0080 const G4ThreeVector& samplePoint,
0081 const G4ThreeVector& sampleDirection,
0082 const G4VSolid* motherSolid,
0083 const G4ThreeVector& localPoint,
0084 const G4ThreeVector& localDirection,
0085 G4double motherStep,
0086 G4double sampleStep) const;
0087
0088
0089
0090
0091 void PostComputeStepLog (const G4VSolid* motherSolid,
0092 const G4ThreeVector& localPoint,
0093 const G4ThreeVector& localDirection,
0094 G4double motherStep,
0095 G4double motherSafety) const;
0096
0097
0098
0099
0100 void ComputeSafetyLog (const G4VSolid* solid,
0101 const G4ThreeVector& point,
0102 G4double safety,
0103 G4bool isMotherVolume,
0104 G4int banner= -1) const;
0105
0106
0107
0108
0109 void PrintDaughterLog (const G4VSolid* sampleSolid,
0110 const G4ThreeVector& samplePoint,
0111 G4double sampleSafety,
0112 G4bool onlySafety,
0113 const G4ThreeVector& sampleDirection,
0114 G4double sampleStep) const;
0115
0116
0117
0118
0119 G4bool CheckAndReportBadNormal(const G4ThreeVector& unitNormal,
0120 const G4ThreeVector& localPoint,
0121 const G4ThreeVector& localDirection,
0122 G4double step,
0123 const G4VSolid* solid,
0124 const char* msg) const;
0125
0126
0127
0128
0129 G4bool CheckAndReportBadNormal(const G4ThreeVector& unitNormal,
0130 const G4ThreeVector& originalNormal,
0131 const G4RotationMatrix& rotationM,
0132 const char* msg) const;
0133
0134
0135
0136
0137 void ReportOutsideMother(const G4ThreeVector& localPoint,
0138 const G4ThreeVector& localDirection,
0139 const G4VPhysicalVolume* motherPV,
0140 G4double tDist = 30.0*CLHEP::cm) const;
0141
0142
0143
0144
0145
0146 void ReportVolumeAndIntersection(std::ostream& ostrm,
0147 const G4ThreeVector& localPoint,
0148 const G4ThreeVector& localDirection,
0149 const G4VPhysicalVolume* physical) const;
0150
0151
0152
0153
0154 inline G4int GetVerboseLevel() const { return fVerbose; }
0155 inline void SetVerboseLevel(G4int level) { fVerbose = level; }
0156
0157
0158
0159
0160 inline G4double GetMinTriggerDistance() const {return fMinTriggerDistance;}
0161 inline void SetMinTriggerDistance(G4double d) {fMinTriggerDistance= d;}
0162 inline G4bool GetReportSoftWarnings() const {return fReportSoftWarnings;}
0163 inline void SetReportSoftWarnings(G4bool b) {fReportSoftWarnings = b;}
0164
0165 private:
0166
0167 G4String fId;
0168 G4int fVerbose = 0;
0169 G4double fMinTriggerDistance = DBL_MAX;
0170 G4bool fReportSoftWarnings = false;
0171 };
0172
0173 #endif