Geant4.10
 All Data Structures Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
G4Scatterer.hh
Go to the documentation of this file.
1 //
2 // ********************************************************************
3 // * License and Disclaimer *
4 // * *
5 // * The Geant4 software is copyright of the Copyright Holders of *
6 // * the Geant4 Collaboration. It is provided under the terms and *
7 // * conditions of the Geant4 Software License, included in the file *
8 // * LICENSE and available at http://cern.ch/geant4/license . These *
9 // * include a list of copyright holders. *
10 // * *
11 // * Neither the authors of this software system, nor their employing *
12 // * institutes,nor the agencies providing financial support for this *
13 // * work make any representation or warranty, express or implied, *
14 // * regarding this software system or assume any liability for its *
15 // * use. Please see the license in the file LICENSE and URL above *
16 // * for the full disclaimer and the limitation of liability. *
17 // * *
18 // * This code implementation is the result of the scientific and *
19 // * technical work of the GEANT4 collaboration. *
20 // * By using, copying, modifying or distributing the software (or *
21 // * any work based on the software) you agree to acknowledge its *
22 // * use in resulting scientific publications, and indicate your *
23 // * acceptance of all terms of the Geant4 Software license. *
24 // ********************************************************************
25 //
26 // $Id: G4Scatterer.hh,v 1.5 2006-06-29 20:35:58 gunter Exp $ //
27 //
28 //
29 // removing a auther spec that was part of a template.
30 
31 #ifndef G4SCATTERER_HH
32 #define G4SCATTERER_HH
33 
34 #include "globals.hh"
35 #include <vector>
36 #include "G4VScatterer.hh"
37 #include "G4VCollision.hh"
38 #include "G4KineticTrackVector.hh"
39 #include "G4CollisionVector.hh"
40 #include "G4BCAction.hh"
41 
42 class G4KineticTrack;
43 
44 class G4Scatterer : public G4VScatterer, public G4BCAction
45 {
46 public:
47 
48  G4Scatterer();
49 
50  virtual ~G4Scatterer();
51 
52  virtual G4double GetTimeToInteraction(const G4KineticTrack& trk1,
53  const G4KineticTrack& trk2);
54 
56  const G4KineticTrack& trk2);
57 
58  virtual G4KineticTrackVector* Scatter(const G4KineticTrack& trk1,
59  const G4KineticTrack& trk2);
60 
61  virtual const std::vector<G4CollisionInitialState *> &
62  GetCollisions(G4KineticTrack * aProjectile,
63  std::vector<G4KineticTrack *> & someCandidates,
64  G4double aCurrentTime);
65 
66  virtual G4KineticTrackVector *
67  GetFinalState(G4KineticTrack * aProjectile,
68  std::vector<G4KineticTrack *> & theTargets);
69 
70 private:
71 
72  G4VCollision* FindCollision(const G4KineticTrack& trk1,
73  const G4KineticTrack& trk2);
74 
75  struct Register
76  {
77  template<class T> void operator()(T*, G4CollisionVector * aC)
78  {
79  G4VCollision* aT = new T;
80  aC->push_back(aT);
81  }
82  };
83 
84  G4CollisionVector collisions;
85  std::vector<G4CollisionInitialState *> theCollisions;
86 
87 };
88 #endif
89 
90 
virtual G4KineticTrackVector * Scatter(const G4KineticTrack &trk1, const G4KineticTrack &trk2)
Definition: G4Scatterer.cc:269
G4double GetCrossSection(const G4KineticTrack &trk1, const G4KineticTrack &trk2)
Definition: G4Scatterer.cc:409
virtual const std::vector< G4CollisionInitialState * > & GetCollisions(G4KineticTrack *aProjectile, std::vector< G4KineticTrack * > &someCandidates, G4double aCurrentTime)
Definition: G4Scatterer.cc:424
void Register(T *inst)
Definition: G4AutoDelete.hh:65
std::vector< G4VCollision * > G4CollisionVector
virtual ~G4Scatterer()
Definition: G4Scatterer.cc:62
virtual G4double GetTimeToInteraction(const G4KineticTrack &trk1, const G4KineticTrack &trk2)
Definition: G4Scatterer.cc:70
double G4double
Definition: G4Types.hh:76
virtual G4KineticTrackVector * GetFinalState(G4KineticTrack *aProjectile, std::vector< G4KineticTrack * > &theTargets)
Definition: G4Scatterer.cc:448