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

#include <G4PreCompoundFragmentVector.hh>

Public Member Functions

G4double CalculateProbabilities (const G4Fragment &aFragment)
 
G4VPreCompoundFragmentChooseFragment ()
 
 G4PreCompoundFragmentVector (pcfvector *avector)
 
void SetOPTxs (G4int)
 
void SetVector (pcfvector *avector)
 
void UseSICB (G4bool)
 
 ~G4PreCompoundFragmentVector ()=default
 

Private Member Functions

 G4PreCompoundFragmentVector (const G4PreCompoundFragmentVector &right)=delete
 
G4bool operator!= (const G4PreCompoundFragmentVector &right) const =delete
 
const G4PreCompoundFragmentVectoroperator= (const G4PreCompoundFragmentVector &right)=delete
 
G4bool operator== (const G4PreCompoundFragmentVector &right) const =delete
 

Private Attributes

G4int nChannels
 
G4DataVector probabilities
 
pcfvectortheChannels
 

Detailed Description

Definition at line 51 of file G4PreCompoundFragmentVector.hh.

Constructor & Destructor Documentation

◆ G4PreCompoundFragmentVector() [1/2]

G4PreCompoundFragmentVector::G4PreCompoundFragmentVector ( pcfvector avector)
explicit

Definition at line 37 of file G4PreCompoundFragmentVector.cc.

References SetVector().

◆ ~G4PreCompoundFragmentVector()

G4PreCompoundFragmentVector::~G4PreCompoundFragmentVector ( )
default

◆ G4PreCompoundFragmentVector() [2/2]

G4PreCompoundFragmentVector::G4PreCompoundFragmentVector ( const G4PreCompoundFragmentVector right)
privatedelete

Member Function Documentation

◆ CalculateProbabilities()

G4double G4PreCompoundFragmentVector::CalculateProbabilities ( const G4Fragment aFragment)

Definition at line 74 of file G4PreCompoundFragmentVector.cc.

76{
77 //G4cout << "## G4PreCompoundFragmentVector::CalculateProbabilities nCh= "
78 // << nChannels << G4endl;
79 G4double probtot = 0.0;
80 for (G4int i=0; i< nChannels; ++i) {
81 (*theChannels)[i]->Initialize(aFragment);
82 G4double prob = ((*theChannels)[i]->IsItPossible(aFragment))
83 ? (*theChannels)[i]->CalcEmissionProbability(aFragment)
84 : 0.0;
85 probtot += prob;
86 probabilities[i] = probtot;
87 //G4cout<<" prob= " << prob << " probtot= " << probtot
88 // << " for "<< i << "-th channel" <<G4endl;
89 }
90 return probtot;
91}
double G4double
Definition: G4Types.hh:83
int G4int
Definition: G4Types.hh:85

References nChannels, probabilities, and theChannels.

Referenced by G4PreCompoundEmission::GetTotalProbability().

◆ ChooseFragment()

G4VPreCompoundFragment * G4PreCompoundFragmentVector::ChooseFragment ( )

Definition at line 93 of file G4PreCompoundFragmentVector.cc.

94{
95 //G4cout << "## G4PreCompoundFragmentVector::ChooseFragment nCh= "
96 // << nChannels << G4endl;
98 G4int i=0;
99 for (; i<nChannels; ++i) {
100 if(x <= probabilities[i]) { break; }
101 }
102 return (*theChannels)[i];
103}
#define G4UniformRand()
Definition: Randomize.hh:52

References G4UniformRand, nChannels, probabilities, and theChannels.

Referenced by G4PreCompoundEmission::PerformEmission().

◆ operator!=()

G4bool G4PreCompoundFragmentVector::operator!= ( const G4PreCompoundFragmentVector right) const
privatedelete

◆ operator=()

const G4PreCompoundFragmentVector & G4PreCompoundFragmentVector::operator= ( const G4PreCompoundFragmentVector right)
privatedelete

◆ operator==()

G4bool G4PreCompoundFragmentVector::operator== ( const G4PreCompoundFragmentVector right) const
privatedelete

◆ SetOPTxs()

void G4PreCompoundFragmentVector::SetOPTxs ( G4int  opt)

Definition at line 59 of file G4PreCompoundFragmentVector.cc.

60{
61 for (G4int i=0; i<nChannels; ++i) {
62 (*theChannels)[i]->SetOPTxs(opt);
63 }
64}

References nChannels.

Referenced by G4PreCompoundEmission::SetOPTxs().

◆ SetVector()

void G4PreCompoundFragmentVector::SetVector ( pcfvector avector)

Definition at line 43 of file G4PreCompoundFragmentVector.cc.

44{
45 if(avector != theChannels) {
46 delete theChannels;
47 theChannels = avector;
48 }
49 if(theChannels) {
50 nChannels = theChannels->size();
51 probabilities.resize(nChannels, 0.0);
52 } else {
53 nChannels = 0;
54 probabilities.clear();
55 }
56}

References nChannels, probabilities, and theChannels.

Referenced by G4PreCompoundFragmentVector(), G4PreCompoundEmission::SetDefaultModel(), and G4PreCompoundEmission::SetHETCModel().

◆ UseSICB()

void G4PreCompoundFragmentVector::UseSICB ( G4bool  use)

Definition at line 67 of file G4PreCompoundFragmentVector.cc.

68{
69 for (G4int i=0; i< nChannels; ++i) {
70 (*theChannels)[i]->UseSICB(use);
71 }
72}

References nChannels.

Referenced by G4PreCompoundEmission::UseSICB().

Field Documentation

◆ nChannels

G4int G4PreCompoundFragmentVector::nChannels
private

◆ probabilities

G4DataVector G4PreCompoundFragmentVector::probabilities
private

◆ theChannels

pcfvector* G4PreCompoundFragmentVector::theChannels
private

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