Geant4  10.03.p01
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Pages
G4DNARuddAngle Class Reference

#include <G4DNARuddAngle.hh>

Inheritance diagram for G4DNARuddAngle:
Collaboration diagram for G4DNARuddAngle:

Public Member Functions

 G4DNARuddAngle (const G4String &name="")
 
virtual ~G4DNARuddAngle ()
 
virtual G4ThreeVectorSampleDirection (const G4DynamicParticle *dp, G4double kinEnergyFinal, G4int Z, const G4Material *mat=0)
 
virtual G4ThreeVectorSampleDirectionForShell (const G4DynamicParticle *dp, G4double kinEnergyFinal, G4int Z, G4int shellIdx, const G4Material *mat=0)
 
void PrintGeneratorInformation () const
 
- Public Member Functions inherited from G4VEmAngularDistribution
 G4VEmAngularDistribution (const G4String &name)
 
virtual ~G4VEmAngularDistribution ()
 
const G4StringGetName () const
 

Additional Inherited Members

- Protected Attributes inherited from G4VEmAngularDistribution
G4ThreeVector fLocalDirection
 

Detailed Description

Definition at line 57 of file G4DNARuddAngle.hh.

Constructor & Destructor Documentation

G4DNARuddAngle::G4DNARuddAngle ( const G4String name = "")

Definition at line 59 of file G4DNARuddAngle.cc.

60  : G4VEmAngularDistribution("deltaRudd")
61 {
62  fElectron = G4Electron::Electron();
63 }
G4VEmAngularDistribution(const G4String &name)
static G4Electron * Electron()
Definition: G4Electron.cc:94

Here is the call graph for this function:

G4DNARuddAngle::~G4DNARuddAngle ( )
virtual

Definition at line 65 of file G4DNARuddAngle.cc.

66 {}

Member Function Documentation

void G4DNARuddAngle::PrintGeneratorInformation ( ) const

Definition at line 113 of file G4DNARuddAngle.cc.

114 {}
G4ThreeVector & G4DNARuddAngle::SampleDirection ( const G4DynamicParticle dp,
G4double  kinEnergyFinal,
G4int  Z,
const G4Material mat = 0 
)
virtual

Implements G4VEmAngularDistribution.

Definition at line 106 of file G4DNARuddAngle.cc.

109 {
110  return SampleDirectionForShell(dp, secEkin, Z, 0, mat);
111 }
virtual G4ThreeVector & SampleDirectionForShell(const G4DynamicParticle *dp, G4double kinEnergyFinal, G4int Z, G4int shellIdx, const G4Material *mat=0)

Here is the call graph for this function:

G4ThreeVector & G4DNARuddAngle::SampleDirectionForShell ( const G4DynamicParticle dp,
G4double  kinEnergyFinal,
G4int  Z,
G4int  shellIdx,
const G4Material mat = 0 
)
virtual

Reimplemented from G4VEmAngularDistribution.

Definition at line 69 of file G4DNARuddAngle.cc.

73 {
74  G4double k = dp->GetKineticEnergy();
75  G4double cosTheta = 1.0;
76 
77  const G4ParticleDefinition* particle = dp->GetDefinition();
78  G4double mass = particle->GetPDGMass();
79 
80  G4double maximumEnergyTransfer = k;
81  if(particle == fElectron) { maximumEnergyTransfer *= 0.5; }
82  else if(mass > MeV) {
83  G4double ratio = electron_mass_c2/mass;
84  G4double tau = k/mass;
85  maximumEnergyTransfer = 2.0*electron_mass_c2*tau*(tau + 2.) /
86  (1. + 2.0*(tau + 1.)*ratio + ratio*ratio);
87 
88  }
89 
90  if (secKinetic>100*eV && secKinetic <= maximumEnergyTransfer) {
91  cosTheta = std::sqrt(secKinetic / maximumEnergyTransfer);
92  } else {
93  cosTheta = (2.*G4UniformRand())-1.;
94  }
95 
96  G4double sint = sqrt((1.0 - cosTheta)*(1.0 + cosTheta));
97  G4double phi = twopi*G4UniformRand();
98 
99  fLocalDirection.set(sint*cos(phi), sint*sin(phi), cosTheta);
101 
102  return fLocalDirection;
103 }
void set(double x, double y, double z)
G4double GetKineticEnergy() const
G4ParticleDefinition * GetDefinition() const
static constexpr double twopi
Definition: G4SIunits.hh:76
static constexpr double electron_mass_c2
#define G4UniformRand()
Definition: Randomize.hh:97
const G4ThreeVector & GetMomentumDirection() const
Hep3Vector & rotateUz(const Hep3Vector &)
Definition: ThreeVector.cc:38
static constexpr double eV
Definition: G4SIunits.hh:215
G4double GetPDGMass() const
static constexpr double MeV
Definition: G4SIunits.hh:214
double G4double
Definition: G4Types.hh:76

Here is the call graph for this function:

Here is the caller graph for this function:


The documentation for this class was generated from the following files: