|
||||
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 /** \file G4INCLParticleSampler.hh 0039 * \brief Class for sampling particles in a nucleus 0040 * 0041 * \date 18 July 2012 0042 * \author Davide Mancusi 0043 */ 0044 0045 #ifndef G4INCLPARTICLESAMPLER_HH_ 0046 #define G4INCLPARTICLESAMPLER_HH_ 0047 0048 #include "G4INCLNuclearDensity.hh" 0049 #include "G4INCLINuclearPotential.hh" 0050 #include "G4INCLInterpolationTable.hh" 0051 0052 namespace G4INCL { 0053 0054 class ParticleSampler { 0055 0056 public: 0057 /** \brief Constructor. 0058 * 0059 * \param A the mass number 0060 * \param Z the charge number 0061 */ 0062 ParticleSampler(const G4int A, const G4int Z, const G4int S); 0063 0064 /// \brief Destructor 0065 ~ParticleSampler(); 0066 0067 /// \brief Getter for theDensity 0068 NuclearDensity const *getDensity() const { return theDensity; } 0069 0070 /// \brief Getter for thePotential 0071 NuclearPotential::INuclearPotential const *getPotential() const { return thePotential; } 0072 0073 /// \brief Getter for rpCorrelationCoefficient 0074 G4double getRPCorrelationCoefficient(const ParticleType t) const { 0075 // assert(t==Proton || t==Neutron); 0076 return rpCorrelationCoefficient[t]; 0077 } 0078 0079 /// \brief Setter for theDensity 0080 void setDensity(NuclearDensity const * const d); 0081 0082 /// \brief Setter for thePotential 0083 void setPotential(NuclearPotential::INuclearPotential const * const p); 0084 0085 /// \brief Setter for rpCorrelationCoefficient 0086 void setRPCorrelationCoefficient(const ParticleType t, const G4double corrCoeff) { 0087 // assert(t==Proton || t==Neutron); 0088 rpCorrelationCoefficient[t] = corrCoeff; 0089 } 0090 0091 ParticleList sampleParticles(ThreeVector const &position); 0092 void sampleParticlesIntoList(ThreeVector const &position, ParticleList &theList); 0093 0094 private: 0095 0096 void updateSampleOneParticleMethods(); 0097 0098 typedef Particle *(ParticleSampler::*ParticleSamplerMethod)(const ParticleType t) const; 0099 0100 /** \brief Sample a list of particles. 0101 * 0102 * This method is a pointer to the method that does the real work for protons. 0103 */ 0104 ParticleSamplerMethod sampleOneProton; 0105 0106 /** \brief Sample a list of particles. 0107 * 0108 * This method is a pointer to the method that does the real work for neutrons. 0109 */ 0110 ParticleSamplerMethod sampleOneNeutron; 0111 0112 /// \brief Sample one particle taking into account the rp-correlation 0113 Particle *sampleOneParticleWithRPCorrelation(const ParticleType t) const; 0114 0115 /// \brief Sample one particle not taking into account the rp-correlation 0116 Particle *sampleOneParticleWithoutRPCorrelation(const ParticleType t) const; 0117 0118 /// \brief Sample one particle with a fuzzy rp-correlation 0119 Particle *sampleOneParticleWithFuzzyRPCorrelation(const ParticleType t) const; 0120 0121 /// \brief Mass number 0122 const G4int theA; 0123 0124 /// \brief Charge number 0125 const G4int theZ; 0126 0127 /// \brief Strangeness number 0128 const G4int theS; 0129 0130 /// \brief Array of pointers to the r-space CDF table 0131 InterpolationTable const *theRCDFTable[UnknownParticle]; 0132 0133 /// \brief Array of pointers to the p-space CDF table 0134 InterpolationTable const *thePCDFTable[UnknownParticle]; 0135 0136 /// \brief Pointer to the Cluster's NuclearDensity 0137 NuclearDensity const *theDensity; 0138 0139 /// \brief Pointer to the Cluster's NuclearPotential 0140 NuclearPotential::INuclearPotential const *thePotential; 0141 0142 /// \brief Correlation coefficients for the r-p correlation 0143 G4double rpCorrelationCoefficient[UnknownParticle]; 0144 }; 0145 0146 } 0147 0148 #endif // G4INCLPARTICLESAMPLER_HH_
[ Source navigation ] | [ Diff markup ] | [ Identifier search ] | [ general search ] |
This page was automatically generated by the 2.3.7 LXR engine. The LXR team |