177 if (!IsScatProjToProjCase){
181 if (Emin>=Emax)
return;
183 G4double f2=(Emax-adjointPrimKinEnergy)/Emax/f1;
184 gammaE1=adjointPrimKinEnergy/(1.-f1*std::pow(f2,
G4UniformRand()));;
185 gammaE2=gammaE1-adjointPrimKinEnergy;
186 diffCSUsed= diffCSUsed*(1.+2.*std::log(1.+
electron_mass_c2/adjointPrimKinEnergy))*adjointPrimKinEnergy/gammaE1/gammaE2;
192 if (Emin>=Emax)
return;
193 gammaE2 =adjointPrimKinEnergy;
195 diffCSUsed= diffCSUsed/gammaE1;
217 w_corr*=diffCS/diffCSUsed;
219 G4double new_weight = aTrack.GetWeight()*w_corr;
220 fParticleChange->SetParentWeightByProcess(
false);
221 fParticleChange->SetSecondaryWeightByProcess(
false);
222 fParticleChange->ProposeParentWeight(new_weight);
230 if (!IsScatProjToProjCase) {
232 cos_th = (gammaE1 - gammaE2*cos_th)/p_elec;
235 if (std::abs(cos_th)>1){
243 else sin_th = std::sqrt(1.-cos_th*cos_th);
255 gammaMomentum1.
rotateUz(dir_parallel);
260 if (!IsScatProjToProjCase){
261 fParticleChange->ProposeTrackStatus(fStopAndKill);
266 fParticleChange->ProposeEnergy(gammaE1);
267 fParticleChange->ProposeMomentumDirection(gammaMomentum1.
unit());
G4double GetLambda(G4double &kinEnergy, const G4MaterialCutsCouple *couple)
virtual G4double GetSecondAdjEnergyMaxForProdToProjCase(G4double PrimAdjEnergy)
CLHEP::Hep3Vector G4ThreeVector
G4double GetPostStepWeightCorrection()
G4double GetTotalMomentum() const
G4Material * currentMaterial
G4ParticleDefinition * theAdjEquivOfDirectPrimPartDef
G4double GetKineticEnergy() const
Hep3Vector & rotateUz(const Hep3Vector &)
virtual G4double GetSecondAdjEnergyMaxForScatProjToProjCase(G4double PrimAdjEnergy)
G4MaterialCutsCouple * currentCouple
void DefineCurrentMaterial(const G4MaterialCutsCouple *couple)
G4double GetElectronDensity() const
const G4ThreeVector & GetMomentumDirection() const
virtual G4double GetSecondAdjEnergyMinForScatProjToProjCase(G4double PrimAdjEnergy, G4double Tcut=0)
static const G4double Emin
static const G4double Emax
G4double currentTcutForDirectSecond
virtual G4double GetSecondAdjEnergyMinForProdToProjCase(G4double PrimAdjEnergy)
static G4AdjointCSManager * GetAdjointCSManager()
virtual G4double DiffCrossSectionPerAtomPrimToScatPrim(G4double kinEnergyProj, G4double kinEnergyScatProj, G4double Z, G4double A=0.)
G4VEmProcess * theDirectEMProcess