source: trunk/source/processes/hadronic/models/de_excitation/fermi_breakup/src/G4FermiConfiguration.cc @ 978

Last change on this file since 978 was 962, checked in by garnier, 15 years ago

update processes

File size: 6.8 KB
Line 
1//
2// ********************************************************************
3// * License and Disclaimer                                           *
4// *                                                                  *
5// * The  Geant4 software  is  copyright of the Copyright Holders  of *
6// * the Geant4 Collaboration.  It is provided  under  the terms  and *
7// * conditions of the Geant4 Software License,  included in the file *
8// * LICENSE and available at  http://cern.ch/geant4/license .  These *
9// * include a list of copyright holders.                             *
10// *                                                                  *
11// * Neither the authors of this software system, nor their employing *
12// * institutes,nor the agencies providing financial support for this *
13// * work  make  any representation or  warranty, express or implied, *
14// * regarding  this  software system or assume any liability for its *
15// * use.  Please see the license in the file  LICENSE  and URL above *
16// * for the full disclaimer and the limitation of liability.         *
17// *                                                                  *
18// * This  code  implementation is the result of  the  scientific and *
19// * technical work of the GEANT4 collaboration.                      *
20// * By using,  copying,  modifying or  distributing the software (or *
21// * any work based  on the software)  you  agree  to acknowledge its *
22// * use  in  resulting  scientific  publications,  and indicate your *
23// * acceptance of all terms of the Geant4 Software license.          *
24// ********************************************************************
25//
26//
27// $Id: G4FermiConfiguration.cc,v 1.9 2006/06/29 20:12:52 gunter Exp $
28// GEANT4 tag $Name: geant4-09-02-ref-02 $
29//
30// Hadronic Process: Nuclear De-excitations
31// by V. Lara (Nov 1998)
32//
33//
34
35
36#include "G4FermiConfiguration.hh"
37#include "G4FermiPhaseSpaceDecay.hh"
38#include <set>
39
40// Kappa = V/V_0 it is used in calculation of Coulomb energy
41// Kappa is adimensional
42const G4double G4FermiConfiguration::Kappa = 1.0;
43
44// r0 is the nuclear radius
45const G4double G4FermiConfiguration::r0 = 1.3*fermi;
46
47
48G4double G4FermiConfiguration::CoulombBarrier(void)
49{
50  //  Calculates Coulomb Barrier (MeV) for given channel with K fragments.
51  const G4double Coef = (3./5.)*(elm_coupling/r0)*std::pow(1./(1.+Kappa), 1./3.);
52
53  G4double SumA = 0;
54  G4double SumZ = 0;
55  G4double CoulombEnergy = 0.;
56  for (std::vector<const G4VFermiFragment*>::iterator i = Configuration.begin(); 
57       i != Configuration.end(); i++) 
58    {
59      G4double z = static_cast<G4double>((*i)->GetZ());
60      G4double a = static_cast<G4double>((*i)->GetA());
61      CoulombEnergy += (z*z) / std::pow(a, 1./3.);
62      SumA += a;
63      SumZ += z;
64    }
65  CoulombEnergy -= SumZ*SumZ/std::pow(SumA, 1./3.);
66  return -Coef * CoulombEnergy;
67}
68
69
70
71
72G4double G4FermiConfiguration::DecayProbability(const G4int A, const G4double TotalE)
73  // Decay probability  for a given channel with K fragments
74{
75  // A: Atomic Weight
76  // TotalE: Total energy of nucleus
77
78
79  G4double KineticEnergy = TotalE; // MeV
80  G4double ProdMass = 1.0;
81  G4double SumMass = 0.0;
82  G4double S_n = 1.0;
83  std::set<G4int>   combSet;
84  std::multiset<G4int> combmSet;
85 
86  for (std::vector<const G4VFermiFragment*>::iterator i = Configuration.begin(); 
87       i != Configuration.end(); i++) 
88    {
89      G4int a = (*i)->GetA();
90      combSet.insert(a);
91      combmSet.insert(a);
92      G4double m = (*i)->GetFragmentMass();
93      ProdMass *= m;
94      SumMass += m;
95      // Spin factor S_n
96      S_n *= (*i)->GetPolarization();
97      KineticEnergy -= m + (*i)->GetExcitationEnergy();
98    }
99
100  // Check that there is enough energy to produce K fragments
101  if (KineticEnergy <= 0.0) return 0.0;
102  if ((KineticEnergy -= this->CoulombBarrier()) <= 0.0) return 0.0;
103
104
105  G4double MassFactor = ProdMass/SumMass;
106  MassFactor *= std::sqrt(MassFactor); 
107 
108  // Number of fragments
109  G4int K = Configuration.size();
110
111  // This is the constant (doesn't depend on nucleus) part
112  const G4double ConstCoeff = std::pow(r0/hbarc,3.0)*Kappa*std::sqrt(2.0/pi)/3.0;
113  G4double Coeff = std::pow(ConstCoeff*A,K-1);
114
115
116  // Calculation of 1/Gamma(3(k-1)/2)
117  G4double Gamma = 1.0;
118  G4double arg = 3.0*(K-1)/2.0 - 1.0;
119  while (arg > 1.1) 
120    {
121      Gamma *= arg; 
122      arg--;
123    }
124  if ((K-1)%2 == 1) Gamma *= std::sqrt(pi);
125
126 
127 
128  // Permutation Factor G_n
129  G4double G_n = 1.0;
130  for (std::set<G4int>::iterator s = combSet.begin(); s != combSet.end(); ++s)
131    {
132      for (G4int ni = combmSet.count(*s); ni > 1; ni--) G_n *= ni;
133    }
134
135  G4double Weight = Coeff * MassFactor * (S_n / G_n) / Gamma;
136  Weight *= std::pow(KineticEnergy,3.0*(K-1)/2.0)/KineticEnergy;
137
138  return Weight; 
139}
140
141
142G4FragmentVector * G4FermiConfiguration::GetFragments(const G4Fragment & theNucleus)
143{
144 
145  G4FermiPhaseSpaceDecay thePhaseSpace;
146
147  // Calculate Momenta of K fragments
148  G4double M = theNucleus.GetMomentum().m();
149  std::vector<G4double> m;
150  m.reserve(Configuration.size());
151  std::vector<const G4VFermiFragment*>::iterator i;
152  for (i = Configuration.begin(); i != Configuration.end(); ++i)
153    {
154      m.push_back( (*i)->GetTotalEnergy() );
155    }
156  std::vector<G4LorentzVector*>* MomentumComponents = 
157    thePhaseSpace.Decay(M,m);
158 
159  G4FragmentVector * theResult = new G4FragmentVector;
160
161  G4ThreeVector boostVector = theNucleus.GetMomentum().boostVector(); 
162
163
164  // Go back to the Lab Frame
165  for (i = Configuration.begin(); i != Configuration.end(); ++i)
166    {
167#ifdef G4NO_ISO_VECDIST
168      std::vector<const G4VFermiFragment*>::difference_type n = 0;
169      std::distance(Configuration.begin(), i, n);
170      G4LorentzVector FourMomentum(*(MomentumComponents->operator[](n)));
171#else
172      G4LorentzVector FourMomentum(*(MomentumComponents->
173                                     operator[](std::distance(Configuration.begin(),i))));
174#endif
175   
176      // Lorentz boost
177      FourMomentum.boost(boostVector);
178     
179      G4FragmentVector * fragment = (*i)->GetFragment(FourMomentum);
180 
181 
182      for (G4FragmentVector::reverse_iterator ri = fragment->rbegin();
183           ri != fragment->rend(); ++ri)
184        {
185          theResult->push_back(*ri);
186        }
187      delete fragment;
188    }
189 
190  if (!MomentumComponents->empty())
191    {
192      std::for_each(MomentumComponents->begin(),MomentumComponents->end(),
193                      DeleteFragment());
194    }
195 
196  delete MomentumComponents;
197 
198  return theResult;
199}
200
201   
202G4ParticleMomentum G4FermiConfiguration::IsotropicVector(const G4double Magnitude)
203  // Samples a isotropic random vectorwith a magnitud given by Magnitude.
204  // By default Magnitude = 1.0
205{
206  G4double CosTheta = 1.0 - 2.0*G4UniformRand();
207  G4double SinTheta = std::sqrt(1.0 - CosTheta*CosTheta);
208  G4double Phi = twopi*G4UniformRand();
209  G4ParticleMomentum Vector(Magnitude*std::cos(Phi)*SinTheta,
210                            Magnitude*std::sin(Phi)*SinTheta,
211                            Magnitude*CosTheta);
212  return Vector;
213}
Note: See TracBrowser for help on using the repository browser.