48 {
49
52
57 theNeutron.SetKineticEnergy( eKinetic );
58
59
63 if(targetMass<500*MeV)
69
70
71 theNeutron.
Lorentz(theNeutron, -1*theTarget);
72 eKinetic = theNeutron.GetKineticEnergy();
73
74
75
77 if (
HasFSData() && !getenv (
"G4NEUTRONHP_USE_ONLY_PHOTONEVAPORATION" ) )
78 {
79
80 if ( hasExactMF6 )
81 {
84 thePhotons = theMF6FinalState.
Sample( eKinetic );
85 }
86 else
87 thePhotons = theFinalStatePhotons.
GetPhotons(eKinetic);
88 }
89 else
90 {
95
98 G4FragmentVector::iterator it;
100 for(it=products->begin(); it!=products->end(); it++)
101 {
103
104 if ( (*it)->GetParticleDefinition() != 0 )
106 else
108
109
110
113
114
115 if ( (*it)->GetExcitationEnergy() > 1.0e-2*eV )
116 {
117 G4double ex = (*it)->GetExcitationEnergy();
120 aPhoton->
SetMomentum( (*it)->GetMomentum().vect().unit() * ex );
121
122 thePhotons->push_back(aPhoton);
123 }
124
125 theOne->
SetMomentum( (*it)->GetMomentum().vect() * ( (*it)->GetMomentum().t() - (*it)->GetExcitationEnergy() ) / (*it)->GetMomentum().t() ) ;
126
127 thePhotons->push_back(theOne);
128 delete *it;
129 }
130 delete products;
131 }
132
133
134
135
136
138 if(thePhotons!=0) nPhotons=thePhotons->size();
139
140
141
142
143
144
145
146
147 if ( nPhotons == 0 )
148 {
154 G4ThreeVector direction( sinth*std::cos(phi), sinth*std::sin(phi), std::cos(theta) );
156 thePhotons->push_back(theOne);
157 nPhotons++;
158 }
159
160
161
162 if ( nPhotons == 1 && thePhotons->operator[](0)->GetDefinition()->GetBaryonNumber() == 0 )
163 {
167 thePhotons->operator[](0)->SetMomentum( Q*direction );
168 }
169
170
171
172 for(i=0; i<nPhotons; i++)
173 {
174 thePhotons->operator[](i)->Lorentz(*(thePhotons->operator[](i)), theTarget);
175 }
176
177
178
179 if ( nPhotons == 1 && thePhotons->operator[](0)->GetDefinition()->GetBaryonNumber() == 0 )
180 {
185
186
189 -thePhotons->operator[](0)->GetMomentum();
190
196 G4double theAbsMom = std::sqrt(theResE*theResE - theResMass*theResMass);
200 }
201
202
203 for(i=0; i<nPhotons; i++)
204 {
205
207 theOne->
SetDefinition(thePhotons->operator[](i)->GetDefinition());
208 theOne->
SetMomentum(thePhotons->operator[](i)->GetMomentum());
210 delete thePhotons->operator[](i);
211 }
212 delete thePhotons;
213
214
219 {
221 }
222
223 if ( residual == false )
224 {
225
226
230 {
232
234 }
235
236
239
240
241 if ( nPhotons - nNonZero > 0 )
242 {
243
244 std::vector<G4double> vRand;
245 vRand.push_back( 0.0 );
246 for (
G4int j = 0 ; j != nPhotons - nNonZero - 1 ; j++ )
247 {
249 }
250 vRand.push_back( 1.0 );
251 std::sort( vRand.begin(), vRand.end() );
252
253 std::vector<G4double> vEPhoton;
254 for (
G4int j = 0 ; j < (
G4int)vRand.size() - 1 ; j++ )
255 {
256 vEPhoton.push_back( deltaE * ( vRand[j+1] - vRand[j] ) );
257 }
258 std::sort( vEPhoton.begin(), vEPhoton.end() );
259
260 for (
G4int j = 0 ; j < nPhotons - nNonZero - 1 ; j++ )
261 {
262
267 G4ThreeVector tempVector(en*sinth*std::cos(phi), en*sinth*std::sin(phi), en*std::cos(theta) );
268
274 }
275
276
279
284 }
285
286
289 - p_photons.vect();
293
294 }
295
296
297
300 }
std::vector< G4Fragment * > G4FragmentVector
CLHEP::HepLorentzVector G4LorentzVector
std::vector< G4ReactionProduct * > G4ReactionProductVector
void SetDefinition(const G4ParticleDefinition *aParticleDefinition)
G4ParticleDefinition * GetDefinition() const
G4LorentzVector Get4Momentum() const
void SetMomentum(const G4ThreeVector &momentum)
void SetStatusChange(G4HadFinalStateStatus aS)
G4int GetNumberOfSecondaries() const
void AddSecondary(G4DynamicParticle *aP)
G4HadSecondary * GetSecondary(size_t i)
const G4Material * GetMaterial() const
const G4ParticleDefinition * GetDefinition() const
G4double GetKineticEnergy() const
const G4LorentzVector & Get4Momentum() const
G4DynamicParticle * GetParticle()
G4double GetTemperature() const
void SetNeutron(G4ReactionProduct &aNeutron)
void SetTarget(G4ReactionProduct &aTarget)
G4ReactionProductVector * Sample(G4double anEnergy)
G4HadFinalState theResult
G4ReactionProductVector * GetPhotons(G4double anEnergy)
static G4Neutron * Neutron()
static G4double GetNuclearMass(const G4double A, const G4double Z)
G4ReactionProduct GetBiasedThermalNucleus(G4double aMass, G4ThreeVector aVelocity, G4double temp=-1) const
G4double GetPDGMass() const
G4ParticleDefinition * FindIon(G4int atomicNumber, G4int atomicMass, G4double excitationEnergy)
static G4ParticleTable * GetParticleTable()
virtual G4FragmentVector * BreakItUp(const G4Fragment &nucleus)
void SetMomentum(const G4double x, const G4double y, const G4double z)
G4double GetKineticEnergy() const
G4double GetTotalEnergy() const
G4ThreeVector GetMomentum() const
void Lorentz(const G4ReactionProduct &p1, const G4ReactionProduct &p2)
void SetDefinition(G4ParticleDefinition *aParticleDefinition)