179 if (!IsScatProjToProjCase){
181 eEnergy=adjointPrimKinEnergy;
184 if (Emin>=Emax)
return;
187 newCS=newCS*(b-
a)/eEnergy;
195 if (Emin>=Emax)
return;
196 G4double diff1=Emin-adjointPrimKinEnergy;
197 G4double diff2=Emax-adjointPrimKinEnergy;
199 G4double t1=adjointPrimKinEnergy*(1./diff1-1./diff2);
205 newCS=newCS*sum_t/adjointPrimKinEnergy/adjointPrimKinEnergy;
209 projectileKinEnergy =adjointPrimKinEnergy +1./(1./diff1-q);
214 projectileKinEnergy =1./(1./Emin-q);
217 projectileKinEnergy=Emin*std::pow(Emax/Emin,
G4UniformRand());
220 eEnergy=projectileKinEnergy-adjointPrimKinEnergy;
227 G4double diffCS_perAtom_Used=
twopi_mc2_rcl2*mass*adjointPrimKinEnergy/projectileKinEnergy/projectileKinEnergy/eEnergy/eEnergy;
243 w_corr*=diffCS/diffCS_perAtom_Used;
246 G4double new_weight = aTrack.GetWeight()*w_corr;
247 fParticleChange->SetParentWeightByProcess(
false);
248 fParticleChange->SetSecondaryWeightByProcess(
false);
249 fParticleChange->ProposeParentWeight(new_weight);
260 G4double projectileTotalEnergy = projectileM0+projectileKinEnergy;
261 G4double projectileP2 = projectileTotalEnergy*projectileTotalEnergy - projectileM0*projectileM0;
268 if (IsScatProjToProjCase) {
271 G4double companionTotalEnergy =companionM0+ projectileKinEnergy-adjointPrimKinEnergy;
272 G4double companionP2 = companionTotalEnergy*companionTotalEnergy - companionM0*companionM0;
277 G4double P_parallel = (adjointPrimP*adjointPrimP + projectileP2 - companionP2)/(2.*adjointPrimP);
278 G4double P_perp = std::sqrt( projectileP2 - P_parallel*P_parallel);
282 projectileMomentum.
rotateUz(dir_parallel);
286 if (!IsScatProjToProjCase ){
287 fParticleChange->ProposeTrackStatus(fStopAndKill);
292 fParticleChange->ProposeEnergy(projectileKinEnergy);
293 fParticleChange->ProposeMomentumDirection(projectileMomentum.
unit());
CLHEP::Hep3Vector G4ThreeVector
G4double GetPostStepWeightCorrection()
G4double GetTotalMomentum() const
virtual G4double GetSecondAdjEnergyMaxForScatProjToProjCase(G4double PrimAdjEnergy)
G4Material * currentMaterial
G4ParticleDefinition * theAdjEquivOfDirectPrimPartDef
virtual G4double GetSecondAdjEnergyMinForScatProjToProjCase(G4double PrimAdjEnergy, G4double Tcut=0)
G4double GetKineticEnergy() const
Hep3Vector & rotateUz(const Hep3Vector &)
void DefineCurrentMaterial(const G4MaterialCutsCouple *couple)
G4double GetElectronDensity() const
const G4ThreeVector & GetMomentumDirection() const
G4double GetPDGMass() const
static const G4double Emin
static const G4double Emax
G4ParticleDefinition * theAdjEquivOfDirectSecondPartDef
G4double currentTcutForDirectSecond
virtual G4double GetSecondAdjEnergyMinForProdToProjCase(G4double PrimAdjEnergy)
static G4AdjointCSManager * GetAdjointCSManager()
virtual G4double DiffCrossSectionPerAtomPrimToSecond(G4double kinEnergyProj, G4double kinEnergyProd, G4double Z, G4double A=0.)
virtual G4double GetSecondAdjEnergyMaxForProdToProjCase(G4double PrimAdjEnergy)