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 ;
124 G4double epsilon, epsilonsq, onecost, sint2, greject ;
129 G4double alpha2 = 0.5*(1.- epsilon0sq);
136 if(nloop > 1000) {
return; }
141 epsilonsq = epsilon*epsilon;
147 epsilon = sqrt(epsilonsq);
150 onecost = (1.- epsilon)/(epsilon*E0_m);
151 sint2 = onecost*(2.-onecost);
152 greject = 1. - epsilon*sint2/(1.+ epsilonsq);
163 G4double dirx = sinTeta*cos(Phi), diry = sinTeta*sin(Phi), dirz = cosTeta;
170 gamDirection1.rotateUz(gamDirection0);
171 G4double gamEnergy1 = epsilon*gamEnergy0;
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);
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)
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)
CLHEP::HepLorentzVector G4LorentzVector