File indexing completed on 2026-07-13 08:21:05
0001 #ifndef G4HepEmMSCTrackData_HH
0002 #define G4HepEmMSCTrackData_HH
0003
0004 #include "G4HepEmMacros.hh"
0005
0006
0007
0008
0009
0010
0011
0012 #include <cmath>
0013
0014 class G4HepEmMSCTrackData {
0015
0016 public:
0017 G4HepEmHostDevice
0018 G4HepEmMSCTrackData() { ReSet(); }
0019
0020 G4HepEmHostDevice
0021 G4HepEmMSCTrackData(const G4HepEmMSCTrackData& o) {
0022 CopyFrom(o);
0023 }
0024
0025 G4HepEmHostDevice
0026 G4HepEmMSCTrackData& operator=(const G4HepEmMSCTrackData& o) {
0027 if (this != &o) {
0028 CopyFrom(o);
0029 }
0030 return *this;
0031 }
0032
0033 G4HepEmHostDevice
0034 void SetDisplacement(double x, double y, double z) {
0035 fDisplacement[0] = x;
0036 fDisplacement[1] = y;
0037 fDisplacement[2] = z;
0038 }
0039 G4HepEmHostDevice
0040 double* GetDisplacement() { return fDisplacement; }
0041
0042 G4HepEmHostDevice
0043 void SetNewDirection(double x, double y, double z) {
0044 fDirection[0] = x;
0045 fDirection[1] = y;
0046 fDirection[2] = z;
0047 }
0048 G4HepEmHostDevice
0049 double* GetDirection() { return fDirection; }
0050
0051
0052
0053 G4HepEmHostDevice
0054 void ReSet() {
0055 fLambtr1 = 0.;
0056
0057 fTrueStepLength = 0.;
0058 fZPathLength = 0.;
0059 fDisplacement[0] = 0.;
0060 fDisplacement[1] = 0.;
0061 fDisplacement[2] = 0.;
0062 fDirection[0] = 0.;
0063 fDirection[1] = 0.;
0064 fDirection[2] = 1.;
0065
0066 fInitialRange = 1.0e+21;
0067 fDynamicRangeFactor = 0.04;
0068 fTlimitMin = 1.0E-7;
0069
0070 fPar1 = -1.;
0071 fPar2 = 0.;
0072 fPar3 = 0.;
0073
0074 fIsNoScatteringInMSC = false;
0075 fIsDisplace = false;
0076 fIsFirstStep = true;
0077 fIsActive = false;
0078 }
0079
0080
0081 G4HepEmHostDevice
0082 void CopyFrom(const G4HepEmMSCTrackData& o) {
0083 fLambtr1 = o.fLambtr1;
0084
0085 fTrueStepLength = o.fTrueStepLength;
0086 fZPathLength = o.fZPathLength;
0087 fDisplacement[0] = o.fDisplacement[0];
0088 fDisplacement[1] = o.fDisplacement[1];
0089 fDisplacement[2] = o.fDisplacement[2];
0090 fDirection[0] = o.fDirection[0];
0091 fDirection[1] = o.fDirection[1];
0092 fDirection[2] = o.fDirection[2];
0093
0094 fInitialRange = o.fInitialRange;
0095 fDynamicRangeFactor = o.fDynamicRangeFactor;
0096 fTlimitMin = o.fTlimitMin;
0097
0098 fPar1 = o.fPar1;
0099 fPar2 = o.fPar2;
0100 fPar3 = o.fPar3;
0101
0102 fIsNoScatteringInMSC = o.fIsNoScatteringInMSC;
0103 fIsDisplace = o.fIsDisplace;
0104 fIsFirstStep = o.fIsFirstStep;
0105 fIsActive = o.fIsActive;
0106 }
0107
0108
0109
0110
0111 public:
0112 double fLambtr1;
0113
0114 double fTrueStepLength;
0115 double fZPathLength;
0116 double fDisplacement[3];
0117 double fDirection[3];
0118
0119 double fInitialRange;
0120 double fDynamicRangeFactor;
0121 double fTlimitMin;
0122
0123 double fPar1;
0124 double fPar2;
0125 double fPar3;
0126
0127 bool fIsNoScatteringInMSC;
0128 bool fIsDisplace;
0129 bool fIsFirstStep;
0130
0131 bool fIsActive;
0132
0133 };
0134
0135 #endif