90 if(idx < 0 || idx >= nShells) {
96 for(idx=0; idx<nShells; ++idx) {
102 for(idx=0; idx<nShells; ++idx) {
103 if(sum <=
prob[idx]) {
break; }
115 static const G4int nmax = 100;
128 totEnergy += ePotEnergy;
136 G4double sintet = sqrt((1 - costet)*(1 + costet));
155 G4double x0 = p*(totMomentum + eTotMomentum*costet);
163 G4double x1 = p*eTotMomentum*sintet;
164 G4double x2 = totEnergy*(eTotEnergy - e) - e*eTotEnergy
167 if(std::abs(y) <= 1.0) {
168 cost = -(x2 + x1*sqrt(1. - y*y))/x0;
169 if(std::abs(cost) <= 1.0) { isOK =
true; }
186 G4double sint = sqrt((1 - cost)*(1 + cost));
G4double G4Log(G4double x)
static constexpr double twopi
void set(double x, double y, double z)
Hep3Vector & rotateUz(const Hep3Vector &)
static G4int GetNumberOfElectrons(G4int Z, G4int SubshellNb)
static G4double GetBindingEnergy(G4int Z, G4int SubshellNb)
static G4int GetNumberOfShells(G4int Z)
G4DeltaAngle(const G4String &name="")
const G4ParticleDefinition * fElectron
std::vector< G4double > prob
G4ThreeVector & SampleDirectionForShell(const G4DynamicParticle *dp, G4double kinEnergyFinal, G4int Z, G4int shellIdx, const G4Material *mat=nullptr) final
G4ThreeVector & SampleDirection(const G4DynamicParticle *dp, G4double kinEnergyFinal, G4int Z, const G4Material *mat=nullptr) final
const G4ThreeVector & GetMomentumDirection() const
const G4ParticleDefinition * GetParticleDefinition() const
G4double GetTotalEnergy() const
G4double GetTotalMomentum() const
static G4Electron * Electron()
G4ThreeVector fLocalDirection
G4double bindingEnergy(G4int A, G4int Z)