51 {
52
55
57
58
63 theNeutron.SetKineticEnergy( eKinetic );
64
65
69 if (targetMass < 500*MeV) targetMass =
76
77
78 theNeutron.Lorentz(theNeutron, theTarget);
79 eKinetic = theNeutron.GetKineticEnergy();
80
81
84 {
85
86 if ( hasExactMF6 ) {
89 thePhotons = theMF6FinalState.
Sample( eKinetic );
90 } else {
91 thePhotons = theFinalStatePhotons.
GetPhotons(eKinetic);
92 }
93 if ( thePhotons == NULL ) {
94 throw G4HadronicException(__FILE__, __LINE__,
"Final state data for photon is not properly allocated");
95 }
96 }
97 else
98 {
99
104
107 G4FragmentVector::iterator it;
109 for(it=products->begin(); it!=products->end(); it++)
110 {
112
113 if ( (*it)->GetParticleDefinition() != 0 )
115 else
117
118
119
121 if ( (*it)->GetMomentum().mag() > 10*MeV)
123
124 if ( (*it)->GetExcitationEnergy() > 1.0e-2*eV) {
125 G4double ex = (*it)->GetExcitationEnergy();
128 aPhoton->
SetMomentum( (*it)->GetMomentum().vect().unit() * ex );
129
130 thePhotons->push_back(aPhoton);
131 }
132
133 theOne->
SetMomentum( (*it)->GetMomentum().vect() * ( (*it)->GetMomentum().t() - (*it)->GetExcitationEnergy() ) / (*it)->GetMomentum().t() ) ;
134 thePhotons->push_back(theOne);
135 delete *it;
136 }
137 delete products;
138 }
139
140
142 nPhotons=thePhotons->size();
143
144
146
147
148 if ( nPhotons == 0 )
149 {
152
154 G4double theta = std::acos(costheta);
157 G4ThreeVector direction(sinth*std::cos(phi), sinth*std::sin(phi), costheta);
159 thePhotons->push_back(theOne);
160 nPhotons++;
161 }
162
163
164
165 if ( nPhotons == 1 && thePhotons->operator[](0)->GetDefinition()->GetBaryonNumber() == 0 )
166 {
168
171
172 thePhotons->operator[](0)->SetMomentum( Q*direction );
173 }
174
175 }
176
177
178 for(i=0; i<nPhotons; i++)
179 {
180 thePhotons->operator[](i)->Lorentz(*(thePhotons->operator[](i)), -1*theTarget);
181 }
182
183
184
185 if ( nPhotons == 1 && thePhotons->operator[](0)->GetDefinition()->GetBaryonNumber() == 0 )
186 {
191
192
195 -thePhotons->operator[](0)->GetMomentum();
196
197
198
199
200
201
202
203
204
205
206
209 }
210
211
212 for(i=0; i<nPhotons; i++)
213 {
214
216 theOne->
SetDefinition(thePhotons->operator[](i)->GetDefinition());
217 theOne->
SetMomentum(thePhotons->operator[](i)->GetMomentum());
219 delete thePhotons->operator[](i);
220 }
221 delete thePhotons;
222
223
227 for ( std::size_t j = 0 ; j !=
theResult.
Get()->GetNumberOfSecondaries() ; j++ )
228 {
230 }
231
232 if ( residual == false )
233 {
236 for ( std::size_t j = 0 ; j !=
theResult.
Get()->GetNumberOfSecondaries() ; j++ )
237 {
239
241 }
242
243
246
247
248 if ( nPhotons - nNonZero > 0 )
249 {
250
251 std::vector<G4double> vRand;
252 vRand.push_back( 0.0 );
253 for (
G4int j = 0 ; j != nPhotons - nNonZero - 1 ; j++ )
254 {
256 }
257 vRand.push_back( 1.0 );
258 std::sort( vRand.begin(), vRand.end() );
259
260 std::vector<G4double> vEPhoton;
261 for (
G4int j = 0 ; j < (
G4int)vRand.size() - 1 ; j++ )
262 {
263 vEPhoton.push_back( deltaE * ( vRand[j+1] - vRand[j] ) );
264 }
265 std::sort( vEPhoton.begin(), vEPhoton.end() );
266
267 for (
G4int j = 0 ; j < nPhotons - nNonZero - 1 ; j++ )
268 {
269
270
272 G4double theta = std::acos(costheta);
276 G4ThreeVector tempVector(en*sinth*std::cos(phi), en*sinth*std::sin(phi), en*costheta);
277
283 }
284
285
288
293 }
294
295
298 - p_photons.vect();
302
303 }
304
305
306
309 }
std::vector< G4Fragment * > G4FragmentVector
CLHEP::HepLorentzVector G4LorentzVector
std::vector< G4ReactionProduct * > G4ReactionProductVector
void Put(const value_type &val) const
void SetDefinition(const G4ParticleDefinition *aParticleDefinition)
G4ParticleDefinition * GetDefinition() const
G4LorentzVector Get4Momentum() const
void SetMomentum(const G4ThreeVector &momentum)
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 L=0, G4int lvl=0) const
static G4IonTable * GetIonTable()
G4double GetTemperature() const
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
void SetProjectileRP(G4ReactionProduct &aIncidentPart)
void SetTarget(G4ReactionProduct &aTarget)
G4ReactionProductVector * Sample(G4double anEnergy)
G4bool DoNotAdjustFinalState()
G4Cache< G4HadFinalState * > theResult
static G4ParticleHPManager * GetInstance()
G4ReactionProductVector * GetPhotons(G4double anEnergy)
virtual void SetICM(G4bool)
G4FragmentVector * BreakItUp(const G4Fragment &theNucleus)
void SetMomentum(const G4double x, const G4double y, const G4double z)
G4double GetTotalEnergy() const
G4ThreeVector GetMomentum() const
void SetDefinitionAndUpdateE(const G4ParticleDefinition *aParticleDefinition)
void SetDefinition(const G4ParticleDefinition *aParticleDefinition)