source: trunk/source/processes/hadronic/models/pre_equilibrium/exciton_model/src/G4PreCompoundModel.cc @ 962

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

update processes

File size: 16.4 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: G4PreCompoundModel.cc,v 1.17 2008/12/09 14:09:59 ahoward Exp $
28// GEANT4 tag $Name: geant4-09-02-ref-02 $
29//
30// by V. Lara
31//
32//J. M. Quesada (Apr.08). Several changes. Soft cut-off switched off.
33//(May. 08). Protection against non-physical preeq. transitional regime has
34// been set
35//
36// Modif (03 September 2008) by J. M. Quesada for external choice of inverse
37// cross section option
38// JMQ (06 September 2008) Also external choices have been added for:
39//                      - superimposed Coulomb barrier (useSICB=true)
40//                      - "never go back"  hipothesis (useNGB=true)
41//                      - soft cutoff from preeq. to equlibrium (useSCO=true)
42//                      - CEM transition probabilities (useCEMtr=true) 
43
44
45#include "G4PreCompoundModel.hh"
46#include "G4PreCompoundEmission.hh"
47#include "G4PreCompoundTransitions.hh"
48#include "G4GNASHTransitions.hh"
49#include "G4ParticleDefinition.hh"
50
51
52#ifdef PRECOMPOUND_TEST
53G4Fragment G4PreCompoundModel::theInitialFragmentForTest;
54std::vector<G4String*> G4PreCompoundModel::theCreatorModels;
55#endif
56
57const G4PreCompoundModel & G4PreCompoundModel::operator=(const G4PreCompoundModel &)
58{
59  throw G4HadronicException(__FILE__, __LINE__, "G4PreCompoundModel::operator= meant to not be accessable");
60  return *this;
61}
62
63
64G4bool G4PreCompoundModel::operator==(const G4PreCompoundModel &) const
65{
66  return false;
67}
68
69G4bool G4PreCompoundModel::operator!=(const G4PreCompoundModel &) const
70{
71  return true;
72}
73
74
75
76// Additional Declarations
77
78G4HadFinalState * G4PreCompoundModel::ApplyYourself(const G4HadProjectile & thePrimary,
79                                                    G4Nucleus & theNucleus)
80{ 
81  // prepare fragment
82  G4Fragment anInitialState;
83  // This si for GNASH transitions
84  anInitialState.SetParticleDefinition(const_cast<G4ParticleDefinition *>(thePrimary.GetDefinition()));
85
86  G4int anA=static_cast<G4int>(theNucleus.GetN());
87  anA += thePrimary.GetDefinition()->GetBaryonNumber();
88
89  anInitialState.SetA(anA);
90 
91  G4int aZ=static_cast<G4int>(theNucleus.GetZ());
92  aZ += static_cast<G4int>(thePrimary.GetDefinition()->GetPDGCharge());
93
94  anInitialState.SetZ(aZ);
95 
96  // Assume the projectile is a nucleon
97 
98  // Number of Excited Particles
99  anInitialState.SetNumberOfParticles(1+thePrimary.GetDefinition()->GetBaryonNumber());
100 
101  // Number of Charged Excited Particles
102  // JMQ/AH modify number of charged particles with probability of the Z/A ratio of the nucleus:
103  //  if(G4UniformRand() <= aZ/anA) BUG! - integer arithmetic
104  if(G4UniformRand() <= (static_cast<G4double>(aZ))/(static_cast<G4double>(anA))) 
105      anInitialState.SetNumberOfCharged(static_cast<G4int>(thePrimary.GetDefinition()->GetPDGCharge()+.01) + 1);
106  else
107      anInitialState.SetNumberOfCharged(static_cast<G4int>(thePrimary.GetDefinition()->GetPDGCharge()+.01));
108   
109//AH     anInitialState.SetNumberOfCharged(static_cast<G4int>(thePrimary.GetDefinition()->GetPDGCharge()+.01) +
110//AH                                static_cast<G4int>(0.5+G4UniformRand()));
111
112  // Number of Holes
113  anInitialState.SetNumberOfHoles(1);
114 
115  // pre-compound nucleus energy.
116  G4double anEnergy = 0;
117  G4double nucleusMass =  G4ParticleTable::GetParticleTable()->GetIonTable()->GetIonMass(static_cast<G4int>(theNucleus.GetZ()),
118                                                                                         static_cast<G4int>(theNucleus.GetN()));
119  anEnergy =  nucleusMass + thePrimary.GetTotalEnergy();
120 
121  // Momentum
122  G4ThreeVector p = thePrimary.Get4Momentum().vect();
123
124  // 4-momentum
125  G4LorentzVector momentum(p, anEnergy);
126  anInitialState.SetMomentum(momentum);
127 
128#ifdef PRECOMPOUND_TEST
129  G4PreCompoundModel::theInitialFragmentForTest = anInitialState;
130#endif
131 
132  // call excitation handler
133  const G4Fragment aFragment(anInitialState);
134  G4ReactionProductVector * result = DeExcite(aFragment);
135
136#ifdef PRECOMPOUND_TEST
137  for (std::vector<G4String*>::iterator icm = theCreatorModels.begin(); 
138       icm != theCreatorModels.end(); ++icm )
139    {
140      delete (*icm);
141    }
142  theCreatorModels.clear();
143#endif
144  // fill particle change
145  theResult.Clear();
146  theResult.SetStatusChange(stopAndKill);
147  for(G4ReactionProductVector::iterator i= result->begin(); i != result->end(); ++i)
148    {
149      G4DynamicParticle * aNew = 
150        new G4DynamicParticle((*i)->GetDefinition(),
151                              (*i)->GetTotalEnergy(),
152                              (*i)->GetMomentum());
153#ifdef PRECOMPOUND_TEST
154      theCreatorModels.push_back(new G4String((*i)->GetCreatorModel()));
155#endif
156      delete (*i);
157      theResult.AddSecondary(aNew);
158    }
159  delete result;
160 
161  //return the filled particle change
162  return &theResult;
163}
164
165
166/////////////////////////////////////////////////////////////////////////////////////////
167/////////////////////////////////////////////////////////////////////////////////////////
168
169G4ReactionProductVector* G4PreCompoundModel::DeExcite(const G4Fragment & theInitialState) const
170{
171 
172  G4ReactionProductVector * Result = new G4ReactionProductVector;
173 
174  // Copy of the initial state
175  G4Fragment aFragment(theInitialState);
176
177  if (aFragment.GetExcitationEnergy() < 10*eV)
178    {
179      // Perform Equilibrium Emission
180      PerformEquilibriumEmission(aFragment,Result);
181      return Result;
182    }
183 
184  if (aFragment.GetA() < 5) {
185    G4ReactionProduct * theRP = new G4ReactionProduct(G4ParticleTable::GetParticleTable()->
186                                                      GetIon(static_cast<G4int>(aFragment.GetZ()),
187                                                             static_cast<G4int>(aFragment.GetA()),
188                                                             aFragment.GetExcitationEnergy()));
189    theRP->SetMomentum(aFragment.GetMomentum().vect());
190    theRP->SetTotalEnergy(aFragment.GetMomentum().e());   
191    Result->push_back(theRP);
192    return Result;
193  }
194 
195  G4PreCompoundEmission aEmission;
196  if (useHETCEmission) aEmission.SetHETCModel();
197  aEmission.SetUp(theInitialState);
198 
199  //for cross section options
200 
201  if (OPTxs!= 0 && OPTxs!=1 && OPTxs !=2 && OPTxs !=3 && OPTxs !=4  ) {
202    std::ostringstream errOs;
203    errOs << "BAD CROSS SECTION OPTION in G4PreCompoundModel.cc !!"  <<G4endl;
204    throw G4HadronicException(__FILE__, __LINE__, errOs.str());}
205  else aEmission.SetOPTxs(OPTxs); 
206 
207  //for the choice of superimposed Coulomb Barrier for inverse cross sections
208 
209   aEmission.UseSICB(useSICB);
210 
211 
212  //----------
213 
214  G4VPreCompoundTransitions * aTransition = 0;
215  if (useGNASHTransition) 
216    {
217      aTransition = new G4GNASHTransitions;
218    }
219  else 
220    {
221      aTransition = new G4PreCompoundTransitions;
222      // for the choice of "never go back" hypothesis and CEM transition probabilities 
223      if (useNGB) aTransition->UseNGB(useNGB);
224      if (useCEMtr) aTransition->UseCEMtr(useCEMtr);
225    }
226 
227  // Main loop. It is performed until equilibrium deexcitation.
228  //G4int fragment=0;
229 
230  for (;;) {
231   
232    //fragment++;
233    //G4cout<<"-------------------------------------------------------------------"<<G4endl;
234    //G4cout<<"Fragment number .. "<<fragment<<G4endl;
235   
236    // Initialize fragment according with the nucleus parameters
237    aEmission.Initialize(aFragment);
238   
239   
240   
241    G4double g = (6.0/pi2)*aFragment.GetA()*
242      G4PreCompoundParameters::GetAddress()->GetLevelDensity();
243   
244   
245   
246   
247    G4int EquilibriumExcitonNumber = static_cast<G4int>(std::sqrt(2.0*g*aFragment.GetExcitationEnergy())+ 0.5);
248//   
249//    G4cout<<"Neq="<<EquilibriumExcitonNumber<<G4endl;
250//
251// J. M. Quesada (Jan. 08)  equilibrium hole number could be used as preeq.- evap. delimiter (IAEA report)
252//    G4int EquilibriumHoleNumber = static_cast<G4int>(0.2*std::sqrt(g*aFragment.GetExcitationEnergy())+ 0.5);
253   
254// Loop for transitions, it is performed while there are preequilibrium transitions.
255    G4bool ThereIsTransition = false;
256   
257    //        G4cout<<"----------------------------------------"<<G4endl;
258    //        G4double NP=aFragment.GetNumberOfParticles();
259    //        G4double NH=aFragment.GetNumberOfHoles();
260    //        G4double NE=aFragment.GetNumberOfExcitons();
261    //        G4cout<<" Ex. Energy="<<aFragment.GetExcitationEnergy()<<G4endl;
262    //        G4cout<<"N. excitons="<<NE<<"  N. Part="<<NP<<"N. Holes ="<<NH<<G4endl;
263       
264   
265    //G4int transition=0;
266    do 
267      {
268        //transition++;
269        //G4cout<<"transition number .."<<transition<<G4endl;
270        //G4cout<<" n ="<<aFragment.GetNumberOfExcitons()<<G4endl;
271        G4bool go_ahead = false;
272        // soft cutoff criterium as an "ad-hoc" solution to force increase in  evaporation 
273        //       G4double test = static_cast<G4double>(aFragment.GetNumberOfHoles());
274        G4double test = static_cast<G4double>(aFragment.GetNumberOfExcitons());
275       
276       
277        if (test < EquilibriumExcitonNumber) go_ahead=true;
278        //J. M. Quesada (Apr. 08): soft-cutoff switched off by default
279        if (useSCO) {
280          if (test < EquilibriumExcitonNumber)
281            //  if (test < EquilibriumHoleNumber)
282            {
283              test /= static_cast<G4double>(EquilibriumExcitonNumber); 
284              //     test /= static_cast<G4double>(EquilibriumHoleNumber);
285              test -= 1.0;
286              test = test*test;
287              test /= 0.32;
288              test = 1.0 - std::exp(-test);
289              go_ahead = (G4UniformRand() < test);
290             
291            }
292        } 
293       
294        //JMQ: WARNING:  CalculateProbability MUST be called prior to Get methods !! (O values would be returned otherwise)
295        G4double TotalTransitionProbability = aTransition->CalculateProbability(aFragment);
296        G4double P1=aTransition->GetTransitionProb1();
297        G4double P2=aTransition->GetTransitionProb2();
298        G4double P3=aTransition->GetTransitionProb3();
299        //       G4cout<<"P1="<<P1<<" P2="<<P2<<"  P3="<<P3<<G4endl;
300       
301       
302        //J.M. Quesada (May. 08). Physical criterium (lamdas)  PREVAILS over approximation (critical exciton number)
303        if(P1<=(P2+P3)) go_ahead=false;
304       
305        if (go_ahead &&  aFragment.GetA() > 4)
306          {                             
307            G4double TotalEmissionProbability = aEmission.GetTotalProbability(aFragment);
308            //
309            //  G4cout<<"TotalEmissionProbability="<<TotalEmissionProbability<<G4endl;
310            //
311            // Check if number of excitons is greater than 0
312            // else perform equilibrium emission
313            if (aFragment.GetNumberOfExcitons() <= 0) 
314              {
315                // Perform Equilibrium Emission
316#ifdef debug // ------------- debug -----------------------------------------
317                CheckConservation(theInitialState,aFragment,Result);
318#endif // ------------------- debug -----------------------------------------
319                PerformEquilibriumEmission(aFragment,Result);
320                delete aTransition;
321                return Result;
322              }
323           
324            //      G4PreCompoundTransitions aTransition(aFragment);
325           
326            //J.M.Quesada (May 08) this has already been done in order to decide what to do (preeq-eq)
327            // Sum of transition probabilities
328            //      G4double TotalTransitionProbability = aTransition->CalculateProbability(aFragment);
329           
330            // Sum of all probabilities
331            G4double TotalProbability = TotalEmissionProbability + TotalTransitionProbability;
332           
333            // Select subprocess
334            if (G4UniformRand() > TotalEmissionProbability/TotalProbability) 
335              {
336                // It will be transition to state with a new number of excitons
337                ThereIsTransition = true;               
338                // Perform the transition
339                aFragment = aTransition->PerformTransition(aFragment);
340              } 
341            else 
342              {
343                // It will be fragment emission
344                ThereIsTransition = false;
345                Result->push_back(aEmission.PerformEmission(aFragment));
346              }
347          } 
348        else 
349          {
350            // Perform Equilibrium Emission
351#ifdef debug
352            CheckConservation(theInitialState,aFragment,Result);
353#endif
354            PerformEquilibriumEmission(aFragment,Result);
355            delete aTransition;
356            return Result;
357          }
358      } while (ThereIsTransition);   // end of do loop
359  } // end of for (;;) loop
360}
361
362
363
364
365void G4PreCompoundModel::PerformEquilibriumEmission(const G4Fragment & aFragment,
366                                                    G4ReactionProductVector * Result) const 
367{
368  G4ReactionProductVector * theEquilibriumResult;
369
370  theEquilibriumResult = GetExcitationHandler()->BreakItUp(aFragment);
371 
372  Result->insert(Result->end(),theEquilibriumResult->begin(), theEquilibriumResult->end());
373
374  delete theEquilibriumResult;
375  return;
376}
377
378
379#ifdef debug
380void G4PreCompoundModel::CheckConservation(const G4Fragment & theInitialState,
381                                           const G4Fragment & aFragment,
382                                           G4ReactionProductVector * Result) const
383{
384  G4double ProductsEnergy = aFragment.GetMomentum().e();
385  G4ThreeVector ProductsMomentum = aFragment.GetMomentum();
386  G4int ProductsA = static_cast<G4int>(aFragment.GetA());
387  G4int ProductsZ = static_cast<G4int>(aFragment.GetZ());
388  for (G4ReactionProductVector::iterator h = Result->begin(); 
389       h != Result->end(); ++h) 
390    {
391      ProductsEnergy += (*h)->GetTotalEnergy();
392      ProductsMomentum += (*h)->GetMomentum();
393      ProductsA += static_cast<G4int>((*h)->GetDefinition()->GetBaryonNumber());
394      ProductsZ += static_cast<G4int>((*h)->GetDefinition()->GetPDGCharge());
395    }
396
397  if (ProductsA != theInitialState.GetA()) 
398    {
399      G4cout << "!!!!!!!!!! Baryonic Number Conservation Violation !!!!!!!!!!\n"
400             << "G4PreCompoundModel.cc: Barionic Number Conservation test for just preequilibrium fragments\n" 
401             << "Initial A = " << theInitialState.GetA() 
402             << "   Fragments A = " << ProductsA << "   Diference --> " 
403             << theInitialState.GetA() - ProductsA << '\n';
404    }
405  if (ProductsZ != theInitialState.GetZ()) 
406    {
407      G4cout << "!!!!!!!!!! Charge Conservation Violation !!!!!!!!!!\n"
408             << "G4PreCompoundModel.cc: Charge Conservation test for just preequilibrium fragments\n" 
409             << "Initial Z = " << theInitialState.GetZ() 
410             << "   Fragments Z = " << ProductsZ << "   Diference --> " 
411             << theInitialState.GetZ() - ProductsZ << '\n';
412    }
413  if (std::abs(ProductsEnergy-theInitialState.GetMomentum().e()) > 1.0*keV) 
414    {
415      G4cout << "!!!!!!!!!! Energy Conservation Violation !!!!!!!!!!\n" 
416             << "G4PreCompoundModel.cc: Energy Conservation test for just preequilibrium fragments\n" 
417             << "Initial E = " << theInitialState.GetMomentum().e()/MeV << " MeV"
418             << "   Fragments E = " << ProductsEnergy/MeV  << " MeV   Diference --> " 
419             << (theInitialState.GetMomentum().e() - ProductsEnergy)/MeV << " MeV\n";
420    } 
421  if (std::abs(ProductsMomentum.x()-theInitialState.GetMomentum().x()) > 1.0*keV || 
422      std::abs(ProductsMomentum.y()-theInitialState.GetMomentum().y()) > 1.0*keV ||
423      std::abs(ProductsMomentum.z()-theInitialState.GetMomentum().z()) > 1.0*keV) 
424    {
425      G4cout << "!!!!!!!!!! Momentum Conservation Violation !!!!!!!!!!\n"
426             << "G4PreCompoundModel.cc: Momentum Conservation test for just preequilibrium fragments\n" 
427             << "Initial P = " << theInitialState.GetMomentum().vect() << " MeV"
428             << "   Fragments P = " << ProductsMomentum  << " MeV   Diference --> " 
429             << theInitialState.GetMomentum().vect() - ProductsMomentum << " MeV\n";
430    }
431  return;
432}
433
434#endif
435
436
437
Note: See TracBrowser for help on using the repository browser.