G4RPGInelastic.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 // Author: D. H. Wright
00029 // Date:   26 May 2007
00030 //
00031  
00032 #ifndef G4RPGInelastic_h
00033 #define G4RPGInelastic_h 1
00034 
00035 // Class Description:
00036 //
00037 // Base class for re-parameterized Gheisha-style models.
00038 
00039 #include <vector>
00040 
00041 #include "globals.hh"
00042 #include "G4FastVector.hh"
00043 #include "G4HadronicInteraction.hh"
00044 #include "G4ReactionProduct.hh"
00045 #include "Randomize.hh"
00046 #include "G4RPGFragmentation.hh"
00047 #include "G4RPGTwoCluster.hh"
00048 #include "G4RPGTwoBody.hh"
00049 #include "G4RPGStrangeProduction.hh"
00050 #include "G4RPGPionSuppression.hh"
00051 
00052 
00053 class G4RPGInelastic : public G4HadronicInteraction
00054  {
00055  public:  // with description
00056     
00057    G4RPGInelastic(const G4String& modelName = "RPGInelastic"); 
00058     
00059    virtual ~G4RPGInelastic()
00060    { }
00061     
00062  protected:  // with description
00063     
00064    G4double Pmltpc(G4int np, G4int nm, G4int nz, G4int n,
00065                    G4double b, G4double c);
00066 
00067    G4int Factorial(G4int n);
00068     
00069    G4bool MarkLeadingStrangeParticle(const G4ReactionProduct& currentParticle,
00070                                      const G4ReactionProduct& targetParticle,
00071                                      G4ReactionProduct& leadParticle);
00072     
00073    void SetUpPions(const G4int np, const G4int nm, const G4int nz,
00074                    G4FastVector<G4ReactionProduct,256> &vec,
00075                    G4int &vecLen);
00076     
00077    //   void Rotate(G4FastVector<G4ReactionProduct,256> &vec, G4int &vecLen);
00078 
00079    void GetNormalizationConstant(const G4double availableEnergy,
00080                                  G4double &n,
00081                                  G4double &anpn);
00082     
00083    void CalculateMomenta(G4FastVector<G4ReactionProduct,256> &vec,
00084                          G4int &vecLen,
00085                          const G4HadProjectile *originalIncident,
00086                          const G4DynamicParticle *originalTarget,
00087                          G4ReactionProduct &modifiedOriginal,
00088                          G4Nucleus &targetNucleus,
00089                          G4ReactionProduct &currentParticle,
00090                          G4ReactionProduct &targetParticle,
00091                          G4bool &incidentHasChanged,
00092                          G4bool &targetHasChanged,
00093                          G4bool quasiElastic);
00094     
00095    void SetUpChange(G4FastVector<G4ReactionProduct,256> &vec,
00096                     G4int &vecLen,
00097                     G4ReactionProduct &currentParticle,
00098                     G4ReactionProduct &targetParticle,
00099                     G4bool &incidentHasChanged);
00100 
00101    G4RPGFragmentation fragmentation;
00102 
00103    G4RPGTwoCluster twoCluster;
00104 
00105    G4RPGPionSuppression pionSuppression;
00106 
00107    G4RPGStrangeProduction strangeProduction;
00108 
00109    G4RPGTwoBody twoBody;
00110 
00111    std::pair<G4int, G4double> interpolateEnergy(G4double ke) const;
00112 
00113    G4int sampleFlat(std::vector<G4double> sigma) const;
00114 
00115    void CheckQnums(G4FastVector<G4ReactionProduct,256> &vec,
00116                    G4int &vecLen,
00117                    G4ReactionProduct &currentParticle,
00118                    G4ReactionProduct &targetParticle,
00119                    G4double Q, G4double B, G4double S);
00120 
00121    enum {pi0, pip, pim, kp, km, k0, k0b, pro, neu, 
00122          lam, sp, s0, sm, xi0, xim, om, ap, an};
00123 
00124  protected:
00125 
00126    G4ParticleDefinition* particleDef[18];
00127 
00128  private:
00129    
00130    G4double cache;
00131    G4ThreeVector what;
00132 
00133    static const G4double energyScale[30];
00134 
00135  };
00136  
00137 #endif

Generated on Mon May 27 17:49:44 2013 for Geant4 by  doxygen 1.4.7