Geant4-11
Public Member Functions | Private Member Functions | Private Attributes
G4FermiChannels Class Reference

#include <G4FermiChannels.hh>

Public Member Functions

void AddChannel (const G4FermiPair *)
 
 G4FermiChannels (size_t nmax, G4double ex, G4double gmass)
 
const std::vector< const G4FermiPair * > & GetChannels () const
 
G4double GetExcitation () const
 
G4double GetMass () const
 
size_t GetNumberOfChannels () const
 
const G4FermiPairGetPair (size_t idx) const
 
std::vector< G4double > & GetProbabilities ()
 
const G4FermiPairSamplePair (G4double rand) const
 

Private Member Functions

 G4FermiChannels (const G4FermiChannels &)
 
G4bool operator!= (const G4FermiChannels &)
 
const G4FermiChannelsoperator= (const G4FermiChannels &)
 
G4bool operator== (const G4FermiChannels &)
 

Private Attributes

std::vector< G4doublecum_prob
 
G4double excitation
 
std::vector< const G4FermiPair * > fvect
 
G4double ground_mass
 
size_t nch
 

Detailed Description

Definition at line 39 of file G4FermiChannels.hh.

Constructor & Destructor Documentation

◆ G4FermiChannels() [1/2]

G4FermiChannels::G4FermiChannels ( size_t  nmax,
G4double  ex,
G4double  gmass 
)
inlineexplicit

Definition at line 43 of file G4FermiChannels.hh.

44 : nch(0), excitation(ex), ground_mass(gmass)
45 { fvect.reserve(nmax); cum_prob.reserve(nmax); };
std::vector< const G4FermiPair * > fvect
std::vector< G4double > cum_prob

References cum_prob, and fvect.

◆ G4FermiChannels() [2/2]

G4FermiChannels::G4FermiChannels ( const G4FermiChannels )
inlineprivate

Member Function Documentation

◆ AddChannel()

void G4FermiChannels::AddChannel ( const G4FermiPair ptr)
inline

Definition at line 97 of file G4FermiChannels.hh.

98{
99 fvect.push_back(ptr);
100 cum_prob.push_back(1.0);
101 ++nch;
102}

References cum_prob, fvect, and nch.

◆ GetChannels()

const std::vector< const G4FermiPair * > & G4FermiChannels::GetChannels ( ) const
inline

Definition at line 78 of file G4FermiChannels.hh.

79{
80 return fvect;
81}

References fvect.

Referenced by G4FermiFragmentsPoolVI::Initialise(), and G4FermiBreakUpVI::SampleDecay().

◆ GetExcitation()

G4double G4FermiChannels::GetExcitation ( ) const
inline

Definition at line 109 of file G4FermiChannels.hh.

110{
111 return excitation;
112}

References excitation.

Referenced by G4FermiBreakUpVI::SampleDecay().

◆ GetMass()

G4double G4FermiChannels::GetMass ( ) const
inline

Definition at line 114 of file G4FermiChannels.hh.

115{
116 return excitation + ground_mass;
117}

References excitation, and ground_mass.

◆ GetNumberOfChannels()

size_t G4FermiChannels::GetNumberOfChannels ( ) const
inline

Definition at line 73 of file G4FermiChannels.hh.

74{
75 return nch;
76}

References nch.

Referenced by G4FermiFragmentsPoolVI::Initialise(), and G4FermiBreakUpVI::SampleDecay().

◆ GetPair()

const G4FermiPair * G4FermiChannels::GetPair ( size_t  idx) const
inline

Definition at line 83 of file G4FermiChannels.hh.

84{
85 return (idx < nch) ? fvect[idx] : nullptr;
86}

References fvect, and nch.

Referenced by G4FermiBreakUpVI::SampleDecay().

◆ GetProbabilities()

std::vector< G4double > & G4FermiChannels::GetProbabilities ( )
inline

Definition at line 104 of file G4FermiChannels.hh.

105{
106 return cum_prob;
107}

References cum_prob.

Referenced by G4FermiFragmentsPoolVI::Initialise().

◆ operator!=()

G4bool G4FermiChannels::operator!= ( const G4FermiChannels )
inlineprivate

◆ operator=()

const G4FermiChannels & G4FermiChannels::operator= ( const G4FermiChannels )
inlineprivate

◆ operator==()

G4bool G4FermiChannels::operator== ( const G4FermiChannels )
inlineprivate

◆ SamplePair()

const G4FermiPair * G4FermiChannels::SamplePair ( G4double  rand) const
inline

Definition at line 88 of file G4FermiChannels.hh.

89{
90 const G4FermiPair* ptr = nullptr;
91 for(size_t i=0; i<nch; ++i) {
92 if(rand <= cum_prob[i]) { ptr = fvect[i]; break; }
93 }
94 return ptr;
95}

References cum_prob, fvect, and nch.

Referenced by G4FermiBreakUpVI::SampleDecay().

Field Documentation

◆ cum_prob

std::vector<G4double> G4FermiChannels::cum_prob
private

Definition at line 69 of file G4FermiChannels.hh.

Referenced by AddChannel(), G4FermiChannels(), GetProbabilities(), and SamplePair().

◆ excitation

G4double G4FermiChannels::excitation
private

Definition at line 66 of file G4FermiChannels.hh.

Referenced by GetExcitation(), and GetMass().

◆ fvect

std::vector<const G4FermiPair*> G4FermiChannels::fvect
private

Definition at line 68 of file G4FermiChannels.hh.

Referenced by AddChannel(), G4FermiChannels(), GetChannels(), GetPair(), and SamplePair().

◆ ground_mass

G4double G4FermiChannels::ground_mass
private

Definition at line 67 of file G4FermiChannels.hh.

Referenced by GetMass().

◆ nch

size_t G4FermiChannels::nch
private

Definition at line 65 of file G4FermiChannels.hh.

Referenced by AddChannel(), GetNumberOfChannels(), GetPair(), and SamplePair().


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