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

#include <G4PreCompoundEmissionInt.hh>

Public Member Functions

 G4PreCompoundEmissionInt (G4int verb)
 ~G4PreCompoundEmissionInt ()
void SetDefaultModel ()
void SetHETCModel ()
G4ReactionProductPerformEmission (G4Fragment &aFragment)
G4double GetTotalProbability (const G4Fragment &aFragment)
void SetOPTxs (G4int)
void UseSICB (G4bool)
 G4PreCompoundEmissionInt (const G4PreCompoundEmissionInt &right)=delete
const G4PreCompoundEmissionIntoperator= (const G4PreCompoundEmissionInt &right)=delete
G4bool operator== (const G4PreCompoundEmissionInt &right) const =delete
G4bool operator!= (const G4PreCompoundEmissionInt &right) const =delete

Detailed Description

Definition at line 49 of file G4PreCompoundEmissionInt.hh.

Constructor & Destructor Documentation

◆ G4PreCompoundEmissionInt() [1/2]

G4PreCompoundEmissionInt::G4PreCompoundEmissionInt ( G4int verb)
explicit

Definition at line 48 of file G4PreCompoundEmissionInt.cc.

49 : fVerbose(verb)
50{
51 theFragmentsFactory = new G4PreCompoundEmissionFactory();
52 theFragmentsVector =
53 new G4PreCompoundFragmentVector(theFragmentsFactory->GetFragmentVector());
54 g4calc = G4Pow::GetInstance();
56 G4DeexPrecoParameters* param = fNuclData->GetParameters();
57 fFermiEnergy = param->GetFermiEnergy();
58 fUseAngularGenerator = param->UseAngularGen();
59 fModelID = G4PhysicsModelCatalog::GetModelID("model_PRECO");
60}
static G4NuclearLevelData * GetInstance()
static G4int GetModelID(const G4int modelIndex)
static G4Pow * GetInstance()
Definition G4Pow.cc:41

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

◆ ~G4PreCompoundEmissionInt()

G4PreCompoundEmissionInt::~G4PreCompoundEmissionInt ( )

Definition at line 62 of file G4PreCompoundEmissionInt.cc.

63{
64 delete theFragmentsFactory;
65 delete theFragmentsVector;
66}

◆ G4PreCompoundEmissionInt() [2/2]

G4PreCompoundEmissionInt::G4PreCompoundEmissionInt ( const G4PreCompoundEmissionInt & right)
delete

Member Function Documentation

◆ GetTotalProbability()

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

Definition at line 101 of file G4PreCompoundEmissionInt.hh.

102{
103 return theFragmentsVector->CalculateProbabilities(aFragment);
104}

◆ operator!=()

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

◆ operator=()

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

◆ operator==()

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

◆ PerformEmission()

G4ReactionProduct * G4PreCompoundEmissionInt::PerformEmission ( G4Fragment & aFragment)

Definition at line 93 of file G4PreCompoundEmissionInt.cc.

94{
95 G4ReactionProduct* res = nullptr;
96 // Choose a Fragment for emission
97 G4VPreCompoundFragment* thePreFragment =
98 theFragmentsVector->ChooseFragment();
99 if (thePreFragment == nullptr) {
100 G4cout << "G4PreCompoundEmission::PerformEmission : "
101 << "I couldn't choose a fragment while trying to de-excite\n"
102 << aFragment << G4endl;
103 throw G4HadronicException(__FILE__, __LINE__, "");
104 return res;
105 }
106
107 // Kinetic Energy of emitted fragment
108 G4double kinEnergy = thePreFragment->SampleKineticEnergy(aFragment);
109 kinEnergy = std::max(kinEnergy, 0.0);
110
111 // Calculate the fragment momentum (three vector theFinalMomentum)
112 if(fUseAngularGenerator) {
113 AngularDistribution(thePreFragment,aFragment,kinEnergy);
114 } else {
115 G4double pmag =
116 std::sqrt(kinEnergy*(kinEnergy + 2.0*thePreFragment->GetNuclearMass()));
117 theFinalMomentum = pmag*G4RandomDirection();
118 }
119
120 // Mass of emittef fragment
121 G4double EmittedMass = thePreFragment->GetNuclearMass();
122 // Now we can calculate the four momentum
123 // both options are valid and give the same result but 2nd one is faster
124 G4LorentzVector Emitted4Momentum(theFinalMomentum,EmittedMass + kinEnergy);
125
126 if (2 < fVerbose) {
127 G4cout << " Emitted Z="
128 << thePreFragment->GetZ() << " A=" << thePreFragment->GetA()
129 << " Ekin(MeV)=" << kinEnergy << " 4-mom C.M.S.: "
130 << Emitted4Momentum << G4endl;
131 }
132
133 // Perform Lorentz boost
134 G4LorentzVector Rest4Momentum = aFragment.GetMomentum();
135 Emitted4Momentum.boost(Rest4Momentum.boostVector());
136
137 // Set emitted fragment momentum
138 thePreFragment->SetMomentum(Emitted4Momentum);
139
140 // Residual nucleus
141 Rest4Momentum -= Emitted4Momentum;
142
143 // Update nucleus parameters
144 // Z and A
145 G4int prodZ = thePreFragment->GetZ();
146 G4int prodA = thePreFragment->GetA();
147 G4int Z = aFragment.GetZ_asInt() - prodZ;
148 G4int A = aFragment.GetA_asInt() - prodA;
149
150 // Number of excitons
151 G4int np = aFragment.GetNumberOfParticles() - prodA;
152 np = std::min(std::max(np, 0), A);
153 G4int nz = aFragment.GetNumberOfCharged() - prodZ;
154 nz = std::min(std::max(nz, 0), np);
155
156 // update fragment
157 aFragment.SetZandA_asInt(Z, A);
158 aFragment.SetNumberOfExcitedParticle(np, nz);
159
160 // Update nucleus momentum
161 // A check on consistence of Z, A, and mass will be performed
162 aFragment.SetMomentum(Rest4Momentum);
163
164 // Create a G4ReactionProduct
165 res = thePreFragment->GetReactionProduct();
166
167 // Set the creator model ID
168 aFragment.SetCreatorModelID(fModelID);
169 if (res != nullptr) { res->SetCreatorModelID(fModelID); }
170
171 return res;
172}
CLHEP::HepLorentzVector G4LorentzVector
G4ThreeVector G4RandomDirection()
double G4double
Definition G4Types.hh:83
int G4int
Definition G4Types.hh:85
const G4double A[17]
#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)
const G4LorentzVector & GetMomentum() const
void SetCreatorModelID(G4int value)
G4int GetZ_asInt() const
void SetMomentum(const G4LorentzVector &value)
void SetNumberOfExcitedParticle(G4int valueTot, G4int valueP)
G4int GetNumberOfCharged() const
G4int GetA_asInt() const
void SetCreatorModelID(const G4int mod)
virtual G4double SampleKineticEnergy(const G4Fragment &)
void SetMomentum(const G4LorentzVector &lv)
G4ReactionProduct * GetReactionProduct() const

◆ SetDefaultModel()

void G4PreCompoundEmissionInt::SetDefaultModel ( )

Definition at line 68 of file G4PreCompoundEmissionInt.cc.

69{
70 if (theFragmentsFactory) { delete theFragmentsFactory; }
71 theFragmentsFactory = new G4PreCompoundEmissionFactory();
72 if (theFragmentsVector) {
73 theFragmentsVector->SetVector(theFragmentsFactory->GetFragmentVector());
74 } else {
75 theFragmentsVector =
76 new G4PreCompoundFragmentVector(theFragmentsFactory->GetFragmentVector());
77 }
78}

◆ SetHETCModel()

void G4PreCompoundEmissionInt::SetHETCModel ( )

Definition at line 80 of file G4PreCompoundEmissionInt.cc.

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

◆ SetOPTxs()

void G4PreCompoundEmissionInt::SetOPTxs ( G4int opt)
inline

Definition at line 106 of file G4PreCompoundEmissionInt.hh.

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

◆ UseSICB()

void G4PreCompoundEmissionInt::UseSICB ( G4bool use)
inline

Definition at line 111 of file G4PreCompoundEmissionInt.hh.

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

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