G4HadronCrossSections.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 //
00027 // GEANT4 tag $Name: not supported by cvs2svn $
00028 //
00029 //
00030 // GEANT4 Hadron physics class -- header file
00031 // F.W. Jones, TRIUMF, 03-DEC-96
00032 //  
00033 // This class encapsulates cross section data and interpolations 
00034 // from the Geant3/Gheisha routine GHESIG.
00035 // For further comments see G4HadronCrossSections.cc.
00036 //
00037 // Note: this is implemented as a SINGLETON class
00038 //
00039 // 27-MAR-97 FWJ: first version for Alpha release
00040 // 14-APR-97 FWJ: class name changed from G4LCrossSectionData
00041 //    to G4HadronicCrossSections
00042 // 14-APR-98 FWJ: rewritten as class G4HadronCrossSections
00043 //    and adapted to G4CrossSectionDataSet/DataStore class design.
00044 // 26-JUN-98 FWJ: added elastic/inelastic caching to improve performance.
00045 // 06-NOV-98 FWJ: added first-order correction for low-energy
00046 //    inelastic cross sections
00047 //
00048 
00049 
00050 #ifndef G4HadronCrossSections_h
00051 #define G4HadronCrossSections_h 1
00052  
00053 #include "globals.hh"
00054 #include "G4Element.hh"
00055 #include "G4VProcess.hh"
00056 #include "G4DynamicParticle.hh"
00057 #include "G4HadTmpUtil.hh"
00058 
00059 enum { TSIZE=41, NPARTS=35, NELAB=17, NCNLW=15, NFISS=21 };
00060 
00061 class G4Pow;
00062 
00063 class G4HadronCrossSections
00064 {
00065   public:
00066 
00067     G4HadronCrossSections();
00068 
00069     ~G4HadronCrossSections();
00070 
00071     static G4HadronCrossSections* Instance();
00072 
00073     G4bool IsApplicable(const G4DynamicParticle* aParticle);
00074 
00075     G4double GetElasticCrossSection(const G4DynamicParticle*,
00076                                     G4int /*ZZ*/, G4int /*AA*/);
00077 
00078     G4double GetInelasticCrossSection(const G4DynamicParticle*,
00079                                       G4int /*ZZ*/, G4int /*AA*/);
00080 
00081     G4double GetCaptureCrossSection(const G4DynamicParticle*, G4int /*Z*/);
00082 
00083     G4double GetFissionCrossSection(const G4DynamicParticle*, G4int /*ZZ*/,
00084                                     G4int /*AA*/);
00085 
00086     static void SetCorrectInelasticNearZero(G4bool value)
00087       {correctInelasticNearZero = value;}
00088 
00089     static G4bool GetCorrectInelasticNearZero()
00090       {return correctInelasticNearZero;}
00091 
00092     void SetVerboseLevel(G4int value) {verboseLevel = value;}
00093 
00094     G4int GetVerboseLevel() {return verboseLevel;}
00095 
00096   private:
00097 
00098     G4int GetParticleCode(const G4DynamicParticle*);
00099 
00100     void CalcScatteringCrossSections(const G4DynamicParticle*, 
00101                                      G4int /*ZZ*/, G4int /*AA*/);
00102 
00103     static G4HadronCrossSections* theInstance;
00104 
00105     G4Pow* g4pow;
00106 
00107     G4double sigelastic;
00108     G4double siginelastic;
00109     G4ParticleDefinition* prevParticleDefinition;
00110     G4Element* prevElement;
00111     G4int prevZZ;
00112     G4int prevAA;
00113     G4double prevKineticEnergy;
00114     G4double lastEkx, lastEkxPower;
00115 
00116     static G4bool correctInelasticNearZero;
00117 
00118     G4int verboseLevel;
00119 
00120     // The following arrays are declared static to allow the use of initializers.  
00121     // They are initialized in G4HadronCrossSections.cc, thus providing some 
00122     // data hiding.
00123 
00124     static G4float plab[TSIZE];
00125     static G4float csel[NPARTS][TSIZE];
00126     static G4float csin[NPARTS][TSIZE];
00127 
00128     static G4float cspiel[3][TSIZE];
00129     static G4float cspiin[3][TSIZE];
00130 
00131     static G4float cspnel[3][TSIZE];
00132     static G4float cspnin[3][TSIZE];
00133 
00134     static G4float elab[NELAB];
00135     static G4float cnlwat[NCNLW], cnlwel[NCNLW][NELAB], cnlwin[NCNLW][NELAB];
00136 
00137     static G4float cscap[100];
00138 
00139     static G4float ekfiss[NFISS], csfiss[4][NFISS];
00140 
00141     static G4float alpha[NPARTS], alphac[TSIZE];
00142 
00143     static G4float partel[35], partin[35];
00144     static G4int   icorr[35], intrc[35];
00145 
00146     static G4float csa[4];
00147     static G4int ipart2[7];
00148 };
00149 #endif
00150 

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