94{
95 G4ReactionProduct* res = nullptr;
96
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"
103 throw G4HadronicException(__FILE__, __LINE__, "");
104 return res;
105 }
106
107
109 kinEnergy = std::max(kinEnergy, 0.0);
110
111
112 if(fUseAngularGenerator) {
113 AngularDistribution(thePreFragment,aFragment,kinEnergy);
114 } else {
116 std::sqrt(kinEnergy*(kinEnergy + 2.0*thePreFragment->
GetNuclearMass()));
118 }
119
120
122
123
124 G4LorentzVector Emitted4Momentum(theFinalMomentum,EmittedMass + kinEnergy);
125
126 if (2 < fVerbose) {
128 << thePreFragment->
GetZ() <<
" A=" << thePreFragment->
GetA()
129 << " Ekin(MeV)=" << kinEnergy << " 4-mom C.M.S.: "
130 << Emitted4Momentum <<
G4endl;
131 }
132
133
136
137
139
140
141 Rest4Momentum -= Emitted4Momentum;
142
143
144
149
150
152 np = std::min(std::max(np, 0),
A);
154 nz = std::min(std::max(nz, 0), np);
155
156
159
160
161
163
164
166
167
170
171 return res;
172}
CLHEP::HepLorentzVector G4LorentzVector
G4ThreeVector G4RandomDirection()
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)
void SetMomentum(const G4LorentzVector &value)
void SetNumberOfExcitedParticle(G4int valueTot, G4int valueP)
G4int GetNumberOfCharged() const
void SetCreatorModelID(const G4int mod)
G4double GetNuclearMass() const
virtual G4double SampleKineticEnergy(const G4Fragment &)
void SetMomentum(const G4LorentzVector &lv)
G4ReactionProduct * GetReactionProduct() const