82 std::vector<G4DynamicParticle*>* fvect,
102 eMomDir *= std::sqrt(eMomentumC2);
129 G4double alpha2 = 0.5*(1.- epsilon0sq);
136 if(nloop > 1000) {
return; }
147 epsilon = sqrt(epsilonsq);
150 onecost = (1.-
epsilon)/(epsilon*E0_m);
151 sint2 = onecost*(2.-onecost);
152 greject = 1. - epsilon*sint2/(1.+ epsilonsq);
164 G4double dirx = sinTeta*cos(Phi), diry = sinTeta*sin(Phi), dirz = cosTeta;
171 gamDirection1.
rotateUz(gamDirection0);
172 G4double gamEnergy1 = epsilon*gamEnergy0;
173 gamDirection1 *= gamEnergy1;
181 G4double eKinEnergy = gamEnergy0 - gamEnergy1;
182 G4ThreeVector eDirection = gamEnergy0*gamDirection0 - gamEnergy1*gamDirection1;
183 eDirection = eDirection.
unit();
184 G4double eFinalMom = std::sqrt(eKinEnergy*(eKinEnergy+2*electron_mass_c2));
185 eDirection *= eFinalMom;
188 gamma4vfinal.
boost(bst);
191 gamDirection1 = gamma4vfinal.
vect();
192 gamEnergy1 = gamDirection1.
mag();
193 gamDirection1 /= gamEnergy1;
212 eDirection = e4vfinal.
vect().
unit();
217 fvect->push_back(dp);
G4double G4Exp(G4double initial_x)
Exponential Function double precision.
static constexpr double keV
G4double lowestSecondaryEnergy
void SetProposedKineticEnergy(G4double proposedKinEnergy)
Hep3Vector & rotateUz(const Hep3Vector &)
G4ThreeVector G4RandomDirection()
G4HeatedKleinNishinaCompton(const G4ParticleDefinition *p=nullptr, const G4String &nam="Heated-Klein-Nishina")
G4double G4Log(G4double x)
G4double LowEnergyLimit() const
static constexpr double electron_mass_c2
void ProposeMomentumDirection(G4double Px, G4double Py, G4double Pz)
static constexpr double twopi
virtual void SampleSecondaries(std::vector< G4DynamicParticle * > *, const G4MaterialCutsCouple *, const G4DynamicParticle *, G4double tmin, G4double maxEnergy) final
G4LorentzVector Get4Momentum() const
G4ParticleDefinition * theElectron
ThreeVector shoot(const G4int Ap, const G4int Af)
G4ParticleChangeForGamma * fParticleChange
double epsilon(double density, double temperature)
G4double GetKineticEnergy() const
Hep3Vector boostVector() const
CLHEP::HepLorentzVector G4LorentzVector
void ProposeLocalEnergyDeposit(G4double anEnergyPart)
virtual ~G4HeatedKleinNishinaCompton()
void ProposeTrackStatus(G4TrackStatus status)
HepLorentzVector & boost(double, double, double)