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

Last change on this file since 1228 was 1228, checked in by garnier, 14 years ago

update geant4.9.3 tag

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