Geant4.10
 All Data Structures Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
Public Member Functions | Protected Member Functions | Protected Attributes
G4VGammaDeexcitation Class Referenceabstract

#include <G4VGammaDeexcitation.hh>

Inheritance diagram for G4VGammaDeexcitation:
G4ContinuumGammaDeexcitation G4DiscreteGammaDeexcitation

Public Member Functions

 G4VGammaDeexcitation ()
 
virtual ~G4VGammaDeexcitation ()
 
virtual G4VGammaTransitionCreateTransition ()=0
 
virtual G4bool CanDoTransition ()=0
 
G4FragmentVectorDoTransition ()
 
G4FragmentVectorDoChain ()
 
G4FragmentGenerateGamma ()
 
G4FragmentGetNucleus ()
 
void SetNucleus (G4Fragment *nucleus)
 
void SetVerboseLevel (G4int verbose)
 
void Initialize ()
 
void SetEO (G4ElectronOccupancy eo)
 
void SetVaccantSN (G4int val)
 
G4ElectronOccupancy GetEO ()
 
G4int GetVacantSN ()
 
void SetTimeLimit (G4double value)
 

Protected Member Functions

void Update ()
 

Protected Attributes

G4VGammaTransition_transition
 
G4int _verbose
 

Detailed Description

Definition at line 72 of file G4VGammaDeexcitation.hh.

Constructor & Destructor Documentation

G4VGammaDeexcitation::G4VGammaDeexcitation ( )

Definition at line 76 of file G4VGammaDeexcitation.cc.

References DBL_MAX.

76  : _transition(0), _verbose(0),
77  _electronO (0), _vSN(-1)
78 {
79  _nucleus = 0;
80  fTimeLimit = DBL_MAX;
81 }
G4VGammaTransition * _transition
#define DBL_MAX
Definition: templates.hh:83
G4VGammaDeexcitation::~G4VGammaDeexcitation ( )
virtual

Definition at line 83 of file G4VGammaDeexcitation.cc.

References _transition.

84 {
85  if (_transition != 0) { delete _transition; }
86 }
G4VGammaTransition * _transition

Member Function Documentation

virtual G4bool G4VGammaDeexcitation::CanDoTransition ( )
pure virtual
virtual G4VGammaTransition* G4VGammaDeexcitation::CreateTransition ( )
pure virtual
G4FragmentVector * G4VGammaDeexcitation::DoChain ( )

Definition at line 106 of file G4VGammaDeexcitation.cc.

References _transition, _verbose, CanDoTransition(), G4cout, G4endl, GenerateGamma(), G4Fragment::GetExcitationEnergy(), Initialize(), G4VGammaTransition::SetEnergyFrom(), and Update().

Referenced by G4PhotonEvaporation::BreakItUp(), and G4PhotonEvaporation::BreakUpFragment().

107 {
108  if (_verbose > 1) { G4cout << "G4VGammaDeexcitation::DoChain" << G4endl; }
109  const G4double tolerance = CLHEP::keV;
110 
111  Initialize();
112  G4FragmentVector* products = new G4FragmentVector();
113 
114  while (CanDoTransition())
115  {
117  G4Fragment* gamma = GenerateGamma();
118  if (gamma != 0)
119  {
120  products->push_back(gamma);
121  //G4cout << "Eex(keV)= " << _nucleus->GetExcitationEnergy()/keV << G4endl;
122  if(_nucleus->GetExcitationEnergy() <= tolerance) { break; }
123  Update();
124  }
125  }
126 
127  if (_verbose > 1) {
128  G4cout << "G4VGammaDeexcitation::DoChain - Transition deleted, end of chain " << G4endl;
129  }
130 
131  return products;
132 }
virtual G4bool CanDoTransition()=0
virtual void SetEnergyFrom(G4double energy)=0
G4GLOB_DLL std::ostream G4cout
std::vector< G4Fragment * > G4FragmentVector
Definition: G4Fragment.hh:65
G4VGammaTransition * _transition
#define G4endl
Definition: G4ios.hh:61
double G4double
Definition: G4Types.hh:76
G4double GetExcitationEnergy() const
Definition: G4Fragment.hh:255
G4FragmentVector * G4VGammaDeexcitation::DoTransition ( )

Definition at line 88 of file G4VGammaDeexcitation.cc.

References _verbose, CanDoTransition(), G4cout, G4endl, GenerateGamma(), and Initialize().

Referenced by G4PhotonEvaporation::BreakUp().

89 {
90  Initialize();
91  G4FragmentVector* products = new G4FragmentVector();
92 
93  if (CanDoTransition())
94  {
95  G4Fragment* gamma = GenerateGamma();
96  if (gamma != 0) { products->push_back(gamma); }
97  }
98 
99  if (_verbose > 1) {
100  G4cout << "G4VGammaDeexcitation::DoTransition - Transition deleted " << G4endl;
101  }
102 
103  return products;
104 }
virtual G4bool CanDoTransition()=0
G4GLOB_DLL std::ostream G4cout
std::vector< G4Fragment * > G4FragmentVector
Definition: G4Fragment.hh:65
#define G4endl
Definition: G4ios.hh:61
G4Fragment * G4VGammaDeexcitation::GenerateGamma ( )

Definition at line 134 of file G4VGammaDeexcitation.cc.

References _transition, _verbose, CLHEP::HepLorentzVector::boost(), CLHEP::HepLorentzVector::boostVector(), CLHEP::HepLorentzVector::e(), G4Electron::Electron(), G4cout, G4endl, G4UniformRand, G4Gamma::Gamma(), G4DiscreteGammaTransition::GetBondEnergy(), G4Fragment::GetCreationTime(), G4Fragment::GetExcitationEnergy(), G4VGammaTransition::GetGammaCreationTime(), G4VGammaTransition::GetGammaEnergy(), G4Fragment::GetGroundStateMass(), G4DiscreteGammaTransition::GetICM(), G4Fragment::GetMomentum(), G4DiscreteGammaTransition::GetOrbitNumber(), G4ParticleDefinition::GetPDGMass(), G4DiscreteGammaTransition::IsAGamma(), CLHEP::HepLorentzVector::mag(), G4ElectronOccupancy::RemoveElectron(), G4VGammaTransition::SelectGamma(), CLHEP::HepLorentzVector::set(), G4Fragment::SetCreationTime(), G4Fragment::SetMomentum(), python.hepunit::twopi, CLHEP::Hep3Vector::unit(), test::v, CLHEP::HepLorentzVector::vect(), CLHEP::Hep3Vector::x(), CLHEP::Hep3Vector::y(), and CLHEP::Hep3Vector::z().

Referenced by DoChain(), DoTransition(), and G4PhotonEvaporation::EmittedFragment().

135 {
136  // 23/04/10 V.Ivanchenko rewrite complitely
137  G4double eGamma = 0.;
138 
139  if (_transition) {
140  _transition->SelectGamma(); // it can be conversion electron too
141  eGamma = _transition->GetGammaEnergy();
142  //G4cout << "G4VGammaDeexcitation::GenerateGamma - Egam(MeV)= "
143  // << eGamma << G4endl;
144  if(eGamma <= 0.0) { return 0; }
145  } else { return 0; }
146 
147  G4double excitation = _nucleus->GetExcitationEnergy() - eGamma;
148  if(excitation < 0.0) { excitation = 0.0; }
149  if (_verbose > 1)
150  {
151  G4cout << "G4VGammaDeexcitation::GenerateGamma - Edeexc(MeV)= " << eGamma
152  << " ** left Eexc(MeV)= " << excitation
153  << G4endl;
154  }
155 
157 
158  // Do complete Lorentz computation
159  G4LorentzVector lv = _nucleus->GetMomentum();
160  G4double Mass = _nucleus->GetGroundStateMass() + excitation;
161 
162  // select secondary
164 
165  G4DiscreteGammaTransition* dtransition =
166  dynamic_cast <G4DiscreteGammaTransition*> (_transition);
167 
168  G4bool eTransition = false;
169  if (dtransition && !( dtransition->IsAGamma()) ) {
170  eTransition = true;
171  gamma = G4Electron::Electron();
172  _vSN = dtransition->GetOrbitNumber();
173  _electronO.RemoveElectron(_vSN);
174  lv += G4LorentzVector(0.0,0.0,0.0,CLHEP::electron_mass_c2 - dtransition->GetBondEnergy());
175  }
176 
177  G4double cosTheta = 1. - 2. * G4UniformRand();
178  G4double sinTheta = std::sqrt(1. - cosTheta * cosTheta);
179  G4double phi = twopi * G4UniformRand();
180 
181  G4double eMass = gamma->GetPDGMass();
182  G4LorentzVector Gamma4P;
183 
184  //G4cout << "Egamma= " << eGamma << " Mass= " << eMass << " t= " << gammaTime
185  // << " tlim= " << fTimeLimit << G4endl;
186 
187  if(gammaTime > fTimeLimit) {
188  // shortcut for long lived levels
189  // not correct position of stopping ion gamma emission
190  // 4-momentum balance is breaked
191  G4double e = eGamma + eMass;
192  G4double mom = std::sqrt(eGamma*(eGamma + 2*eMass));
193  Gamma4P.set(mom * sinTheta * std::cos(phi),
194  mom * sinTheta * std::sin(phi),
195  mom * cosTheta, e);
196  lv -= Gamma4P;
197  e = lv.e();
198  if(e < Mass) { e = Mass; }
199  mom = std::sqrt((e - Mass)*(e + Mass));
200  G4ThreeVector v = lv.vect().unit();
201  lv.set(mom*v.x(), mom*v.y(), mom*v.z(), e);
202 
203  } else {
204  // 2-body decay in rest frame
205  G4double Ecm = lv.mag();
206  G4ThreeVector bst = lv.boostVector();
207 
208  G4double GammaEnergy = 0.5*((Ecm - Mass)*(Ecm + Mass) + eMass*eMass)/Ecm;
209  if(GammaEnergy <= eMass) { return 0; }
210 
211  G4double mom = std::sqrt((GammaEnergy - eMass)*(GammaEnergy + eMass));
212  Gamma4P.set(mom * sinTheta * std::cos(phi),
213  mom * sinTheta * std::sin(phi),
214  mom * cosTheta,
215  GammaEnergy);
216 
217  Gamma4P.boost(bst);
218  lv -= Gamma4P;
219  }
220 
221  // modified primary fragment
222  gammaTime += _nucleus->GetCreationTime();
223 
224  _nucleus->SetMomentum(lv);
225  _nucleus->SetCreationTime(gammaTime);
226 
227  // e- is not produced
228  if(eTransition && !dtransition->GetICM()) { return 0; }
229 
230  // gamma or e- are produced
231  G4Fragment * thePhoton = new G4Fragment(Gamma4P,gamma);
232  thePhoton->SetCreationTime(gammaTime);
233 
234  //G4cout << "G4VGammaDeexcitation::GenerateGamma : " << thePhoton << G4endl;
235  //G4cout << " Left nucleus: " << _nucleus << G4endl;
236  return thePhoton;
237 }
Hep3Vector boostVector() const
virtual G4double GetGammaEnergy()=0
double x() const
double z() const
Hep3Vector vect() const
#define G4UniformRand()
Definition: Randomize.hh:87
G4GLOB_DLL std::ostream G4cout
virtual void SelectGamma()=0
G4double GetCreationTime() const
Definition: G4Fragment.hh:398
double mag() const
bool G4bool
Definition: G4Types.hh:79
const G4LorentzVector & GetMomentum() const
Definition: G4Fragment.hh:271
HepLorentzVector & boost(double, double, double)
void SetMomentum(const G4LorentzVector &value)
Definition: G4Fragment.hh:276
G4double GetGroundStateMass() const
Definition: G4Fragment.hh:260
static G4Gamma * Gamma()
Definition: G4Gamma.cc:86
void SetCreationTime(G4double time)
Definition: G4Fragment.hh:403
void set(double x, double y, double z, double t)
G4double GetPDGMass() const
Hep3Vector unit() const
double y() const
G4VGammaTransition * _transition
static G4Electron * Electron()
Definition: G4Electron.cc:94
#define G4endl
Definition: G4ios.hh:61
double G4double
Definition: G4Types.hh:76
G4double GetExcitationEnergy() const
Definition: G4Fragment.hh:255
G4int RemoveElectron(G4int orbit, G4int number=1)
CLHEP::HepLorentzVector G4LorentzVector
virtual G4double GetGammaCreationTime()=0
G4ElectronOccupancy G4VGammaDeexcitation::GetEO ( )
inline

Definition at line 102 of file G4VGammaDeexcitation.hh.

Referenced by G4PhotonEvaporation::BreakItUp(), G4PhotonEvaporation::BreakUp(), and G4PhotonEvaporation::BreakUpFragment().

102 { return _electronO; };
G4Fragment * G4VGammaDeexcitation::GetNucleus ( )
inline
G4int G4VGammaDeexcitation::GetVacantSN ( )
inline
void G4VGammaDeexcitation::Initialize ( )
inline

Definition at line 143 of file G4VGammaDeexcitation.hh.

References _transition, CreateTransition(), G4Fragment::GetExcitationEnergy(), and G4VGammaTransition::SetEnergyFrom().

Referenced by DoChain(), DoTransition(), and G4PhotonEvaporation::EmittedFragment().

144 {
145  if (_transition != 0) { delete _transition; }
147  if (_transition != 0) {
149  }
150 }
virtual void SetEnergyFrom(G4double energy)=0
virtual G4VGammaTransition * CreateTransition()=0
G4VGammaTransition * _transition
G4double GetExcitationEnergy() const
Definition: G4Fragment.hh:255
void G4VGammaDeexcitation::SetEO ( G4ElectronOccupancy  eo)
inline

Definition at line 99 of file G4VGammaDeexcitation.hh.

Referenced by G4PhotonEvaporation::SetEOccupancy().

99 { _electronO = eo; };
void G4VGammaDeexcitation::SetNucleus ( G4Fragment nucleus)
inline
void G4VGammaDeexcitation::SetTimeLimit ( G4double  value)
inline

Definition at line 105 of file G4VGammaDeexcitation.hh.

Referenced by G4PhotonEvaporation::G4PhotonEvaporation(), and G4PhotonEvaporation::SetTimeLimit().

105 { fTimeLimit = value; }
const XML_Char int const XML_Char * value
void G4VGammaDeexcitation::SetVaccantSN ( G4int  val)
inline
void G4VGammaDeexcitation::SetVerboseLevel ( G4int  verbose)
inline

Definition at line 138 of file G4VGammaDeexcitation.hh.

References _verbose.

Referenced by G4PhotonEvaporation::SetVerboseLevel().

139 {
140  _verbose = verbose;
141 }
void G4VGammaDeexcitation::Update ( )
protected

Definition at line 239 of file G4VGammaDeexcitation.cc.

References _transition, _verbose, CreateTransition(), G4cout, G4endl, G4Fragment::GetExcitationEnergy(), and G4VGammaTransition::SetEnergyFrom().

Referenced by DoChain().

240 {
241  if (_transition != 0)
242  {
243  delete _transition;
244  _transition = 0;
245  if (_verbose > 1) {
246  G4cout << "G4VGammaDeexcitation::Update - Transition deleted " << G4endl;
247  }
248  }
249 
251  if (_transition != 0)
252  {
254  // if ( _vSN != -1) (dynamic_cast <G4DiscreteGammaTransition*> (_transition))->SetICM(false);
255  // the above line is commented out for bug fix #952. It was intruduced for reason that
256  // the k-shell electron is most likely one to be kicked out and there is no time for
257  // the atom to deexcite before the next IC. But this limitation is causing other problems as
258  // reported in #952
259  }
260 
261  return;
262 }
virtual void SetEnergyFrom(G4double energy)=0
virtual G4VGammaTransition * CreateTransition()=0
G4GLOB_DLL std::ostream G4cout
G4VGammaTransition * _transition
#define G4endl
Definition: G4ios.hh:61
G4double GetExcitationEnergy() const
Definition: G4Fragment.hh:255

Field Documentation

G4VGammaTransition* G4VGammaDeexcitation::_transition
protected
G4int G4VGammaDeexcitation::_verbose
protected

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