82 std::vector<G4DynamicParticle*>* fvect,
102 eMomDir *= std::sqrt(eMomentumC2);
103 G4double eEnergy = std::sqrt(eMomentumC2+electron_mass_c2*electron_mass_c2);
111 G4double gamEnergy0 = gammaMomV.mag();
115 G4double E0_m = gamEnergy0 / electron_mass_c2 ;
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;
208 eKinEnergy = e4vfinal.t()-electron_mass_c2;
212 eDirection = e4vfinal.vect().unit();
217 fvect->push_back(dp);
ThreeVector shoot(const G4int Ap, const G4int Af)
G4double LowEnergyLimit() const
G4ParticleChangeForGamma * fParticleChange
G4double GetKineticEnergy() const
CLHEP::Hep3Vector G4ThreeVector
G4ThreeVector G4RandomDirection()
void ProposeMomentumDirection(G4double Px, G4double Py, G4double Pz)
void ProposeLocalEnergyDeposit(G4double anEnergyPart)
static const double twopi
G4double lowestSecondaryEnergy
virtual ~G4HeatedKleinNishinaCompton()
G4HeatedKleinNishinaCompton(const G4ParticleDefinition *p=0, const G4String &nam="Heated-Klein-Nishina")
G4LorentzVector Get4Momentum() const
G4double G4Log(G4double x)
G4double G4Exp(G4double initial_x)
Exponential Function double precision.
virtual void SampleSecondaries(std::vector< G4DynamicParticle * > *, const G4MaterialCutsCouple *, const G4DynamicParticle *, G4double tmin, G4double maxEnergy)
void SetProposedKineticEnergy(G4double proposedKinEnergy)
G4ParticleDefinition * theElectron
void ProposeTrackStatus(G4TrackStatus status)
double epsilon(double density, double temperature)
CLHEP::HepLorentzVector G4LorentzVector