00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018
00019
00020
00021
00022
00023
00024
00025
00026
00027 #ifndef G4RKPropagation_h
00028 #define G4RKPropagation_h 1
00029
00030 #include "G4VFieldPropagation.hh"
00031 #include "G4VNuclearField.hh"
00032 #include "G4V3DNucleus.hh"
00033 #include "G4KM_DummyField.hh"
00034 #include "G4Mag_EqRhs.hh"
00035 #include <map>
00036
00037
00038 class G4RKPropagation: public G4VFieldPropagation
00039 {
00040
00041 public:
00042 G4RKPropagation();
00043 virtual ~G4RKPropagation();
00044
00045 private:
00046 G4RKPropagation(const G4RKPropagation &right);
00047 const G4RKPropagation & operator=(const G4RKPropagation & right);
00048 G4int operator==(const G4RKPropagation & right) const;
00049 G4int operator!=(const G4RKPropagation & right) const;
00050
00051 public:
00052
00053 virtual void Init(G4V3DNucleus * nucleus);
00054 virtual void Transport(G4KineticTrackVector &theActive,
00055 const G4KineticTrackVector &theSpectators,
00056 G4double theTimeStep);
00057 G4bool GetSphereIntersectionTimes(const G4KineticTrack * track,
00058 G4double & t1, G4double & t2);
00059 G4ThreeVector GetMomentumTransfer() const;
00060 private:
00061 G4double theOuterRadius;
00062 G4V3DNucleus * theNucleus;
00063 std::map <G4int, G4VNuclearField *, std::less<G4int> > * theFieldMap;
00064 std::map <G4int, G4Mag_EqRhs *, std::less<G4int> > * theEquationMap;
00065 G4KM_DummyField * theField;
00066
00067 G4ThreeVector theMomentumTranfer;
00068
00069 G4bool GetSphereIntersectionTimes(const G4double radius,
00070 const G4ThreeVector & currentPos,
00071 const G4LorentzVector & momentum,
00072 G4double & t1, G4double & t2);
00073
00074
00075 G4bool FieldTransport(G4KineticTrack * track, const G4double timestep);
00076 G4bool FreeTransport(G4KineticTrack * track, const G4double timestep);
00077
00078 void delete_FieldsAndMap(
00079 std::map <G4int, G4VNuclearField *, std::less<G4int> > * aMap);
00080 void delete_EquationsAndMap(
00081 std::map <G4int, G4Mag_EqRhs *, std::less<G4int> > * aMap);
00082
00083 public:
00084 inline G4double GetBarrier(G4int encoding)
00085 {
00086 std::map <G4int, G4VNuclearField *, std::less<G4int> >::iterator iter;
00087 iter = theFieldMap->find(encoding);
00088 if(iter == theFieldMap->end()) return 0;
00089 return (*theFieldMap)[encoding]->GetBarrier();
00090 }
00091
00092 inline G4double GetField(G4int encoding,G4ThreeVector pos)
00093 {
00094 std::map <G4int, G4VNuclearField *, std::less<G4int> >::iterator iter;
00095 iter = theFieldMap->find(encoding);
00096 if(iter == theFieldMap->end()) return 0;
00097 return (*theFieldMap)[encoding]->GetField(pos);
00098 }
00099
00100 };
00101
00102 #endif
00103
00104
00105
00106
00107
00108
00109
00110
00111
00112
00113
00114
00115
00116
00117