#include <G4RayleighAngularGenerator.hh>
|
| G4RayleighAngularGenerator () |
|
virtual | ~G4RayleighAngularGenerator () |
|
virtual G4ThreeVector & | SampleDirection (const G4DynamicParticle *dp, G4double out_energy, G4int Z, const G4Material *mat=0) |
|
| G4VEmAngularDistribution (const G4String &name) |
|
virtual | ~G4VEmAngularDistribution () |
|
virtual G4ThreeVector & | SampleDirection (const G4DynamicParticle *dp, G4double finalTotalEnergy, G4int Z, const G4Material *)=0 |
|
virtual G4ThreeVector & | SampleDirectionForShell (const G4DynamicParticle *dp, G4double finalTotalEnergy, G4int Z, G4int shellID, const G4Material *) |
|
virtual void | SamplePairDirections (const G4DynamicParticle *dp, G4double elecKinEnergy, G4double posiKinEnergy, G4ThreeVector &dirElectron, G4ThreeVector &dirPositron, G4int Z=0, const G4Material *mat=nullptr) |
|
const G4String & | GetName () const |
|
G4VEmAngularDistribution & | operator= (const G4VEmAngularDistribution &right)=delete |
|
| G4VEmAngularDistribution (const G4VEmAngularDistribution &)=delete |
|
◆ G4RayleighAngularGenerator()
G4RayleighAngularGenerator::G4RayleighAngularGenerator |
( |
| ) |
|
◆ ~G4RayleighAngularGenerator()
G4RayleighAngularGenerator::~G4RayleighAngularGenerator |
( |
| ) |
|
|
virtual |
◆ SampleDirection()
Implements G4VEmAngularDistribution.
Definition at line 79 of file G4RayleighAngularGenerator.cc.
82{
85
92
95 G4double w0 = (x < numlim) ? n0*x*(1.0 - 0.5*(n0 - 1.0)*x*(1.0 - (n0 - 2.0)*x/3.))
97
98 x = 2.*xx*b1;
99 G4double w1 = (x < numlim) ? n1*x*(1.0 - 0.5*(n1 - 1.0)*x*(1.0 - (n1 - 2.0)*x/3.))
101
102 x = 2.*xx*b2;
103 G4double w2 = (x < numlim) ? n2*x*(1.0 - 0.5*(n2 - 1.0)*x*(1.0 - (n2 - 2.0)*x/3.))
105
109
111 do {
112
116
118 if(x > x0) {
119 x -= x0;
120 if(x <= x1 ) {
121 w = w1;
123 b = b1;
124 } else {
125 w = w2;
127 b = b2;
128 }
129 }
131
132
134 if(y < numlim) { x = y*
n*( 1. + 0.5*(
n + 1.)*y*(1. - (n + 2.)*y/3.)); }
135
137 cost = 1.0 - x/(b*xx);
138
139
140 }
while (2*
G4UniformRand() > 1.0 + cost*cost || cost < -1.0);
141
143 G4double sint = sqrt((1. - cost)*(1.0 + cost));
146
148}
G4double G4Exp(G4double initial_x)
Exponential Function double precision.
G4double G4Log(G4double x)
void set(double x, double y, double z)
Hep3Vector & rotateUz(const Hep3Vector &)
const G4ThreeVector & GetMomentumDirection() const
G4double GetKineticEnergy() const
G4ThreeVector fLocalDirection
The documentation for this class was generated from the following files: