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

#include <G4ContinuumGammaTransition.hh>

+ Inheritance diagram for G4ContinuumGammaTransition:

Public Member Functions

 G4ContinuumGammaTransition (const G4NuclearLevelManager *levelManager, G4int Z, G4int A, G4double excitation, G4int verbose)
 
virtual ~G4ContinuumGammaTransition ()
 
virtual void SetEnergyFrom (G4double energy)
 
virtual G4double GetGammaEnergy ()
 
virtual G4double GetGammaCreationTime ()
 
virtual void SelectGamma ()
 
- Public Member Functions inherited from G4VGammaTransition
 G4VGammaTransition ()
 
virtual ~G4VGammaTransition ()
 
virtual void SelectGamma ()=0
 
virtual G4double GetGammaEnergy ()=0
 
virtual G4double GetGammaCreationTime ()=0
 
virtual void SetEnergyFrom (G4double energy)=0
 

Additional Inherited Members

- Protected Attributes inherited from G4VGammaTransition
G4int _verbose
 

Detailed Description

Definition at line 59 of file G4ContinuumGammaTransition.hh.

Constructor & Destructor Documentation

◆ G4ContinuumGammaTransition()

G4ContinuumGammaTransition::G4ContinuumGammaTransition ( const G4NuclearLevelManager levelManager,
G4int  Z,
G4int  A,
G4double  excitation,
G4int  verbose 
)

Definition at line 66 of file G4ContinuumGammaTransition.cc.

70 :
71 _nucleusA(A), _nucleusZ(Z), _excitation(excitation), _levelManager(levelManager)
72{
73 G4double eTolerance = 0.;
74 G4int lastButOne = _levelManager->NumberOfLevels() - 2;
75 if (lastButOne >= 0)
76 {
77 eTolerance = (_levelManager->MaxLevelEnergy() -
78 _levelManager->GetLevel(lastButOne)->Energy());
79 if (eTolerance < 0.) eTolerance = 0.;
80 }
81
82
83 _verbose = verbose;
84 _eGamma = 0.;
85 _gammaCreationTime = 0.;
86
87 _maxLevelE = _levelManager->MaxLevelEnergy() + eTolerance;
88 _minLevelE = _levelManager->MinLevelEnergy();
89
90 // Energy range for photon generation; upper limit is defined 5*Gamma(GDR) from GDR peak
91 _eMin = 0.001 * MeV;
92 // Giant Dipole Resonance energy
93 G4double energyGDR = (40.3 / G4Pow::GetInstance()->powZ(_nucleusA,0.2) ) * MeV;
94 // Giant Dipole Resonance width
95 G4double widthGDR = 0.30 * energyGDR;
96 // Extend
97 G4double factor = 5;
98 _eMax = energyGDR + factor * widthGDR;
99 if (_eMax > excitation) _eMax = _excitation;
100
101}
double G4double
Definition: G4Types.hh:64
int G4int
Definition: G4Types.hh:66
const G4NuclearLevel * GetLevel(G4int i) const
G4double Energy() const
static G4Pow * GetInstance()
Definition: G4Pow.cc:50
G4double powZ(G4int Z, G4double y)
Definition: G4Pow.hh:180

◆ ~G4ContinuumGammaTransition()

G4ContinuumGammaTransition::~G4ContinuumGammaTransition ( )
virtual

Definition at line 107 of file G4ContinuumGammaTransition.cc.

108{}

Member Function Documentation

◆ GetGammaCreationTime()

G4double G4ContinuumGammaTransition::GetGammaCreationTime ( )
virtual

Implements G4VGammaTransition.

Definition at line 167 of file G4ContinuumGammaTransition.cc.

168{
169 return _gammaCreationTime;
170}

◆ GetGammaEnergy()

G4double G4ContinuumGammaTransition::GetGammaEnergy ( )
virtual

Implements G4VGammaTransition.

Definition at line 162 of file G4ContinuumGammaTransition.cc.

163{
164 return _eGamma;
165}

◆ SelectGamma()

void G4ContinuumGammaTransition::SelectGamma ( )
virtual

Implements G4VGammaTransition.

Definition at line 110 of file G4ContinuumGammaTransition.cc.

111{
112
113 _eGamma = 0.;
114
115 G4int nBins = 200;
116 G4double sampleArray[200];
117 G4int i;
118 for (i=0; i<nBins; i++)
119 {
120 G4double e = _eMin + ( (_eMax - _eMin) / nBins) * i;
121 sampleArray[i] = E1Pdf(e);
122
123 if(_verbose > 10)
124 G4cout << "*---* G4ContinuumTransition: e = " << e
125 << " pdf = " << sampleArray[i] << G4endl;
126 }
127 G4RandGeneralTmp randGeneral(sampleArray, nBins);
128 G4double random = randGeneral.shoot();
129
130 _eGamma = _eMin + (_eMax - _eMin) * random;
131
132 G4double finalExcitation = _excitation - _eGamma;
133
134 if(_verbose > 10) {
135 G4cout << "*---*---* G4ContinuumTransition: eGamma = " << _eGamma
136 << " finalExcitation = " << finalExcitation
137 << " random = " << random << G4endl;
138 }
139 // if (finalExcitation < 0)
140 if(finalExcitation < _minLevelE/2.)
141 {
142 _eGamma = _excitation;
143 finalExcitation = 0.;
144 }
145
146 if (finalExcitation < _maxLevelE && finalExcitation > 0.)
147 {
148 G4double levelE = _levelManager->NearestLevel(finalExcitation)->Energy();
149 G4double diff = finalExcitation - levelE;
150 _eGamma = _eGamma + diff;
151 }
152
153 _gammaCreationTime = GammaTime();
154
155 if(_verbose > 10) {
156 G4cout << "*---*---* G4ContinuumTransition: _gammaCreationTime = "
157 << _gammaCreationTime/second << G4endl;
158 }
159 return;
160}
#define G4endl
Definition: G4ios.hh:52
G4DLLIMPORT std::ostream G4cout
const G4NuclearLevel * NearestLevel(G4double energy, G4double eDiffMax=9999.*CLHEP::GeV) const

◆ SetEnergyFrom()

void G4ContinuumGammaTransition::SetEnergyFrom ( G4double  energy)
virtual

Implements G4VGammaTransition.

Definition at line 173 of file G4ContinuumGammaTransition.cc.

174{
175 if (energy > 0.) _excitation = energy;
176}

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