Back to home page

EIC code displayed by LXR

 
 

    


File indexing completed on 2025-01-18 09:58:29

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 // INCL++ intra-nuclear cascade model
0027 // Alain Boudard, CEA-Saclay, France
0028 // Joseph Cugnon, University of Liege, Belgium
0029 // Jean-Christophe David, CEA-Saclay, France
0030 // Pekka Kaitaniemi, CEA-Saclay, France, and Helsinki Institute of Physics, Finland
0031 // Sylvie Leray, CEA-Saclay, France
0032 // Davide Mancusi, CEA-Saclay, France
0033 //
0034 #define INCLXX_IN_GEANT4_MODE 1
0035 
0036 #include "globals.hh"
0037 
0038 #ifndef G4INCLParticleTable_hh
0039 #define G4INCLParticleTable_hh 1
0040 
0041 #include <string>
0042 #include <vector>
0043 // #include <cassert>
0044 
0045 #include "G4INCLParticleType.hh"
0046 #include "G4INCLParticleSpecies.hh"
0047 #include "G4INCLLogger.hh"
0048 #include "G4INCLConfig.hh"
0049 #include "G4INCLHFB.hh"
0050 
0051 #ifdef INCLXX_IN_GEANT4_MODE
0052 #include "G4IonTable.hh"
0053 #include "G4ParticleTable.hh"
0054 #endif
0055 #include "G4INCLGlobals.hh"
0056 #include "G4INCLNaturalIsotopicDistributions.hh"
0057 
0058 namespace G4INCL {
0059 
0060   namespace ParticleTable {
0061 
0062     const G4int maxClusterMass = 12;
0063     const G4int maxClusterCharge = 8;
0064 
0065     const G4int clusterTableZSize = maxClusterCharge+1;
0066     const G4int clusterTableASize = maxClusterMass+1;
0067     const G4int clusterTableSSize = 4;
0068 
0069     const G4double effectiveNucleonMass = 938.2796;
0070     const G4double effectiveNucleonMass2 = 8.8036860777616e5;
0071     const G4double effectiveDeltaMass = 1232.0;
0072     const G4double effectiveDeltaWidth = 130.0;
0073     const G4double effectivePionMass = 138.0;
0074     const G4double effectiveLambdaMass = 1115.683;
0075     const G4double effectiveSigmaMass = 1197.45; // max value
0076     const G4double effectiveXiMass = 1321.71; // max value
0077     const G4double effectiveKaonMass = 497.614; // max value
0078     const G4double effectiveAntiKaonMass = 497.614; // max value
0079     const G4double effectiveEtaMass = 547.862;
0080     const G4double effectiveOmegaMass = 782.65;
0081     const G4double effectiveEtaPrimeMass = 957.78;
0082     const G4double effectivePhotonMass = 0.0;
0083     extern G4ThreadLocal G4double minDeltaMass;
0084     extern G4ThreadLocal G4double minDeltaMass2;
0085     extern G4ThreadLocal G4double minDeltaMassRndm;
0086 
0087     /// \brief Initialize the particle table
0088     void initialize(Config const * const theConfig = 0);
0089 
0090     /// \brief Get the isospin of a particle
0091     G4int getIsospin(const ParticleType t);
0092 
0093     /// \brief Get the native INCL name of the particle
0094     std::string getName(const ParticleType t);
0095 
0096     /// \brief Get the short INCL name of the particle
0097     std::string getShortName(const ParticleType t);
0098 
0099     /// \brief Get the native INCL name of the particle
0100     std::string getName(const ParticleSpecies &s);
0101 
0102     /// \brief Get the short INCL name of the particle
0103     std::string getShortName(const ParticleSpecies &s);
0104 
0105     /// \brief Get the native INCL name of the ion
0106     std::string getName(const G4int A, const G4int Z);
0107 
0108     /// \brief Get the native INCL name of the ion
0109     std::string getName(const G4int A, const G4int Z, const G4int S);
0110 
0111     /// \brief Get the short INCL name of the ion
0112     std::string getShortName(const G4int A, const G4int Z);
0113 
0114     /// \brief Get INCL nuclear mass (in MeV/c^2)
0115     G4double getINCLMass(const G4int A, const G4int Z, const G4int S);
0116 
0117     /// \brief Get INCL particle mass (in MeV/c^2)
0118     G4double getINCLMass(const ParticleType t);
0119 
0120 #ifndef INCLXX_IN_GEANT4_MODE
0121     /// \brief Do we have this particle mass?
0122     G4double hasMassTable(const unsigned int A, const unsigned int Z);
0123 
0124     /** \brief Weizsaecker mass formula
0125      *
0126      * Return the nuclear mass, as calculated from Weizsaecker's mass formula.
0127      * Adapted from the Geant4 source.
0128      *
0129      * \param A the mass number
0130      * \param Z the charge number
0131      * \return the nuclear mass [MeV/c^2]
0132      */
0133     G4double getWeizsaeckerMass(const G4int A, const G4int Z);
0134 #endif
0135 
0136     ///\brief Get particle mass (in MeV/c^2)
0137     G4double getRealMass(const G4INCL::ParticleType t);
0138     ///\brief Get nuclear mass (in MeV/c^2)
0139     G4double getRealMass(const G4int A, const G4int Z, const G4int S = 0);
0140 
0141     /**\brief Get Q-value (in MeV/c^2)
0142      *
0143      * Uses the getTableMass function to compute the Q-value for the
0144      * following reaction:
0145      * \f[ (A_1,Z_1) + (A_2, Z_2) --> (A_1+A_2,Z_1+Z_2) \f]
0146      */
0147     G4double getTableQValue(const G4int A1, const G4int Z1, const G4int S1, const G4int A2, const G4int Z2, const G4int S2);
0148 
0149     /**\brief Get Q-value (in MeV/c^2)
0150      *
0151      * Uses the getTableMass function to compute the Q-value for the
0152      * following reaction:
0153      * \f[ (A_1,Z_1) + (A_2, Z_2) --> (A_3,Z_3) + (A1+A2-A3,Z1+Z2-Z3) \f]
0154      */
0155     G4double getTableQValue(const G4int A1, const G4int Z1, const G4int S1, const G4int A2, const G4int Z2, const G4int S2, const G4int A3, const G4int Z3, const G4int S3);
0156 
0157     G4double getTableSpeciesMass(const ParticleSpecies &p);
0158 
0159     /// \brief Get mass number from particle type
0160     G4int getMassNumber(const ParticleType t);
0161 
0162     /// \brief Get charge number from particle type
0163     G4int getChargeNumber(const ParticleType t);
0164     
0165     /// \brief Get strangeness number from particle type
0166     G4int getStrangenessNumber(const ParticleType t);
0167 
0168     G4double getNuclearRadius(const ParticleType t, const G4int A, const G4int Z);
0169     G4double getLargestNuclearRadius(const G4int A, const G4int Z);
0170     G4double getRadiusParameter(const ParticleType t, const G4int A, const G4int Z);
0171     G4double getMaximumNuclearRadius(const ParticleType t, const G4int A, const G4int Z);
0172     G4double getSurfaceDiffuseness(const ParticleType t, const G4int A, const G4int Z);
0173 
0174     /// \brief Return the RMS of the momentum distribution (light clusters)
0175     G4double getMomentumRMS(const G4int A, const G4int Z);
0176 
0177     /// \brief Return INCL's default separation energy
0178     G4double getSeparationEnergyINCL(const ParticleType t, const G4int /*A*/, const G4int /*Z*/);
0179 
0180     /// \brief Return the real separation energy
0181     G4double getSeparationEnergyReal(const ParticleType t, const G4int A, const G4int Z);
0182 
0183     /// \brief Return the real separation energy only for light nuclei
0184     G4double getSeparationEnergyRealForLight(const ParticleType t, const G4int A, const G4int Z);
0185 
0186     /// \brief Getter for protonSeparationEnergy
0187     G4double getProtonSeparationEnergy();
0188 
0189     /// \brief Getter for neutronSeparationEnergy
0190     G4double getNeutronSeparationEnergy();
0191 
0192     /// \brief Setter for protonSeparationEnergy
0193     void setProtonSeparationEnergy(const G4double s);
0194 
0195     /// \brief Setter for protonSeparationEnergy
0196     void setNeutronSeparationEnergy(const G4double s);
0197 
0198     /// \brief Get the name of the element from the atomic number
0199     std::string getElementName(const G4int Z);
0200 
0201     /// \brief Get the name of an unnamed element from the IUPAC convention
0202     std::string getIUPACElementName(const G4int Z);
0203 
0204     /// \brief Get the name of the element from the atomic number
0205     G4int parseElement(std::string pS);
0206 
0207     /** \brief Parse a IUPAC element name
0208      *
0209      * Note: this function is UGLY. Look at it at your own peril.
0210      *
0211      * \param pS a normalised string (lowercase)
0212      * \return the charge number of the nuclide, or zero on fail
0213      */
0214     G4int parseIUPACElement(std::string const &pS);
0215 
0216     IsotopicDistribution const &getNaturalIsotopicDistribution(const G4int Z);
0217 
0218     G4int drawRandomNaturalIsotope(const G4int Z);
0219 
0220     // Typedefs and pointers for transparent handling of mass functions
0221     //typedef G4double (*NuclearMassFn)(const G4int, const G4int);
0222     typedef G4double (*NuclearMassFn)(const G4int, const G4int, const G4int);
0223     typedef G4double (*ParticleMassFn)(const ParticleType);
0224     /// \brief Static pointer to the mass function for nuclei
0225     extern G4ThreadLocal NuclearMassFn getTableMass;
0226     /// \brief Static pointer to the mass function for particles
0227     extern G4ThreadLocal ParticleMassFn getTableParticleMass;
0228 
0229     // Typedefs and pointers for transparent handling of separation energies
0230     typedef G4double (*SeparationEnergyFn)(const ParticleType, const G4int, const G4int);
0231     /// \brief Static pointer to the separation-energy function
0232     extern G4ThreadLocal SeparationEnergyFn getSeparationEnergy;
0233 
0234     // Typedefs and pointers for transparent handling of Fermi momentum
0235     typedef G4double (*FermiMomentumFn)(const G4int, const G4int);
0236     extern G4ThreadLocal FermiMomentumFn getFermiMomentum;
0237 
0238     /// \brief Return the constant value of the Fermi momentum
0239     G4double getFermiMomentumConstant(const G4int /*A*/, const G4int /*Z*/);
0240 
0241     /** \brief Return the constant value of the Fermi momentum - special for light
0242      *
0243      * This function should always return PhysicalConstants::Pf for heavy
0244      * nuclei, and values from the momentumRMS table for light nuclei.
0245      *
0246      * \param A mass number
0247      * \param Z charge number
0248      */
0249     G4double getFermiMomentumConstantLight(const G4int A, const G4int Z);
0250 
0251     /** \brief Return the value Fermi momentum from a fit
0252      *
0253      * This function returns a fitted Fermi momentum, based on data from Moniz
0254      * et al., Phys. Rev. Lett. 26 (1971) 445. The fitted functional form is
0255      * \f[
0256      * p_F(A)=\alpha-\beta\cdot e^{(-A\cdot\gamma)}
0257      * \f]
0258      * with \f$\alpha=259.416\f$ MeV/\f$c\f$, \f$\beta=152.824\f$ MeV/\f$c\f$
0259      * and \f$\gamma=9.5157\cdot10^{-2}\f$.
0260      *
0261      * \param A mass number
0262      */
0263     G4double getFermiMomentumMassDependent(const G4int A, const G4int /*Z*/);
0264 
0265     /** \brief Get the value of the r-p correlation coefficient
0266      *
0267      * \param t the type of the particle (Proton or Neutron)
0268      * \return the value of the r-p correlation coefficient
0269      */
0270     G4double getRPCorrelationCoefficient(const ParticleType t);
0271 
0272     /// \brief Get the thickness of the neutron skin
0273     G4double getNeutronSkin();
0274 
0275     /// \brief Get the size of the neutron halo
0276     G4double getNeutronHalo();
0277 
0278     /// \brief Get the type of pion
0279     ParticleType getPionType(const G4int isosp);
0280 
0281     /// \brief Get the type of nucleon
0282     ParticleType getNucleonType(const G4int isosp);
0283 
0284     /// \brief Get the type of delta
0285     ParticleType getDeltaType(const G4int isosp);
0286 
0287     /// \brief Get the type of sigma
0288     ParticleType getSigmaType(const G4int isosp);
0289     
0290     /// \brief Get the type of kaon
0291     ParticleType getKaonType(const G4int isosp);
0292 
0293     /// \brief Get the type of antikaon
0294     ParticleType getAntiKaonType(const G4int isosp);
0295        
0296     /// \brief Get the type of xi
0297     ParticleType getXiType(const G4int isosp);
0298     
0299     /// \brief Get the type of antinucleon
0300     ParticleType getAntiNucleonType(const G4int isosp);
0301 
0302     /// \brief Get the type of antidelta
0303     ParticleType getAntiXiType(const G4int isosp);
0304 
0305     /// \brief Get the type of antisigma
0306     ParticleType getAntiSigmaType(const G4int isosp); 
0307 
0308     /// \brief Get particle width (in s)
0309     G4double getWidth(const ParticleType t);
0310   }
0311 }
0312 
0313 #endif
0314