File indexing completed on 2026-10-03 09:09:05
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 G4LOCATOR_CHANGE_RECORD_HH
0036 #define G4LOCATOR_CHANGE_RECORD_HH 1
0037
0038 #include <vector>
0039 #include "G4FieldTrack.hh"
0040
0041
0042
0043
0044
0045
0046 class G4LocatorChangeRecord
0047 {
0048 public:
0049
0050 enum EChangeLocation { kInvalidCL = 0, kUnknownCL = 1,
0051 kInitialisingCL, kIntersectsAF, kIntersectsFB,
0052 kNoIntersectAForFB, kRecalculatedB,
0053 kInsertingMidPoint, kRecalculatedBagn,
0054 kLevelPop };
0055
0056
0057
0058
0059 G4LocatorChangeRecord( EChangeLocation codeLocation,
0060 G4int iter,
0061 unsigned int count,
0062 const G4FieldTrack& fieldTrack );
0063
0064
0065
0066
0067 G4LocatorChangeRecord( const G4LocatorChangeRecord & ) = default;
0068 G4LocatorChangeRecord( G4LocatorChangeRecord && ) = default;
0069
0070
0071
0072
0073
0074
0075 inline EChangeLocation GetLocation() const { return fCodeLocation; }
0076 inline unsigned int GetCount() const { return fEventCount; }
0077 inline G4int GetIteration() const { return fIteration; }
0078 inline G4double GetLength() const { return fFieldTrack.GetCurveLength(); }
0079
0080
0081
0082
0083 friend std::ostream& operator<< ( std::ostream& os,
0084 const G4LocatorChangeRecord& r );
0085 friend std::ostream& operator<< ( std::ostream& os,
0086 const std::vector<G4LocatorChangeRecord> & vecR );
0087
0088
0089
0090
0091 std::ostream& StreamInfo(std::ostream& os) const;
0092
0093 static std::ostream& ReportVector ( std::ostream& os,
0094 const std::string & nameOfRecord,
0095 const std::vector<G4LocatorChangeRecord> & lcr );
0096
0097 static std::ostream& ReportEndChanges ( std::ostream& os,
0098 const std::vector<G4LocatorChangeRecord> & startA,
0099 const std::vector<G4LocatorChangeRecord> & endB );
0100
0101 static const char* GetNameChangeLocation( EChangeLocation );
0102
0103 private:
0104
0105 static const char* fNameChangeLocation[];
0106 EChangeLocation fCodeLocation = kInvalidCL;
0107 G4int fIteration = -1;
0108 unsigned int fEventCount = 0;
0109 G4FieldTrack fFieldTrack;
0110 };
0111
0112 #endif