Geant4  10.03.p01
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Pages
G4PreCompoundFragmentVector Class Reference

#include <G4PreCompoundFragmentVector.hh>

Public Member Functions

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

Detailed Description

Definition at line 52 of file G4PreCompoundFragmentVector.hh.

Constructor & Destructor Documentation

G4PreCompoundFragmentVector::G4PreCompoundFragmentVector ( pcfvector avector)
explicit

Definition at line 38 of file G4PreCompoundFragmentVector.cc.

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

Here is the call graph for this function:

G4PreCompoundFragmentVector::~G4PreCompoundFragmentVector ( )

Definition at line 44 of file G4PreCompoundFragmentVector.cc.

45 {}

Member Function Documentation

G4double G4PreCompoundFragmentVector::CalculateProbabilities ( const G4Fragment aFragment)
inline

Definition at line 85 of file G4PreCompoundFragmentVector.hh.

86 {
87  //G4cout << "## G4PreCompoundFragmentVector::CalculateProbabilities" << G4endl;
88  G4double probtot = 0.0;
89  G4double prob;
90  for (G4int i=0; i< nChannels; ++i) {
91  (*theChannels)[i]->Initialize(aFragment);
92  prob = 0.0;
93  if ((*theChannels)[i]->IsItPossible(aFragment)) {
94  prob = (*theChannels)[i]->CalcEmissionProbability(aFragment);
95  }
96  probtot += prob;
97  probabilities[i] = probtot;
98  //G4cout<<" prob= "<<prob<<" for "<<(*theChannels)[i]->GetName()<<G4endl;
99  }
100  return probtot;
101 }
int G4int
Definition: G4Types.hh:78
double G4double
Definition: G4Types.hh:76

Here is the caller graph for this function:

G4VPreCompoundFragment * G4PreCompoundFragmentVector::ChooseFragment ( )
inline

Definition at line 103 of file G4PreCompoundFragmentVector.hh.

104 {
105  G4double x = probabilities[nChannels-1]*G4UniformRand();
106  G4int i=0;
107  for (; i<nChannels; ++i) {
108  if(x <= probabilities[i]) { break; }
109  }
110  return (*theChannels)[i];
111 }
int G4int
Definition: G4Types.hh:78
#define G4UniformRand()
Definition: Randomize.hh:97
double G4double
Definition: G4Types.hh:76

Here is the caller graph for this function:

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 }
int G4int
Definition: G4Types.hh:78

Here is the caller graph for this function:

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 }

Here is the caller graph for this function:

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 }
int G4int
Definition: G4Types.hh:78

Here is the caller graph for this function:


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