239{
240 G4int coupleIndex = FindCoupleIndex(matCC);
241 if(0 > coupleIndex) { return; }
242
244
246
248
249 if( maxEnergy < tmax) tmax = maxEnergy;
250 if( tmin >= tmax) return;
251
253 G4double scaledTkin = kineticEnergy*fRatio;
254 G4double totalEnergy = kineticEnergy + fMass;
255 G4double totalMomentum = sqrt(kineticEnergy*(totalEnergy + fMass));
257
259 {
261
262
263
264
265 if( deltaTkin <= 0. && fVerbose > 0)
266 {
267 G4cout<<
"G4PAIPhotModel::SampleSecondary e- deltaTkin = "<<deltaTkin<<
G4endl;
268 }
269 if( deltaTkin <= 0.) { return; }
270
271 if( deltaTkin > tmax) { deltaTkin = tmax; }
272
276
280 deltaTkin);
281
282
283
284 kineticEnergy -= deltaTkin;
285
286 if( kineticEnergy <= 0. )
287 {
290 return;
291 }
292 else
293 {
294 G4ThreeVector dir = totalMomentum*direction - deltaRay->GetMomentum();
295 direction = dir.
unit();
298 vdp->push_back(deltaRay);
299 }
300 }
301 else
302 {
304
305
306
307 if( deltaTkin <= 0. )
308 {
309 G4cout<<
"G4PAIPhotonModel::SampleSecondary gamma deltaTkin = "<<deltaTkin<<
G4endl;
310 }
311 if( deltaTkin <= 0.) return;
312
313 if( deltaTkin >= kineticEnergy )
314 {
315 deltaTkin = kineticEnergy;
316 kineticEnergy = 0.0;
317 }
319 G4double sintheta = sqrt((1.+costheta)*(1.-costheta));
320
321
323 G4double dirx = sintheta*cos(phi), diry = sintheta*sin(phi), dirz = costheta;
324
326 deltaDirection.rotateUz(direction);
327
328 if( kineticEnergy > 0.)
329 {
330 kineticEnergy -= deltaTkin;
332 }
333 else
334 {
335
337 }
338
339
342 photonRay->SetKineticEnergy( deltaTkin );
343 photonRay->SetMomentumDirection(deltaDirection);
344
345 vdp->push_back(photonRay);
346 }
347 return;
348}
const G4ThreeVector & GetMomentumDirection() const
void SetDefinition(const G4ParticleDefinition *aParticleDefinition)
G4double GetLogKineticEnergy() const
const G4Material * GetMaterial() const
G4double SamplePostStepPlasmonTransfer(G4int coupleIndex, G4double scaledTkin) const
G4double GetPlasmonRatio(G4int coupleIndex, G4double scaledTkin) const
G4double SamplePostStepPhotonTransfer(G4int coupleIndex, G4double scaledTkin) const
void SetProposedKineticEnergy(G4double proposedKinEnergy)
void SetProposedMomentumDirection(const G4ThreeVector &dir)
G4VEmAngularDistribution * GetAngularDistribution()
const G4Element * SelectTargetAtom(const G4MaterialCutsCouple *, const G4ParticleDefinition *, G4double kineticEnergy, G4double logKineticEnergy, G4double cutEnergy=0.0, G4double maxEnergy=DBL_MAX)
void ProposeLocalEnergyDeposit(G4double anEnergyPart)