Back to home page

EIC code displayed by LXR

 
 

    


File indexing completed on 2026-07-13 08:21:04

0001 
0002 
0003 #ifndef G4HepEmElectronTrack_HH
0004 #define G4HepEmElectronTrack_HH
0005 
0006 
0007 #include "G4HepEmMacros.hh"
0008 #include "G4HepEmTrack.hh"
0009 #include "G4HepEmMSCTrackData.hh"
0010 
0011 // A simple track structure for e-/e+ particles.
0012 //
0013 // A G4HepEmElectronTrack contains several extra information beyond those base
0014 // properties that are already available in the NEUTRAL G4HepEmTrack object.
0015 // Such G4HepEmElectronTrack object buffers are stored in each G4HepEmTLData
0016 // object, that are unique for each worker, to propagate and communicate
0017 // primary/secondary e-/e+ track information between the different phases of a
0018 // given step or between the G4HepEmElectron/GammaManager and their functions.
0019 
0020 class G4HepEmElectronTrack {
0021 
0022 public:
0023   G4HepEmHostDevice
0024   G4HepEmElectronTrack() {
0025     fTrack.ReSet();
0026     fTrack.SetCharge(-1.0);
0027     fMSCData.ReSet();
0028     fRange         =  0.0;
0029     fPStepLength   =  0.0;
0030   }
0031 
0032   G4HepEmHostDevice
0033   G4HepEmElectronTrack(const G4HepEmElectronTrack& o) {
0034     fTrack         = o.fTrack;
0035     fTrack.SetCharge(o.GetCharge());
0036     fMSCData       = o.fMSCData;
0037     fRange         = o.fRange;
0038     fPStepLength   = o.fPStepLength;
0039   }
0040 
0041   G4HepEmHostDevice
0042   G4HepEmTrack*  GetTrack()  { return &fTrack; }
0043 
0044   G4HepEmHostDevice
0045   G4HepEmMSCTrackData*  GetMSCTrackData()  { return &fMSCData; }
0046 
0047   G4HepEmHostDevice
0048   double  GetCharge() const { return fTrack.GetCharge(); }
0049 
0050   G4HepEmHostDevice
0051   void    SetRange(double r) { fRange = r; }
0052   G4HepEmHostDevice
0053   double  GetRange()         { return fRange; }
0054 
0055   G4HepEmHostDevice
0056   void    SetPStepLength(double psl)   { fPStepLength = psl;  }
0057   G4HepEmHostDevice
0058   double  GetPStepLength()             { return fPStepLength; }
0059 
0060   G4HepEmHostDevice
0061   void SavePreStepEKin()  {
0062     fPreStepEKin    = fTrack.GetEKin();
0063     fPreStepLogEKin = fTrack.GetLogEKin();
0064   }
0065   G4HepEmHostDevice
0066   void SetPreStepEKin(double ekin, double lekin) {
0067     fPreStepEKin    = ekin;
0068     fPreStepLogEKin = lekin;
0069   }
0070 
0071   G4HepEmHostDevice
0072   double GetPreStepEKin() const { return fPreStepEKin; }
0073   G4HepEmHostDevice
0074   double GetPreStepLogEKin() const { return fPreStepLogEKin; }
0075 
0076   // Reset all member values
0077   G4HepEmHostDevice
0078   void ReSet() {
0079     fTrack.ReSet();
0080     fTrack.SetCharge(-1.0);
0081     fMSCData.ReSet();
0082     fRange         = 0.0;
0083     fPStepLength   = 0.0;
0084   }
0085 
0086 private:
0087   G4HepEmTrack        fTrack;
0088   G4HepEmMSCTrackData fMSCData;
0089   double              fRange;
0090   double              fPStepLength;  // physical step length >= fTrack.fGStepLength
0091   double              fPreStepEKin;
0092   double              fPreStepLogEKin;
0093 };
0094 
0095 
0096 
0097 #endif // G4HepEmElectronTrack_HH