Back to home page

EIC code displayed by LXR

 
 

    


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

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 G4INCLNuclearDensity_hh
0039 #define G4INCLNuclearDensity_hh 1
0040 
0041 #include <vector>
0042 #include <map>
0043 // #include <cassert>
0044 #include "G4INCLThreeVector.hh"
0045 #include "G4INCLIFunction1D.hh"
0046 #include "G4INCLParticle.hh"
0047 #include "G4INCLGlobals.hh"
0048 #include "G4INCLRandom.hh"
0049 #include "G4INCLINuclearPotential.hh"
0050 #include "G4INCLInterpolationTable.hh"
0051 
0052 namespace G4INCL {
0053 
0054   class NuclearDensity {
0055   public:
0056     NuclearDensity(const G4int A, const G4int Z, const G4int S, InterpolationTable const * const rpCorrelationTableProton, InterpolationTable const * const rpCorrelationTableNeutron, InterpolationTable const * const rpCorrelationTableLambda);
0057     ~NuclearDensity();
0058 
0059     /// \brief Copy constructor
0060     NuclearDensity(const NuclearDensity &rhs);
0061 
0062     /// \brief Assignment operator
0063     NuclearDensity &operator=(const NuclearDensity &rhs);
0064 
0065     /// \brief Helper method for the assignment operator
0066     void swap(NuclearDensity &rhs);
0067 
0068     /** \brief Get the maximum allowed radius for a given momentum.
0069      *  \param t type of the particle
0070      *  \param p absolute value of the particle momentum, divided by the
0071      *           relevant Fermi momentum.
0072      *  \return maximum allowed radius.
0073      */
0074     G4double getMaxRFromP(const ParticleType t, const G4double p) const;
0075 
0076     G4double getMinPFromR(const ParticleType t, const G4double r) const;
0077 
0078     G4double getMaximumRadius() const { return theMaximumRadius; };
0079 
0080     /** \brief The radius used for calculating the transmission coefficient.
0081      *
0082      * \return the radius
0083      */
0084     G4double getTransmissionRadius(Particle const * const p) const {
0085       const ParticleType t = p->getType();
0086 // assert(t!= antiLambda && t!=antiNeutron && t!=Neutron && t!=PiZero && t!=DeltaZero && t!=Eta && t!=Omega && t!=EtaPrime && t!=Photon && t!= Lambda && t!=SigmaZero && t!=KZero && t!=KZeroBar && t!=KShort && t!=KLong); // no neutral particles here
0087       if(t==Composite) {
0088         return transmissionRadius[t] +
0089           ParticleTable::getNuclearRadius(t, p->getA(), p->getZ());
0090       } else
0091         return transmissionRadius[t];
0092     };
0093 
0094     /** \brief The radius used for calculating the transmission coefficient.
0095      *
0096      * \return the radius
0097      */
0098     G4double getTransmissionRadius(ParticleType type) const {
0099 // assert(type!=Composite);
0100       return transmissionRadius[type];
0101     };
0102 
0103     /// \brief Get the mass number.
0104     G4int getA() const { return theA; }
0105 
0106     /// \brief Get the charge number.
0107     G4int getZ() const { return theZ; }
0108 
0109     /// \brief Get the strange number.
0110     G4int getS() const { return theS; }
0111 
0112     G4double getProtonNuclearRadius() const { return theProtonNuclearRadius; }
0113     void setProtonNuclearRadius(const G4double r) { theProtonNuclearRadius = r; }
0114 
0115   private:
0116 
0117     /** \brief Initialize the transmission radius. */
0118     void initializeTransmissionRadii();
0119 
0120     G4int theA, theZ, theS;
0121     G4double theMaximumRadius;
0122     /// \brief Represents INCL4.5's R0 variable
0123     G4double theProtonNuclearRadius;
0124 
0125     /* \brief map of transmission radii per particle type */
0126     G4double transmissionRadius[UnknownParticle];
0127 
0128     InterpolationTable const *rFromP[UnknownParticle];
0129     InterpolationTable const *pFromR[UnknownParticle];
0130   };
0131 
0132 }
0133 
0134 #endif