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