Geant4  10.02
G4INCL::PhaseSpaceRauboldLynch Class Reference

Generate momenta using the RauboldLynch method. More...

#include <G4INCLPhaseSpaceRauboldLynch.hh>

+ Inheritance diagram for G4INCL::PhaseSpaceRauboldLynch:
+ Collaboration diagram for G4INCL::PhaseSpaceRauboldLynch:

Public Member Functions

 PhaseSpaceRauboldLynch ()
 
virtual ~PhaseSpaceRauboldLynch ()
 
 PhaseSpaceRauboldLynch (PhaseSpaceRauboldLynch const &other)
 Dummy copy constructor to silence Coverity warning. More...
 
PhaseSpaceRauboldLynchoperator= (PhaseSpaceRauboldLynch const &rhs)
 Dummy assignment operator to silence Coverity warning. More...
 
void generate (const G4double sqrtS, ParticleList &particles)
 Generate momenta according to a uniform, Lorentz-invariant phase-space model. More...
 
G4double getMaxGeneratedWeight () const
 Return the largest generated weight. More...
 
- Public Member Functions inherited from G4INCL::IPhaseSpaceGenerator
 IPhaseSpaceGenerator ()
 
virtual ~IPhaseSpaceGenerator ()
 

Private Member Functions

void initialize (ParticleList &particles)
 Initialize internal structures (masses and sum of masses) More...
 
G4double computeMaximumWeightNaive ()
 Compute the maximum possible weight using a naive algorithm. More...
 
G4double computeMaximumWeightParam ()
 Compute the maximum possible weight using parametrizations. More...
 
G4double computeWeight ()
 Compute the maximum possible weight. More...
 
void generateEvent (ParticleList &particles)
 Generate an event. More...
 

Private Attributes

std::vector< G4doublemasses
 
std::vector< G4doublesumMasses
 
std::vector< G4doublernd
 
std::vector< G4doubleinvariantMasses
 
std::vector< G4doublemomentaCM
 
size_t nParticles
 
G4double sqrtS
 
G4double availableEnergy
 
G4double maxGeneratedWeight
 
InterpolationTablewMaxMassless
 
InterpolationTablewMaxCorrection
 
G4double prelog [wMaxNP]
 Precalculated coefficients: -ln(n) More...
 

Static Private Attributes

static const size_t nMasslessParticlesTable = 13
 
static const size_t wMaxNE = 30
 
static const G4double wMaxMasslessX [wMaxNE]
 
static const G4double wMaxMasslessY [wMaxNE]
 
static const G4double wMaxCorrectionX [wMaxNE]
 
static const G4double wMaxCorrectionY [wMaxNE]
 
static const G4double wMaxInterpolationMargin = std::log(1.5)
 
static const size_t wMaxNP = 20
 

Detailed Description

Generate momenta using the RauboldLynch method.

Definition at line 49 of file G4INCLPhaseSpaceRauboldLynch.hh.

Constructor & Destructor Documentation

G4INCL::PhaseSpaceRauboldLynch::PhaseSpaceRauboldLynch ( )
G4INCL::PhaseSpaceRauboldLynch::~PhaseSpaceRauboldLynch ( )
virtual

Definition at line 200 of file G4INCLPhaseSpaceRauboldLynch.cc.

References wMaxCorrection, and wMaxMassless.

G4INCL::PhaseSpaceRauboldLynch::PhaseSpaceRauboldLynch ( PhaseSpaceRauboldLynch const &  other)

Dummy copy constructor to silence Coverity warning.

Member Function Documentation

G4double G4INCL::PhaseSpaceRauboldLynch::computeMaximumWeightNaive ( )
private

Compute the maximum possible weight using a naive algorithm.

Definition at line 257 of file G4INCLPhaseSpaceRauboldLynch.cc.

References masses, G4INCL::KinematicsUtils::momentumInCM(), nParticles, and sqrtS.

Referenced by computeMaximumWeightParam().

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

G4double G4INCL::PhaseSpaceRauboldLynch::computeMaximumWeightParam ( )
private

Compute the maximum possible weight using parametrizations.

Definition at line 270 of file G4INCLPhaseSpaceRauboldLynch.cc.

References availableEnergy, computeMaximumWeightNaive(), INCL_WARN, nParticles, prelog, sumMasses, wMaxInterpolationMargin, wMaxMasslessX, wMaxNE, and wMaxNP.

Referenced by generate().

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

G4double G4INCL::PhaseSpaceRauboldLynch::computeWeight ( )
private

Compute the maximum possible weight.

Definition at line 292 of file G4INCLPhaseSpaceRauboldLynch.cc.

References availableEnergy, invariantMasses, masses, momentaCM, G4INCL::KinematicsUtils::momentumInCM(), nParticles, rnd, G4INCL::Random::shoot(), and sumMasses.

Referenced by generate().

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

void G4INCL::PhaseSpaceRauboldLynch::generate ( const G4double  sqrtS,
ParticleList particles 
)
virtual

Generate momenta according to a uniform, Lorentz-invariant phase-space model.

This function will assign momenta to the particles in the list that is passed as an argument. The event is generated in the CM frame.

Parameters
sqrtStotal centre-of-mass energy of the system
particleslist of particles

Implements G4INCL::IPhaseSpaceGenerator.

Definition at line 205 of file G4INCLPhaseSpaceRauboldLynch.cc.

References computeMaximumWeightParam(), computeWeight(), generateEvent(), INCL_WARN, initialize(), G4INCL::Math::max(), maxGeneratedWeight, nParticles, G4INCL::Random::shoot(), and sqrtS.

+ Here is the call graph for this function:

void G4INCL::PhaseSpaceRauboldLynch::generateEvent ( ParticleList particles)
private

Generate an event.

Definition at line 318 of file G4INCLPhaseSpaceRauboldLynch.cc.

References G4INCL::Particle::adjustEnergyFromMomentum(), invariantMasses, G4INCL::ThreeVector::mag2(), momentaCM, G4INCL::Random::normVector(), nParticles, and G4INCL::Particle::setMomentum().

Referenced by generate().

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

G4double G4INCL::PhaseSpaceRauboldLynch::getMaxGeneratedWeight ( ) const

Return the largest generated weight.

Definition at line 344 of file G4INCLPhaseSpaceRauboldLynch.cc.

References maxGeneratedWeight.

void G4INCL::PhaseSpaceRauboldLynch::initialize ( ParticleList particles)
private

Initialize internal structures (masses and sum of masses)

Definition at line 236 of file G4INCLPhaseSpaceRauboldLynch.cc.

References availableEnergy, G4INCL::Particle::getMass(), invariantMasses, masses, momentaCM, nParticles, rnd, sqrtS, and sumMasses.

Referenced by generate().

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

PhaseSpaceRauboldLynch& G4INCL::PhaseSpaceRauboldLynch::operator= ( PhaseSpaceRauboldLynch const &  rhs)

Dummy assignment operator to silence Coverity warning.

Member Data Documentation

G4double G4INCL::PhaseSpaceRauboldLynch::availableEnergy
private
std::vector<G4double> G4INCL::PhaseSpaceRauboldLynch::invariantMasses
private

Definition at line 78 of file G4INCLPhaseSpaceRauboldLynch.hh.

Referenced by computeWeight(), generateEvent(), and initialize().

std::vector<G4double> G4INCL::PhaseSpaceRauboldLynch::masses
private
G4double G4INCL::PhaseSpaceRauboldLynch::maxGeneratedWeight
private

Definition at line 83 of file G4INCLPhaseSpaceRauboldLynch.hh.

Referenced by generate(), and getMaxGeneratedWeight().

std::vector<G4double> G4INCL::PhaseSpaceRauboldLynch::momentaCM
private

Definition at line 79 of file G4INCLPhaseSpaceRauboldLynch.hh.

Referenced by computeWeight(), generateEvent(), and initialize().

const size_t G4INCL::PhaseSpaceRauboldLynch::nMasslessParticlesTable = 13
staticprivate

Definition at line 85 of file G4INCLPhaseSpaceRauboldLynch.hh.

size_t G4INCL::PhaseSpaceRauboldLynch::nParticles
private
G4double G4INCL::PhaseSpaceRauboldLynch::prelog[wMaxNP]
private

Precalculated coefficients: -ln(n)

Definition at line 99 of file G4INCLPhaseSpaceRauboldLynch.hh.

Referenced by computeMaximumWeightParam(), and PhaseSpaceRauboldLynch().

std::vector<G4double> G4INCL::PhaseSpaceRauboldLynch::rnd
private

Definition at line 77 of file G4INCLPhaseSpaceRauboldLynch.hh.

Referenced by computeWeight(), and initialize().

G4double G4INCL::PhaseSpaceRauboldLynch::sqrtS
private

Definition at line 81 of file G4INCLPhaseSpaceRauboldLynch.hh.

Referenced by computeMaximumWeightNaive(), generate(), and initialize().

std::vector<G4double> G4INCL::PhaseSpaceRauboldLynch::sumMasses
private
InterpolationTable* G4INCL::PhaseSpaceRauboldLynch::wMaxCorrection
private
const G4double G4INCL::PhaseSpaceRauboldLynch::wMaxCorrectionX
staticprivate

Definition at line 89 of file G4INCLPhaseSpaceRauboldLynch.hh.

Referenced by PhaseSpaceRauboldLynch().

const G4double G4INCL::PhaseSpaceRauboldLynch::wMaxCorrectionY
staticprivate

Definition at line 90 of file G4INCLPhaseSpaceRauboldLynch.hh.

Referenced by PhaseSpaceRauboldLynch().

const G4double G4INCL::PhaseSpaceRauboldLynch::wMaxInterpolationMargin = std::log(1.5)
staticprivate

Definition at line 91 of file G4INCLPhaseSpaceRauboldLynch.hh.

Referenced by computeMaximumWeightParam().

InterpolationTable* G4INCL::PhaseSpaceRauboldLynch::wMaxMassless
private
const G4double G4INCL::PhaseSpaceRauboldLynch::wMaxMasslessX
staticprivate
const G4double G4INCL::PhaseSpaceRauboldLynch::wMaxMasslessY
staticprivate

Definition at line 88 of file G4INCLPhaseSpaceRauboldLynch.hh.

Referenced by PhaseSpaceRauboldLynch().

const size_t G4INCL::PhaseSpaceRauboldLynch::wMaxNE = 30
staticprivate
const size_t G4INCL::PhaseSpaceRauboldLynch::wMaxNP = 20
staticprivate

The documentation for this class was generated from the following files: