Geant4 9.6.0
Toolkit for the simulation of the passage of particles through matter
Loading...
Searching...
No Matches
G4PreCompoundFragmentVector Class Reference

#include <G4PreCompoundFragmentVector.hh>

Public Member Functions

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

Detailed Description

Definition at line 52 of file G4PreCompoundFragmentVector.hh.

Constructor & Destructor Documentation

◆ G4PreCompoundFragmentVector()

G4PreCompoundFragmentVector::G4PreCompoundFragmentVector ( pcfvector avector)

Definition at line 38 of file G4PreCompoundFragmentVector.cc.

39 : theChannels(0), nChannels(0)
40{
41 SetVector(avector);
42}

◆ ~G4PreCompoundFragmentVector()

G4PreCompoundFragmentVector::~G4PreCompoundFragmentVector ( )

Definition at line 44 of file G4PreCompoundFragmentVector.cc.

45{}

Member Function Documentation

◆ CalculateProbabilities()

G4double G4PreCompoundFragmentVector::CalculateProbabilities ( const G4Fragment aFragment)
inline

Definition at line 96 of file G4PreCompoundFragmentVector.hh.

97{
98 //G4cout << "## G4PreCompoundFragmentVector::CalculateProbabilities" << G4endl;
99 G4double probtot = 0.0;
100 for (G4int i=0; i< nChannels; ++i) {
101 G4double prob = (*theChannels)[i]->CalcEmissionProbability(aFragment);
102 probtot += prob;
103 probabilities[i] = probtot;
104 //G4cout<<" prob= "<<prob<<" for "<<(*theChannels)[i]->GetName()<<G4endl;
105 }
106 return probtot;
107}
double G4double
Definition: G4Types.hh:64
int G4int
Definition: G4Types.hh:66

Referenced by G4PreCompoundEmission::GetTotalProbability().

◆ ChooseFragment()

G4VPreCompoundFragment * G4PreCompoundFragmentVector::ChooseFragment ( )
inline

Definition at line 109 of file G4PreCompoundFragmentVector.hh.

110{
111 G4double x = probabilities[nChannels-1]*G4UniformRand();
112 G4int i=0;
113 for (; i<nChannels; ++i) {
114 if(x <= probabilities[i]) { break; }
115 }
116 return (*theChannels)[i];
117}
#define G4UniformRand()
Definition: Randomize.hh:53

Referenced by G4PreCompoundEmission::PerformEmission().

◆ Initialize()

void G4PreCompoundFragmentVector::Initialize ( const G4Fragment aFragment)
inline

Definition at line 88 of file G4PreCompoundFragmentVector.hh.

89{
90 for (G4int i=0; i< nChannels; ++i) {
91 (*theChannels)[i]->Initialize(aFragment);
92 }
93}

Referenced by G4PreCompoundEmission::Initialize().

◆ SetOPTxs()

void G4PreCompoundFragmentVector::SetOPTxs ( G4int  opt)

Definition at line 57 of file G4PreCompoundFragmentVector.cc.

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

Referenced by G4PreCompoundEmission::SetOPTxs().

◆ SetVector()

void G4PreCompoundFragmentVector::SetVector ( pcfvector avector)

Definition at line 47 of file G4PreCompoundFragmentVector.cc.

48{
49 theChannels = avector;
50 if(theChannels) {
51 nChannels = theChannels->size();
52 probabilities.resize(nChannels);
53 }
54}

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

◆ UseSICB()

void G4PreCompoundFragmentVector::UseSICB ( G4bool  use)

Definition at line 65 of file G4PreCompoundFragmentVector.cc.

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

Referenced by G4PreCompoundEmission::UseSICB().


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