Geant4  10.00.p02
PrimaryGeneratorAction2 Class Reference

#include <PrimaryGeneratorAction2.hh>

+ Collaboration diagram for PrimaryGeneratorAction2:

Public Member Functions

 PrimaryGeneratorAction2 (G4ParticleGun *)
 
 ~PrimaryGeneratorAction2 ()
 
void GeneratePrimaries (G4Event *)
 
G4double RejectAccept ()
 
G4double InverseCumul ()
 

Private Member Functions

void InitFunction ()
 

Private Attributes

G4ParticleGunparticleGun
 
G4int nPoints
 
std::vector< G4doublex
 
std::vector< G4doublef
 
std::vector< G4doublea
 
std::vector< G4doubleFc
 
G4double fMax
 

Detailed Description

Definition at line 47 of file PrimaryGeneratorAction2.hh.

Constructor & Destructor Documentation

PrimaryGeneratorAction2::PrimaryGeneratorAction2 ( G4ParticleGun gun)

Definition at line 48 of file PrimaryGeneratorAction2.cc.

References InitFunction().

+ Here is the call graph for this function:

PrimaryGeneratorAction2::~PrimaryGeneratorAction2 ( )

Definition at line 58 of file PrimaryGeneratorAction2.cc.

Member Function Documentation

void PrimaryGeneratorAction2::GeneratePrimaries ( G4Event anEvent)

Definition at line 63 of file PrimaryGeneratorAction2.cc.

References G4INCL::KinematicsUtils::energy(), G4UniformRand, G4ParticleGun::GeneratePrimaryVertex(), InverseCumul(), particleGun, G4ParticleGun::SetParticleEnergy(), and G4ParticleGun::SetParticleMomentumDirection().

+ Here is the call graph for this function:

void PrimaryGeneratorAction2::InitFunction ( )
private

Definition at line 85 of file PrimaryGeneratorAction2.cc.

References a, f, Fc, fMax, keV, nPoints, and x.

Referenced by PrimaryGeneratorAction2().

+ Here is the caller graph for this function:

G4double PrimaryGeneratorAction2::InverseCumul ( )

Definition at line 148 of file PrimaryGeneratorAction2.cc.

References a, f, Fc, G4UniformRand, nPoints, G4INCL::Math::sign(), and x.

Referenced by GeneratePrimaries().

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

G4double PrimaryGeneratorAction2::RejectAccept ( )

Definition at line 126 of file PrimaryGeneratorAction2.cc.

References a, f, fMax, G4UniformRand, nPoints, and x.

Member Data Documentation

std::vector<G4double> PrimaryGeneratorAction2::a
private

Definition at line 66 of file PrimaryGeneratorAction2.hh.

Referenced by InitFunction(), InverseCumul(), and RejectAccept().

std::vector<G4double> PrimaryGeneratorAction2::f
private

Definition at line 65 of file PrimaryGeneratorAction2.hh.

Referenced by InitFunction(), InverseCumul(), and RejectAccept().

std::vector<G4double> PrimaryGeneratorAction2::Fc
private

Definition at line 67 of file PrimaryGeneratorAction2.hh.

Referenced by InitFunction(), and InverseCumul().

G4double PrimaryGeneratorAction2::fMax
private

Definition at line 68 of file PrimaryGeneratorAction2.hh.

Referenced by InitFunction(), and RejectAccept().

G4int PrimaryGeneratorAction2::nPoints
private

Definition at line 63 of file PrimaryGeneratorAction2.hh.

Referenced by InitFunction(), InverseCumul(), and RejectAccept().

G4ParticleGun* PrimaryGeneratorAction2::particleGun
private

Definition at line 61 of file PrimaryGeneratorAction2.hh.

Referenced by GeneratePrimaries().

std::vector<G4double> PrimaryGeneratorAction2::x
private

Definition at line 64 of file PrimaryGeneratorAction2.hh.

Referenced by InitFunction(), InverseCumul(), and RejectAccept().


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