G4HEInelastic.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 //
00029 // G4 Gheisha High Energy (GHE) model class -- header file
00030 // H. Fesefeldt, RWTH Aachen 23-October-1996
00031 // Last modified: 10-December-1996
00032 
00033 // A prototype of the Gheisha High Energy collision model.
00034 // It includes all Physics Routines from Geant3,
00035 // relevant for simulation of hadronic processes
00036 // above approx. 20 GeV incident momentum.
00037 // Not included are the Physics Routines for
00038 // stopping particles, the low energy neutron
00039 // slowing down description and the low energy
00040 // nuclear reactions a(A,A')b.
00041 
00042 #ifndef G4HEInelastic_h
00043 #define G4HEInelastic_h 1
00044 
00045 // Class description:
00046 // Each of the high energy parameterized models (e.g. G4HEProtonInelastic)
00047 // derives from the G4HEInelastic class. This class contains the various
00048 // algorithms needed to implement the interaction. These include 
00049 // lambda-fragmentation, meson and nucleon cluster formation and decay, 
00050 // nuclear cascade, and nuclear de-excitation.  
00051 //
00052 // This class is derived from G4HadronicInteraction.
00053 
00054 // Class Description - End
00055 
00056 #include "G4HEVector.hh"
00057 #include "G4HadronicInteraction.hh"
00058 
00059 class G4HEInelastic : public G4HadronicInteraction
00060 {
00061  public:  // with description 
00062    G4HEInelastic(const G4String& modelName = "HEInelastic") 
00063     : G4HadronicInteraction(modelName)
00064    { 
00065      SetParticles();
00066      verboseLevel = 0;
00067      MAXPART = 0;
00068      conserveEnergy = true;
00069    };
00070 
00071    ~G4HEInelastic(){ };
00072          
00073    void SetMaxNumberOfSecondaries(const G4int maxnumber)
00074             {MAXPART = maxnumber;}      
00075  
00076    void SetVerboseLevel(const G4int level) {verboseLevel = level;}
00077 
00078    G4int verboseLevel; 
00079    G4int MAXPART;
00080    G4bool conserveEnergy;
00081 
00082    void ForceEnergyConservation(G4bool energyConservation)
00083               {conserveEnergy = energyConservation;}
00084 
00085    G4bool EnergyConservation(void) {return conserveEnergy;} 
00086 
00087    virtual const std::pair<G4double, G4double> GetFatalEnergyCheckLevels() const;
00088 
00089    G4double Amin(G4double a, G4double b);
00090    G4double Amax(G4double a, G4double b);
00091    G4int Imin(G4int a, G4int b);
00092    G4int Imax(G4int a, G4int b);
00093  
00094    void FillParticleChange(G4HEVector pv[], G4int aVecLength);
00095 
00096    G4double pmltpc(G4int np, G4int nm, G4int nz,
00097                    G4int n, G4double b, G4double c);
00098 
00099    G4int Factorial(G4int n); 
00100 
00101    G4double NuclearInelasticity(G4double incidentKineticEnergy,
00102                                 G4double atomicWeight,
00103                                 G4double atomicNumber);
00104 
00105    G4double NuclearExcitation(G4double  incidentKineticEnergy,
00106                               G4double  atomicWeight,
00107                               G4double  atomicNumber,
00108                               G4double& excitationEnergyCascade,
00109                               G4double& excitationEnergyEvaporation); 
00110    
00111    void HighEnergyCascading(G4bool& successful,
00112                             G4HEVector pv[],
00113                             G4int& vecLen,
00114                             G4double& excitationEnergyGNP,
00115                             G4double& excitationEnergyDTA, 
00116                             const G4HEVector& incidentParticle,
00117                             const G4HEVector& targetParticle,
00118                             G4double atomicWeight,
00119                             G4double atomicNumber);
00120 
00121    void HighEnergyClusterProduction(G4bool& successful,
00122                                     G4HEVector pv[],
00123                                     G4int& vecLen,
00124                                     G4double& excitationEnergyGNP,
00125                                     G4double& excitationEnergyDTA, 
00126                                     const G4HEVector& incidentParticle,
00127                                     const G4HEVector& targetParticle,
00128                                     G4double atomicWeight,
00129                                     G4double atomicNumber);             
00130 
00131    void TuningOfHighEnergyCascading(G4HEVector pv[],
00132                                     G4int& vecLen,
00133                                     const G4HEVector& incidentParticle,
00134                                     const G4HEVector& targetParticle,
00135                                     G4double atomicWeight,
00136                                     G4double atomicNumber);   
00137 
00138    void MediumEnergyCascading(G4bool& successful,
00139                               G4HEVector pv[],
00140                               G4int& vecLen,
00141                               G4double& excitationEnergyGNP,
00142                               G4double& excitationEnergyDTA,
00143                               const G4HEVector& incidentParticle,
00144                               const G4HEVector& targetParticle,
00145                               G4double atomicWeight,
00146                               G4double atomicNumber);            
00147 
00148    void MediumEnergyClusterProduction(G4bool& successful,
00149                                       G4HEVector pv[],
00150                                       G4int& vecLen,
00151                                       G4double& excitationEnergyGNP,
00152                                       G4double& excitationEnergyDTA,
00153                                       const G4HEVector& incidentParticle,
00154                                       const G4HEVector& targetParticle,
00155                                       G4double atomicWeight,
00156                                       G4double atomicNumber);            
00157 
00158    void QuasiElasticScattering(G4bool& successful,
00159                                G4HEVector pv[],
00160                                G4int& vecLen,
00161                                G4double& excitationEnergyGNP,
00162                                G4double& excitationEnergyDTA, 
00163                                const G4HEVector& incidentParticle,
00164                                const G4HEVector& targetParticle,
00165                                G4double atomicWeight,
00166                                G4double atomicNumber);
00167 
00168    void ElasticScattering(G4bool& successful,
00169                           G4HEVector pv[],
00170                           G4int& vecLen,                      
00171                           const G4HEVector& incidentParticle,
00172                           G4double atomicWeight,
00173                           G4double atomicNumber); 
00174 
00175    G4int rtmi(G4double *x, G4double xli, G4double xri, G4double eps,
00176               G4int iend, G4double aa, G4double bb, G4double cc, 
00177               G4double dd, G4double rr);
00178 
00179    G4double fctcos(G4double t, G4double aa, G4double bb,G4double cc, 
00180                    G4double dd, G4double rr);     
00181         
00182    void StrangeParticlePairProduction(const G4double availableEnergy,
00183                                       const G4double centerOfMassEnergy,
00184                                       G4HEVector pv[],
00185                                       G4int& vecLen,
00186                                       const G4HEVector& incidentParticle,
00187                                       const G4HEVector& targetParticle); 
00188 
00189    G4double NBodyPhaseSpace(const G4double totalEnergy,
00190                             const G4bool   constantCrossSection,
00191                             G4HEVector pv[],
00192                             G4int &vecLen);
00193      
00194    G4double NBodyPhaseSpace(G4int npart, 
00195                             G4HEVector pv[],
00196                             G4double wmax,
00197                             G4double wfcn,
00198                             G4int maxtrial,
00199                             G4int ntrial);
00200 
00201    G4double gpdk(G4double a, G4double b, G4double c);
00202 
00203    void QuickSort(G4double arr[], const G4int lidx, const G4int ridx);
00204 
00205    G4double Alam(G4double a, G4double b, G4double c);
00206  
00207    G4double CalculatePhaseSpaceWeight( G4int npart);
00208        
00209    G4double normal(void);
00210    G4double GammaRand(G4double avalue);
00211    G4double Erlang(G4int mvalue);
00212    G4int Poisson(G4double x);
00213    void SetParticles(void);
00214 
00215    G4HEVector PionPlus;
00216    G4HEVector PionZero;
00217    G4HEVector PionMinus;             
00218    G4HEVector KaonPlus;
00219    G4HEVector KaonZero;
00220    G4HEVector AntiKaonZero;             
00221    G4HEVector KaonMinus;
00222    G4HEVector KaonZeroShort; 
00223    G4HEVector KaonZeroLong;
00224    G4HEVector Proton;
00225    G4HEVector AntiProton;
00226    G4HEVector Neutron;             
00227    G4HEVector AntiNeutron;
00228    G4HEVector Lambda;
00229    G4HEVector AntiLambda;             
00230    G4HEVector SigmaPlus;
00231    G4HEVector SigmaZero; 
00232    G4HEVector SigmaMinus;
00233    G4HEVector AntiSigmaPlus;
00234    G4HEVector AntiSigmaZero; 
00235    G4HEVector AntiSigmaMinus;
00236    G4HEVector XiZero;             
00237    G4HEVector XiMinus;
00238    G4HEVector AntiXiZero; 
00239    G4HEVector AntiXiMinus;
00240    G4HEVector OmegaMinus;
00241    G4HEVector AntiOmegaMinus; 
00242    G4HEVector Deuteron;
00243    G4HEVector Triton;
00244    G4HEVector Alpha;                         
00245    G4HEVector Gamma;
00246 };
00247 
00248 #endif

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