58{
60
61
64
66 {
67 return;
68 }
69
70
72 if(!fWithRapidSampling)
73 {
74 projectileKinEnergy =
76
77
79 adjointPrimKinEnergy, projectileKinEnergy,
80 IsScatProjToProj);
81 }
82 else
83 {
85 if(IsScatProjToProj)
86 {
90 }
91 else
92 {
95 }
96 projectileKinEnergy = Emin * std::pow(Emax / Emin,
G4UniformRand());
97
99 if(!IsScatProjToProj)
101
104 fLastCS * std::log(Emax / Emin) / projectileKinEnergy;
105 G4double needed_diffCS = adjointPrimKinEnergy / projectileKinEnergy;
106 if(!IsScatProjToProj)
109 else
112 new_weight *= needed_diffCS / used_diffCS;
116 }
117
118
119
120
122 G4double projectileTotalEnergy = projectileM0 + projectileKinEnergy;
124 projectileTotalEnergy * projectileTotalEnergy - projectileM0 * projectileM0;
125
126
128 if(IsScatProjToProj)
129 {
131 }
133 companionM0 + projectileKinEnergy - adjointPrimKinEnergy;
135 companionTotalEnergy * companionTotalEnergy - companionM0 * companionM0;
136
137
139 (adjointPrimP * adjointPrimP + projectileP2 - companionP2) /
140 (2. * adjointPrimP);
141 G4double P_perp = std::sqrt(projectileP2 - P_parallel * P_parallel);
145 G4ThreeVector(P_perp * std::cos(phi), P_perp * std::sin(phi), P_parallel);
146 projectileMomentum.
rotateUz(dir_parallel);
147
148 if(!IsScatProjToProj)
149 {
153 }
154 else
155 {
158 }
159}
CLHEP::Hep3Vector G4ThreeVector
Hep3Vector & rotateUz(const Hep3Vector &)
const G4ThreeVector & GetMomentumDirection() const
G4double GetKineticEnergy() const
G4double GetTotalMomentum() const
void AddSecondary(G4Track *aSecondary)
void ProposeEnergy(G4double finalEnergy)
void ProposeMomentumDirection(G4double Px, G4double Py, G4double Pz)
G4double GetPDGMass() const
G4double GetWeight() const
const G4DynamicParticle * GetDynamicParticle() const
G4double fLastAdjointCSForScatProjToProj
virtual G4double DiffCrossSectionPerVolumePrimToScatPrim(const G4Material *aMaterial, G4double kinEnergyProj, G4double kinEnergyScatProj)
virtual G4double GetSecondAdjEnergyMinForScatProjToProj(G4double primAdjEnergy, G4double tcut=0.)
virtual G4double GetSecondAdjEnergyMaxForScatProjToProj(G4double primAdjEnergy)
G4Material * fCurrentMaterial
virtual G4double DiffCrossSectionPerVolumePrimToSecond(const G4Material *aMaterial, G4double kinEnergyProj, G4double kinEnergyProd)
virtual void CorrectPostStepWeight(G4ParticleChange *fParticleChange, G4double old_weight, G4double adjointPrimKinEnergy, G4double projectileKinEnergy, G4bool isScatProjToProj)
G4double SampleAdjSecEnergyFromCSMatrix(std::size_t MatrixIndex, G4double prim_energy, G4bool isScatProjToProj)
G4double GetHighEnergyLimit()
G4double fLastAdjointCSForProdToProj
void ProposeTrackStatus(G4TrackStatus status)
void SetSecondaryWeightByProcess(G4bool)
void SetParentWeightByProcess(G4bool)
void ProposeParentWeight(G4double finalWeight)