Geant4  10.02.p03
G4eeToTwoGammaModel Class Reference

#include <G4eeToTwoGammaModel.hh>

Inheritance diagram for G4eeToTwoGammaModel:
Collaboration diagram for G4eeToTwoGammaModel:

Public Member Functions

 G4eeToTwoGammaModel (const G4ParticleDefinition *p=0, const G4String &nam="eplus2gg")
 
virtual ~G4eeToTwoGammaModel ()
 
virtual void Initialise (const G4ParticleDefinition *, const G4DataVector &)
 
virtual G4double ComputeCrossSectionPerElectron (const G4ParticleDefinition *, G4double kinEnergy, G4double cutEnergy=0., G4double maxEnergy=DBL_MAX)
 
virtual G4double ComputeCrossSectionPerAtom (const G4ParticleDefinition *, G4double kinEnergy, G4double Z, G4double A=0., G4double cutEnergy=0., G4double maxEnergy=DBL_MAX)
 
virtual G4double CrossSectionPerVolume (const G4Material *, const G4ParticleDefinition *, G4double kineticEnergy, G4double cutEnergy, G4double maxEnergy)
 
virtual void SampleSecondaries (std::vector< G4DynamicParticle *> *, const G4MaterialCutsCouple *, const G4DynamicParticle *, G4double tmin, G4double maxEnergy)
 
- Public Member Functions inherited from G4VEmModel
 G4VEmModel (const G4String &nam)
 
virtual ~G4VEmModel ()
 
virtual void InitialiseLocal (const G4ParticleDefinition *, G4VEmModel *masterModel)
 
virtual void InitialiseForMaterial (const G4ParticleDefinition *, const G4Material *)
 
virtual void InitialiseForElement (const G4ParticleDefinition *, G4int Z)
 
virtual G4double ComputeDEDXPerVolume (const G4Material *, const G4ParticleDefinition *, G4double kineticEnergy, G4double cutEnergy=DBL_MAX)
 
virtual G4double GetPartialCrossSection (const G4Material *, G4int, const G4ParticleDefinition *, G4double)
 
virtual G4double ComputeCrossSectionPerShell (const G4ParticleDefinition *, G4int Z, G4int shellIdx, G4double kinEnergy, G4double cutEnergy=0.0, G4double maxEnergy=DBL_MAX)
 
virtual G4double ChargeSquareRatio (const G4Track &)
 
virtual G4double GetChargeSquareRatio (const G4ParticleDefinition *, const G4Material *, G4double kineticEnergy)
 
virtual G4double GetParticleCharge (const G4ParticleDefinition *, const G4Material *, G4double kineticEnergy)
 
virtual void StartTracking (G4Track *)
 
virtual void CorrectionsAlongStep (const G4MaterialCutsCouple *, const G4DynamicParticle *, G4double &eloss, G4double &niel, G4double length)
 
virtual G4double Value (const G4MaterialCutsCouple *, const G4ParticleDefinition *, G4double kineticEnergy)
 
virtual G4double MinPrimaryEnergy (const G4Material *, const G4ParticleDefinition *, G4double cut=0.0)
 
virtual G4double MinEnergyCut (const G4ParticleDefinition *, const G4MaterialCutsCouple *)
 
virtual void SetupForMaterial (const G4ParticleDefinition *, const G4Material *, G4double kineticEnergy)
 
virtual void DefineForRegion (const G4Region *)
 
virtual void ModelDescription (std::ostream &outFile) const
 
void InitialiseElementSelectors (const G4ParticleDefinition *, const G4DataVector &)
 
std::vector< G4EmElementSelector * > * GetElementSelectors ()
 
void SetElementSelectors (std::vector< G4EmElementSelector *> *)
 
G4double ComputeDEDX (const G4MaterialCutsCouple *, const G4ParticleDefinition *, G4double kineticEnergy, G4double cutEnergy=DBL_MAX)
 
G4double CrossSection (const G4MaterialCutsCouple *, const G4ParticleDefinition *, G4double kineticEnergy, G4double cutEnergy=0.0, G4double maxEnergy=DBL_MAX)
 
G4double ComputeMeanFreePath (const G4ParticleDefinition *, G4double kineticEnergy, const G4Material *, G4double cutEnergy=0.0, G4double maxEnergy=DBL_MAX)
 
G4double ComputeCrossSectionPerAtom (const G4ParticleDefinition *, const G4Element *, G4double kinEnergy, G4double cutEnergy=0.0, G4double maxEnergy=DBL_MAX)
 
G4int SelectIsotopeNumber (const G4Element *)
 
const G4ElementSelectRandomAtom (const G4MaterialCutsCouple *, const G4ParticleDefinition *, G4double kineticEnergy, G4double cutEnergy=0.0, G4double maxEnergy=DBL_MAX)
 
const G4ElementSelectRandomAtom (const G4Material *, const G4ParticleDefinition *, G4double kineticEnergy, G4double cutEnergy=0.0, G4double maxEnergy=DBL_MAX)
 
G4int SelectRandomAtomNumber (const G4Material *)
 
void SetParticleChange (G4VParticleChange *, G4VEmFluctuationModel *f=0)
 
void SetCrossSectionTable (G4PhysicsTable *, G4bool isLocal)
 
G4ElementDataGetElementData ()
 
G4PhysicsTableGetCrossSectionTable ()
 
G4VEmFluctuationModelGetModelOfFluctuations ()
 
G4VEmAngularDistributionGetAngularDistribution ()
 
void SetAngularDistribution (G4VEmAngularDistribution *)
 
G4double HighEnergyLimit () const
 
G4double LowEnergyLimit () const
 
G4double HighEnergyActivationLimit () const
 
G4double LowEnergyActivationLimit () const
 
G4double PolarAngleLimit () const
 
G4double SecondaryThreshold () const
 
G4bool LPMFlag () const
 
G4bool DeexcitationFlag () const
 
G4bool ForceBuildTableFlag () const
 
G4bool UseAngularGeneratorFlag () const
 
void SetAngularGeneratorFlag (G4bool)
 
void SetHighEnergyLimit (G4double)
 
void SetLowEnergyLimit (G4double)
 
void SetActivationHighEnergyLimit (G4double)
 
void SetActivationLowEnergyLimit (G4double)
 
G4bool IsActive (G4double kinEnergy)
 
void SetPolarAngleLimit (G4double)
 
void SetSecondaryThreshold (G4double)
 
void SetLPMFlag (G4bool val)
 
void SetDeexcitationFlag (G4bool val)
 
void SetForceBuildTable (G4bool val)
 
void SetMasterThread (G4bool val)
 
G4bool IsMaster () const
 
G4double MaxSecondaryKinEnergy (const G4DynamicParticle *dynParticle)
 
const G4StringGetName () const
 
void SetCurrentCouple (const G4MaterialCutsCouple *)
 
const G4ElementGetCurrentElement () const
 
const G4IsotopeGetCurrentIsotope () const
 
G4bool IsLocked () const
 
void SetLocked (G4bool)
 

Private Member Functions

G4eeToTwoGammaModeloperator= (const G4eeToTwoGammaModel &right)
 
 G4eeToTwoGammaModel (const G4eeToTwoGammaModel &)
 

Private Attributes

G4double pi_rcl2
 
G4ParticleDefinitiontheGamma
 
G4ParticleChangeForGamma * fParticleChange
 
G4bool isInitialised
 

Additional Inherited Members

- Protected Member Functions inherited from G4VEmModel
G4ParticleChangeForLoss * GetParticleChangeForLoss ()
 
G4ParticleChangeForGamma * GetParticleChangeForGamma ()
 
virtual G4double MaxSecondaryEnergy (const G4ParticleDefinition *, G4double kineticEnergy)
 
const G4MaterialCutsCoupleCurrentCouple () const
 
void SetCurrentElement (const G4Element *)
 
- Protected Attributes inherited from G4VEmModel
G4ElementDatafElementData
 
G4VParticleChange * pParticleChange
 
G4PhysicsTablexSectionTable
 
const std::vector< G4double > * theDensityFactor
 
const std::vector< G4int > * theDensityIdx
 
size_t idxTable
 
- Static Protected Attributes inherited from G4VEmModel
static const G4double inveplus = 1.0/CLHEP::eplus
 

Detailed Description

Definition at line 60 of file G4eeToTwoGammaModel.hh.

Constructor & Destructor Documentation

◆ G4eeToTwoGammaModel() [1/2]

G4eeToTwoGammaModel::G4eeToTwoGammaModel ( const G4ParticleDefinition p = 0,
const G4String nam = "eplus2gg" 
)

Definition at line 87 of file G4eeToTwoGammaModel.cc.

89  : G4VEmModel(nam),
91  isInitialised(false)
92 {
94  fParticleChange = 0;
95 }
G4ParticleChangeForGamma * fParticleChange
G4VEmModel(const G4String &nam)
Definition: G4VEmModel.cc:69
static G4Gamma * Gamma()
Definition: G4Gamma.cc:86
int classic_electr_radius
Definition: hepunit.py:288
static const double pi
Definition: G4SIunits.hh:74
G4ParticleDefinition * theGamma
Here is the call graph for this function:

◆ ~G4eeToTwoGammaModel()

G4eeToTwoGammaModel::~G4eeToTwoGammaModel ( )
virtual

Definition at line 99 of file G4eeToTwoGammaModel.cc.

100 {}

◆ G4eeToTwoGammaModel() [2/2]

G4eeToTwoGammaModel::G4eeToTwoGammaModel ( const G4eeToTwoGammaModel )
private

Member Function Documentation

◆ ComputeCrossSectionPerAtom()

G4double G4eeToTwoGammaModel::ComputeCrossSectionPerAtom ( const G4ParticleDefinition p,
G4double  kinEnergy,
G4double  Z,
G4double  A = 0.,
G4double  cutEnergy = 0.,
G4double  maxEnergy = DBL_MAX 
)
virtual

Reimplemented from G4VEmModel.

Definition at line 137 of file G4eeToTwoGammaModel.cc.

141 {
142  // Calculates the cross section per atom of annihilation into two photons
143 
144  G4double cross = Z*ComputeCrossSectionPerElectron(p,kineticEnergy);
145  return cross;
146 }
virtual G4double ComputeCrossSectionPerElectron(const G4ParticleDefinition *, G4double kinEnergy, G4double cutEnergy=0., G4double maxEnergy=DBL_MAX)
Float_t Z
double G4double
Definition: G4Types.hh:76
Here is the call graph for this function:

◆ ComputeCrossSectionPerElectron()

G4double G4eeToTwoGammaModel::ComputeCrossSectionPerElectron ( const G4ParticleDefinition ,
G4double  kinEnergy,
G4double  cutEnergy = 0.,
G4double  maxEnergy = DBL_MAX 
)
virtual

Reimplemented in G4PolarizedAnnihilationModel.

Definition at line 114 of file G4eeToTwoGammaModel.cc.

118 {
119  // Calculates the cross section per electron of annihilation into two photons
120  // from the Heilter formula.
121 
122  G4double ekin = std::max(eV,kineticEnergy);
123 
124  G4double tau = ekin/electron_mass_c2;
125  G4double gam = tau + 1.0;
126  G4double gamma2= gam*gam;
127  G4double bg2 = tau * (tau+2.0);
128  G4double bg = sqrt(bg2);
129 
130  G4double cross = pi_rcl2*((gamma2+4*gam+1.)*G4Log(gam+bg) - (gam+3.)*bg)
131  / (bg2*(gam+1.));
132  return cross;
133 }
float electron_mass_c2
Definition: hepunit.py:274
G4double G4Log(G4double x)
Definition: G4Log.hh:230
static const double eV
Definition: G4SIunits.hh:212
double G4double
Definition: G4Types.hh:76
Here is the call graph for this function:
Here is the caller graph for this function:

◆ CrossSectionPerVolume()

G4double G4eeToTwoGammaModel::CrossSectionPerVolume ( const G4Material material,
const G4ParticleDefinition p,
G4double  kineticEnergy,
G4double  cutEnergy,
G4double  maxEnergy 
)
virtual

Reimplemented from G4VEmModel.

Definition at line 150 of file G4eeToTwoGammaModel.cc.

155 {
156  // Calculates the cross section per volume of annihilation into two photons
157 
158  G4double eDensity = material->GetElectronDensity();
159  G4double cross = eDensity*ComputeCrossSectionPerElectron(p,kineticEnergy);
160  return cross;
161 }
virtual G4double ComputeCrossSectionPerElectron(const G4ParticleDefinition *, G4double kinEnergy, G4double cutEnergy=0., G4double maxEnergy=DBL_MAX)
G4double GetElectronDensity() const
Definition: G4Material.hh:217
double G4double
Definition: G4Types.hh:76
Here is the call graph for this function:

◆ Initialise()

void G4eeToTwoGammaModel::Initialise ( const G4ParticleDefinition ,
const G4DataVector  
)
virtual

Implements G4VEmModel.

Reimplemented in G4PolarizedAnnihilationModel.

Definition at line 104 of file G4eeToTwoGammaModel.cc.

106 {
107  if(isInitialised) { return; }
109  isInitialised = true;
110 }
G4ParticleChangeForGamma * fParticleChange
G4ParticleChangeForGamma * GetParticleChangeForGamma()
Definition: G4VEmModel.cc:134
Here is the call graph for this function:

◆ operator=()

G4eeToTwoGammaModel& G4eeToTwoGammaModel::operator= ( const G4eeToTwoGammaModel right)
private

◆ SampleSecondaries()

void G4eeToTwoGammaModel::SampleSecondaries ( std::vector< G4DynamicParticle *> *  vdp,
const G4MaterialCutsCouple ,
const G4DynamicParticle dp,
G4double  tmin,
G4double  maxEnergy 
)
virtual

!! likely problematic direction to be checked

Implements G4VEmModel.

Reimplemented in G4PolarizedAnnihilationModel.

Definition at line 165 of file G4eeToTwoGammaModel.cc.

170 {
171  G4double PositKinEnergy = dp->GetKineticEnergy();
172  G4DynamicParticle *aGamma1, *aGamma2;
173 
174  CLHEP::HepRandomEngine* rndmEngine = G4Random::getTheEngine();
175 
176  // Case at rest
177  if(PositKinEnergy == 0.0) {
178  G4double cost = 2.*rndmEngine->flat()-1.;
179  G4double sint = sqrt((1. - cost)*(1. + cost));
180  G4double phi = twopi * G4UniformRand();
181  G4ThreeVector dir(sint*cos(phi), sint*sin(phi), cost);
182  phi = twopi * rndmEngine->flat();
183  G4ThreeVector pol(cos(phi), sin(phi), 0.0);
184  pol.rotateUz(dir);
186  aGamma1->SetPolarization(pol.x(),pol.y(),pol.z());
188  aGamma1->SetPolarization(-pol.x(),-pol.y(),-pol.z());
189 
190  } else {
191 
192  G4ThreeVector PositDirection = dp->GetMomentumDirection();
193 
194  G4double tau = PositKinEnergy/electron_mass_c2;
195  G4double gam = tau + 1.0;
196  G4double tau2 = tau + 2.0;
197  G4double sqgrate = sqrt(tau/tau2)*0.5;
198  G4double sqg2m1 = sqrt(tau*tau2);
199 
200  // limits of the energy sampling
201  G4double epsilmin = 0.5 - sqgrate;
202  G4double epsilmax = 0.5 + sqgrate;
203  G4double epsilqot = epsilmax/epsilmin;
204 
205  //
206  // sample the energy rate of the created gammas
207  //
208  G4double epsil, greject;
209 
210  do {
211  epsil = epsilmin*G4Exp(G4Log(epsilqot)*rndmEngine->flat());
212  greject = 1. - epsil + (2.*gam*epsil-1.)/(epsil*tau2*tau2);
213  // Loop checking, 03-Aug-2015, Vladimir Ivanchenko
214  } while( greject < rndmEngine->flat());
215 
216  //
217  // scattered Gamma angles. ( Z - axis along the parent positron)
218  //
219 
220  G4double cost = (epsil*tau2-1.)/(epsil*sqg2m1);
221  if(std::abs(cost) > 1.0) {
222  G4cout << "### G4eeToTwoGammaModel WARNING cost= " << cost
223  << " positron Ekin(MeV)= " << PositKinEnergy
224  << " gamma epsil= " << epsil
225  << G4endl;
226  if(cost > 1.0) cost = 1.0;
227  else cost = -1.0;
228  }
229  G4double sint = sqrt((1.+cost)*(1.-cost));
230  G4double phi = twopi * rndmEngine->flat();
231 
232  //
233  // kinematic of the created pair
234  //
235 
236  G4double TotalAvailableEnergy = PositKinEnergy + 2.0*electron_mass_c2;
237  G4double Phot1Energy = epsil*TotalAvailableEnergy;
238 
239  G4ThreeVector Phot1Direction(sint*cos(phi), sint*sin(phi), cost);
240  Phot1Direction.rotateUz(PositDirection);
241  aGamma1 = new G4DynamicParticle (theGamma,Phot1Direction, Phot1Energy);
242  phi = twopi * G4UniformRand();
243  G4ThreeVector pol1(cos(phi), sin(phi), 0.0);
244  pol1.rotateUz(Phot1Direction);
245  aGamma1->SetPolarization(pol1.x(),pol1.y(),pol1.z());
246 
247  G4double Phot2Energy =(1.-epsil)*TotalAvailableEnergy;
248  G4double PositP= sqrt(PositKinEnergy*(PositKinEnergy+2.*electron_mass_c2));
249  G4ThreeVector dir = PositDirection*PositP - Phot1Direction*Phot1Energy;
250  G4ThreeVector Phot2Direction = dir.unit();
251 
252  // create G4DynamicParticle object for the particle2
253  aGamma2 = new G4DynamicParticle (theGamma,Phot2Direction, Phot2Energy);
254 
256  aGamma2->SetPolarization(-pol1.x(),-pol1.y(),-pol1.z());
257  }
258  /*
259  G4cout << "Annihilation in fly: e0= " << PositKinEnergy
260  << " m= " << electron_mass_c2
261  << " e1= " << Phot1Energy
262  << " e2= " << Phot2Energy << " dir= " << dir
263  << " -> " << Phot1Direction << " "
264  << Phot2Direction << G4endl;
265  */
266 
267  vdp->push_back(aGamma1);
268  vdp->push_back(aGamma2);
269  fParticleChange->SetProposedKineticEnergy(0.);
270  fParticleChange->ProposeTrackStatus(fStopAndKill);
271 }
G4ParticleChangeForGamma * fParticleChange
virtual double flat()=0
TDirectory * dir
G4double GetKineticEnergy() const
#define G4UniformRand()
Definition: Randomize.hh:97
G4GLOB_DLL std::ostream G4cout
Hep3Vector unit() const
static const double twopi
Definition: G4SIunits.hh:75
float electron_mass_c2
Definition: hepunit.py:274
double flat()
Definition: G4AblaRandom.cc:47
void SetPolarization(G4double polX, G4double polY, G4double polZ)
G4double G4Log(G4double x)
Definition: G4Log.hh:230
G4double G4Exp(G4double initial_x)
Exponential Function double precision.
Definition: G4Exp.hh:183
const G4ThreeVector & GetMomentumDirection() const
G4ParticleDefinition * theGamma
#define G4endl
Definition: G4ios.hh:61
double G4double
Definition: G4Types.hh:76
Here is the call graph for this function:

Member Data Documentation

◆ fParticleChange

G4ParticleChangeForGamma* G4eeToTwoGammaModel::fParticleChange
private

Definition at line 106 of file G4eeToTwoGammaModel.hh.

◆ isInitialised

G4bool G4eeToTwoGammaModel::isInitialised
private

Definition at line 107 of file G4eeToTwoGammaModel.hh.

◆ pi_rcl2

G4double G4eeToTwoGammaModel::pi_rcl2
private

Definition at line 104 of file G4eeToTwoGammaModel.hh.

◆ theGamma

G4ParticleDefinition* G4eeToTwoGammaModel::theGamma
private

Definition at line 105 of file G4eeToTwoGammaModel.hh.


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