Back to home page

EIC code displayed by LXR

 
 

    


File indexing completed on 2025-01-18 09:59:04

0001 //
0002 // ********************************************************************
0003 // * License and Disclaimer                                           *
0004 // *                                                                  *
0005 // * The  Geant4 software  is  copyright of the Copyright Holders  of *
0006 // * the Geant4 Collaboration.  It is provided  under  the terms  and *
0007 // * conditions of the Geant4 Software License,  included in the file *
0008 // * LICENSE and available at  http://cern.ch/geant4/license .  These *
0009 // * include a list of copyright holders.                             *
0010 // *                                                                  *
0011 // * Neither the authors of this software system, nor their employing *
0012 // * institutes,nor the agencies providing financial support for this *
0013 // * work  make  any representation or  warranty, express or implied, *
0014 // * regarding  this  software system or assume any liability for its *
0015 // * use.  Please see the license in the file  LICENSE  and URL above *
0016 // * for the full disclaimer and the limitation of liability.         *
0017 // *                                                                  *
0018 // * This  code  implementation is the result of  the  scientific and *
0019 // * technical work of the GEANT4 collaboration.                      *
0020 // * By using,  copying,  modifying or  distributing the software (or *
0021 // * any work based  on the software)  you  agree  to acknowledge its *
0022 // * use  in  resulting  scientific  publications,  and indicate your *
0023 // * acceptance of all terms of the Geant4 Software license.          *
0024 // ********************************************************************
0025 //
0026 //
0027 //
0028 // removing a auther spec that was part of a template.
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