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

#include <G4PreCompoundEmission.hh>

Public Member Functions

 G4PreCompoundEmission ()
 
 ~G4PreCompoundEmission ()
 
void SetDefaultModel ()
 
void SetHETCModel ()
 
G4ReactionProductPerformEmission (G4Fragment &aFragment)
 
G4double GetTotalProbability (const G4Fragment &aFragment)
 
void Initialize (const G4Fragment &aFragment)
 
void SetOPTxs (G4int)
 
void UseSICB (G4bool)
 

Detailed Description

Definition at line 52 of file G4PreCompoundEmission.hh.

Constructor & Destructor Documentation

◆ G4PreCompoundEmission()

G4PreCompoundEmission::G4PreCompoundEmission ( )

Definition at line 55 of file G4PreCompoundEmission.cc.

56{
57 theFragmentsFactory = new G4PreCompoundEmissionFactory();
58 theFragmentsVector =
59 new G4PreCompoundFragmentVector(theFragmentsFactory->GetFragmentVector());
60 g4pow = G4Pow::GetInstance();
62}
static G4Pow * GetInstance()
Definition: G4Pow.cc:50
static G4PreCompoundParameters * GetAddress()
std::vector< G4VPreCompoundFragment * > * GetFragmentVector()

◆ ~G4PreCompoundEmission()

G4PreCompoundEmission::~G4PreCompoundEmission ( )

Definition at line 64 of file G4PreCompoundEmission.cc.

65{
66 if (theFragmentsFactory) { delete theFragmentsFactory; }
67 if (theFragmentsVector) { delete theFragmentsVector; }
68}

Member Function Documentation

◆ GetTotalProbability()

G4double G4PreCompoundEmission::GetTotalProbability ( const G4Fragment aFragment)
inline

Definition at line 104 of file G4PreCompoundEmission.hh.

105{
106 return theFragmentsVector->CalculateProbabilities(aFragment);
107}
G4double CalculateProbabilities(const G4Fragment &aFragment)

Referenced by G4PreCompoundModel::DeExcite().

◆ Initialize()

void G4PreCompoundEmission::Initialize ( const G4Fragment aFragment)
inline

Definition at line 110 of file G4PreCompoundEmission.hh.

111{
112 theFragmentsVector->Initialize(aFragment);
113}
void Initialize(const G4Fragment &aFragment)

Referenced by G4PreCompoundModel::DeExcite().

◆ PerformEmission()

G4ReactionProduct * G4PreCompoundEmission::PerformEmission ( G4Fragment aFragment)

Definition at line 102 of file G4PreCompoundEmission.cc.

103{
104 // Choose a Fragment for emission
105 G4VPreCompoundFragment * thePreFragment = theFragmentsVector->ChooseFragment();
106 if (thePreFragment == 0)
107 {
108 G4cout << "G4PreCompoundEmission::PerformEmission : I couldn't choose a fragment\n"
109 << "while trying to de-excite\n"
110 << aFragment << G4endl;
111 throw G4HadronicException(__FILE__, __LINE__, "");
112 }
113
114 //G4cout << "Chosen fragment: " << G4endl;
115 //G4cout << *thePreFragment << G4endl;
116
117 // Kinetic Energy of emitted fragment
118 G4double kinEnergyOfEmittedFragment = thePreFragment->GetKineticEnergy(aFragment);
119 // if(kinEnergyOfEmittedFragment < MeV) {
120 // G4cout << "Chosen fragment: " << G4endl;
121 // G4cout << *thePreFragment << G4endl;
122 // G4cout << "Ekin= " << kinEnergyOfEmittedFragment << G4endl;
123 // }
124 if(kinEnergyOfEmittedFragment < 0.0) { kinEnergyOfEmittedFragment = 0.0; }
125
126 // Calculate the fragment momentum (three vector)
127 AngularDistribution(thePreFragment,aFragment,kinEnergyOfEmittedFragment);
128
129 // Mass of emittef fragment
130 G4double EmittedMass = thePreFragment->GetNuclearMass();
131 // Now we can calculate the four momentum
132 // both options are valid and give the same result but 2nd one is faster
133 G4LorentzVector Emitted4Momentum(theFinalMomentum,
134 EmittedMass + kinEnergyOfEmittedFragment);
135
136 // Perform Lorentz boost
137 G4LorentzVector Rest4Momentum = aFragment.GetMomentum();
138 Emitted4Momentum.boost(Rest4Momentum.boostVector());
139
140 // Set emitted fragment momentum
141 thePreFragment->SetMomentum(Emitted4Momentum);
142
143 // NOW THE RESIDUAL NUCLEUS
144 // ------------------------
145
146 Rest4Momentum -= Emitted4Momentum;
147
148 // Update nucleus parameters:
149 // --------------------------
150
151 // Z and A
152 aFragment.SetZandA_asInt(thePreFragment->GetRestZ(),
153 thePreFragment->GetRestA());
154
155 // Number of excitons
156 aFragment.SetNumberOfParticles(aFragment.GetNumberOfParticles()-
157 thePreFragment->GetA());
158 // Number of charges
159 aFragment.SetNumberOfCharged(aFragment.GetNumberOfCharged()-
160 thePreFragment->GetZ());
161
162 // Update nucleus momentum
163 // A check on consistence of Z, A, and mass will be performed
164 aFragment.SetMomentum(Rest4Momentum);
165
166 // Create a G4ReactionProduct
167 G4ReactionProduct * MyRP = thePreFragment->GetReactionProduct();
168
169 // if(kinEnergyOfEmittedFragment < MeV) {
170 // G4cout << "G4PreCompoundEmission::Fragment emitted" << G4endl;
171 // G4cout << thePreFragment << G4endl;
172 // }
173 return MyRP;
174}
double G4double
Definition: G4Types.hh:64
#define G4endl
Definition: G4ios.hh:52
G4DLLIMPORT std::ostream G4cout
Hep3Vector boostVector() const
HepLorentzVector & boost(double, double, double)
G4int GetNumberOfParticles() const
Definition: G4Fragment.hh:305
void SetNumberOfCharged(G4int value)
Definition: G4Fragment.hh:349
const G4LorentzVector & GetMomentum() const
Definition: G4Fragment.hh:251
void SetMomentum(const G4LorentzVector &value)
Definition: G4Fragment.hh:256
void SetNumberOfParticles(G4int value)
Definition: G4Fragment.hh:344
G4int GetNumberOfCharged() const
Definition: G4Fragment.hh:310
void SetZandA_asInt(G4int Znew, G4int Anew)
Definition: G4Fragment.hh:228
G4VPreCompoundFragment * ChooseFragment()
G4double GetNuclearMass() const
G4int GetRestZ() const
G4ReactionProduct * GetReactionProduct() const
void SetMomentum(const G4LorentzVector &value)
G4int GetRestA() const
virtual G4double GetKineticEnergy(const G4Fragment &aFragment)=0

Referenced by G4PreCompoundModel::DeExcite().

◆ SetDefaultModel()

void G4PreCompoundEmission::SetDefaultModel ( )

Definition at line 70 of file G4PreCompoundEmission.cc.

71{
72 if (theFragmentsFactory) { delete theFragmentsFactory; }
73 theFragmentsFactory = new G4PreCompoundEmissionFactory();
74 if (theFragmentsVector)
75 {
76 theFragmentsVector->SetVector(theFragmentsFactory->GetFragmentVector());
77 }
78 else
79 {
80 theFragmentsVector =
81 new G4PreCompoundFragmentVector(theFragmentsFactory->GetFragmentVector());
82 }
83 return;
84}

Referenced by G4PreCompoundModel::G4PreCompoundModel(), and G4PreCompoundModel::UseDefaultEmission().

◆ SetHETCModel()

void G4PreCompoundEmission::SetHETCModel ( )

Definition at line 86 of file G4PreCompoundEmission.cc.

87{
88 if (theFragmentsFactory) delete theFragmentsFactory;
89 theFragmentsFactory = new G4HETCEmissionFactory();
90 if (theFragmentsVector)
91 {
92 theFragmentsVector->SetVector(theFragmentsFactory->GetFragmentVector());
93 }
94 else
95 {
96 theFragmentsVector =
97 new G4PreCompoundFragmentVector(theFragmentsFactory->GetFragmentVector());
98 }
99 return;
100}

Referenced by G4PreCompoundModel::G4PreCompoundModel(), and G4PreCompoundModel::UseHETCEmission().

◆ SetOPTxs()

void G4PreCompoundEmission::SetOPTxs ( G4int  opt)
inline

Definition at line 115 of file G4PreCompoundEmission.hh.

116{
117 theFragmentsVector->SetOPTxs(opt);
118}

Referenced by G4PreCompoundModel::G4PreCompoundModel(), and G4PreCompoundModel::SetOPTxs().

◆ UseSICB()

void G4PreCompoundEmission::UseSICB ( G4bool  use)
inline

Definition at line 120 of file G4PreCompoundEmission.hh.

121{
122 theFragmentsVector->UseSICB(use);
123}

Referenced by G4PreCompoundModel::G4PreCompoundModel(), and G4PreCompoundModel::UseSICB().


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