70 fTemperature = 1.0*keV;
81 std::vector<G4DynamicParticle*>* fvect,
98 G4double eMomentumC2 = G4RandGamma::shoot(1.5, 1.);
99 eMomentumC2 *= 2*electron_mass_c2*fTemperature;
101 eMomDir *= std::sqrt(eMomentumC2);
102 G4double eEnergy = std::sqrt(eMomentumC2+electron_mass_c2*electron_mass_c2);
114 G4double E0_m = gamEnergy0 / electron_mass_c2 ;
128 G4double alpha2 = 0.5*(1.- epsilon0sq);
135 if(nloop > 1000) {
return; }
150 sint2 = onecost*(2.-onecost);
151 greject = 1. -
epsilon*sint2/(1.+ epsilonsq);
163 G4double dirx = sinTeta*cos(Phi), diry = sinTeta*sin(Phi), dirz = cosTeta;
170 gamDirection1.
rotateUz(gamDirection0);
172 gamDirection1 *= gamEnergy1;
180 G4double eKinEnergy = gamEnergy0 - gamEnergy1;
181 G4ThreeVector eDirection = gamEnergy0*gamDirection0 - gamEnergy1*gamDirection1;
182 eDirection = eDirection.
unit();
183 G4double eFinalMom = std::sqrt(eKinEnergy*(eKinEnergy+2*electron_mass_c2));
184 eDirection *= eFinalMom;
187 gamma4vfinal.
boost(bst);
190 gamDirection1 = gamma4vfinal.
vect();
191 gamEnergy1 = gamDirection1.
mag();
192 gamDirection1 /= gamEnergy1;
207 eKinEnergy = e4vfinal.
t()-electron_mass_c2;
211 eDirection = e4vfinal.
vect().
unit();
216 fvect->push_back(dp);
double epsilon(double density, double temperature)
G4double G4Exp(G4double initial_x)
Exponential Function double precision.
G4double G4Log(G4double x)
CLHEP::HepLorentzVector G4LorentzVector
G4ThreeVector G4RandomDirection()
Hep3Vector & rotateUz(const Hep3Vector &)
Hep3Vector boostVector() const
HepLorentzVector & boost(double, double, double)
G4LorentzVector Get4Momentum() const
G4double GetKineticEnergy() const
virtual ~G4HeatedKleinNishinaCompton()
virtual void SampleSecondaries(std::vector< G4DynamicParticle * > *, const G4MaterialCutsCouple *, const G4DynamicParticle *, G4double tmin, G4double maxEnergy) final
G4HeatedKleinNishinaCompton(const G4ParticleDefinition *p=nullptr, const G4String &nam="Heated-Klein-Nishina")
G4double lowestSecondaryEnergy
G4ParticleChangeForGamma * fParticleChange
G4ParticleDefinition * theElectron
void SetProposedKineticEnergy(G4double proposedKinEnergy)
void ProposeMomentumDirection(G4double Px, G4double Py, G4double Pz)
G4double LowEnergyLimit() const
void ProposeTrackStatus(G4TrackStatus status)
void ProposeLocalEnergyDeposit(G4double anEnergyPart)