File indexing completed on 2025-01-18 09:59:04
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 #ifndef G4SCATTERER_HH
0031 #define G4SCATTERER_HH
0032
0033 #include "globals.hh"
0034 #include <vector>
0035 #include "G4VScatterer.hh"
0036 #include "G4VCollision.hh"
0037 #include "G4KineticTrackVector.hh"
0038 #include "G4CollisionVector.hh"
0039 #include "G4BCAction.hh"
0040
0041 class G4KineticTrack;
0042
0043 class G4Scatterer : public G4VScatterer, public G4BCAction
0044 {
0045 public:
0046
0047 G4Scatterer();
0048
0049 virtual ~G4Scatterer();
0050
0051 virtual G4double GetTimeToInteraction(const G4KineticTrack& trk1,
0052 const G4KineticTrack& trk2) const;
0053
0054 G4double GetCrossSection(const G4KineticTrack& trk1,
0055 const G4KineticTrack& trk2) const;
0056
0057 virtual G4KineticTrackVector* Scatter(const G4KineticTrack& trk1,
0058 const G4KineticTrack& trk2) const;
0059
0060 virtual const std::vector<G4CollisionInitialState *> &
0061 GetCollisions(G4KineticTrack * aProjectile,
0062 std::vector<G4KineticTrack *> & someCandidates,
0063 G4double aCurrentTime);
0064
0065 virtual G4KineticTrackVector *
0066 GetFinalState(G4KineticTrack * aProjectile,
0067 std::vector<G4KineticTrack *> & theTargets);
0068
0069 private:
0070
0071 const G4VCollision* FindCollision(const G4KineticTrack& trk1,
0072 const G4KineticTrack& trk2) const;
0073
0074 struct Register
0075 {
0076 template<class T> void operator()(T*, G4CollisionVector * aC)
0077 {
0078 G4VCollision* aT = new T;
0079 aC->push_back(aT);
0080 }
0081 };
0082
0083 static G4CollisionVector collisions;
0084 std::vector<G4CollisionInitialState *> theCollisions;
0085
0086 };
0087 #endif
0088
0089