Geant4 11.4.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)
 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}
static G4NuclearLevelData * GetInstance()
static G4int GetModelID(const G4int modelIndex)
static G4Pow * GetInstance()
Definition G4Pow.cc:41

Referenced by G4PreCompoundEmission(), operator!=(), operator=(), and operator==().

◆ ~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 103 of file G4PreCompoundEmission.hh.

104{
105 return theFragmentsVector->CalculateProbabilities(aFragment);
106}

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

◆ 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}

◆ SetOPTxs()

void G4PreCompoundEmission::SetOPTxs ( G4int opt)
inline

Definition at line 108 of file G4PreCompoundEmission.hh.

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

◆ 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: