Back to home page

EIC code displayed by LXR

 
 

    


File indexing completed on 2026-09-18 09:13:51

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 Getter for antiprotonSeparationEnergy
0193     G4double getantiProtonSeparationEnergy();
0194 
0195     /// \brief Getter for antineutronSeparationEnergy
0196     G4double getantiNeutronSeparationEnergy();
0197 
0198      /// \brief Getter for antilambdaSeparationEnergy
0199     G4double getantiLambdaSeparationEnergy();
0200 
0201      /// \brief Getter for lambdaSeparationEnergy
0202     G4double getLambdaSeparationEnergy();
0203 
0204     /// \brief Setter for protonSeparationEnergy
0205     void setProtonSeparationEnergy(const G4double s);
0206 
0207     /// \brief Setter for protonSeparationEnergy
0208     void setNeutronSeparationEnergy(const G4double s);
0209  
0210      /// \brief Setter for lambdaSeparationEnergy
0211     void setLambdaSeparationEnergy(const G4double s);
0212 
0213     /// \brief Setter for antilambdaSeparationEnergy
0214     void setantiLambdaSeparationEnergy(const G4double s);
0215 
0216     /// \brief Get the name of the element from the atomic number
0217     std::string getElementName(const G4int Z);
0218 
0219     /// \brief Get the name of an unnamed element from the IUPAC convention
0220     std::string getIUPACElementName(const G4int Z);
0221 
0222     /// \brief Get the name of the element from the atomic number
0223     G4int parseElement(std::string pS);
0224 
0225     /** \brief Parse a IUPAC element name
0226      *
0227      * Note: this function is UGLY. Look at it at your own peril.
0228      *
0229      * \param pS a normalised string (lowercase)
0230      * \return the charge number of the nuclide, or zero on fail
0231      */
0232     G4int parseIUPACElement(std::string const &pS);
0233 
0234     IsotopicDistribution const &getNaturalIsotopicDistribution(const G4int Z);
0235 
0236     G4int drawRandomNaturalIsotope(const G4int Z);
0237 
0238     // Typedefs and pointers for transparent handling of mass functions
0239     //typedef G4double (*NuclearMassFn)(const G4int, const G4int);
0240     typedef G4double (*NuclearMassFn)(const G4int, const G4int, const G4int);
0241     typedef G4double (*ParticleMassFn)(const ParticleType);
0242     /// \brief Static pointer to the mass function for nuclei
0243     extern G4ThreadLocal NuclearMassFn getTableMass;
0244     /// \brief Static pointer to the mass function for particles
0245     extern G4ThreadLocal ParticleMassFn getTableParticleMass;
0246 
0247     // Typedefs and pointers for transparent handling of separation energies
0248     typedef G4double (*SeparationEnergyFn)(const ParticleType, const G4int, const G4int);
0249     /// \brief Static pointer to the separation-energy function
0250     extern G4ThreadLocal SeparationEnergyFn getSeparationEnergy;
0251 
0252     // Typedefs and pointers for transparent handling of Fermi momentum
0253     typedef G4double (*FermiMomentumFn)(const G4int, const G4int);
0254     extern G4ThreadLocal FermiMomentumFn getFermiMomentum;
0255 
0256     /// \brief Return the constant value of the Fermi momentum
0257     G4double getFermiMomentumConstant(const G4int /*A*/, const G4int /*Z*/);
0258 
0259     /** \brief Return the constant value of the Fermi momentum - special for light
0260      *
0261      * This function should always return PhysicalConstants::Pf for heavy
0262      * nuclei, and values from the momentumRMS table for light nuclei.
0263      *
0264      * \param A mass number
0265      * \param Z charge number
0266      */
0267     G4double getFermiMomentumConstantLight(const G4int A, const G4int Z);
0268 
0269     /** \brief Return the value Fermi momentum from a fit
0270      *
0271      * This function returns a fitted Fermi momentum, based on data from Moniz
0272      * et al., Phys. Rev. Lett. 26 (1971) 445. The fitted functional form is
0273      * \f[
0274      * p_F(A)=\alpha-\beta\cdot e^{(-A\cdot\gamma)}
0275      * \f]
0276      * with \f$\alpha=259.416\f$ MeV/\f$c\f$, \f$\beta=152.824\f$ MeV/\f$c\f$
0277      * and \f$\gamma=9.5157\cdot10^{-2}\f$.
0278      *
0279      * \param A mass number
0280      */
0281     G4double getFermiMomentumMassDependent(const G4int A, const G4int /*Z*/);
0282 
0283     /** \brief Get the value of the r-p correlation coefficient
0284      *
0285      * \param t the type of the particle (Proton or Neutron)
0286      * \return the value of the r-p correlation coefficient
0287      */
0288     G4double getRPCorrelationCoefficient(const ParticleType t);
0289  
0290     /// \brief Get the configuration of src-pair correlations
0291     G4bool getsrcPairConfig();
0292     
0293     /// \brief Get the distance between src nucleons
0294     G4float getsrcPairDistance();
0295 
0296     /// \brief Get the thickness of the neutron skin
0297     G4double getNeutronSkin();
0298 
0299     /// \brief Get the size of the neutron halo
0300     G4double getNeutronHalo();
0301 
0302     /// \brief Get the type of pion
0303     ParticleType getPionType(const G4int isosp);
0304 
0305     /// \brief Get the type of nucleon
0306     ParticleType getNucleonType(const G4int isosp);
0307 
0308     /// \brief Get the type of delta
0309     ParticleType getDeltaType(const G4int isosp);
0310 
0311     /// \brief Get the type of sigma
0312     ParticleType getSigmaType(const G4int isosp);
0313     
0314     /// \brief Get the type of kaon
0315     ParticleType getKaonType(const G4int isosp);
0316 
0317     /// \brief Get the type of antikaon
0318     ParticleType getAntiKaonType(const G4int isosp);
0319        
0320     /// \brief Get the type of xi
0321     ParticleType getXiType(const G4int isosp);
0322     
0323     /// \brief Get the type of antinucleon
0324     ParticleType getAntiNucleonType(const G4int isosp);
0325 
0326     /// \brief Get the type of antidelta
0327     ParticleType getAntiXiType(const G4int isosp);
0328 
0329     /// \brief Get the type of antisigma
0330     ParticleType getAntiSigmaType(const G4int isosp); 
0331 
0332     /// \brief Get particle width (in s)
0333     G4double getWidth(const ParticleType t);
0334   }
0335 }
0336 
0337 #endif
0338