Geant4 10.7.0
Toolkit for the simulation of the passage of particles through matter
Loading...
Searching...
No Matches
G4ModifiedTsai Class Reference

#include <G4ModifiedTsai.hh>

+ Inheritance diagram for G4ModifiedTsai:

Public Member Functions

 G4ModifiedTsai (const G4String &name="")
 
virtual ~G4ModifiedTsai ()
 
virtual G4ThreeVectorSampleDirection (const G4DynamicParticle *dp, G4double out_energy, G4int Z, const G4Material *mat=nullptr) final
 
virtual void SamplePairDirections (const G4DynamicParticle *dp, G4double elecKinEnergy, G4double posiKinEnergy, G4ThreeVector &dirElectron, G4ThreeVector &dirPositron, G4int Z=0, const G4Material *mat=nullptr) final
 
virtual void PrintGeneratorInformation () const final
 
- Public Member Functions inherited from G4VEmAngularDistribution
 G4VEmAngularDistribution (const G4String &name)
 
virtual ~G4VEmAngularDistribution ()
 
virtual G4ThreeVectorSampleDirection (const G4DynamicParticle *dp, G4double finalTotalEnergy, G4int Z, const G4Material *)=0
 
virtual G4ThreeVectorSampleDirectionForShell (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 G4StringGetName () const
 
G4VEmAngularDistributionoperator= (const G4VEmAngularDistribution &right)=delete
 
 G4VEmAngularDistribution (const G4VEmAngularDistribution &)=delete
 

Additional Inherited Members

- Protected Attributes inherited from G4VEmAngularDistribution
G4ThreeVector fLocalDirection
 
G4bool fPolarisation
 

Detailed Description

Definition at line 62 of file G4ModifiedTsai.hh.

Constructor & Destructor Documentation

◆ G4ModifiedTsai()

G4ModifiedTsai::G4ModifiedTsai ( const G4String name = "")
explicit

Definition at line 65 of file G4ModifiedTsai.cc.

◆ ~G4ModifiedTsai()

G4ModifiedTsai::~G4ModifiedTsai ( )
virtual

Definition at line 71 of file G4ModifiedTsai.cc.

72{}

Member Function Documentation

◆ PrintGeneratorInformation()

void G4ModifiedTsai::PrintGeneratorInformation ( ) const
finalvirtual

Definition at line 144 of file G4ModifiedTsai.cc.

145{
146 G4cout << "\n" << G4endl;
147 G4cout << "Bremsstrahlung Angular Generator is Modified Tsai" << G4endl;
148 G4cout << "Distribution suggested by L.Urban (Geant3 manual (1993) Phys211)"
149 << G4endl;
150 G4cout << "Derived from Tsai distribution (Rev Mod Phys 49,421(1977)) \n"
151 << G4endl;
152}
#define G4endl
Definition: G4ios.hh:57
G4GLOB_DLL std::ostream G4cout

◆ SampleDirection()

G4ThreeVector & G4ModifiedTsai::SampleDirection ( const G4DynamicParticle dp,
G4double  out_energy,
G4int  Z,
const G4Material mat = nullptr 
)
finalvirtual

Implements G4VEmAngularDistribution.

Definition at line 77 of file G4ModifiedTsai.cc.

79{
80 // Sample gamma angle (Z - axis along the parent particle).
81 G4double cost = SampleCosTheta(dp->GetKineticEnergy());
82 G4double sint = std::sqrt((1 - cost)*(1 + cost));
83 G4double phi = CLHEP::twopi*G4UniformRand();
84
85 fLocalDirection.set(sint*std::cos(phi), sint*std::sin(phi), cost);
87
88 return fLocalDirection;
89}
double G4double
Definition: G4Types.hh:83
#define G4UniformRand()
Definition: Randomize.hh:52
void set(double x, double y, double z)
Hep3Vector & rotateUz(const Hep3Vector &)
Definition: ThreeVector.cc:33
const G4ThreeVector & GetMomentumDirection() const
G4double GetKineticEnergy() const

◆ SamplePairDirections()

void G4ModifiedTsai::SamplePairDirections ( const G4DynamicParticle dp,
G4double  elecKinEnergy,
G4double  posiKinEnergy,
G4ThreeVector dirElectron,
G4ThreeVector dirPositron,
G4int  Z = 0,
const G4Material mat = nullptr 
)
finalvirtual

Reimplemented from G4VEmAngularDistribution.

Definition at line 118 of file G4ModifiedTsai.cc.

124{
125 G4double phi = CLHEP::twopi * G4UniformRand();
126 G4double sinp = std::sin(phi);
127 G4double cosp = std::cos(phi);
128
129 G4double cost = SampleCosTheta(elecKinEnergy);
130 G4double sint = std::sqrt((1. - cost)*(1. + cost));
131
132 dirElectron.set(sint*cosp, sint*sinp, cost);
133 dirElectron.rotateUz(dp->GetMomentumDirection());
134
135 cost = SampleCosTheta(posiKinEnergy);
136 sint = std::sqrt((1. - cost)*(1. + cost));
137
138 dirPositron.set(-sint*cosp, -sint*sinp, cost);
139 dirPositron.rotateUz(dp->GetMomentumDirection());
140}

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