Geant4  10.02.p03
G4VGammaDeexcitation Class Referenceabstract

#include <G4VGammaDeexcitation.hh>

Inheritance diagram for G4VGammaDeexcitation:
Collaboration diagram for G4VGammaDeexcitation:

Public Member Functions

 G4VGammaDeexcitation ()
 
virtual ~G4VGammaDeexcitation ()
 
virtual G4bool CanDoTransition (G4Fragment *aNucleus)=0
 
void DoChain (G4FragmentVector *, G4Fragment *nucleus)
 
G4FragmentGenerateGamma (G4Fragment *nucleus)
 
void SetVerboseLevel (G4int verbose)
 
void SetEO (G4ElectronOccupancy eo)
 
void SetVaccantSN (G4int val)
 
G4ElectronOccupancy GetEO ()
 
G4int GetVacantSN ()
 
void SetTimeLimit (G4double value)
 

Protected Attributes

G4VGammaTransition_transition
 
G4int _verbose
 
G4double _tolerance
 
G4double _timeLimit
 

Private Member Functions

 G4VGammaDeexcitation (const G4VGammaDeexcitation &right)
 
const G4VGammaDeexcitationoperator= (const G4VGammaDeexcitation &right)
 
G4bool operator== (const G4VGammaDeexcitation &right) const
 
G4bool operator!= (const G4VGammaDeexcitation &right) const
 

Private Attributes

G4ElectronOccupancy _electronO
 
G4int _vSN
 

Detailed Description

Definition at line 72 of file G4VGammaDeexcitation.hh.

Constructor & Destructor Documentation

◆ G4VGammaDeexcitation() [1/2]

G4VGammaDeexcitation::G4VGammaDeexcitation ( )

Definition at line 76 of file G4VGammaDeexcitation.cc.

76  : _transition(0), _verbose(0),
77  _electronO (0), _vSN(-1)
78 {
79  _tolerance = 0.1*CLHEP::keV;
81 }
G4ElectronOccupancy _electronO
G4VGammaTransition * _transition
#define DBL_MAX
Definition: templates.hh:83
static const double keV

◆ ~G4VGammaDeexcitation()

G4VGammaDeexcitation::~G4VGammaDeexcitation ( )
virtual

Definition at line 83 of file G4VGammaDeexcitation.cc.

84 {
85  delete _transition;
86 }
G4VGammaTransition * _transition

◆ G4VGammaDeexcitation() [2/2]

G4VGammaDeexcitation::G4VGammaDeexcitation ( const G4VGammaDeexcitation right)
private

Member Function Documentation

◆ CanDoTransition()

virtual G4bool G4VGammaDeexcitation::CanDoTransition ( G4Fragment aNucleus)
pure virtual

Implemented in G4DiscreteGammaDeexcitation, and G4ContinuumGammaDeexcitation.

Here is the caller graph for this function:

◆ DoChain()

void G4VGammaDeexcitation::DoChain ( G4FragmentVector products,
G4Fragment nucleus 
)

Definition at line 88 of file G4VGammaDeexcitation.cc.

90 {
91  if (_verbose > 1) { G4cout << "G4VGammaDeexcitation::DoChain" << G4endl; }
92 
93  if(CanDoTransition(nucleus)) {
94  for(size_t i=0; i<100; ++i) {
96  G4Fragment* gamma = GenerateGamma(nucleus);
97  if (gamma) { products->push_back(gamma); }
98  else { break; }
99  //G4cout << i << ". Egamma(MeV)= " << gamma->GetMomentum().e()
100  // << "; new Eex(MeV)= " << nucleus->GetExcitationEnergy()
101  // << G4endl;
102  if(nucleus->GetExcitationEnergy() <= _tolerance) { break; }
103  }
104  }
105  if (_verbose > 1) {
106  G4cout << "G4VGammaDeexcitation::DoChain - end" << G4endl;
107  }
108 }
G4double GetExcitationEnergy() const
Definition: G4Fragment.hh:273
virtual void SetEnergyFrom(G4double energy)=0
virtual G4bool CanDoTransition(G4Fragment *aNucleus)=0
G4GLOB_DLL std::ostream G4cout
G4Fragment * GenerateGamma(G4Fragment *nucleus)
G4VGammaTransition * _transition
#define G4endl
Definition: G4ios.hh:61
Here is the call graph for this function:
Here is the caller graph for this function:

◆ GenerateGamma()

G4Fragment * G4VGammaDeexcitation::GenerateGamma ( G4Fragment nucleus)

Definition at line 110 of file G4VGammaDeexcitation.cc.

111 {
112  G4Fragment * thePhoton = 0;
113  _vSN = -1;
114 
115  _transition->SelectGamma(); // it can be conversion electron too
116 
117  G4double etrans = _transition->GetGammaEnergy();
118 
119  //L.Desorgher 05/01/2015 need to add the bond energy for correct
120  // computation of a transition in case of ICM
121  G4DiscreteGammaTransition* dtransition =
122  dynamic_cast <G4DiscreteGammaTransition*> (_transition);
123  G4double bond_energy=0.;
124 
125  if (dtransition && !dtransition->IsAGamma()) {
126  bond_energy = dtransition->GetBondEnergy();
127  }
128  etrans += bond_energy;
129  //G4cout << "G4VGammaDeexcitation::GenerateGamma - Etrans(MeV)= "
130  // << etrans << G4endl;
131  if(etrans <= 0.0) { return thePhoton; }
132 
133  // final excitation
134  G4double excitation = aNucleus->GetExcitationEnergy() - etrans;
135  if(excitation <= _tolerance) { excitation = 0.0; }
136 
138  if (_verbose > 1) {
139  G4cout << "G4VGammaDeexcitation::GenerateGamma - Edeexc(MeV)= "
140  << etrans << "; Time(ns)= " << gammaTime/CLHEP::ns
141  << "; left Eexc(MeV)= " << excitation << G4endl;
142  }
143 
144  // Do complete Lorentz computation
145  G4LorentzVector lv = aNucleus->GetMomentum();
146  G4double Mass = aNucleus->GetGroundStateMass() + excitation;
147 
148  // select secondary
150 
151  if (dtransition && !dtransition->IsAGamma() ) {
152  gamma = G4Electron::Electron();
153  _vSN = dtransition->GetOrbitNumber();
155  //L. Desorgher 05/01/2015 need to remove atomic bond energy
156  // of the IC electron
157  lv += G4LorentzVector(0.0,0.0,0.0,
158  CLHEP::electron_mass_c2 - bond_energy);
159  }
160 
161  G4double cosTheta = 1. - 2. * G4UniformRand();
162  G4double sinTheta = std::sqrt(1. - cosTheta * cosTheta);
163  G4double phi = twopi * G4UniformRand();
164 
165  G4double eMass = gamma->GetPDGMass();
166  G4LorentzVector Gamma4P;
167  /*
168  G4cout << " Mass= " << eMass << " t= " << gammaTime
169  << " tlim= " << _timeLimit << G4endl;
170  */
171  // 2-body decay in rest frame
172  G4double Ecm = lv.mag();
173  G4ThreeVector bst = lv.boostVector();
174 
175  G4double GammaEnergy = 0.5*((Ecm - Mass)*(Ecm + Mass) + eMass*eMass)/Ecm;
176  if(GammaEnergy < eMass) { GammaEnergy = eMass; }
177 
178  G4double mom = std::sqrt((GammaEnergy - eMass)*(GammaEnergy + eMass));
179  Gamma4P.set(mom * sinTheta * std::cos(phi),
180  mom * sinTheta * std::sin(phi),
181  mom * cosTheta, GammaEnergy);
182 
183  // Lab system in normal case (_timeLimit = DBL_MAX)
184  if(gammaTime <= _timeLimit) {
185  Gamma4P.boost(bst);
186  lv -= Gamma4P;
187  } else {
188  // In exceptional case sample decay at rest at not correct position
189  // of stopping ion, 4-momentum balance is breaked but gamma energy
190  // is correct
191  lv -= Gamma4P;
192  G4double E = lv.e();
193  G4double P2= (E - Mass)*(E + Mass);
194  G4ThreeVector v = lv.vect().unit();
195  G4double p = 0.0;
196  if(P2 > 0.0) { p = std::sqrt(P2); }
197  else { E = Mass; }
198  lv.set(v.x()*p, v.y()*p, v.z()*p, E);
199  }
200 
201  // modified primary fragment
202  gammaTime += aNucleus->GetCreationTime();
203  aNucleus->SetMomentum(lv);
204  aNucleus->SetCreationTime(gammaTime);
205 
206  // gamma or e- are produced
207  thePhoton = new G4Fragment(Gamma4P,gamma);
208  thePhoton->SetCreationTime(gammaTime);
209 
210  //G4cout << "G4VGammaDeexcitation::GenerateGamma : " << thePhoton << G4endl;
211  //G4cout << " Left nucleus: " << aNucleus << G4endl;
212  return thePhoton;
213 }
G4double GetExcitationEnergy() const
Definition: G4Fragment.hh:273
virtual G4double GetGammaEnergy()=0
G4ElectronOccupancy _electronO
Hep3Vector vect() const
#define G4UniformRand()
Definition: Randomize.hh:97
G4GLOB_DLL std::ostream G4cout
virtual void SelectGamma()=0
HepLorentzVector & boost(double, double, double)
Hep3Vector unit() const
static const double twopi
Definition: G4SIunits.hh:75
static G4Gamma * Gamma()
Definition: G4Gamma.cc:86
double x() const
void SetCreationTime(G4double time)
Definition: G4Fragment.hh:425
void set(double x, double y, double z, double t)
double y() const
Hep3Vector boostVector() const
double z() const
G4VGammaTransition * _transition
static const G4double * P2[nN]
static G4Electron * Electron()
Definition: G4Electron.cc:94
#define G4endl
Definition: G4ios.hh:61
double G4double
Definition: G4Types.hh:76
static const double ns
static const double electron_mass_c2
G4int RemoveElectron(G4int orbit, G4int number=1)
CLHEP::HepLorentzVector G4LorentzVector
virtual G4double GetGammaCreationTime()=0
Here is the call graph for this function:
Here is the caller graph for this function:

◆ GetEO()

G4ElectronOccupancy G4VGammaDeexcitation::GetEO ( )
inline

Definition at line 94 of file G4VGammaDeexcitation.hh.

94 { return _electronO; };
G4ElectronOccupancy _electronO

◆ GetVacantSN()

G4int G4VGammaDeexcitation::GetVacantSN ( )
inline

Definition at line 95 of file G4VGammaDeexcitation.hh.

95 { return _vSN;};
Here is the caller graph for this function:

◆ operator!=()

G4bool G4VGammaDeexcitation::operator!= ( const G4VGammaDeexcitation right) const
private

◆ operator=()

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

◆ operator==()

G4bool G4VGammaDeexcitation::operator== ( const G4VGammaDeexcitation right) const
private

◆ SetEO()

void G4VGammaDeexcitation::SetEO ( G4ElectronOccupancy  eo)
inline

Definition at line 91 of file G4VGammaDeexcitation.hh.

91 { _electronO = eo; };
G4ElectronOccupancy _electronO
Here is the caller graph for this function:

◆ SetTimeLimit()

void G4VGammaDeexcitation::SetTimeLimit ( G4double  value)
inline

Definition at line 97 of file G4VGammaDeexcitation.hh.

97 { _timeLimit = value; }
Here is the caller graph for this function:

◆ SetVaccantSN()

void G4VGammaDeexcitation::SetVaccantSN ( G4int  val)
inline

Definition at line 92 of file G4VGammaDeexcitation.hh.

92 { _vSN = val;};

◆ SetVerboseLevel()

void G4VGammaDeexcitation::SetVerboseLevel ( G4int  verbose)
inline

Definition at line 87 of file G4VGammaDeexcitation.hh.

87 { _verbose = verbose; };
Here is the caller graph for this function:

Member Data Documentation

◆ _electronO

G4ElectronOccupancy G4VGammaDeexcitation::_electronO
private

Definition at line 113 of file G4VGammaDeexcitation.hh.

◆ _timeLimit

G4double G4VGammaDeexcitation::_timeLimit
protected

Definition at line 104 of file G4VGammaDeexcitation.hh.

◆ _tolerance

G4double G4VGammaDeexcitation::_tolerance
protected

Definition at line 103 of file G4VGammaDeexcitation.hh.

◆ _transition

G4VGammaTransition* G4VGammaDeexcitation::_transition
protected

Definition at line 101 of file G4VGammaDeexcitation.hh.

◆ _verbose

G4int G4VGammaDeexcitation::_verbose
protected

Definition at line 102 of file G4VGammaDeexcitation.hh.

◆ _vSN

G4int G4VGammaDeexcitation::_vSN
private

Definition at line 114 of file G4VGammaDeexcitation.hh.


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