Geant4.10
 All Data Structures Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
Public Member Functions
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 ( pcfvector avector)

Definition at line 38 of file G4PreCompoundFragmentVector.cc.

References SetVector().

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

Definition at line 44 of file G4PreCompoundFragmentVector.cc.

45 {}

Member Function Documentation

G4double G4PreCompoundFragmentVector::CalculateProbabilities ( const G4Fragment aFragment)
inline

Definition at line 96 of file G4PreCompoundFragmentVector.hh.

Referenced by G4PreCompoundEmission::GetTotalProbability().

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 }
int G4int
Definition: G4Types.hh:78
double G4double
Definition: G4Types.hh:76
G4VPreCompoundFragment * G4PreCompoundFragmentVector::ChooseFragment ( )
inline

Definition at line 109 of file G4PreCompoundFragmentVector.hh.

References G4UniformRand, and test::x.

Referenced by G4PreCompoundEmission::PerformEmission().

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 }
int G4int
Definition: G4Types.hh:78
#define G4UniformRand()
Definition: Randomize.hh:87
double G4double
Definition: G4Types.hh:76
void G4PreCompoundFragmentVector::Initialize ( const G4Fragment aFragment)
inline

Definition at line 88 of file G4PreCompoundFragmentVector.hh.

Referenced by G4PreCompoundEmission::Initialize().

89 {
90  for (G4int i=0; i< nChannels; ++i) {
91  (*theChannels)[i]->Initialize(aFragment);
92  }
93 }
int G4int
Definition: G4Types.hh:78
void G4PreCompoundFragmentVector::SetOPTxs ( G4int  opt)

Definition at line 57 of file G4PreCompoundFragmentVector.cc.

Referenced by G4PreCompoundEmission::SetOPTxs().

58 {
59  for (G4int i=0; i< nChannels; ++i) {
60  (*theChannels)[i]->SetOPTxs(opt);
61  }
62 }
int G4int
Definition: G4Types.hh:78
void G4PreCompoundFragmentVector::SetVector ( pcfvector avector)

Definition at line 47 of file G4PreCompoundFragmentVector.cc.

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

48 {
49  theChannels = avector;
50  if(theChannels) {
51  nChannels = theChannels->size();
52  probabilities.resize(nChannels);
53  }
54 }
void G4PreCompoundFragmentVector::UseSICB ( G4bool  use)

Definition at line 65 of file G4PreCompoundFragmentVector.cc.

Referenced by G4PreCompoundEmission::UseSICB().

66 {
67  for (G4int i=0; i< nChannels; ++i) {
68  (*theChannels)[i]->UseSICB(use);
69  }
70 }
int G4int
Definition: G4Types.hh:78

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