Geant4 11.2.2
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)
 
 G4PreCompoundEmission (const G4PreCompoundEmission &right)=delete
 
const G4PreCompoundEmissionoperator= (const G4PreCompoundEmission &right)=delete
 
G4bool operator== (const G4PreCompoundEmission &right) const =delete
 
G4bool operator!= (const G4PreCompoundEmission &right) const =delete
 

Detailed Description

Definition at line 50 of file G4PreCompoundEmission.hh.

Constructor & Destructor Documentation

◆ G4PreCompoundEmission() [1/2]

G4PreCompoundEmission::G4PreCompoundEmission ( )

Definition at line 60 of file G4PreCompoundEmission.cc.

61{
62 theFragmentsFactory = new G4PreCompoundEmissionFactory();
63 theFragmentsVector =
64 new G4PreCompoundFragmentVector(theFragmentsFactory->GetFragmentVector());
65 g4calc = G4Pow::GetInstance();
67 G4DeexPrecoParameters* param = fNuclData->GetParameters();
68 fFermiEnergy = param->GetFermiEnergy();
69 fUseAngularGenerator = param->UseAngularGen();
70 fModelID = G4PhysicsModelCatalog::GetModelID("model_PRECO");
71}
G4DeexPrecoParameters * GetParameters()
static G4NuclearLevelData * GetInstance()
static G4int GetModelID(const G4int modelIndex)
static G4Pow * GetInstance()
Definition G4Pow.cc:41
std::vector< G4VPreCompoundFragment * > * GetFragmentVector()

◆ ~G4PreCompoundEmission()

G4PreCompoundEmission::~G4PreCompoundEmission ( )

Definition at line 73 of file G4PreCompoundEmission.cc.

74{
75 delete theFragmentsFactory;
76 delete theFragmentsVector;
77}

◆ G4PreCompoundEmission() [2/2]

G4PreCompoundEmission::G4PreCompoundEmission ( const G4PreCompoundEmission & right)
delete

Member Function Documentation

◆ GetTotalProbability()

G4double G4PreCompoundEmission::GetTotalProbability ( const G4Fragment & aFragment)
inline

Definition at line 102 of file G4PreCompoundEmission.hh.

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

Referenced by G4PreCompoundModel::DeExcite().

◆ operator!=()

G4bool G4PreCompoundEmission::operator!= ( const G4PreCompoundEmission & right) const
delete

◆ operator=()

const G4PreCompoundEmission & G4PreCompoundEmission::operator= ( const G4PreCompoundEmission & right)
delete

◆ operator==()

G4bool G4PreCompoundEmission::operator== ( const G4PreCompoundEmission & right) const
delete

◆ PerformEmission()

G4ReactionProduct * G4PreCompoundEmission::PerformEmission ( G4Fragment & aFragment)

Definition at line 104 of file G4PreCompoundEmission.cc.

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

Referenced by G4PreCompoundModel::DeExcite().

◆ SetDefaultModel()

void G4PreCompoundEmission::SetDefaultModel ( )

Definition at line 79 of file G4PreCompoundEmission.cc.

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

◆ SetHETCModel()

void G4PreCompoundEmission::SetHETCModel ( )

Definition at line 91 of file G4PreCompoundEmission.cc.

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

Referenced by G4PreCompoundModel::InitialiseModel().

◆ SetOPTxs()

void G4PreCompoundEmission::SetOPTxs ( G4int opt)
inline

Definition at line 107 of file G4PreCompoundEmission.hh.

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

Referenced by G4PreCompoundModel::InitialiseModel().

◆ UseSICB()

void G4PreCompoundEmission::UseSICB ( G4bool use)
inline

Definition at line 112 of file G4PreCompoundEmission.hh.

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

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