65{
68
70
71
76 theNeutron.SetKineticEnergy(eKinetic);
77
78
81 if (targetMass < 500 * MeV)
83 / CLHEP::neutron_mass_c2;
84 G4ThreeVector neutronVelocity = theNeutron.GetMomentum()/ CLHEP::neutron_mass_c2;
88
89
90 theNeutron.Lorentz(theNeutron, theTarget);
91 eKinetic = theNeutron.GetKineticEnergy();
92
93
96
97 if (hasExactMF6) {
100 thePhotons = theMF6FinalState.
Sample(eKinetic);
101 }
102 else {
103 thePhotons = theFinalStatePhotons.
GetPhotons(eKinetic);
104 }
105 if (thePhotons == nullptr) {
107 "Final state data for photon is not properly allocated");
108 }
109 }
110 else {
111
116
117 photonEvaporation.
SetICM(
true);
120 for (auto it = products->cbegin(); it != products->cend(); ++it) {
122
123 if ((*it)->GetParticleDefinition() != nullptr)
125 else
127
128
129 if ((*it)->GetMomentum().mag() > 10 * CLHEP::MeV)
131
132 if ((*it)->GetExcitationEnergy() > 1.0e-2 * eV) {
133 G4double ex = (*it)->GetExcitationEnergy();
136 aPhoton->SetMomentum((*it)->GetMomentum().vect().unit() * ex);
137
138 thePhotons->push_back(aPhoton);
139 }
140
141 theOne->SetMomentum((*it)->GetMomentum().vect()
142 * ((*it)->GetMomentum().t() - (*it)->GetExcitationEnergy())
143 / (*it)->GetMomentum().t());
144 thePhotons->push_back(theOne);
145 delete *it;
146 }
147 delete products;
148 }
149
150
152
154
155
156 if (nPhotons == 0) {
160 theOne->SetMomentum(direction);
161 thePhotons->push_back(theOne);
162 ++nPhotons;
163 }
164
165
166 if (nPhotons == 1 &&
167 (*thePhotons)[0]->GetDefinition()->GetBaryonNumber() == 0) {
169
171 + CLHEP::neutron_mass_c2
173 (*thePhotons)[0]->SetMomentum(Q * direction);
174 }
175 }
176
177
178 for (i = 0; i < nPhotons; i++) {
179 (*thePhotons)[i]->Lorentz(*((*thePhotons)[i]), -1*theTarget);
180 }
181
182
183
184 if (nPhotons == 1 && thePhotons->operator[](0)->GetDefinition()->GetBaryonNumber() == 0) {
187 theOne->SetDefinition(aRecoil);
188
189
191 - thePhotons->operator[](0)->GetMomentum();
192
193 theOne->SetMomentum(aMomentum);
195 }
196
197
198 for (i = 0; i < nPhotons; ++i) {
199
201 theOne->
SetDefinition(thePhotons->operator[](i)->GetDefinition());
202 theOne->SetMomentum(thePhotons->operator[](i)->GetMomentum());
204 delete thePhotons->operator[](i);
205 }
206 delete thePhotons;
207
208
211 for (std::size_t j = 0; j !=
theResult.
Get()->GetNumberOfSecondaries(); j++) {
213 residual = true;
214 }
215
216 if (!residual) {
219 for (std::size_t j = 0; j !=
theResult.
Get()->GetNumberOfSecondaries(); ++j) {
221
223 }
224
225
228
229
230 if (nPhotons - nNonZero > 0) {
231
232
233 std::vector<G4double> vRand;
234 vRand.push_back(0.0);
235 for (
G4int j = 0; j != nPhotons - nNonZero - 1; j++) {
237 }
238 vRand.push_back(1.0);
239 std::sort(vRand.begin(), vRand.end());
240
241 std::vector<G4double> vEPhoton;
242 for (
G4int j = 0; j < (
G4int)vRand.size() - 1; j++) {
243 vEPhoton.push_back(deltaE * (vRand[j + 1] - vRand[j]));
244 }
245 std::sort(vEPhoton.begin(), vEPhoton.end());
246
247 for (
G4int j = 0; j < nPhotons - nNonZero - 1; j++) {
248
249
251
255 theOne->SetMomentum(tempVector);
257 }
258
259
262
265 theOne->SetMomentum(lastPhoton);
267 }
268
269
273 theOne->SetDefinition(aRecoil);
274 theOne->SetMomentum(aMomentum);
276 }
277
278
279
282}
std::vector< G4Fragment * > G4FragmentVector
CLHEP::HepLorentzVector G4LorentzVector
G4ThreeVector G4RandomDirection()
std::vector< G4ReactionProduct * > G4ReactionProductVector
void Put(const value_type &val) const
void SetDefinition(const G4ParticleDefinition *aParticleDefinition)
G4ParticleDefinition * GetDefinition() const
G4LorentzVector Get4Momentum() const
void SetStatusChange(G4HadFinalStateStatus aS)
void AddSecondary(G4DynamicParticle *aP, G4int mod=-1)
G4HadSecondary * GetSecondary(size_t i)
const G4Material * GetMaterial() const
const G4ParticleDefinition * GetDefinition() const
G4double GetKineticEnergy() const
const G4LorentzVector & Get4Momentum() const
G4DynamicParticle * GetParticle()
G4ParticleDefinition * GetIon(G4int Z, G4int A, G4int lvl=0)
G4double GetIonMass(G4int Z, G4int A, G4int nL=0, G4int lvl=0) const
G4double GetTemperature() const
static G4double GetNuclearMass(const G4double A, const G4double Z)
G4ReactionProduct GetBiasedThermalNucleus(G4double aMass, G4ThreeVector aVelocity, G4double temp=-1) const
G4double GetPDGMass() const
void SetProjectileRP(G4ReactionProduct &aIncidentPart)
void SetTarget(G4ReactionProduct &aTarget)
G4ReactionProductVector * Sample(G4double anEnergy)
G4ParticleHPManager * fManager
G4Cache< G4HadFinalState * > theResult
G4bool GetUseOnlyPhotoEvaporation() const
G4bool GetDoNotAdjustFinalState() const
G4ReactionProductVector * GetPhotons(G4double anEnergy)
void SetICM(G4bool) override
G4FragmentVector * BreakItUp(const G4Fragment &theNucleus)
G4double GetTotalEnergy() const
G4ThreeVector GetMomentum() const
void SetDefinitionAndUpdateE(const G4ParticleDefinition *aParticleDefinition)
void SetDefinition(const G4ParticleDefinition *aParticleDefinition)