Geant4 10.7.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 SetOPTxs (G4int)
 
void UseSICB (G4bool)
 

Detailed Description

Definition at line 50 of file G4PreCompoundEmission.hh.

Constructor & Destructor Documentation

◆ G4PreCompoundEmission()

G4PreCompoundEmission::G4PreCompoundEmission ( )

Definition at line 58 of file G4PreCompoundEmission.cc.

59{
60 theFragmentsFactory = new G4PreCompoundEmissionFactory();
61 theFragmentsVector =
62 new G4PreCompoundFragmentVector(theFragmentsFactory->GetFragmentVector());
63 g4calc = G4Pow::GetInstance();
65 G4DeexPrecoParameters* param = fNuclData->GetParameters();
66 fFermiEnergy = param->GetFermiEnergy();
67 fUseAngularGenerator = param->UseAngularGen();
68}
G4DeexPrecoParameters * GetParameters()
static G4NuclearLevelData * GetInstance()
static G4Pow * GetInstance()
Definition: G4Pow.cc:41
std::vector< G4VPreCompoundFragment * > * GetFragmentVector()

◆ ~G4PreCompoundEmission()

G4PreCompoundEmission::~G4PreCompoundEmission ( )

Definition at line 70 of file G4PreCompoundEmission.cc.

71{
72 delete theFragmentsFactory;
73 delete theFragmentsVector;
74}

Member Function Documentation

◆ GetTotalProbability()

G4double G4PreCompoundEmission::GetTotalProbability ( const G4Fragment aFragment)
inline

Definition at line 103 of file G4PreCompoundEmission.hh.

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

Referenced by G4PreCompoundModel::DeExcite().

◆ PerformEmission()

G4ReactionProduct * G4PreCompoundEmission::PerformEmission ( G4Fragment aFragment)

Definition at line 101 of file G4PreCompoundEmission.cc.

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

Referenced by G4PreCompoundModel::DeExcite().

◆ SetDefaultModel()

void G4PreCompoundEmission::SetDefaultModel ( )

Definition at line 76 of file G4PreCompoundEmission.cc.

77{
78 if (theFragmentsFactory) { delete theFragmentsFactory; }
79 theFragmentsFactory = new G4PreCompoundEmissionFactory();
80 if (theFragmentsVector) {
81 theFragmentsVector->SetVector(theFragmentsFactory->GetFragmentVector());
82 } else {
83 theFragmentsVector =
84 new G4PreCompoundFragmentVector(theFragmentsFactory->GetFragmentVector());
85 }
86}

◆ SetHETCModel()

void G4PreCompoundEmission::SetHETCModel ( )

Definition at line 88 of file G4PreCompoundEmission.cc.

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

Referenced by G4PreCompoundModel::InitialiseModel().

◆ SetOPTxs()

void G4PreCompoundEmission::SetOPTxs ( G4int  opt)
inline

Definition at line 108 of file G4PreCompoundEmission.hh.

109{
110 theFragmentsVector->SetOPTxs(opt);
111}

Referenced by G4PreCompoundModel::InitialiseModel().

◆ UseSICB()

void G4PreCompoundEmission::UseSICB ( G4bool  use)
inline

Definition at line 113 of file G4PreCompoundEmission.hh.

114{
115 theFragmentsVector->UseSICB(use);
116}

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