Geant4 9.6.0
Toolkit for the simulation of the passage of particles through matter
All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros
G4INCLParticleSampler.hh
Go to the documentation of this file.
1//
2// ********************************************************************
3// * License and Disclaimer *
4// * *
5// * The Geant4 software is copyright of the Copyright Holders of *
6// * the Geant4 Collaboration. It is provided under the terms and *
7// * conditions of the Geant4 Software License, included in the file *
8// * LICENSE and available at http://cern.ch/geant4/license . These *
9// * include a list of copyright holders. *
10// * *
11// * Neither the authors of this software system, nor their employing *
12// * institutes,nor the agencies providing financial support for this *
13// * work make any representation or warranty, express or implied, *
14// * regarding this software system or assume any liability for its *
15// * use. Please see the license in the file LICENSE and URL above *
16// * for the full disclaimer and the limitation of liability. *
17// * *
18// * This code implementation is the result of the scientific and *
19// * technical work of the GEANT4 collaboration. *
20// * By using, copying, modifying or distributing the software (or *
21// * any work based on the software) you agree to acknowledge its *
22// * use in resulting scientific publications, and indicate your *
23// * acceptance of all terms of the Geant4 Software license. *
24// ********************************************************************
25//
26// INCL++ intra-nuclear cascade model
27// Pekka Kaitaniemi, CEA and Helsinki Institute of Physics
28// Davide Mancusi, CEA
29// Alain Boudard, CEA
30// Sylvie Leray, CEA
31// Joseph Cugnon, University of Liege
32//
33// INCL++ revision: v5.1.8
34//
35#define INCLXX_IN_GEANT4_MODE 1
36
37#include "globals.hh"
38
39/** \file G4INCLParticleSampler.hh
40 * \brief Class for sampling particles in a nucleus
41 *
42 * \date 18 July 2012
43 * \author Davide Mancusi
44 */
45
46#ifndef G4INCLPARTICLESAMPLER_HH_
47#define G4INCLPARTICLESAMPLER_HH_
48
51
52namespace G4INCL {
53
55
56 public:
57 /** \brief Constructor.
58 *
59 * \param A the mass number
60 * \param Z the charge number
61 * \param rCDFTable the interpolation table for the inverse CDF in r-space
62 * \param pCDFTable the interpolation table for the inverse CDF in p-space
63 */
64 ParticleSampler(const G4int A, const G4int Z, InverseInterpolationTable const * const rCDFTable, InverseInterpolationTable const * const pCDFTable);
65
66 /// \brief Destructor
68
69 /// \brief Getter for theDensity
70 NuclearDensity const *getDensity() const { return theDensity; }
71
72 /// \brief Getter for thePotential
73 NuclearPotential::INuclearPotential const *getPotential() const { return thePotential; }
74
75 /// \brief Setter for theDensity
76 void setDensity(NuclearDensity const * const d);
77
78 /// \brief Setter for thePotential
80
82
83 private:
84
85 void updateSampleOneParticleMethod();
86
87 typedef Particle *(ParticleSampler::*ParticleSamplerMethod)(const ParticleType t) const;
88 /** \brief Sample a list of particles.
89 *
90 * This method is a pointer to the method that does the real work.
91 */
92 ParticleSamplerMethod sampleOneParticle;
93
94 /// \brief Sample one particle taking into account the rp-correlation
95 Particle *sampleOneParticleWithRPCorrelation(const ParticleType t) const;
96
97 /// \brief Sample one particle not taking into account the rp-correlation
98 Particle *sampleOneParticleWithoutRPCorrelation(const ParticleType t) const;
99
100 /// \brief Mass number
101 const G4int theA;
102
103 /// \brief Charge number
104 const G4int theZ;
105
106 /// \brief Pointer to the r-space CDF table
107 InverseInterpolationTable const *theRCDFTable;
108
109 /// \brief Pointer to the p-space CDF table
110 InverseInterpolationTable const *thePCDFTable;
111
112 /// \brief Pointer to the Cluster's NuclearDensity
113 NuclearDensity const *theDensity;
114
115 /// \brief Pointer to the Cluster's NuclearPotential
116 NuclearPotential::INuclearPotential const *thePotential;
117 };
118
119}
120
121#endif // G4INCLPARTICLESAMPLER_HH_
Abstract interface to the nuclear potential.
int G4int
Definition: G4Types.hh:66
Class for interpolating the inverse of a 1-dimensional function.
void setPotential(NuclearPotential::INuclearPotential const *const p)
Setter for thePotential.
NuclearPotential::INuclearPotential const * getPotential() const
Getter for thePotential.
void setDensity(NuclearDensity const *const d)
Setter for theDensity.
NuclearDensity const * getDensity() const
Getter for theDensity.
ParticleList sampleParticles(ThreeVector const &position) const
std::list< G4INCL::Particle * > ParticleList