G4ElementaryParticleCollider.hh

Go to the documentation of this file.
00001 //
00002 // ********************************************************************
00003 // * License and Disclaimer                                           *
00004 // *                                                                  *
00005 // * The  Geant4 software  is  copyright of the Copyright Holders  of *
00006 // * the Geant4 Collaboration.  It is provided  under  the terms  and *
00007 // * conditions of the Geant4 Software License,  included in the file *
00008 // * LICENSE and available at  http://cern.ch/geant4/license .  These *
00009 // * include a list of copyright holders.                             *
00010 // *                                                                  *
00011 // * Neither the authors of this software system, nor their employing *
00012 // * institutes,nor the agencies providing financial support for this *
00013 // * work  make  any representation or  warranty, express or implied, *
00014 // * regarding  this  software system or assume any liability for its *
00015 // * use.  Please see the license in the file  LICENSE  and URL above *
00016 // * for the full disclaimer and the limitation of liability.         *
00017 // *                                                                  *
00018 // * This  code  implementation is the result of  the  scientific and *
00019 // * technical work of the GEANT4 collaboration.                      *
00020 // * By using,  copying,  modifying or  distributing the software (or *
00021 // * any work based  on the software)  you  agree  to acknowledge its *
00022 // * use  in  resulting  scientific  publications,  and indicate your *
00023 // * acceptance of all terms of the Geant4 Software license.          *
00024 // ********************************************************************
00025 //
00026 // $Id$
00027 //
00028 // 20100114  M. Kelsey -- Remove G4CascadeMomentum, use G4LorentzVector directly
00029 // 20100315  M. Kelsey -- Remove "using" directive and unnecessary #includes.
00030 // 20100407  M. Kelsey -- Eliminate return-by-value std::vector<> by creating
00031 //              three data buffers for particles, momenta, and particle types.
00032 //              The following functions now return void and are non-const:
00033 //                ::generateSCMfinalState()
00034 //                ::generateMomModules() (also remove input vector)
00035 //                ::generateStrangeChannelPartTypes()
00036 //                ::generateSCMpionAbsorption()
00037 // 20100413  M. Kelsey -- Pass G4CollisionOutput by ref to ::collide(); merge
00038 //              public vs. private ::collide() functions.
00039 // 20100511  M. Kelsey -- Remove G4PionSampler and G4NucleonSampler.  Expand
00040 //              particle-types selector to all modes, not just strangeness.
00041 // 20100517  M. Kelsey -- Inherit from common base class, make arrays static
00042 // 20100714  M. Kelsey -- Switch to new G4CascadeColliderBase class
00043 // 20100726  M. Kelsey -- Move remaining std::vector<> buffers here
00044 // 20100804  M. Kelsey -- Add printFinalStateTables() function.
00045 // 20110923  M. Kelsey -- Add optional stream& to printFinalStateTables().
00046 
00047 #ifndef G4ELEMENTARY_PARTICLE_COLLIDER_HH
00048 #define G4ELEMENTARY_PARTICLE_COLLIDER_HH
00049 
00050 #include "G4CascadeColliderBase.hh"
00051 #include "G4InuclElementaryParticle.hh"
00052 #include "G4LorentzVector.hh"
00053 #include <iosfwd>
00054 #include <vector>
00055 
00056 class G4LorentzConvertor;
00057 class G4CollisionOutput;
00058 
00059 
00060 class G4ElementaryParticleCollider : public G4CascadeColliderBase {
00061 public:
00062   G4ElementaryParticleCollider();
00063   virtual ~G4ElementaryParticleCollider() {};
00064   
00065   void collide(G4InuclParticle* bullet, G4InuclParticle* target,
00066                G4CollisionOutput& output);
00067 
00068 private:
00069   void initializeArrays();
00070 
00071   G4int generateMultiplicity(G4int is, G4double ekin) const;
00072 
00073   void generateOutgoingPartTypes(G4int is, G4int mult, G4double ekin);
00074 
00075   void generateSCMfinalState(G4double ekin, G4double etot_scm, G4double pscm,
00076                              G4InuclElementaryParticle* particle1,
00077                              G4InuclElementaryParticle* particle2, 
00078                              G4LorentzConvertor* toSCM); 
00079 
00080   void generateSCMpionAbsorption(G4double etot_scm,
00081                                  G4InuclElementaryParticle* particle1,
00082                                  G4InuclElementaryParticle* particle2); 
00083 
00084   void generateMomModules(G4int mult, G4int is, G4double ekin,
00085                           G4double etot_cm); 
00086 
00087   // Samples the CM momentum for elastic and charge exchange scattering
00088   //
00089   G4LorentzVector
00090   sampleCMmomentumFor2to2(G4int is, G4int kw, G4double ekin,
00091                           G4double pscm) const; 
00092 
00093 
00094   // Samples cos(theta) in the CM for elastic and charge exchange scattering
00095   //
00096   G4double sampleCMcosFor2to2(G4double pscm, G4double pFrac,
00097                               G4double pA, G4double pC, G4double pCos) const;
00098 
00099 
00100   G4double getMomModuleFor2toMany(G4int is, G4int mult, G4int knd, 
00101                                   G4double ekin) const; 
00102 
00103 
00104   G4bool satisfyTriangle(const std::vector<G4double>& modules) const; 
00105         
00106   G4LorentzVector
00107   particleSCMmomentumFor2to3(G4int is, G4int knd, G4double ekin, 
00108                              G4double pmod) const; 
00109 
00110   void printFinalStateTables(std::ostream& os=G4cout) const;
00111 
00112   // Internal buffers for lists of secondaries
00113   std::vector<G4InuclElementaryParticle> particles;
00114   std::vector<G4LorentzVector> scm_momentums;
00115   std::vector<G4double> modules;
00116   std::vector<G4double> masses2;
00117   std::vector<G4int> particle_kinds;
00118 
00119   // Parameter arrays
00120   static const G4double rmn[14][10][2];    
00121   static const G4double abn[4][4][4];
00122 };
00123 
00124 #endif  /* G4ELEMENTARY_PARTICLE_COLLIDER_HH */
00125 
00126 

Generated on Mon May 27 17:48:07 2013 for Geant4 by  doxygen 1.4.7