Ignore:
Timestamp:
Nov 5, 2010, 3:45:55 PM (15 years ago)
Author:
garnier
Message:

update ti head

Location:
trunk/source/processes/hadronic/models/pre_equilibrium
Files:
62 edited

Legend:

Unmodified
Added
Removed
  • trunk/source/processes/hadronic/models/pre_equilibrium/History

    r1337 r1340  
    1414     * Please list in reverse chronological order (last date on top)
    1515     ---------------------------------------------------------------
     16
     1720-October 2010 V.Ivanchenko   hadr-pre-V09-03-12
     18---------------------------------------------------
     19G4PreCompoundTransitions - fixed compillation warning introduced in previous tag
     20
     2111-October 2010 V.Ivanchenko   hadr-pre-V09-03-11
     22---------------------------------------------------
     23G4PreCompoundTransitions - JMQ fixed bug in the PerformTransition method
     24                       (use number of particles instead of number of excitons)
     25G4PreCompoundModel - disabled upper limit on excitation energy
     26
     278-September 2010 G.Folger      hadr-pre-V09-03-10
     28---------------------------------------------------
     29G4LowEIonFragmentation: use integer A and Z
     30
     311-September 2010 V.Ivanchenko  hadr-pre-V09-03-09
     32---------------------------------------------------
     33G4PreCompoundEmission - removed SetUp inline method and move its functionality
     34
     3531-August 2010 V.Ivanchenko    hadr-pre-V09-03-08
     36---------------------------------------------------
     37G4PreCompoundTransition - fixed typo introduced in previous tag
     38
     3928-August 2010 V.Ivanchenko    hadr-pre-V09-03-07
     40---------------------------------------------------
     41General cleaup of all classes: constructors and destructors moved to the
     42                               source, integer Z and A, G4Pow class
     43                               is used to speedup computations
     44G4PreCompoundModel - Emission and Transition classes become members created
     45                     at construction and not at run time,
     46                     initialisation is performed at construction or when options
     47                     are changed and not in run time, G4Fragment is not const,
     48                     it is modified during process of emission of particles
    1649
    175011-June 2010 V.Ivanchenko  hadr-pre-V09-03-06
  • trunk/source/processes/hadronic/models/pre_equilibrium/exciton_model/include/G4GNASHTransitions.hh

    r962 r1340  
    2424// ********************************************************************
    2525//
     26// $Id: G4GNASHTransitions.hh,v 1.4 2010/08/20 07:42:19 vnivanch Exp $
     27// GEANT4 tag $Name: geant4-09-03-ref-09 $
     28//
    2629#ifndef G4GNASHTransitions_hh
    2730#define G4GNASHTransitions_hh 1
     
    3336{
    3437public:
    35   G4GNASHTransitions() {}
    36   virtual ~G4GNASHTransitions() {}
     38
     39  G4GNASHTransitions();
     40
     41  virtual ~G4GNASHTransitions();
     42
     43  virtual G4double CalculateProbability(const G4Fragment & aFragment);
     44 
     45  virtual void PerformTransition(G4Fragment & aFragment);
    3746
    3847private:
    3948
    40   G4GNASHTransitions(const G4GNASHTransitions &) : G4VPreCompoundTransitions() {}
    41 
    42   const G4GNASHTransitions& operator=(const G4GNASHTransitions &right);
     49G4GNASHTransitions(const G4GNASHTransitions &);
     50const G4GNASHTransitions& operator=(const G4GNASHTransitions &right);
    4351
    4452  G4bool operator==(const G4GNASHTransitions &right) const;
     
    4654  G4bool operator!=(const G4GNASHTransitions &right) const;
    4755
    48 public:
    49 
    50   virtual G4double CalculateProbability(const G4Fragment & aFragment);
    51  
    52   virtual G4Fragment PerformTransition(const G4Fragment & aFragment);
    53 
    54 //JMQ 03/01/08
    55  public:
    56 // inline G4double GetTransitionProb1() const
    57 G4double GetTransitionProb1()
    58 {return 0;}
    59 // inline G4double GetTransitionProb2() const
    60 G4double GetTransitionProb2()
    61 {return 0;}
    62 // inline G4double GetTransitionProb3() const
    63 G4double GetTransitionProb3()
    64 {return 0;}
    65 //
    66 
    6756
    6857};
  • trunk/source/processes/hadronic/models/pre_equilibrium/exciton_model/include/G4HETCAlpha.hh

    r819 r1340  
    2424// ********************************************************************
    2525//
     26// $Id: G4HETCAlpha.hh,v 1.3 2010/08/28 15:16:55 vnivanch Exp $
     27// GEANT4 tag $Name: geant4-09-03-ref-09 $
     28//
    2629// by V. Lara
     30//
     31// Modified:
     32// 23.08.2010 V.Ivanchenko general cleanup, move constructor and destructor
     33//            the source, use G4Pow
    2734
    2835#ifndef G4HETCAlpha_h
     
    3138#include "G4HETCChargedFragment.hh"
    3239#include "G4ReactionProduct.hh"
    33 #include "G4Alpha.hh"
    34 
    3540#include "G4AlphaCoulombBarrier.hh"
    36 
    3741
    3842class G4HETCAlpha : public G4HETCChargedFragment
    3943{
    4044public:
    41   // default constructor
    42   G4HETCAlpha():G4HETCChargedFragment(4,2,&theAlphaCoulombBarrier,"Alpha") {}
    4345
    44   // copy constructor
    45   G4HETCAlpha(const G4HETCAlpha &right): G4HETCChargedFragment(right) {}
     46  G4HETCAlpha();
    4647
    47   // destructor
    48   ~G4HETCAlpha() {}
     48  ~G4HETCAlpha();
    4949
    50   // operators 
    51   const G4HETCAlpha & operator=(const G4HETCAlpha &right)
    52   {
    53     if (&right != this) this->G4HETCChargedFragment::operator=(right);
    54     return *this;
    55   };
    56  
    57   G4bool operator==(const G4HETCAlpha &right) const
    58   {
    59     return G4HETCChargedFragment::operator==(right);
    60   }
     50protected:
    6151
    62  
    63   G4bool operator!=(const G4HETCAlpha &right) const
    64   {
    65     return G4HETCChargedFragment::operator!=(right);
    66   }
     52  virtual G4double GetAlpha();
    6753
     54  virtual G4double GetBeta();
    6855
    69   G4ReactionProduct * GetReactionProduct() const
    70   {
    71     G4ReactionProduct * theReactionProduct =
    72       new G4ReactionProduct(G4Alpha::AlphaDefinition());
    73     theReactionProduct->SetMomentum(GetMomentum().vect());
    74     theReactionProduct->SetTotalEnergy(GetMomentum().e());
    75 #ifdef PRECOMPOUND_TEST
    76     theReactionProduct->SetCreatorModel("G4PrecompoundModel");
    77 #endif
    78     return theReactionProduct;
    79   }   
    80    
    81 private:
    82   virtual G4double GetAlpha()
    83   {
    84     G4double C = 0.0;
    85     G4double aZ = GetZ() + GetRestZ();
    86     if (aZ <= 30)
    87       {
    88         C = 0.10;
    89       }
    90     else if (aZ <= 50)
    91       {
    92         C = 0.1 + -((aZ-50.)/20.)*0.02;
    93       }
    94     else if (aZ < 70)
    95       {
    96         C = 0.08 + -((aZ-70.)/20.)*0.02;
    97       }
    98     else
    99       {
    100         C = 0.06;
    101       }
    102     return 1.0+C;
    103   }
    104  
    105   virtual G4double GetBeta()
    106   {
    107     return -GetCoulombBarrier();
    108   }
    109  
    110 
    111   virtual G4double GetSpinFactor()
    112   {
    113     return 1.0;
    114   }
     56  virtual G4double GetSpinFactor();
    11557
    11658  virtual G4double K(const G4Fragment & aFragment);
    11759
     60private:
    11861
    119 private:
     62  // operators 
     63  G4HETCAlpha(const G4HETCAlpha &right);
     64  const G4HETCAlpha & operator=(const G4HETCAlpha &right);
     65  G4bool operator==(const G4HETCAlpha &right) const;
     66  G4bool operator!=(const G4HETCAlpha &right) const;
    12067
    12168  G4AlphaCoulombBarrier theAlphaCoulombBarrier;
  • trunk/source/processes/hadronic/models/pre_equilibrium/exciton_model/include/G4HETCChargedFragment.hh

    r819 r1340  
    2424// ********************************************************************
    2525//
     26// $Id: G4HETCChargedFragment.hh,v 1.3 2010/08/28 15:16:55 vnivanch Exp $
     27// GEANT4 tag $Name: geant4-09-03-ref-09 $
     28//
    2629// by V. Lara
    2730
     
    3033
    3134#include "G4HETCFragment.hh"
    32 #include "G4VCoulombBarrier.hh"
    33 
    3435
    3536class G4HETCChargedFragment : public G4HETCFragment
    3637{
    37 protected:
    38   // default constructor
    39   G4HETCChargedFragment() {}
    40 
    4138public:
    4239
    43   // copy constructor
    44   G4HETCChargedFragment(const G4HETCChargedFragment &right):
    45     G4HETCFragment(right) {}
     40  G4HETCChargedFragment(const G4ParticleDefinition*,
     41                        G4VCoulombBarrier * aCoulombBarrier);
    4642
    47   // constructor 
    48   G4HETCChargedFragment(const G4double anA,
    49                         const G4double aZ,
    50                         G4VCoulombBarrier* aCoulombBarrier,
    51                         const G4String & aName):
    52     G4HETCFragment(anA,aZ,aCoulombBarrier,aName) {}
     43  virtual ~G4HETCChargedFragment();
    5344
    54   virtual ~G4HETCChargedFragment() {}
     45  virtual G4double GetKineticEnergy(const G4Fragment & aFragment);
     46
     47private:
    5548
    5649  // operators 
     50  G4HETCChargedFragment();
     51  G4HETCChargedFragment(const G4HETCChargedFragment &right);
    5752  const G4HETCChargedFragment &
    58   operator=(const G4HETCChargedFragment &right)
    59   {
    60     if (&right != this) this->G4HETCFragment::operator=(right);
    61     return *this;
    62   }
    63 
    64   G4bool operator==(const G4HETCChargedFragment &right) const
    65   {
    66     return G4HETCFragment::operator==(right);
    67   }
    68    
    69   G4bool operator!=(const G4HETCChargedFragment &right) const
    70   {
    71     return G4HETCFragment::operator!=(right);
    72   }
    73    
    74 
    75   virtual G4double GetKineticEnergy(const G4Fragment & aFragment);
    76    
     53  operator=(const G4HETCChargedFragment &right);
     54  G4bool operator==(const G4HETCChargedFragment &right) const;
     55  G4bool operator!=(const G4HETCChargedFragment &right) const;   
    7756   
    7857};
  • trunk/source/processes/hadronic/models/pre_equilibrium/exciton_model/include/G4HETCDeuteron.hh

    r819 r1340  
    2424// ********************************************************************
    2525//
     26// $Id: G4HETCDeuteron.hh,v 1.3 2010/08/28 15:16:55 vnivanch Exp $
     27// GEANT4 tag $Name: geant4-09-03-ref-09 $
     28//
    2629// by V. Lara
     30//
     31// Modified:
     32// 23.08.2010 V.Ivanchenko general cleanup, move constructor and destructor
     33//            the source, use G4Pow
     34//
    2735
    2836#ifndef G4HETCDeuteron_h
     
    3139#include "G4HETCChargedFragment.hh"
    3240#include "G4ReactionProduct.hh"
    33 #include "G4Deuteron.hh"
    34 
    3541#include "G4DeuteronCoulombBarrier.hh"
    36 
    3742
    3843class G4HETCDeuteron : public G4HETCChargedFragment
    3944{
    4045public:
    41   // default constructor
    42   G4HETCDeuteron():G4HETCChargedFragment(2,1,&theDeuteronCoulombBarrier,"Deuteron") {}
    4346
    44   // copy constructor
    45   G4HETCDeuteron(const G4HETCDeuteron &right): G4HETCChargedFragment(right) {}
     47  G4HETCDeuteron();
     48
     49  ~G4HETCDeuteron();
    4650 
    47   // destructor
    48   ~G4HETCDeuteron() {}
    49  
    50   // operators 
    51   const G4HETCDeuteron & operator=(const G4HETCDeuteron &right)
    52   {
    53     if (&right != this) this->G4HETCChargedFragment::operator=(right);
    54     return *this;
    55   }
     51protected:
    5652
    57   G4bool operator==(const G4HETCDeuteron &right) const
    58   {
    59     return G4HETCChargedFragment::operator==(right);
    60   }
     53  virtual G4double GetAlpha();
    6154
    62  
    63   G4bool operator!=(const G4HETCDeuteron &right) const
    64   {
    65     return G4HETCChargedFragment::operator!=(right);
    66   }
     55  virtual G4double GetBeta();
    6756
     57  virtual G4double GetSpinFactor();
    6858
    69   G4ReactionProduct * GetReactionProduct() const
    70   {
    71     G4ReactionProduct * theReactionProduct =
    72       new G4ReactionProduct(G4Deuteron::DeuteronDefinition());
    73     theReactionProduct->SetMomentum(GetMomentum().vect());
    74     theReactionProduct->SetTotalEnergy(GetMomentum().e());
    75 #ifdef PRECOMPOUND_TEST
    76     theReactionProduct->SetCreatorModel("G4PrecompoundModel");
    77 #endif
    78     return theReactionProduct;
    79   }   
    80    
    81 private:
    82   virtual G4double GetAlpha()
    83   {
    84     G4double C = 0.0;
    85     G4double aZ = GetZ() + GetRestZ();
    86     if (aZ >= 70)
    87       {
    88         C = 0.10;
    89       }
    90     else
    91       {
    92         C = ((((0.15417e-06*aZ) - 0.29875e-04)*aZ + 0.21071e-02)*aZ - 0.66612e-01)*aZ + 0.98375;
    93       }
    94     return 1.0 + C/2.0;
    95   }
    96  
    97   virtual G4double GetBeta()
    98   {
    99     return -GetCoulombBarrier();
    100   }
    101 
    102   virtual G4double GetSpinFactor()
    103   {
    104     // 2s+1
    105     return 3.0;
    106   }
    107  
    10859  virtual G4double K(const G4Fragment & aFragment);
    109 
    11060
    11161private:
    11262
     63  // operators 
     64  G4HETCDeuteron(const G4HETCDeuteron &right);
     65  const G4HETCDeuteron & operator=(const G4HETCDeuteron &right);
     66  G4bool operator==(const G4HETCDeuteron &right) const;
     67  G4bool operator!=(const G4HETCDeuteron &right) const;
     68   
     69private:
     70 
    11371  G4DeuteronCoulombBarrier theDeuteronCoulombBarrier;
    11472
  • trunk/source/processes/hadronic/models/pre_equilibrium/exciton_model/include/G4HETCEmissionFactory.hh

    r819 r1340  
    2424// ********************************************************************
    2525//
     26// $Id: G4HETCEmissionFactory.hh,v 1.3 2010/08/28 15:16:55 vnivanch Exp $
     27// GEANT4 tag $Name: geant4-09-03-ref-09 $
     28//
     29//
     30
    2631#ifndef G4HETCEmissionFactory_hh
    2732#define G4HETCEmissionFactory_hh
     
    2934#include "G4VPreCompoundEmissionFactory.hh"
    3035
    31 
    3236class G4HETCEmissionFactory : public G4VPreCompoundEmissionFactory
    3337{
    3438public:
    3539
    36   G4HETCEmissionFactory() {};
    37   virtual ~G4HETCEmissionFactory() {};
     40  G4HETCEmissionFactory();
     41  virtual ~G4HETCEmissionFactory();
     42
     43protected:
     44
     45  virtual std::vector<G4VPreCompoundFragment*> *  CreateFragmentVector();
    3846
    3947private:
    4048
    41   G4HETCEmissionFactory(const G4HETCEmissionFactory & ) : G4VPreCompoundEmissionFactory() {};
     49  G4HETCEmissionFactory(const G4HETCEmissionFactory & );
    4250  const G4HETCEmissionFactory & operator=(const G4HETCEmissionFactory & val);
    4351  G4bool operator==(const G4HETCEmissionFactory & val) const;
    4452  G4bool operator!=(const G4HETCEmissionFactory & val) const;
    4553
    46 private:
    47 
    48   virtual std::vector<G4VPreCompoundFragment*> *  CreateFragmentVector();
    49 
    5054};
    5155
  • trunk/source/processes/hadronic/models/pre_equilibrium/exciton_model/include/G4HETCFragment.hh

    r819 r1340  
    2424// ********************************************************************
    2525//
     26// $Id: G4HETCFragment.hh,v 1.3 2010/08/28 15:16:55 vnivanch Exp $
     27// GEANT4 tag $Name: geant4-09-03-ref-09 $
     28//
    2629// by V. Lara
     30//
     31// Modified: 
     32// 20.08.2010 V.Ivanchenko added G4Pow and G4PreCompoundParameters pointers
     33//                         use int Z and A and cleanup
    2734
    2835#ifndef G4HETCFragment_h
     
    3037
    3138#include "G4VPreCompoundFragment.hh"
     39#include "Randomize.hh"
    3240
    3341class G4HETCFragment : public G4VPreCompoundFragment
    3442{
    35 protected:
    36   // default constructor
    37   G4HETCFragment() {};
    38    
    3943public: 
    40   // copy constructor
    41   G4HETCFragment(const G4HETCFragment &right);
    42    
    43   // constructor 
    44   G4HETCFragment(const G4double anA, const G4double aZ,
    45                  G4VCoulombBarrier * aCoulombBarrier,
    46                  const G4String &  aName);
     44
     45  G4HETCFragment(const G4ParticleDefinition*,
     46                 G4VCoulombBarrier * aCoulombBarrier);
    4747 
    4848  virtual ~G4HETCFragment();
    49  
    50   // ==========
    51   // operators
    52   // ==========
    53  
    54   const G4HETCFragment&
    55   operator= (const G4HETCFragment &right);
    56  
    57   G4int operator==(const G4HETCFragment &right) const;
    58  
    59   G4int operator!=(const G4HETCFragment &right) const;
    60  
     49
     50  G4double CalcEmissionProbability(const G4Fragment & aFragment);
     51
    6152protected:
    6253
     
    6758  virtual G4double GetBeta() = 0;
    6859
    69 public:
    70    
     60  inline G4double BetaRand(const G4int N, const G4int L) const;
     61 
     62private:
    7163
    72   G4double CalcEmissionProbability(const G4Fragment & aFragment);
    73  
    74 private:       
    7564  // This method performs integration for probability function over
    7665  // fragment kinetic energy
     
    7867                                        const G4double & Up,
    7968                                        const G4Fragment & aFragment); 
    80    
    81   // ============================
    82   // Data members access methods
    83   // ============================
    84  
    8569
    86   inline G4bool IsItPossible(const G4Fragment & aFragment) const;
     70  G4HETCFragment();
     71  G4HETCFragment(const G4HETCFragment &right);
     72  const G4HETCFragment&
     73  operator= (const G4HETCFragment &right); 
     74  G4int operator==(const G4HETCFragment &right) const;
     75  G4int operator!=(const G4HETCFragment &right) const;
    8776
    88 protected:
    89  
    90   inline G4double BetaRand(const G4int N, const G4int L) const;
    91  
     77  G4double r2norm;
    9278};
    9379
    94 #include "G4HETCFragment.icc"
     80inline G4double G4HETCFragment::
     81BetaRand(const G4int N, const G4int L) const
     82{
     83  G4double Y1 = CLHEP::RandGamma::shoot(N,1);
     84  G4double Y2 = CLHEP::RandGamma::shoot(L,1);
     85 
     86  return Y1/(Y1+Y2);
     87}
    9588
    9689#endif
  • trunk/source/processes/hadronic/models/pre_equilibrium/exciton_model/include/G4HETCFragment.icc

    r819 r1340  
    2424// ********************************************************************
    2525//
     26// $Id: G4HETCFragment.icc,v 1.4 2010/08/28 15:16:55 vnivanch Exp $
     27// GEANT4 tag $Name: geant4-09-03-ref-09 $
     28//
    2629// by V. Lara
    2730
    28 
    29 #include <CLHEP/Random/RandGamma.h>
    30 
    31 inline G4bool G4HETCFragment::
    32 IsItPossible(const G4Fragment & aFragment) const
    33 {
    34   G4int pplus = aFragment.GetNumberOfCharged();
    35   G4int pneut = aFragment.GetNumberOfParticles()-pplus;
    36   return (pneut >= (GetA()-GetZ()) && pplus >= GetZ());
    37 }
    38 
    39 inline G4double G4HETCFragment::
    40 BetaRand(const G4int N, const G4int L) const
    41 {
    42   G4double Y1 = CLHEP::RandGamma::shoot(N,1);
    43   G4double Y2 = CLHEP::RandGamma::shoot(L,1);
    44  
    45   return Y1/(Y1+Y2);
    46 }
  • trunk/source/processes/hadronic/models/pre_equilibrium/exciton_model/include/G4HETCHe3.hh

    r819 r1340  
    2424// ********************************************************************
    2525//
     26// $Id: G4HETCHe3.hh,v 1.3 2010/08/28 15:16:55 vnivanch Exp $
     27// GEANT4 tag $Name: geant4-09-03-ref-09 $
     28//
    2629// by V. Lara
     30//
     31// Modified:
     32// 23.08.2010 V.Ivanchenko general cleanup, move constructor and destructor
     33//            the source, use G4Pow
    2734
    2835#ifndef G4HETCHe3_h
     
    3138#include "G4HETCChargedFragment.hh"
    3239#include "G4ReactionProduct.hh"
    33 #include "G4He3.hh"
    34 
    3540#include "G4He3CoulombBarrier.hh"
    36 
    3741
    3842class G4HETCHe3 : public G4HETCChargedFragment
    3943{
    4044public:
    41   // default constructor
    42   G4HETCHe3():G4HETCChargedFragment(3,2,&theHe3CoulombBarrier,"He3") {}
    4345
    44   // copy constructor
    45   G4HETCHe3(const G4HETCHe3 &right): G4HETCChargedFragment(right) {}
     46  G4HETCHe3();
    4647
    47   // destructor
    48   ~G4HETCHe3() {}
     48  ~G4HETCHe3();
    4949
    50   // operators 
    51   const G4HETCHe3 & operator=(const G4HETCHe3 &right)
    52   {
    53     if (&right != this) this->G4HETCChargedFragment::operator=(right);
    54     return *this;
    55   }
    56  
    57   G4bool operator==(const G4HETCHe3 &right) const
    58   {
    59     return G4HETCChargedFragment::operator==(right);
    60   }
     50protected:
    6151
    62  
    63   G4bool operator!=(const G4HETCHe3 &right) const
    64   {
    65     return G4HETCChargedFragment::operator!=(right);
    66   }
     52  virtual G4double GetAlpha();
    6753
     54  virtual G4double GetBeta();
    6855
    69   G4ReactionProduct * GetReactionProduct() const
    70   {
    71     G4ReactionProduct * theReactionProduct =
    72       new G4ReactionProduct(G4He3::He3Definition());
    73     theReactionProduct->SetMomentum(GetMomentum().vect());
    74     theReactionProduct->SetTotalEnergy(GetMomentum().e());
    75 #ifdef PRECOMPOUND_TEST
    76     theReactionProduct->SetCreatorModel("G4PrecompoundModel");
    77 #endif
    78     return theReactionProduct;
    79   }   
    80    
    81 private:
    82   virtual G4double GetAlpha()
    83   {
    84     G4double C = 0.0;
    85     G4double aZ = GetZ() + GetRestZ();
    86     if (aZ <= 30)
    87       {
    88         C = 0.10;
    89       }
    90     else if (aZ <= 50)
    91       {
    92         C = 0.1 + -((aZ-50.)/20.)*0.02;
    93       }
    94     else if (aZ < 70)
    95       {
    96         C = 0.08 + -((aZ-70.)/20.)*0.02;
    97       }
    98     else
    99       {
    100         C = 0.06;
    101       }
    102     return 1.0 + C*(4.0/3.0);
    103   }
    104  
    105 
    106   virtual G4double GetBeta()
    107   {
    108     return -GetCoulombBarrier();
    109   }
    110  
    111   //   virtual G4double FactorialFactor(const G4double N, const G4double P)
    112   //   {
    113   //     return
    114   //       (N-3.0)*(P-2.0)*(
    115   //                   (((N-2.0)*(P-1.0))/2.0) *(
    116   //                                             (((N-1.0)*P)/3.0)
    117   //                                             )
    118   //                   );
    119   //   }
    120  
    121   virtual G4double GetSpinFactor()
    122   {
    123     // 2s+1
    124     return 2.0;
    125   }   
     56  virtual G4double GetSpinFactor();
    12657
    12758  virtual G4double K(const G4Fragment & aFragment);
     
    12960private:
    13061
     62  // operators 
     63  G4HETCHe3(const G4HETCHe3 &right);
     64  const G4HETCHe3 & operator=(const G4HETCHe3 &right);
     65  G4bool operator==(const G4HETCHe3 &right) const;
     66  G4bool operator!=(const G4HETCHe3 &right) const;
     67
    13168  G4He3CoulombBarrier theHe3CoulombBarrier;
    132 
    13369};
    13470
  • trunk/source/processes/hadronic/models/pre_equilibrium/exciton_model/include/G4HETCNeutron.hh

    r819 r1340  
    2424// ********************************************************************
    2525//
     26// $Id: G4HETCNeutron.hh,v 1.4 2010/08/28 15:16:55 vnivanch Exp $
     27// GEANT4 tag $Name: geant4-09-03-ref-09 $
     28//
    2629// by V. Lara
    27 
     30//
     31// Modified:
     32// 23.08.2010 V.Ivanchenko general cleanup, move constructor and destructor
     33//            the source, use G4Pow
    2834
    2935#ifndef G4HETCNeutron_h
     
    3238#include "G4HETCFragment.hh"
    3339#include "G4ReactionProduct.hh"
    34 #include "G4Neutron.hh"
    35 #include "G4PreCompoundParameters.hh"
    36 #include "Randomize.hh"
    37 
    3840#include "G4NeutronCoulombBarrier.hh"
    39 
    4041
    4142class G4HETCNeutron : public G4HETCFragment
    4243{
    4344public:
    44   // default constructor
    45   G4HETCNeutron() : G4HETCFragment(1,0,&theNeutronCoulomBarrier,"Neutron") {}
    4645
    47   // copy constructor
    48   G4HETCNeutron(const G4HETCNeutron &right): G4HETCFragment(right) {}
     46  G4HETCNeutron();
    4947
    50   // destructor
    51   ~G4HETCNeutron() {}
     48  ~G4HETCNeutron();
     49
     50  virtual G4double GetKineticEnergy(const G4Fragment & aFragment);
     51
     52protected:
     53
     54  virtual G4double GetAlpha();
     55
     56  virtual G4double GetBeta();
     57
     58  virtual G4double GetSpinFactor();
     59
     60  virtual G4double K(const G4Fragment & aFragment);
     61
     62private:
    5263
    5364  // operators 
    54   const G4HETCNeutron & operator=(const G4HETCNeutron &right) {
    55     if (&right != this) this->G4HETCFragment::operator=(right);
    56     return *this;
    57   }
     65  G4HETCNeutron(const G4HETCNeutron &right);
     66  const G4HETCNeutron & operator=(const G4HETCNeutron &right);
     67  G4bool operator==(const G4HETCNeutron &right) const;
     68  G4bool operator!=(const G4HETCNeutron &right) const;
    5869
    59   G4bool operator==(const G4HETCNeutron &right) const
    60   { return G4HETCFragment::operator==(right);}
     70  G4NeutronCoulombBarrier theNeutronCoulombBarrier;
    6171 
    62   G4bool operator!=(const G4HETCNeutron &right) const
    63   { return G4HETCFragment::operator!=(right);}
    64 
    65 
    66   G4ReactionProduct * GetReactionProduct() const
    67   {
    68     G4ReactionProduct * theReactionProduct =
    69       new G4ReactionProduct(G4Neutron::NeutronDefinition());
    70     theReactionProduct->SetMomentum(GetMomentum().vect());
    71     theReactionProduct->SetTotalEnergy(GetMomentum().e());
    72 #ifdef PRECOMPOUND_TEST
    73     theReactionProduct->SetCreatorModel("G4PrecompoundModel");
    74 #endif
    75     return theReactionProduct;
    76   }
    77 
    78   virtual G4double GetKineticEnergy(const G4Fragment & aFragment);
    79  
    80 private:
    81   virtual G4double GetAlpha()
    82   {
    83     return 0.76+2.2/std::pow(GetRestA(),1.0/3.0);
    84   }
    85  
    86   virtual G4double GetBeta()
    87   {
    88     return (2.12/std::pow(GetRestA(),2.0/3.0)-0.05)*MeV/GetAlpha();
    89   }
    90 
    91   virtual G4double GetSpinFactor()
    92   {
    93     // (2s+1)
    94     return 2.0;
    95   }
    96  
    97   virtual G4double K(const G4Fragment& aFragment);
    98 
    99 private:
    100  
    101   G4NeutronCoulombBarrier theNeutronCoulomBarrier;
    102 
    10372};
    10473
  • trunk/source/processes/hadronic/models/pre_equilibrium/exciton_model/include/G4HETCProton.hh

    r819 r1340  
    2424// ********************************************************************
    2525//
     26// $Id: G4HETCProton.hh,v 1.3 2010/08/28 15:16:55 vnivanch Exp $
     27// GEANT4 tag $Name: geant4-09-03-ref-09 $
     28//
    2629// by V. Lara
     30//
     31// Modified:
     32// 23.08.2010 V.Ivanchenko general cleanup, move constructor and destructor
     33//            the source, use G4Pow
    2734
    2835#ifndef G4HETCProton_h
     
    3138#include "G4HETCChargedFragment.hh"
    3239#include "G4ReactionProduct.hh"
    33 #include "G4Proton.hh"
    34 #include "G4PreCompoundParameters.hh"
    35 #include "Randomize.hh"
    36 
    3740#include "G4ProtonCoulombBarrier.hh"
    38 
    3941
    4042class G4HETCProton : public G4HETCChargedFragment
    4143{
    4244public:
    43   // default constructor
    44   G4HETCProton():G4HETCChargedFragment(1,1,&theProtonCoulombBarrier,"Proton") {}
    45  
    46   // copy constructor
    47   G4HETCProton(const G4HETCProton &right): G4HETCChargedFragment(right) {}
    4845
    49   // destructor
    50   ~G4HETCProton() {};
    51  
    52   // operators 
    53   const G4HETCProton & operator=(const G4HETCProton &right)
    54   {
    55     if (&right != this) this->G4HETCChargedFragment::operator=(right);
    56     return *this;
    57   }
     46  G4HETCProton();
    5847
    59   G4bool operator==(const G4HETCProton &right) const
    60   {
    61     return G4HETCChargedFragment::operator==(right);
    62   }
     48  ~G4HETCProton();
    6349
    64  
    65   G4bool operator!=(const G4HETCProton &right) const
    66   {
    67     return G4HETCChargedFragment::operator!=(right);
    68   }
     50protected:
    6951
     52  virtual G4double GetAlpha();
    7053
    71   G4ReactionProduct * GetReactionProduct() const
    72   {
    73     G4ReactionProduct * theReactionProduct =
    74       new G4ReactionProduct(G4Proton::ProtonDefinition());
    75     theReactionProduct->SetMomentum(GetMomentum().vect());
    76     theReactionProduct->SetTotalEnergy(GetMomentum().e());
    77 #ifdef PRECOMPOUND_TEST
    78     theReactionProduct->SetCreatorModel("G4PrecompoundModel");
    79 #endif
    80     return theReactionProduct;
    81   }
    82  
    83 private:
    84   virtual G4double GetAlpha()
    85   {
    86     G4double aZ = static_cast<G4double>(GetRestZ());
    87     G4double C = 0.0;
    88     if (aZ >= 70)
    89       {
    90         C = 0.10;
    91       }
    92     else
    93       {
    94         C = ((((0.15417e-06*aZ) - 0.29875e-04)*aZ + 0.21071e-02)*aZ - 0.66612e-01)*aZ + 0.98375;
    95       }
    96     return 1.0 + C;
    97   }
    98  
    99   virtual G4double GetBeta()
    100   {
    101     return -GetCoulombBarrier();
    102   }
    103  
    104   virtual G4double GetSpinFactor()
    105   {
    106     // 2s+1
    107     return 2.0;
    108   }
     54  virtual G4double GetBeta();
     55
     56  virtual G4double GetSpinFactor();
    10957
    11058  virtual G4double K(const G4Fragment & aFragment);
    11159
    11260private:
     61
     62  // operators 
     63  G4HETCProton(const G4HETCProton &right);
     64  const G4HETCProton & operator=(const G4HETCProton &right);
     65  G4bool operator==(const G4HETCProton &right) const;
     66  G4bool operator!=(const G4HETCProton &right) const;
    11367
    11468  G4ProtonCoulombBarrier theProtonCoulombBarrier;
  • trunk/source/processes/hadronic/models/pre_equilibrium/exciton_model/include/G4HETCTriton.hh

    r819 r1340  
    2424// ********************************************************************
    2525//
     26// $Id: G4HETCTriton.hh,v 1.3 2010/08/28 15:16:55 vnivanch Exp $
     27// GEANT4 tag $Name: geant4-09-03-ref-09 $
     28//
    2629// by V. Lara
     30//
     31// Modified:
     32// 23.08.2010 V.Ivanchenko general cleanup, move constructor and destructor
     33//            the source, use G4Pow
    2734
    2835#ifndef G4HETCTriton_h
     
    3138#include "G4HETCChargedFragment.hh"
    3239#include "G4ReactionProduct.hh"
    33 #include "G4Triton.hh"
    34 
    3540#include "G4TritonCoulombBarrier.hh"
    36 
    3741
    3842class G4HETCTriton : public G4HETCChargedFragment
    3943{
    4044public:
    41   // default constructor
    42   G4HETCTriton():G4HETCChargedFragment(3,1,&theTritonCoulombBarrier,"Triton") {}
    4345
    44   // copy constructor
    45   G4HETCTriton(const G4HETCTriton &right): G4HETCChargedFragment(right) {}
     46  G4HETCTriton();
    4647
    47   // destructor
    48   ~G4HETCTriton() {}
     48  ~G4HETCTriton();
     49
     50protected:
     51
     52  virtual G4double GetAlpha();
     53
     54  virtual G4double GetBeta();
     55
     56  virtual G4double GetSpinFactor();
     57
     58  virtual G4double K(const G4Fragment & aFragment);
     59
     60private:
    4961
    5062  // operators 
    51   const G4HETCTriton & operator=(const G4HETCTriton &right)
    52   {
    53     if (&right != this) this->G4HETCChargedFragment::operator=(right);
    54     return *this;
    55   }
     63  G4HETCTriton(const G4HETCTriton &right);
     64  const G4HETCTriton & operator=(const G4HETCTriton &right);
     65  G4bool operator==(const G4HETCTriton &right) const;
     66  G4bool operator!=(const G4HETCTriton &right) const;
    5667
    57   G4bool operator==(const G4HETCTriton &right) const
    58   {
    59     return G4HETCChargedFragment::operator==(right);
    60   }
    61 
    62  
    63   G4bool operator!=(const G4HETCTriton &right) const
    64   {
    65     return G4HETCChargedFragment::operator!=(right);
    66   }
    67 
    68 
    69   G4ReactionProduct * GetReactionProduct() const
    70   {
    71     G4ReactionProduct * theReactionProduct =
    72       new G4ReactionProduct(G4Triton::TritonDefinition());
    73     theReactionProduct->SetMomentum(GetMomentum().vect());
    74     theReactionProduct->SetTotalEnergy(GetMomentum().e());
    75 #ifdef PRECOMPOUND_TEST
    76     theReactionProduct->SetCreatorModel("G4PrecompoundModel");
    77 #endif
    78     return theReactionProduct;
    79   }   
    80    
    81 private:
    82   virtual G4double GetAlpha()
    83   {
    84     G4double C = 0.0;
    85     G4double aZ = GetZ() + GetRestZ();
    86     if (aZ >= 70)
    87       {
    88         C = 0.10;
    89       }
    90     else
    91       {
    92         C = ((((0.15417e-06*aZ) - 0.29875e-04)*aZ + 0.21071e-02)*aZ - 0.66612e-01)*aZ + 0.98375;
    93       }
    94    
    95     return 1.0 + C/3.0;
    96   }
    97  
    98   virtual G4double GetBeta()
    99   {
    100     return -GetCoulombBarrier();
    101   }
    102 
    103 
    104 
    105   virtual G4double GetSpinFactor()
    106   {
    107     // 2s+1
    108     return 2.0;
    109   }
    110 
    111   virtual G4double K(const G4Fragment& aFragment);
    112 
    113 private:
    114  
    11568  G4TritonCoulombBarrier theTritonCoulombBarrier;
    116  
    11769};
    11870
  • trunk/source/processes/hadronic/models/pre_equilibrium/exciton_model/include/G4LowEIonFragmentation.hh

    r1337 r1340  
    2424// ********************************************************************
    2525//
    26 // $Id: G4LowEIonFragmentation.hh,v 1.5 2010/06/11 15:34:18 vnivanch Exp $
    27 // GEANT4 tag $Name: geant4-09-04-beta-01 $
     26// $Id: G4LowEIonFragmentation.hh,v 1.6 2010/08/20 07:42:19 vnivanch Exp $
     27// GEANT4 tag $Name: geant4-09-03-ref-09 $
    2828//
    2929//---------------------------------------------------------------------------
    3030//
    31 // $Id: G4LowEIonFragmentation.hh,v 1.5 2010/06/11 15:34:18 vnivanch Exp $
    32 // GEANT4 tag $Name: geant4-09-04-beta-01 $
     31// $Id: G4LowEIonFragmentation.hh,v 1.6 2010/08/20 07:42:19 vnivanch Exp $
     32// GEANT4 tag $Name: geant4-09-03-ref-09 $
    3333//
    3434// ClassName:   G4LowEIonFragmentation
     
    5757  G4LowEIonFragmentation();
    5858
    59   ~G4LowEIonFragmentation();
     59  virtual ~G4LowEIonFragmentation();
    6060
    61 private:
    62  
    63   G4LowEIonFragmentation(const G4LowEIonFragmentation &);
    64  
    65   const G4LowEIonFragmentation& operator=(const G4LowEIonFragmentation &right);
    66 
    67   G4bool operator==(const G4LowEIonFragmentation &right) const;
    68  
    69   G4bool operator!=(const G4LowEIonFragmentation &right) const;
    70 
    71 public:
    72 
    73   G4HadFinalState * ApplyYourself(const G4HadProjectile & thePrimary, G4Nucleus & theNucleus);
     61  virtual G4HadFinalState * ApplyYourself(const G4HadProjectile & thePrimary,
     62                                          G4Nucleus & theNucleus);
    7463
    7564  static G4double GetCrossSection()
    7665  {
    77 //    clog << "area/millibarn = "<<area/millibarn<<G4endl;
    78 //    clog << "hits = "<<hits<<G4endl;
    79 //    clog << "totalTries = "<<totalTries<<G4endl;
     66    //    clog << "area/millibarn = "<<area/millibarn<<G4endl;
     67    //    clog << "hits = "<<hits<<G4endl;
     68    //    clog << "totalTries = "<<totalTries<<G4endl;
    8069    return area*static_cast<G4double>(hits)/static_cast<G4double>(totalTries)/millibarn;
    8170  }
     71
    8272private: 
    8373
     74  G4LowEIonFragmentation(const G4LowEIonFragmentation &); 
     75  const G4LowEIonFragmentation& operator=(const G4LowEIonFragmentation &right);
     76  G4bool operator==(const G4LowEIonFragmentation &right) const;
     77  G4bool operator!=(const G4LowEIonFragmentation &right) const;
     78
     79  // Members
    8480 
    8581  G4HadFinalState theResult;
     
    8985 
    9086private:
     87
    9188  static G4int hits;
    9289  static G4int totalTries;
  • trunk/source/processes/hadronic/models/pre_equilibrium/exciton_model/include/G4PreCompoundAlpha.hh

    r962 r1340  
    2424// ********************************************************************
    2525//
     26// $Id: G4PreCompoundAlpha.hh,v 1.12 2010/08/28 15:16:55 vnivanch Exp $
     27// GEANT4 tag $Name: geant4-09-03-ref-09 $
     28//
    2629// by V. Lara
    2730//
    28 //J. M. Quesada (July 08)
    29 
     31// Modified:
     32// J. M. Quesada (July 08) cleanup
     33// 20.08.2010 V.Ivanchenko added int Z and A and cleanup; added
     34//                        G4ParticleDefinition to constructor,
     35//                        moved constructor and destructor to source
    3036
    3137#ifndef G4PreCompoundAlpha_h
     
    3339
    3440#include "G4PreCompoundIon.hh"
    35 #include "G4ReactionProduct.hh"
    36 #include "G4Alpha.hh"
    3741#include "G4AlphaCoulombBarrier.hh"
    38 #include "G4PreCompoundParameters.hh"
    3942
    4043class G4PreCompoundAlpha : public G4PreCompoundIon
    4144{
    4245public:
    43   // default constructor
    44   G4PreCompoundAlpha():G4PreCompoundIon(4,2,&theAlphaCoulombBarrier,"Alpha") {}
    4546
    46   // copy constructor
    47   G4PreCompoundAlpha(const G4PreCompoundAlpha &right): G4PreCompoundIon(right){}
     47  G4PreCompoundAlpha();
    4848
    49   // destructor
    50   ~G4PreCompoundAlpha() {}
     49  virtual ~G4PreCompoundAlpha();
    5150
    52   // operators 
    53   const G4PreCompoundAlpha & operator=(const G4PreCompoundAlpha &right) {
    54     if (&right != this) this->G4PreCompoundIon::operator=(right);
    55     return *this;
    56   };
     51protected:
    5752
    58   G4bool operator==(const G4PreCompoundAlpha &right) const
    59   { return G4PreCompoundIon::operator==(right);}
     53  virtual G4double GetRj(G4int NumberParticles, G4int NumberCharged);
    6054
     55  virtual G4double CrossSection(G4double ekin) ;
     56
     57  virtual G4double FactorialFactor(G4int N, G4int P);
     58
     59  virtual G4double CoalescenceFactor(G4int A);
     60
     61  virtual G4double GetAlpha();
     62
     63  G4double GetOpt12(G4double K);
     64
     65  G4double GetOpt34(G4double K);
    6166 
    62   G4bool operator!=(const G4PreCompoundAlpha &right) const
    63   { return G4PreCompoundIon::operator!=(right);}
    64 
    65 
    66   G4ReactionProduct * GetReactionProduct() const;
    67 
    6867private:
    6968
    70   virtual G4double GetRj(const G4int NumberParticles, const G4int NumberCharged);
     69  // operators
     70  G4PreCompoundAlpha(const G4PreCompoundAlpha &right);
     71  const G4PreCompoundAlpha&
     72  operator= (const G4PreCompoundAlpha &right);
     73  G4int operator==(const G4PreCompoundAlpha &right) const;
     74  G4int operator!=(const G4PreCompoundAlpha &right) const;   
    7175
    72   virtual G4double CrossSection(const  G4double K) ;
    73 
    74   virtual G4double FactorialFactor(const G4double N, const G4double P);
    75 
    76   virtual G4double CoalescenceFactor(const G4double A);
    77 
    78   G4double GetOpt0(const G4double K);
    79   G4double GetOpt12(const G4double K);
    80   G4double GetOpt34(const G4double K);
    81 
    82   G4double GetAlpha();
    83  
    84   G4double GetBeta();
    85 
    86 //data members
    87 
    88       G4AlphaCoulombBarrier theAlphaCoulombBarrier;
    89       G4double ResidualA;
    90       G4double ResidualZ;
    91       G4double theA;
    92       G4double theZ;
    93       G4double ResidualAthrd;
    94       G4double FragmentA;
    95       G4double FragmentAthrd;
     76  G4AlphaCoulombBarrier theAlphaCoulombBarrier;
     77  G4double ResidualAthrd;
     78  G4double FragmentAthrd;
     79  G4int FragmentA;
     80  G4int ResidualA;
     81  G4int ResidualZ;
     82  G4int theA;
     83  G4int theZ;
    9684
    9785};
  • trunk/source/processes/hadronic/models/pre_equilibrium/exciton_model/include/G4PreCompoundDeuteron.hh

    r962 r1340  
    2424// ********************************************************************
    2525//
     26// $Id: G4PreCompoundDeuteron.hh,v 1.13 2010/08/28 15:16:55 vnivanch Exp $
     27// GEANT4 tag $Name: geant4-09-03-ref-09 $
     28//
    2629// by V. Lara
    2730//
    28 //J. M. Quesada (July 08)
     31// Modified:
     32// J. M. Quesada (July 08) cleanup
     33// 20.08.2010 V.Ivanchenko added int Z and A and cleanup; added
     34//                        G4ParticleDefinition to constructor,
     35//                        moved constructor and destructor to source
    2936
    3037#ifndef G4PreCompoundDeuteron_h
     
    3239
    3340#include "G4PreCompoundIon.hh"
    34 #include "G4ReactionProduct.hh"
    35 #include "G4Deuteron.hh"
    3641#include "G4DeuteronCoulombBarrier.hh"
    37 #include "G4PreCompoundParameters.hh"
    38 
    3942
    4043class G4PreCompoundDeuteron : public G4PreCompoundIon
    4144{
    4245public:
    43   // default constructor
    44   G4PreCompoundDeuteron():G4PreCompoundIon(2,1,&theDeuteronCoulombBarrier,"Deuteron") {}
    4546
    46   // copy constructor
    47   G4PreCompoundDeuteron(const G4PreCompoundDeuteron &right): G4PreCompoundIon(right) {}
     47  G4PreCompoundDeuteron();
    4848
    49   // destructor
    50   ~G4PreCompoundDeuteron() {}
     49  ~G4PreCompoundDeuteron();
    5150
    52   // operators 
    53   const G4PreCompoundDeuteron & operator=(const G4PreCompoundDeuteron &right) {
    54     if (&right != this) this->G4PreCompoundIon::operator=(right);
    55     return *this;
    56   }
     51protected:
    5752
    58   G4bool operator==(const G4PreCompoundDeuteron &right) const
    59   { return G4PreCompoundIon::operator==(right);}
     53  virtual G4double GetRj(G4int NumberParticles, G4int NumberCharged);
    6054
     55  virtual G4double CrossSection(G4double ekin);
     56
     57  virtual G4double FactorialFactor(G4int N, G4int P);
     58
     59  virtual G4double CoalescenceFactor(G4int A);
     60
     61  virtual G4double GetAlpha();
    6162 
    62   G4bool operator!=(const G4PreCompoundDeuteron &right) const
    63   { return G4PreCompoundIon::operator!=(right);}
     63  G4double GetOpt12(G4double K);
    6464
     65  G4double GetOpt34(G4double K);
    6566
    66   G4ReactionProduct * GetReactionProduct() const;
    67 
    68  
    6967private:
    7068
    71   virtual G4double GetRj(const G4int NumberParticles, const G4int NumberCharged);
     69  // operators
     70  G4PreCompoundDeuteron(const G4PreCompoundDeuteron &right);
     71  const G4PreCompoundDeuteron&
     72  operator= (const G4PreCompoundDeuteron &right);
     73  G4int operator==(const G4PreCompoundDeuteron &right) const;
     74  G4int operator!=(const G4PreCompoundDeuteron &right) const;   
    7275
    73   virtual G4double CrossSection(const  G4double K) ;
     76  G4DeuteronCoulombBarrier theDeuteronCoulombBarrier;
     77  G4int ResidualA;
     78  G4int ResidualZ;
     79  G4int theA;
     80  G4int theZ;
     81  G4int FragmentA;
     82  G4double ResidualAthrd;
     83  G4double FragmentAthrd;
     84};
    7485
    75   virtual G4double FactorialFactor(const G4double N, const G4double P);
    76 
    77   virtual G4double CoalescenceFactor(const G4double A);
    78 
    79   G4double GetOpt0(const G4double K);
    80   G4double GetOpt12(const G4double K);
    81   G4double GetOpt34(const G4double K);
    82 
    83   G4double GetAlpha();
    84  
    85   G4double GetBeta();
    86 
    87 //data members
    88 
    89       G4DeuteronCoulombBarrier theDeuteronCoulombBarrier;
    90       G4double ResidualA;
    91       G4double ResidualZ;
    92       G4double theA;
    93       G4double theZ;
    94       G4double ResidualAthrd;
    95       G4double FragmentA;
    96       G4double FragmentAthrd;
    97 
    98 };
    9986#endif
    10087
  • trunk/source/processes/hadronic/models/pre_equilibrium/exciton_model/include/G4PreCompoundEmission.hh

    r1337 r1340  
    2424// ********************************************************************
    2525//
    26 // $Id: G4PreCompoundEmission.hh,v 1.7 2009/11/12 14:33:44 gunter Exp $
    27 // GEANT4 tag $Name: geant4-09-04-beta-01 $
     26// $Id: G4PreCompoundEmission.hh,v 1.9 2010/09/01 14:51:21 vnivanch Exp $
     27// GEANT4 tag $Name: geant4-09-03-ref-09 $
    2828//
    2929// Hadronic Process: Nuclear Preequilibrium
     
    3434// JMQ (06 September 2008) Also external choice has been added for:
    3535//                      - superimposed Coulomb barrier (if useSICB=true)
     36// 20.08.2010 V.Ivanchenko added G4Pow and G4PreCompoundParameters pointers
     37//                         use int Z and A and cleanup;
     38//                         inline methods moved from icc file to hh
    3639
    3740#ifndef G4PreCompoundEmission_h
     
    4144#include "G4ReactionProduct.hh"
    4245#include "G4Fragment.hh"
    43 #include "Randomize.hh"
    44 #include "G4PreCompoundParameters.hh"
    4546#include "G4PreCompoundFragmentVector.hh"
    4647
    4748class G4VPreCompoundEmissionFactory;
    4849
     50class G4Pow;
     51class G4PreCompoundParameters;
    4952
    5053class G4PreCompoundEmission
    5154{
    5255public:
     56
    5357  G4PreCompoundEmission();
     58
    5459  ~G4PreCompoundEmission();
    5560
     61  void SetDefaultModel();
     62
     63  void SetHETCModel();
     64
     65  G4ReactionProduct * PerformEmission(G4Fragment & aFragment);
     66
     67  inline G4double GetTotalProbability(const G4Fragment & aFragment);
     68
     69  inline void Initialize(const G4Fragment & aFragment);
     70
     71  inline void SetOPTxs(G4int);
     72
     73  inline void UseSICB(G4bool);
     74
    5675private:
     76
     77  void AngularDistribution(G4VPreCompoundFragment * theFragment,
     78                           const G4Fragment& aFragment,
     79                           G4double KineticEnergy);
     80               
     81  G4double rho(G4int p, G4int h, G4double g, G4double E, G4double Ef) const;
     82
    5783  G4PreCompoundEmission(const G4PreCompoundEmission &right);
    5884  const G4PreCompoundEmission& operator=(const G4PreCompoundEmission &right);
     
    6086  G4bool operator!=(const G4PreCompoundEmission &right) const;
    6187
    62 public:
    63 
    64   inline void SetUp(const G4Fragment & aFragment);
    65   inline void Initialize(const G4Fragment & aFragment);
    66        
    67   inline G4double GetTotalProbability(const G4Fragment & aFragment);
    68        
    69   G4ReactionProduct * PerformEmission(G4Fragment & aFragment);
    70 
    71   void SetDefaultModel();
    72   void SetHETCModel();
    73 
    74 private:
    75 
    76   G4ThreeVector AngularDistribution(G4VPreCompoundFragment * theFragment,
    77                                     const G4Fragment& aFragment,
    78                                     const G4double KineticEnergy) const;
    79                
    80 
    81 
    82   G4double rho(const G4double p, const G4double h, const G4double g,
    83                const G4double E, const G4double Ef) const;
    84 
    85   G4double factorial(G4double a) const;
    86   G4double logfactorial(G4double a) const;
    87 
    88   //for inverse cross section choice
    89 public:
    90   inline void SetOPTxs(G4int);
    91   //for superimposed CoulomBarrier for inverse cross sections
    92   inline void UseSICB(G4bool);
    93 
    94 
    9588  //==============
    9689  // Data Members
    9790  //==============
     91
     92  G4Pow* g4pow;
     93  G4PreCompoundParameters* theParameters;
    9894
    9995  // A vector with the allowed emission fragments
     
    10197  G4VPreCompoundEmissionFactory * theFragmentsFactory;
    10298
    103   // Projectile energy
    104   G4double ProjEnergy;
    105 
    106   // Projectile direction
    107   G4ThreeVector theIncidentDirection;
    108 
     99  // Momentum of emitted fragment
     100  G4ThreeVector theFinalMomentum;
    109101};
    110102
    111 #include "G4PreCompoundEmission.icc"
     103inline G4double
     104G4PreCompoundEmission::GetTotalProbability(const G4Fragment& aFragment)
     105{
     106  return theFragmentsVector->CalculateProbabilities(aFragment);
     107}
     108
     109inline void
     110G4PreCompoundEmission::Initialize(const G4Fragment& aFragment)
     111{
     112  theFragmentsVector->Initialize(aFragment);
     113}
     114
     115inline void G4PreCompoundEmission::SetOPTxs(G4int opt)
     116{
     117  theFragmentsVector->SetOPTxs(opt);
     118}
     119
     120inline void G4PreCompoundEmission::UseSICB(G4bool use)
     121{
     122  theFragmentsVector->UseSICB(use);
     123}
    112124
    113125#endif
  • trunk/source/processes/hadronic/models/pre_equilibrium/exciton_model/include/G4PreCompoundEmission.icc

    r1337 r1340  
    2424// ********************************************************************
    2525//
    26 // $Id: G4PreCompoundEmission.icc,v 1.5 2009/02/10 16:01:37 vnivanch Exp $
    27 // GEANT4 tag $Name: geant4-09-04-beta-01 $
     26// $Id: G4PreCompoundEmission.icc,v 1.6 2010/08/28 15:16:55 vnivanch Exp $
     27// GEANT4 tag $Name: geant4-09-03-ref-09 $
    2828//
    2929//
     
    3636//                      - superimposed Coulomb barrier (if useSICB=true)
    3737
    38 inline void G4PreCompoundEmission::Initialize(const G4Fragment & aFragment)
    39 {
    40   theFragmentsVector->Initialize(aFragment);
    41   return;
    42 }
    4338
    44 inline G4double G4PreCompoundEmission::GetTotalProbability(const G4Fragment & aFragment)
    45 {
    46   return theFragmentsVector->CalculateProbabilities(aFragment);
    47 }
    48 
    49 inline void G4PreCompoundEmission::SetUp(const G4Fragment & aFragment)
    50 {
    51   // This should be the projectile energy. If I would know which is the projectile (proton, neutron)
    52   // I could remove the binding energy. But, what happens if INC precedes precompound? This approximation
    53   // seems to work well enough
    54   ProjEnergy = aFragment.GetExcitationEnergy();
    55   theIncidentDirection = aFragment.GetMomentum().vect().unit();
    56   theFragmentsVector->ResetStage();
    57   return;
    58 }
    59 
    60 //for inverse cross section choice
    61 inline void G4PreCompoundEmission::SetOPTxs(G4int opt)
    62 {
    63   theFragmentsVector->SetOPTxs(opt);
    64   return;
    65 }
    66 //for superimposed Coumlomb Barrier for inverse cross sections
    67 inline void G4PreCompoundEmission::UseSICB(G4bool use)
    68 {
    69   theFragmentsVector->UseSICB(use);
    70   return;
    71 }
    72 
  • trunk/source/processes/hadronic/models/pre_equilibrium/exciton_model/include/G4PreCompoundEmissionFactory.hh

    r819 r1340  
    2424// ********************************************************************
    2525//
     26// $Id: G4PreCompoundEmissionFactory.hh,v 1.3 2010/08/28 15:16:55 vnivanch Exp $
     27// GEANT4 tag $Name: geant4-09-03-ref-09 $
     28//
     29//
     30
    2631#ifndef G4PreCompoundEmissionFactory_hh
    2732#define G4PreCompoundEmissionFactory_hh
     
    2934#include "G4VPreCompoundEmissionFactory.hh"
    3035
    31 
    3236class G4PreCompoundEmissionFactory : public G4VPreCompoundEmissionFactory
    3337{
    3438public:
    3539
    36   G4PreCompoundEmissionFactory() {};
    37   virtual ~G4PreCompoundEmissionFactory() {};
     40  G4PreCompoundEmissionFactory();
     41  virtual ~G4PreCompoundEmissionFactory();
     42
     43protected:
     44
     45  virtual std::vector<G4VPreCompoundFragment*> *  CreateFragmentVector();
    3846
    3947private:
    4048
    41   G4PreCompoundEmissionFactory(const G4PreCompoundEmissionFactory & ) : G4VPreCompoundEmissionFactory() {};
    42   const G4PreCompoundEmissionFactory & operator=(const G4PreCompoundEmissionFactory & val);
     49  G4PreCompoundEmissionFactory(const G4PreCompoundEmissionFactory & );
     50  const G4PreCompoundEmissionFactory & operator=
     51  (const G4PreCompoundEmissionFactory & val);
    4352  G4bool operator==(const G4PreCompoundEmissionFactory & val) const;
    4453  G4bool operator!=(const G4PreCompoundEmissionFactory & val) const;
    45 
    46 private:
    47 
    48   virtual std::vector<G4VPreCompoundFragment*> *  CreateFragmentVector();
    4954
    5055};
  • trunk/source/processes/hadronic/models/pre_equilibrium/exciton_model/include/G4PreCompoundFragment.hh

    r962 r1340  
    2424// ********************************************************************
    2525//
    26 //J. M. Quesada (August 2008). 
    27 //Based  on previous work by V. Lara
     26// $Id: G4PreCompoundFragment.hh,v 1.6 2010/08/28 15:16:55 vnivanch Exp $
     27// GEANT4 tag $Name: geant4-09-03-ref-09 $
    2828//
    29 // Modif (03 September 2008) by J. M. Quesada for external choice of inverse
    30 // cross section option (default OPTxs=2)
    31 // JMQ (06 September 2008) Also external choice has been added for
    32 // superimposed Coulomb barrier (if useSICB=true, default false)
    33 
     29//  J. M. Quesada (August 2008). 
     30//  Based  on previous work by V. Lara
     31//
     32// Modified:
     33// 03.09.2008 by J. M. Quesada for external choice of inverse
     34//                    cross section option (default OPTxs=2)
     35// 06.09.2008 by JMQ Also external choice has been added for
     36//     superimposed Coulomb barrier (if useSICB=true, default false)
     37// 20.08.2010 V.Ivanchenko added int Z and A and cleanup; added
     38//                        G4ParticleDefinition to constructor
    3439
    3540#ifndef G4PreCompoundFragment_h
     
    4045class G4PreCompoundFragment : public G4VPreCompoundFragment
    4146{
    42 protected:
    43   // default constructor
    44   G4PreCompoundFragment() {};
    45    
    4647public: 
    47   // copy constructor
    48   G4PreCompoundFragment(const G4PreCompoundFragment &right);
    49    
    50   // constructor 
    51   G4PreCompoundFragment(const G4double anA, const G4double aZ,
    52                         G4VCoulombBarrier * aCoulombBarrier,
    53                         const G4String &  aName);
     48
     49  G4PreCompoundFragment(const G4ParticleDefinition*,
     50                        G4VCoulombBarrier * aCoulombBarrier);
    5451 
    5552  virtual ~G4PreCompoundFragment();
    56  
    57   // ==========
    58   // operators
    59   // ==========
    60  
    61   const G4PreCompoundFragment&
    62   operator= (const G4PreCompoundFragment &right);
    63  
    64   G4int operator==(const G4PreCompoundFragment &right) const;
    65  
    66   G4int operator!=(const G4PreCompoundFragment &right) const;
    6753     
    68 public:
    69  
    70   // Initialization method
    71 //  void Initialize(const G4Fragment & aFragment);
    72    
    7354  // ================================================
    7455  // Methods for calculating the emission probability
     
    8162  G4double GetKineticEnergy(const G4Fragment & aFragment);
    8263
     64protected:
     65
     66  virtual G4double
     67  ProbabilityDistributionFunction(G4double K,
     68                                  const G4Fragment & aFragment) = 0;
     69
    8370private:       
    8471  // This method performs integration for probability function over
    8572  // fragment kinetic energy
    86   G4double IntegrateEmissionProbability(const G4double & Low,
    87                                         const G4double & Up,
     73  G4double IntegrateEmissionProbability(G4double Low,
     74                                        G4double Up,
    8875                                        const G4Fragment & aFragment); 
    89 protected:
    9076
    91   virtual G4double
    92   ProbabilityDistributionFunction(const G4double K,
    93                                   const G4Fragment & aFragment) = 0;
     77  // default constructor
     78  G4PreCompoundFragment();
     79  // operators
     80  G4PreCompoundFragment(const G4PreCompoundFragment &right);
     81  const G4PreCompoundFragment&
     82  operator= (const G4PreCompoundFragment &right);
     83  G4int operator==(const G4PreCompoundFragment &right) const;
     84  G4int operator!=(const G4PreCompoundFragment &right) const;
    9485
    9586};
  • trunk/source/processes/hadronic/models/pre_equilibrium/exciton_model/include/G4PreCompoundFragmentVector.hh

    r1337 r1340  
    2424// ********************************************************************
    2525//
    26 //
    27 // $Id: G4PreCompoundFragmentVector.hh,v 1.6 2009/02/10 16:01:37 vnivanch Exp $
    28 // GEANT4 tag $Name: geant4-09-04-beta-01 $
     26// $Id: G4PreCompoundFragmentVector.hh,v 1.7 2010/08/28 15:16:55 vnivanch Exp $
     27// GEANT4 tag $Name: geant4-09-03-ref-09 $
    2928//
    3029// Hadronic Process: Nuclear Preequilibrium
    3130// by V. Lara
    3231//
    33 // Modif (03 September 2008) by J. M. Quesada for external choice of inverse
     32// Modified:
     33// 03.09.2008 by J. M. Quesada for external choice of inverse
    3434// cross section option
    35 // JMQ (06 September 2008) Also external choice has been added for:
    36 //                      - superimposed Coulomb barrier (if useSICB=true)
     35// 06.09.2008 JMQ Also external choice has been added for:
     36//                - superimposed Coulomb barrier (if useSICB=true)
     37// 27.08.2010 V.Ivanchenko simplify and make more efficient by adding extra
     38//            vector of probabilities, moved constructor and destructor to source,
     39//            simplify run time computations making inlined
     40//
    3741
    3842#ifndef G4PreCompoundFragmentVector_h
     
    4044
    4145#include "G4VPreCompoundFragment.hh"
     46#include "G4DataVector.hh"
     47#include "Randomize.hh"
     48#include "globals.hh"
     49#include <vector>
     50
     51typedef std::vector<G4VPreCompoundFragment*>  pcfvector;
    4252
    4353class G4PreCompoundFragmentVector
    4454{
    45   typedef std::vector<G4VPreCompoundFragment*>  pcfvector;
    4655public:
    47   inline G4PreCompoundFragmentVector(pcfvector * avector);
    48   inline ~G4PreCompoundFragmentVector();
    49  
     56
     57  G4PreCompoundFragmentVector(pcfvector * avector);
     58
     59  ~G4PreCompoundFragmentVector();
     60
     61  void SetVector(pcfvector * avector);
     62
     63  void SetOPTxs(G4int);
     64
     65  void UseSICB(G4bool);
     66
     67  inline void Initialize(const G4Fragment & aFragment);
     68
     69  inline G4double CalculateProbabilities(const G4Fragment & aFragment);
     70       
     71  inline G4VPreCompoundFragment * ChooseFragment();
     72                 
    5073private:
     74
    5175  G4PreCompoundFragmentVector(const G4PreCompoundFragmentVector &right);
    5276  const G4PreCompoundFragmentVector&
     
    5579  G4bool operator!=(const G4PreCompoundFragmentVector &right) const;   
    5680 
    57 public:
     81  pcfvector * theChannels;
     82  G4DataVector probabilities;
    5883
    59   inline void Initialize(const G4Fragment & aFragment);
    60   inline void ResetStage();
    61   inline void SetVector(pcfvector * avector);
    62 
    63   G4double CalculateProbabilities(const G4Fragment & aFragment);
    64        
    65   G4VPreCompoundFragment * ChooseFragment(void);
    66                
    67 private:
    68 
    69   pcfvector * theChannels;
    70 
    71   G4double TotalEmissionProbability;
    72 
    73 //for inverse cross section choice
    74 public:
    75   inline void SetOPTxs(G4int);
    76   //for superimposed CoulomBarrier for inverse cross sections
    77   inline void UseSICB(G4bool);
    78 
     84  G4int nChannels;
    7985
    8086};
    8187
    82 #include "G4PreCompoundFragmentVector.icc"
     88inline void
     89G4PreCompoundFragmentVector::Initialize(const G4Fragment & aFragment)
     90{
     91  for (G4int i=0; i< nChannels; ++i) {
     92    (*theChannels)[i]->Initialize(aFragment);
     93  }
     94}
     95
     96inline G4double
     97G4PreCompoundFragmentVector::CalculateProbabilities(const G4Fragment & aFragment)
     98{
     99  //G4cout << "## G4PreCompoundFragmentVector::CalculateProbabilities" << G4endl;
     100  G4double probtot = 0.0;
     101  for (G4int i=0; i< nChannels; ++i) {
     102    G4double prob = (*theChannels)[i]->CalcEmissionProbability(aFragment);
     103    probtot += prob;
     104    probabilities[i] = probtot;
     105    //G4cout<<" prob= "<<prob<<" for "<<(*theChannels)[i]->GetName()<<G4endl;
     106  }
     107  return probtot;
     108}
     109
     110inline G4VPreCompoundFragment* G4PreCompoundFragmentVector::ChooseFragment()
     111{
     112  G4double x = probabilities[nChannels-1]*G4UniformRand();
     113  G4int i=0;
     114  for (; i<nChannels; ++i) {
     115    if(x <= probabilities[i]) { break; }
     116  }
     117  return (*theChannels)[i]; 
     118}
    83119
    84120#endif
  • trunk/source/processes/hadronic/models/pre_equilibrium/exciton_model/include/G4PreCompoundFragmentVector.icc

    r1337 r1340  
    2525//
    2626//
    27 // $Id: G4PreCompoundFragmentVector.icc,v 1.4 2008/09/22 10:18:36 ahoward Exp $
    28 // GEANT4 tag $Name: geant4-09-04-beta-01 $
     27// $Id: G4PreCompoundFragmentVector.icc,v 1.5 2010/08/28 15:16:55 vnivanch Exp $
     28// GEANT4 tag $Name: geant4-09-03-ref-09 $
    2929//
    3030// Hadronic Process: Nuclear Preequilibrium
     
    3636//                      - superimposed Coulomb barrier (if useSICB=true)
    3737
    38 inline G4PreCompoundFragmentVector::G4PreCompoundFragmentVector(pcfvector * avector) :
    39   theChannels(avector), TotalEmissionProbability(0.0)
    40 {
    41 }
    4238
    43 
    44 inline G4PreCompoundFragmentVector::~G4PreCompoundFragmentVector()
    45 {
    46 }
    47 
    48 inline void G4PreCompoundFragmentVector::SetVector(pcfvector * avector)
    49 {
    50   theChannels = avector;
    51 }
    52 
    53 inline void
    54 G4PreCompoundFragmentVector::
    55 Initialize(const G4Fragment & aFragment)
    56 {
    57     TotalEmissionProbability = 0.0;
    58     for (pcfvector::iterator i=theChannels->begin();
    59          i != theChannels->end(); i++) (*i)->Initialize(aFragment);
    60     return;
    61 }
    62 
    63 inline void G4PreCompoundFragmentVector::
    64 ResetStage()
    65 {
    66   for (pcfvector::iterator i=theChannels->begin(); i != theChannels->end(); i++)
    67     (*i)->ResetStage();
    68   return;
    69 }
    70 
    71 //for inverse cross section choice
    72 inline void G4PreCompoundFragmentVector::
    73 SetOPTxs(G4int opt)
    74 {   
    75   for (pcfvector::iterator i = theChannels->begin(); i != theChannels->end(); ++i)
    76     (*i)->SetOPTxs(opt);
    77   return;
    78 }
    79 
    80 //for superimposed Coulomb Barrier for inverse  cross sections
    81 inline void G4PreCompoundFragmentVector::
    82 UseSICB(G4bool use)
    83 {   
    84   for (pcfvector::iterator i = theChannels->begin(); i != theChannels->end(); ++i)
    85     (*i)->UseSICB(use);
    86   return;
    87 }
  • trunk/source/processes/hadronic/models/pre_equilibrium/exciton_model/include/G4PreCompoundHe3.hh

    r962 r1340  
    2424// ********************************************************************
    2525//
     26// $Id: G4PreCompoundHe3.hh,v 1.11 2010/08/28 15:16:55 vnivanch Exp $
     27// GEANT4 tag $Name: geant4-09-03-ref-09 $
     28//
    2629// by V. Lara
    2730//
    28 //J. M. Quesada (July 08)
     31// Modified:
     32// J. M. Quesada (July 08) cleanup
     33// 20.08.2010 V.Ivanchenko added int Z and A and cleanup; added
     34//                        G4ParticleDefinition to constructor,
     35//                        moved constructor and destructor to source
    2936
    3037#ifndef G4PreCompoundHe3_h
     
    3239
    3340#include "G4PreCompoundIon.hh"
    34 #include "G4ReactionProduct.hh"
    35 #include "G4He3.hh"
    3641#include "G4He3CoulombBarrier.hh"
    37 #include "G4PreCompoundParameters.hh"
    3842
    3943class G4PreCompoundHe3 : public G4PreCompoundIon
    4044{
    4145public:
    42   // default constructor
    43   G4PreCompoundHe3():G4PreCompoundIon(3,2,&theHe3CoulombBarrier,"He3") {}
    4446
    45   // copy constructor
    46   G4PreCompoundHe3(const G4PreCompoundHe3 &right): G4PreCompoundIon(right) {}
     47  G4PreCompoundHe3();
    4748
    48   // destructor
    49   ~G4PreCompoundHe3() {}
     49  virtual ~G4PreCompoundHe3();
    5050
    51   // operators 
    52   const G4PreCompoundHe3 & operator=(const G4PreCompoundHe3 &right) {
    53     if (&right != this) this->G4PreCompoundIon::operator=(right);
    54     return *this;
    55   }
     51protected:
    5652
    57   G4bool operator==(const G4PreCompoundHe3 &right) const
    58   { return G4PreCompoundIon::operator==(right);}
     53  virtual G4double GetRj(G4int NumberParticles, G4int NumberCharged);
    5954
     55  virtual G4double CrossSection(G4double ekin) ;
     56
     57  virtual G4double FactorialFactor(G4int N, G4int P);
     58
     59  virtual G4double CoalescenceFactor(G4int A);
     60
     61  virtual G4double GetAlpha();
    6062 
    61   G4bool operator!=(const G4PreCompoundHe3 &right) const
    62   { return G4PreCompoundIon::operator!=(right);}
     63  G4double GetOpt12(G4double K);
    6364
    64 
    65   G4ReactionProduct * GetReactionProduct() const;
    66  
     65  G4double GetOpt34(G4double K);
    6766
    6867private:
    6968
    70   virtual G4double GetRj(const G4int NumberParticles, const G4int NumberCharged);
     69  // operators
     70  G4PreCompoundHe3(const G4PreCompoundHe3 &right);
     71  const G4PreCompoundHe3&
     72  operator= (const G4PreCompoundHe3 &right);
     73  G4int operator==(const G4PreCompoundHe3 &right) const;
     74  G4int operator!=(const G4PreCompoundHe3 &right) const;   
    7175
    72   virtual G4double CrossSection(const  G4double K) ;
     76  G4He3CoulombBarrier theHe3CoulombBarrier;
     77  G4double ResidualAthrd;
     78  G4double FragmentAthrd;
     79  G4int FragmentA;
     80  G4int ResidualA;
     81  G4int ResidualZ;
     82  G4int theA;
     83  G4int theZ;
     84};
    7385
    74   virtual G4double FactorialFactor(const G4double N, const G4double P);
    75 
    76   virtual G4double CoalescenceFactor(const G4double A);
    77 
    78   G4double GetOpt0(const G4double K);
    79   G4double GetOpt12(const G4double K);
    80   G4double GetOpt34(const G4double K);
    81 
    82   G4double GetAlpha();
    83  
    84   G4double GetBeta();
    85 
    86 //data members
    87 
    88       G4He3CoulombBarrier theHe3CoulombBarrier;
    89         G4double ResidualA;
    90       G4double ResidualZ;
    91       G4double theA;
    92       G4double theZ;
    93       G4double ResidualAthrd;
    94       G4double FragmentA;
    95       G4double FragmentAthrd;
    96 
    97 
    98 };
    9986#endif
    10087
  • trunk/source/processes/hadronic/models/pre_equilibrium/exciton_model/include/G4PreCompoundIon.hh

    r962 r1340  
    2424// ********************************************************************
    2525//
    26 //J. M. Quesada (August 2008). 
    27 //Based  on previous work by V. Lara
     26// $Id: G4PreCompoundIon.hh,v 1.8 2010/08/28 15:16:55 vnivanch Exp $
     27// GEANT4 tag $Name: geant4-09-03-ref-09 $
    2828//
     29// J. M. Quesada (August 2008). 
     30// Based  on previous work by V. Lara
     31//
     32// Modified:
     33// 20.08.2010 V.Ivanchenko added int Z and A and cleanup; added
     34//                        G4ParticleDefinition to constructor,
     35//                        moved constructor and destructor to source,
     36//                        added inline methods
    2937
    3038#ifndef G4PreCompoundIon_h
     
    3543class G4PreCompoundIon : public G4PreCompoundFragment
    3644{
    37 protected:
    38   // default constructor
    39   G4PreCompoundIon() {}
    40 
    4145public:
    4246
    43   // copy constructor
    44   G4PreCompoundIon(const G4PreCompoundIon &right):
    45     G4PreCompoundFragment(right) {}
    46    
    47   // constructor 
    48   G4PreCompoundIon(const G4double anA,
    49                    const G4double aZ,
    50                    G4VCoulombBarrier* aCoulombBarrier,
    51                    const G4String & aName):
    52     G4PreCompoundFragment(anA,aZ,aCoulombBarrier,aName) {}
    53    
    54   virtual ~G4PreCompoundIon() {}
    55    
    56   // operators 
    57   const G4PreCompoundIon &
    58   operator=(const G4PreCompoundIon &right)
    59   {
    60     if (&right != this) this->G4PreCompoundFragment::operator=(right);
    61     return *this;
    62   }
    63    
    64   G4bool operator==(const G4PreCompoundIon &right) const
    65   {
    66     return G4PreCompoundFragment::operator==(right);
    67   }
    68    
    69   G4bool operator!=(const G4PreCompoundIon &right) const
    70   {
    71     return G4PreCompoundFragment::operator!=(right);
    72   }
    73    
    74   virtual G4double ProbabilityDistributionFunction(const G4double eKin,
    75                                                    const G4Fragment& aFragment);
     47  G4PreCompoundIon(const G4ParticleDefinition*,
     48                   G4VCoulombBarrier * aCoulombBarrier);
     49 
     50  virtual ~G4PreCompoundIon();
    7651
    77   private:
     52protected:
     53         
     54  virtual G4double
     55  ProbabilityDistributionFunction(G4double eKin,
     56                                  const G4Fragment& aFragment);
    7857
    79   G4bool IsItPossible(const G4Fragment& aFragment) ;
    80  
    81   protected:
     58  virtual G4double CrossSection(G4double ekin) = 0;
    8259
    83   virtual G4double CrossSection(const G4double ekin)=0;
     60  virtual G4double
     61  GetRj(G4int NumberParticles, G4int NumberCharged) = 0;
    8462
    85   virtual G4double GetRj(const G4int NumberParticles, const G4int NumberCharged) = 0;
     63  virtual G4double FactorialFactor(G4int N, G4int P) = 0;
    8664
    87   virtual G4double FactorialFactor(const G4double N, const G4double P) = 0;
     65  virtual G4double CoalescenceFactor(G4int A) = 0;
    8866
    89   virtual G4double CoalescenceFactor(const G4double A) = 0;
     67  virtual G4double GetAlpha() = 0;
    9068
    91    };
     69  inline G4double GetBeta();
     70
     71  inline G4double GetOpt0(G4double ekin);
     72
     73private:
     74
     75  // default constructor
     76  G4PreCompoundIon();
     77  // operators
     78  G4PreCompoundIon(const G4PreCompoundIon &right);
     79  const G4PreCompoundIon&
     80  operator= (const G4PreCompoundIon &right);
     81  G4int operator==(const G4PreCompoundIon &right) const;
     82  G4int operator!=(const G4PreCompoundIon &right) const;   
     83
     84  G4double fact;
     85};
     86
     87inline G4double G4PreCompoundIon::GetBeta()
     88{
     89  return -GetCoulombBarrier();
     90}
     91
     92// *********************** OPT=0 : Dostrovski's cross section  ***************
     93inline G4double G4PreCompoundIon::GetOpt0(G4double K)
     94{
     95  G4double r0 = theParameters->Getr0()*ResidualA13();
     96  // cross section is now given in mb (r0 is in mm) for the sake of consistency
     97  //with the rest of the options
     98  return 1.e+25*CLHEP::pi*r0*r0*ResidualA13()*GetAlpha()*(1.+GetBeta()/K);
     99}
    92100
    93101#endif
  • trunk/source/processes/hadronic/models/pre_equilibrium/exciton_model/include/G4PreCompoundModel.hh

    r1337 r1340  
    2424// ********************************************************************
    2525//
    26 //
    27 // $Id: G4PreCompoundModel.hh,v 1.7 2009/11/19 10:19:31 vnivanch Exp $
    28 // GEANT4 tag $Name: geant4-09-04-beta-01 $
     26// $Id: G4PreCompoundModel.hh,v 1.9 2010/08/20 07:41:48 vnivanch Exp $
     27// GEANT4 tag $Name: geant4-09-03-ref-09 $
    2928//
    3029// by V. Lara
    31 
     30//
    3231// Class Description
    3332// Model implementation for pre-equilibrium decay models in geant4.
     
    3736// Class Description - End
    3837//
    39 // Modif (03 September 2008) by J. M. Quesada for external choice of inverse
    40 // cross section option.(default OPTxs=3)
    41 // JMQ (06 September 2008) Also external choices have been added for:
     38// Modified:
     39// 03.09.2008 J.M.Quesada added external choice of inverse
     40//            cross section option.(default OPTxs=3)
     41// 06.09.2008 J.M.Quesada external choices have been added for:
    4242//                - superimposed Coulomb barrier (if useSICB=true, default false)
    4343//                - "never go back"  hipothesis (if useNGB=true, default false)
    4444//                - soft cutoff from preeq. to equlibrium (if useSCO=true, default false)
    4545//                - CEM transition probabilities (if useCEMtr=true)
    46 // J. M. Quesada (30.10.09) : CEM transition probabilities are set as default
     46// 30.10.2009 J.M.Quesada CEM transition probabilities are set as default
     47// 20.08.2010 V.Ivanchenko Cleanup of the code - changed data members and inline methods
    4748
    4849#ifndef G4PreCompoundModel_h
     
    5051
    5152#include "G4VPreCompoundModel.hh"
    52 #include "G4LorentzVector.hh"
    53 
    54 
    55 #include "G4NucleiProperties.hh"
    56 #include "G4PreCompoundParameters.hh"
    57 #include "G4ExcitationHandler.hh"
    5853#include "G4Fragment.hh"
    59 #include "Randomize.hh"
    60 
    61 //#include "G4PreCompoundEmission.hh"
    62 
    63 #include "G4DynamicParticle.hh"
    6454#include "G4ReactionProductVector.hh"
    6555#include "G4ReactionProduct.hh"
    66 #include "G4ParticleTypes.hh"
    67 #include "G4ParticleTable.hh"
     56#include "G4ExcitationHandler.hh"
    6857
    69 //#define debug
    70 //#define verbose
     58class G4PreCompoundParameters;
     59class G4PreCompoundEmission;
     60class G4VPreCompoundTransitions;
     61class G4ParticleDefinition;
    7162
    7263class G4PreCompoundModel : public G4VPreCompoundModel
    73 {
    74  
     64{
    7565public:
    7666
     
    7969  virtual ~G4PreCompoundModel();
    8070
    81 private:
     71  virtual G4HadFinalState * ApplyYourself(const G4HadProjectile & thePrimary,
     72                                          G4Nucleus & theNucleus);
    8273
    83   G4PreCompoundModel();
     74  virtual G4ReactionProductVector* DeExcite(G4Fragment& aFragment);
    8475
    85   G4PreCompoundModel(const G4PreCompoundModel &);
     76  void UseHETCEmission();
     77  void UseDefaultEmission();
     78  void UseGNASHTransition();
     79  void UseDefaultTransition();
    8680
    87   const G4PreCompoundModel& operator=(const G4PreCompoundModel &right);
    88   G4bool operator==(const G4PreCompoundModel &right) const;
    89   G4bool operator!=(const G4PreCompoundModel &right) const;
     81  //for cross section selection
     82  void SetOPTxs(G4int opt);
    9083
    91 public:
    92 
    93   G4HadFinalState * ApplyYourself(const G4HadProjectile & thePrimary, G4Nucleus & theNucleus);
    94 
    95   G4ReactionProductVector* DeExcite(const G4Fragment& aFragment) const;
     84  //for the rest of external choices
     85  void UseSICB();
     86  void UseNGB();
     87  void UseSCO();
     88  void UseCEMtr();
    9689
    9790#ifdef PRECOMPOUND_TEST
     
    10295#endif
    10396
    104   inline void UseHETCEmission() { useHETCEmission = true; }
    105   inline void UseDefaultEmission() { useHETCEmission = false; }
    106   inline void UseGNASHTransition() { useGNASHTransition = true; }
    107   inline void UseDefaultTransition() { useGNASHTransition = false; }
    108 
    109  //for cross section selection
    110   inline void SetOPTxs(G4int opt) { OPTxs = opt; }
    111 //for the rest of external choices
    112   inline void UseSICB() { useSICB = true; }
    113   inline void UseNGB()  { useNGB = true; }
    114   inline void UseSCO()  { useSCO = true; }
    115   inline void UseCEMtr() { useCEMtr = true; }
    11697private: 
    11798
     99  inline
    118100  void PerformEquilibriumEmission(const G4Fragment & aFragment,
    119101                                  G4ReactionProductVector * theResult) const;
    120102
    121 private:
     103  G4PreCompoundModel();
     104  G4PreCompoundModel(const G4PreCompoundModel &);
     105  const G4PreCompoundModel& operator=(const G4PreCompoundModel &right);
     106  G4bool operator==(const G4PreCompoundModel &right) const;
     107  G4bool operator!=(const G4PreCompoundModel &right) const;
    122108
    123109#ifdef debug                             
     
    131117  //==============
    132118
     119  G4PreCompoundParameters*   theParameters;
     120  G4PreCompoundEmission*     theEmission;
     121  G4VPreCompoundTransitions* theTransition;
    133122
     123  const G4ParticleDefinition* proton;
     124  const G4ParticleDefinition* neutron;
    134125
    135   G4bool           useHETCEmission;
    136   G4bool           useGNASHTransition;
     126  G4bool useHETCEmission;
     127  G4bool useGNASHTransition;
    137128
    138 //for cross section options
     129  //for cross section options
    139130  G4int OPTxs;
    140 //for the rest of external choices
     131
     132  //for the rest of external choices
    141133  G4bool useSICB;
    142134  G4bool useNGB;
     
    144136  G4bool useCEMtr;
    145137
    146 
    147     G4HadFinalState theResult;
     138  G4HadFinalState theResult;
    148139
    149140#ifdef PRECOMPOUND_TEST
     
    151142  static std::vector<G4String*> theCreatorModels;
    152143#endif
     144};
    153145
    154 };
     146inline void
     147G4PreCompoundModel::PerformEquilibriumEmission(const G4Fragment & aFragment,
     148                                               G4ReactionProductVector * Result) const
     149{
     150  G4ReactionProductVector* theEquilibriumResult =
     151    GetExcitationHandler()->BreakItUp(aFragment);
     152  Result->insert(Result->end(),theEquilibriumResult->begin(), theEquilibriumResult->end());
     153  delete theEquilibriumResult;
     154}
     155
    155156#endif
    156157
  • trunk/source/processes/hadronic/models/pre_equilibrium/exciton_model/include/G4PreCompoundNeutron.hh

    r962 r1340  
    2424// ********************************************************************
    2525//
     26// $Id: G4PreCompoundNeutron.hh,v 1.13 2010/08/28 15:16:55 vnivanch Exp $
     27// GEANT4 tag $Name: geant4-09-03-ref-09 $
    2628//
    27 //J. M. Quesada (July  08)
    28 
     29// by V. Lara
     30//
     31// Modified:
     32// J. M. Quesada (July 08) cleanup
     33// 20.08.2010 V.Ivanchenko added int Z and A and cleanup; added
     34//                        G4ParticleDefinition to constructor,
     35//                        moved constructor and destructor to source
    2936
    3037#ifndef G4PreCompoundNeutron_h
     
    3239
    3340#include "G4PreCompoundNucleon.hh"
    34 #include "G4ReactionProduct.hh"
    35 #include "G4Neutron.hh"
    36 #include "G4PreCompoundParameters.hh"
    37 #include "Randomize.hh"
    3841#include "G4NeutronCoulombBarrier.hh"
    39 
    4042
    4143class G4PreCompoundNeutron : public G4PreCompoundNucleon
    4244{
    4345public:
    44   // default constructor
    45   G4PreCompoundNeutron() : G4PreCompoundNucleon(1,0,&theNeutronCoulombBarrier,"Neutron") {}
    4646
    47   // copy constructor
    48   G4PreCompoundNeutron(const G4PreCompoundNeutron &right): G4PreCompoundNucleon(right) {}
     47  G4PreCompoundNeutron();
    4948
    50   // destructor
    51   ~G4PreCompoundNeutron() {}
     49  virtual ~G4PreCompoundNeutron();
    5250
    53   // operators 
    54   const G4PreCompoundNeutron & operator=(const G4PreCompoundNeutron &right) {
    55     if (&right != this) this->G4PreCompoundNucleon::operator=(right);
    56     return *this;
    57   }
     51protected:
    5852
    59   G4bool operator==(const G4PreCompoundNeutron &right) const
    60   { return G4PreCompoundNucleon::operator==(right);}
    61  
    62   G4bool operator!=(const G4PreCompoundNeutron &right) const
    63   { return G4PreCompoundNucleon::operator!=(right);}
     53  virtual G4double GetRj(G4int NumberParticles, G4int NumberCharged);
    6454
     55  virtual G4double CrossSection(G4double ekin);
    6556
    66   G4ReactionProduct * GetReactionProduct() const;
    67  
     57  virtual G4double GetAlpha();
     58
     59  virtual G4double GetBeta();
     60
     61  G4double GetOpt12(G4double K);
     62
     63  G4double GetOpt34(G4double K);
     64
    6865private:
    6966
    70   virtual G4double GetRj(const G4int NumberParticles, const G4int NumberCharged);
     67  // operators
     68  G4PreCompoundNeutron(const G4PreCompoundNeutron &right);
     69  const G4PreCompoundNeutron&
     70  operator= (const G4PreCompoundNeutron &right);
     71  G4int operator==(const G4PreCompoundNeutron &right) const;
     72  G4int operator!=(const G4PreCompoundNeutron &right) const;   
    7173
    72   virtual G4double CrossSection(const  G4double K);
    73 
    74 
    75   G4double GetOpt0(const G4double K);
    76   G4double GetOpt12(const G4double K);
    77   G4double GetOpt34(const G4double K);
    78 
    79  
    80   G4double GetAlpha();
    81  
    82   G4double GetBeta();
    83  
    84 //data members
    85 
    86       G4NeutronCoulombBarrier theNeutronCoulombBarrier;
    87       G4double ResidualA;
    88       G4double ResidualZ;
    89       G4double theA;
    90       G4double theZ;
    91       G4double ResidualAthrd;
    92       G4double FragmentA;
    93       G4double FragmentAthrd;
    94 
    95  
     74  G4NeutronCoulombBarrier theNeutronCoulombBarrier;
     75  G4double ResidualAthrd;
     76  G4double FragmentAthrd;
     77  G4int FragmentA;
     78  G4int ResidualA;
     79  G4int ResidualZ;
     80  G4int theA;
     81  G4int theZ;
    9682};
    97 
    9883 
    9984#endif
  • trunk/source/processes/hadronic/models/pre_equilibrium/exciton_model/include/G4PreCompoundNucleon.hh

    r962 r1340  
    2424// ********************************************************************
    2525//
    26 //J. M. Quesada (August 2008). 
    27 //Based  on previous work by V. Lara
     26// $Id: G4PreCompoundNucleon.hh,v 1.7 2010/08/28 15:16:55 vnivanch Exp $
     27// GEANT4 tag $Name: geant4-09-03-ref-09 $
    2828//
     29// J. M. Quesada (August 2008). 
     30// Based  on previous work by V. Lara
     31//
     32// Modified:
     33// 20.08.2010 V.Ivanchenko added int Z and A and cleanup; added
     34//                        G4ParticleDefinition to constructor
    2935
    3036
     
    3642class G4PreCompoundNucleon : public G4PreCompoundFragment
    3743{
     44public: 
     45
     46  G4PreCompoundNucleon(const G4ParticleDefinition*,
     47                       G4VCoulombBarrier * aCoulombBarrier);
     48 
     49  virtual ~G4PreCompoundNucleon();
     50   
     51protected:
     52
     53  virtual G4double
     54  ProbabilityDistributionFunction(G4double eKin,
     55                                  const G4Fragment& aFragment);
     56
     57  virtual G4double CrossSection(G4double ekin) = 0;
     58
     59  virtual G4double
     60  GetRj(G4int NumberParticles, G4int NumberCharged) = 0;
     61
     62  virtual G4double GetAlpha() = 0;
     63
     64  virtual G4double GetBeta() = 0;
     65
     66  inline G4double GetOpt0(G4double ekin);
     67
    3868private:
     69
    3970  // default constructor
    40   G4PreCompoundNucleon() {};
     71  G4PreCompoundNucleon();
     72  // operators
     73  G4PreCompoundNucleon(const G4PreCompoundNucleon &right);
     74  const G4PreCompoundNucleon&
     75  operator= (const G4PreCompoundNucleon &right);
     76  G4int operator==(const G4PreCompoundNucleon &right) const;
     77  G4int operator!=(const G4PreCompoundNucleon &right) const;   
    4178
    42 public:
    43  
    44   // copy constructor
    45   G4PreCompoundNucleon(const G4PreCompoundNucleon &right):
    46     G4PreCompoundFragment(right) {}
     79  G4double fact;
     80};
    4781
    48   // constructor 
    49   G4PreCompoundNucleon(const G4double anA,
    50                        const G4double aZ,
    51                        G4VCoulombBarrier* aCoulombBarrier,                     
    52                        const G4String & aName) :
    53     G4PreCompoundFragment(anA,aZ,aCoulombBarrier,aName) {}
    54 
    55 
    56   virtual ~G4PreCompoundNucleon() {}
    57 
    58   // operators 
    59   const G4PreCompoundNucleon &
    60   operator=(const G4PreCompoundNucleon &right)
    61   {
    62     if (&right != this) this->G4PreCompoundFragment::operator=(right);
    63     return *this;
    64   }
    65  
    66   G4bool operator==(const G4PreCompoundNucleon &right) const
    67   {
    68     return G4PreCompoundFragment::operator==(right);
    69   }
    70    
    71   G4bool operator!=(const G4PreCompoundNucleon &right) const
    72   {
    73     return G4PreCompoundFragment::operator!=(right);
    74   }
    75    
    76   virtual G4double ProbabilityDistributionFunction(const G4double eKin,
    77                                                    const G4Fragment& aFragment);
    78  
    79   private:
    80 
    81   G4bool IsItPossible(const G4Fragment&) ;   
    82    
    83  protected:
    84 
    85   virtual G4double CrossSection(const G4double ekin)=0;
    86 
    87   virtual G4double GetRj(const G4int NumberParticles, const G4int NumberCharged) = 0;
    88 
    89  };
     82// *********************** OPT=0 : Dostrovski's cross section  ***************
     83inline G4double G4PreCompoundNucleon::GetOpt0(G4double K)
     84{
     85  G4double r0 = theParameters->Getr0()*ResidualA13();
     86  // cross section is now given in mb (r0 is in mm) for the sake of consistency
     87  //with the rest of the options
     88  return 1.e+25*CLHEP::pi*r0*r0*ResidualA13()*GetAlpha()*(1.+GetBeta()/K);
     89}
    9090
    9191#endif
  • trunk/source/processes/hadronic/models/pre_equilibrium/exciton_model/include/G4PreCompoundParameters.hh

    r1337 r1340  
    2424// ********************************************************************
    2525//
    26 //
    27 // $Id: G4PreCompoundParameters.hh,v 1.5 2008/05/08 10:34:25 quesada Exp $
    28 // GEANT4 tag $Name: geant4-09-04-beta-01 $
     26// $Id: G4PreCompoundParameters.hh,v 1.6 2010/08/18 14:07:24 vnivanch Exp $
     27// GEANT4 tag $Name: geant4-09-03-ref-09 $
    2928//
    3029// by V. Lara
    3130//
    32 //J. M. Quesada (Apr. 2008) Level density set to A/10 at preequilibrium
    33 
     31// 01.04.2008 J. M. Quesada Level density set to A/10 at preequilibrium
     32// 18.08.2010 V.Ivanchenko make this class as a standard singleton
     33//
    3434
    3535#ifndef G4PreCompoundParameters_h
     
    4040class G4PreCompoundParameters
    4141{
    42 private:
    43     static G4PreCompoundParameters thePreCompoundParameters;
    44 
    45     // default constructor
    46 //    G4PreCompoundParameters() : theLevelDensity(0.125/MeV),
    47 //JMQ level density parameter  set to  A/10 at preequilibrium
    48     G4PreCompoundParameters() : theLevelDensity(0.10/MeV),
    49       r0(1.5*fermi),Transitions_r0(0.6*fermi),FermiEnergy(35.0*MeV)
    50         {}
    51 
    5242public:
    5343
    54     ~G4PreCompoundParameters() {};
     44  static G4PreCompoundParameters * GetAddress();
     45
     46  ~G4PreCompoundParameters();
    5547 
    56     static G4PreCompoundParameters * GetAddress();
     48  inline G4double GetLevelDensity();
    5749
    58     G4double GetLevelDensity()
    59         { return theLevelDensity; }
    60  
     50  inline G4double Getr0();
    6151
    62     G4double Getr0()
    63         { return r0; }
     52  inline G4double GetTransitionsr0();
    6453
    65     G4double GetTransitionsr0()
    66         { return Transitions_r0; }
    67 
    68 
    69     G4double GetFermiEnergy()
    70         { return FermiEnergy; }
     54  inline G4double GetFermiEnergy();
    7155
    7256private:
    73     // Level density parameter
    74     const G4double theLevelDensity;
    7557
    76     // Nuclear radius r0
    77     const G4double r0;
     58  G4PreCompoundParameters();
     59
     60  static G4PreCompoundParameters* theParameters;
     61
     62  // Level density parameter
     63  G4double fLevelDensity;
     64
     65  // Nuclear radius r0
     66  G4double fR0;
    7867       
    79     // Nuclear radius r0 for transitions
    80     const G4double Transitions_r0;
     68  // Nuclear radius r0 for transitions
     69  G4double fTransitions_r0;
    8170
    82     // Fermi energy level
    83     const G4double FermiEnergy;
    84  
     71  // Fermi energy level
     72  G4double fFermiEnergy;
    8573};
    8674
     75inline G4double G4PreCompoundParameters::GetLevelDensity()
     76{
     77  return fLevelDensity;
     78}
     79 
     80inline G4double G4PreCompoundParameters::Getr0()
     81{
     82  return fR0;
     83}
     84
     85inline G4double G4PreCompoundParameters::GetTransitionsr0()
     86{
     87  return fTransitions_r0;
     88}
     89
     90inline G4double G4PreCompoundParameters::GetFermiEnergy()
     91{
     92  return fFermiEnergy;
     93}
     94
    8795#endif
  • trunk/source/processes/hadronic/models/pre_equilibrium/exciton_model/include/G4PreCompoundProton.hh

    r962 r1340  
    2424// ********************************************************************
    2525//
     26// $Id: G4PreCompoundProton.hh,v 1.13 2010/08/28 15:16:55 vnivanch Exp $
     27// GEANT4 tag $Name: geant4-09-03-ref-09 $
    2628//
    27 //J. M. Quesada (July 08)
     29// by V. Lara
     30//
     31// Modified:
     32// J. M. Quesada (July 08) cleanup
     33// 20.08.2010 V.Ivanchenko added int Z and A and cleanup; added
     34//                        G4ParticleDefinition to constructor,
     35//                        moved constructor and destructor to source
    2836
    2937#ifndef G4PreCompoundProton_h
     
    3139
    3240#include "G4PreCompoundNucleon.hh"
    33 #include "G4ReactionProduct.hh"
    34 #include "G4Proton.hh"
    35 #include "G4PreCompoundParameters.hh"
    36 #include "Randomize.hh"
    3741#include "G4ProtonCoulombBarrier.hh"
    3842
     
    4044{
    4145public:
    42   // default constructor
    43   G4PreCompoundProton():G4PreCompoundNucleon(1,1,&theProtonCoulombBarrier,"Proton") {}
    4446
    45   // copy constructor
    46   G4PreCompoundProton(const G4PreCompoundProton &right): G4PreCompoundNucleon(right) {}
     47  G4PreCompoundProton();
    4748
    48   // destructor
    49   ~G4PreCompoundProton() {};
     49  virtual ~G4PreCompoundProton();
    5050
    51   // operators 
    52   const G4PreCompoundProton & operator=(const G4PreCompoundProton &right) {
    53     if (&right != this) this->G4PreCompoundNucleon::operator=(right);
    54     return *this;
    55   };
     51protected:
    5652
    57   G4bool operator==(const G4PreCompoundProton &right) const
    58   { return G4PreCompoundNucleon::operator==(right);}
     53  virtual G4double GetRj(G4int NumberParticles, G4int NumberCharged);
    5954
    60  
    61   G4bool operator!=(const G4PreCompoundProton &right) const
    62   { return G4PreCompoundNucleon::operator!=(right);}
     55  virtual G4double CrossSection(G4double ekin) ;
    6356
     57  virtual G4double GetAlpha();
    6458
    65   G4ReactionProduct * GetReactionProduct() const;
    66  
    67  
     59  virtual G4double GetBeta();
     60
     61  G4double GetOpt1(G4double K);
     62
     63  G4double GetOpt2(G4double K);
     64
     65  G4double GetOpt3(G4double K);
     66
    6867private:
    6968
    70 //JMQ (Sep. 07) combinatorial factor Rj
    71   virtual G4double GetRj(const G4int NumberParticles, const G4int NumberCharged);
     69  // operators
     70  G4PreCompoundProton(const G4PreCompoundProton &right);
     71  const G4PreCompoundProton&
     72  operator= (const G4PreCompoundProton &right);
     73  G4int operator==(const G4PreCompoundProton &right) const;
     74  G4int operator!=(const G4PreCompoundProton &right) const;   
    7275
    73   virtual G4double CrossSection(const  G4double K) ;
    74 
    75 
    76   G4double GetOpt0(const G4double K);
    77   G4double GetOpt1(const G4double K);
    78   G4double GetOpt2(const G4double K);
    79   G4double GetOpt3(const G4double K);
    80 
    81   G4double GetAlpha();
    82  
    83   G4double GetBeta();
    84 
    85 //data members
    86 
    87       G4ProtonCoulombBarrier theProtonCoulombBarrier;
    88        G4double ResidualA;
    89       G4double ResidualZ;
    90       G4double theA;
    91       G4double theZ;
    92       G4double ResidualAthrd;
    93       G4double FragmentA;
    94       G4double FragmentAthrd;
    95 
    96 
    97  
     76  G4ProtonCoulombBarrier theProtonCoulombBarrier;
     77  G4double ResidualAthrd;
     78  G4double FragmentAthrd;
     79  G4int FragmentA;
     80  G4int ResidualA;
     81  G4int ResidualZ;
     82  G4int theA;
     83  G4int theZ;
    9884};
    9985#endif
  • trunk/source/processes/hadronic/models/pre_equilibrium/exciton_model/include/G4PreCompoundTransitions.hh

    r1337 r1340  
    2424// ********************************************************************
    2525//
    26 //
    27 // $Id: G4PreCompoundTransitions.hh,v 1.6 2008/09/22 10:18:36 ahoward Exp $
    28 // GEANT4 tag $Name: geant4-09-04-beta-01 $
     26// $Id: G4PreCompoundTransitions.hh,v 1.8 2010/08/28 15:16:55 vnivanch Exp $
     27// GEANT4 tag $Name: geant4-09-03-ref-09 $
    2928//
    3029// by V. Lara
    31 // J. M. Quesada . New methods for accessing to individual transition probabilities (landa+, landa-, landa0) from
    32 // G4PreCompoundModel.cc 
    33 
     30// 01.05.2008 J. M. Quesada . New methods for accessing to individual transition
     31//                 probabilities (landa+, landa-, landa0) from G4PreCompoundModel 
     32// 20.08.2010 V.Ivanchenko move constructor and destructor to the source
    3433
    3534#ifndef G4PreCompoundTransitions_h
     
    4847#include "globals.hh"
    4948#include "G4Fragment.hh"
    50 #include "G4PreCompoundParameters.hh"
    51 #include "G4Proton.hh"
    52 #include "Randomize.hh"
     49
     50class G4ParticleDefinition;
     51class G4Pow;
    5352
    5453class G4PreCompoundTransitions : public G4VPreCompoundTransitions
    55 
    5654{
    5755public:
    5856
    59   // Calculates transition probabilities with Delta N = +2 (Trans1) -2 (Trans2) and 0 (Trans3)
     57  G4PreCompoundTransitions();
    6058
    61   G4PreCompoundTransitions() : TransitionProb1(0.0), TransitionProb2(0.0), TransitionProb3(0.0){}
     59  virtual ~G4PreCompoundTransitions();
    6260
    63   virtual ~G4PreCompoundTransitions() {}
     61  virtual G4double CalculateProbability(const G4Fragment & aFragment);
     62 
     63  virtual void PerformTransition(G4Fragment & aFragment);
    6464
    6565private:
    6666 
    67   G4PreCompoundTransitions(const G4PreCompoundTransitions &) : G4VPreCompoundTransitions() {};
    68  
     67  G4PreCompoundTransitions(const G4PreCompoundTransitions &);
    6968  const G4PreCompoundTransitions& operator=(const G4PreCompoundTransitions &right);
    70 
    7169  G4bool operator==(const G4PreCompoundTransitions &right) const;
    72  
    7370  G4bool operator!=(const G4PreCompoundTransitions &right) const;
    7471
    75 public:
    76  
    77   virtual G4double CalculateProbability(const G4Fragment & aFragment);
    78  
    79   virtual G4Fragment PerformTransition(const G4Fragment & aFragment);
    80  
    81 private:
    82        
    83   G4double TransitionProb1;
    84   G4double TransitionProb2;
    85   G4double TransitionProb3;
     72  G4Pow* g4pow;
     73  const G4ParticleDefinition* proton;
    8674
    87 
    88   //J. M.Quesada (May. 08)
    89 public:
    90   // inline G4double GetTransitionProb1() const
    91   G4double GetTransitionProb1()
    92   {
    93     return TransitionProb1;
    94   }
    95   // inline G4double GetTransitionProb2() const
    96   G4double GetTransitionProb2()
    97   {
    98     return TransitionProb2;
    99   }
    100   // inline G4double GetTransitionProb3() const
    101   G4double GetTransitionProb3()
    102   {
    103     return TransitionProb3;
    104   }
    105 
     75  G4double FermiEnergy;
     76  G4double r0;  // Nuclear radius
     77  G4double aLDP;// Level density parameter
    10678};
    10779
  • trunk/source/processes/hadronic/models/pre_equilibrium/exciton_model/include/G4PreCompoundTriton.hh

    r962 r1340  
    2424// ********************************************************************
    2525//
     26// $Id: G4PreCompoundTriton.hh,v 1.12 2010/08/28 15:16:55 vnivanch Exp $
     27// GEANT4 tag $Name: geant4-09-03-ref-09 $
    2628//
    2729// by V. Lara
    2830//
    29 //J. M. Quesada (July 08)
     31// Modified:
     32// J. M. Quesada (July 08) cleanup
     33// 20.08.2010 V.Ivanchenko added int Z and A and cleanup; added
     34//                        G4ParticleDefinition to constructor,
     35//                        moved constructor and destructor to source
    3036
    3137#ifndef G4PreCompoundTriton_h
     
    3339
    3440#include "G4PreCompoundIon.hh"
    35 #include "G4ReactionProduct.hh"
    36 #include "G4Triton.hh"
    3741#include "G4TritonCoulombBarrier.hh"
    38 #include "G4PreCompoundParameters.hh"
    39 
    4042
    4143class G4PreCompoundTriton : public G4PreCompoundIon
    4244{
    4345public:
    44   // default constructor
    45   G4PreCompoundTriton():G4PreCompoundIon(3,1,&theTritonCoulombBarrier,"Triton") {}
    4646
    47   // copy constructor
    48   G4PreCompoundTriton(const G4PreCompoundTriton &right): G4PreCompoundIon(right) {}
     47  G4PreCompoundTriton();
    4948
    50   // destructor
    51   ~G4PreCompoundTriton() {}
     49  virtual ~G4PreCompoundTriton();
    5250
    53   // operators 
    54 //  const G4PreCompoundTriton & operator=(const G4PreCompoundTriton &right) {
    55 //    if (&right != this) this->G4PreCompoundIon::operator=(right);
    56 //    return *this;
    57 //  }
     51protected:
    5852
    59 //  G4bool operator==(const G4PreCompoundTriton &right) const
    60 //  { return G4PreCompoundIon::operator==(right);}
     53  virtual G4double GetRj(G4int NumberParticles, G4int NumberCharged);
    6154
     55  virtual G4double CrossSection(G4double ekin) ;
     56
     57  virtual G4double FactorialFactor(G4int N, G4int P);
     58
     59  virtual G4double CoalescenceFactor(G4int A);
     60
     61  virtual G4double GetAlpha();
    6262 
    63 //  G4bool operator!=(const G4PreCompoundTriton &right) const
    64 //  { return G4PreCompoundIon::operator!=(right);}
     63  G4double GetOpt12(G4double K);
    6564
    66 
    67   G4ReactionProduct * GetReactionProduct() const;
    68  
     65  G4double GetOpt34(G4double K);
    6966
    7067private:
    7168
    72   virtual G4double GetRj(const G4int NumberParticles, const G4int NumberCharged);
     69  // operators
     70  G4PreCompoundTriton(const G4PreCompoundTriton &right);
     71  const G4PreCompoundTriton&
     72  operator= (const G4PreCompoundTriton &right);
     73  G4int operator==(const G4PreCompoundTriton &right) const;
     74  G4int operator!=(const G4PreCompoundTriton &right) const;   
    7375
    74   virtual G4double CrossSection(const  G4double K) ;
    75 
    76   virtual G4double FactorialFactor(const G4double N, const G4double P);
    77 
    78   virtual G4double CoalescenceFactor(const G4double A);
    79 
    80   G4double GetOpt0(const G4double K);
    81   G4double GetOpt12(const G4double K);
    82   G4double GetOpt34(const G4double K);
    83 
    84   G4double GetAlpha();
    85  
    86   G4double GetBeta();
    87 
    88 //data members
    89 
    90       G4TritonCoulombBarrier theTritonCoulombBarrier;
    91        G4double ResidualA;
    92       G4double ResidualZ;
    93       G4double theA;
    94       G4double theZ;
    95       G4double ResidualAthrd;
    96       G4double FragmentA;
    97       G4double FragmentAthrd;
     76  G4TritonCoulombBarrier theTritonCoulombBarrier;
     77  G4double ResidualAthrd;
     78  G4double FragmentAthrd;
     79  G4int FragmentA;
     80  G4int ResidualA;
     81  G4int ResidualZ;
     82  G4int theA;
     83  G4int theZ;
    9884};
    9985
  • trunk/source/processes/hadronic/models/pre_equilibrium/exciton_model/include/G4VPreCompoundEmissionFactory.hh

    r819 r1340  
    2424// ********************************************************************
    2525//
    26 
     26// $Id: G4VPreCompoundEmissionFactory.hh,v 1.3 2010/08/28 15:16:55 vnivanch Exp $
     27// GEANT4 tag $Name: geant4-09-03-ref-09 $
     28//
    2729// by V. Lara
    28 
     30//
    2931
    3032#ifndef G4VPreCompoundEmissionFactory_hh
    3133#define G4VPreCompoundEmissionFactory_hh
    32 
    3334
    3435#include "G4VPreCompoundFragment.hh"
     
    3839{
    3940public:
    40   G4VPreCompoundEmissionFactory() : _fragvector(0) {};
     41
     42  G4VPreCompoundEmissionFactory();
     43
    4144  virtual ~G4VPreCompoundEmissionFactory();
    4245 
    43 private:
    44   G4VPreCompoundEmissionFactory(const G4VPreCompoundEmissionFactory & ) {};
    45   const G4VPreCompoundEmissionFactory & operator=(const G4VPreCompoundEmissionFactory & val);
    46   G4bool operator==(const G4VPreCompoundEmissionFactory & val) const;
    47   G4bool operator!=(const G4VPreCompoundEmissionFactory & val) const;
    48 
    49 public:
    50  
    51   std::vector<G4VPreCompoundFragment*> * GetFragmentVector();
     46  inline std::vector<G4VPreCompoundFragment*> * GetFragmentVector();
    5247
    5348protected:
     
    5651
    5752private:
    58   std::vector<G4VPreCompoundFragment*> * _fragvector;
     53
     54  G4VPreCompoundEmissionFactory(const G4VPreCompoundEmissionFactory & );
     55  const G4VPreCompoundEmissionFactory & operator=
     56  (const G4VPreCompoundEmissionFactory & val);
     57  G4bool operator==(const G4VPreCompoundEmissionFactory & val) const;
     58  G4bool operator!=(const G4VPreCompoundEmissionFactory & val) const;
     59
     60  std::vector<G4VPreCompoundFragment*> * fragvector;
    5961
    6062  struct DeleteFragment
     
    6870 
    6971};
     72
     73inline std::vector<G4VPreCompoundFragment*> *
     74G4VPreCompoundEmissionFactory::GetFragmentVector()
     75{
     76  if (fragvector == 0) { fragvector = CreateFragmentVector(); }
     77  return fragvector;
     78}
     79
    7080#endif
  • trunk/source/processes/hadronic/models/pre_equilibrium/exciton_model/include/G4VPreCompoundFragment.hh

    r1337 r1340  
    2424// ********************************************************************
    2525//
    26 //
    27 // $Id: G4VPreCompoundFragment.hh,v 1.10 2009/02/10 16:01:37 vnivanch Exp $
    28 // GEANT4 tag $Name: geant4-09-04-beta-01 $
     26// $Id: G4VPreCompoundFragment.hh,v 1.11 2010/08/28 15:16:55 vnivanch Exp $
     27// GEANT4 tag $Name: geant4-09-03-ref-09 $
    2928//
    3029// J. M. Quesada (August 2008). 
     
    3534// JMQ (06 September 2008) Also external choice has been added for:
    3635//                      - superimposed Coulomb barrier (if useSICB=true)
     36// 20.08.2010 V.Ivanchenko added int Z and A and cleanup; added
     37//                        G4ParticleDefinition to constructor,
     38//                        inline method to build G4ReactionProduct;
     39//                        remove string name
     40//                       
    3741
    3842#ifndef G4VPreCompoundFragment_h
     
    4145#include "G4ios.hh"
    4246#include <iomanip>
    43 #include "G4ParticleTable.hh"
     47#include "G4ParticleDefinition.hh"
    4448#include "G4IonTable.hh"
    4549#include "G4Fragment.hh"
    4650#include "G4VCoulombBarrier.hh"
    47 
    48 class G4ReactionProduct;
     51#include "G4ReactionProduct.hh"
     52#include "G4PreCompoundParameters.hh"
     53#include "G4Pow.hh"
    4954
    5055class G4VPreCompoundFragment
    5156{
     57public: 
     58
    5259  // ============================
    5360  // Constructors and destructor
    5461  // ============================
    55  
    56 protected:
    57   // default constructor
    58   G4VPreCompoundFragment() {};
    5962   
    60 public: 
    61   // copy constructor
    62   G4VPreCompoundFragment(const G4VPreCompoundFragment &right);
    63    
    64   // constructor 
    65   G4VPreCompoundFragment(const G4double anA, const G4double aZ,
    66                          G4VCoulombBarrier * aCoulombBarrier,
    67                          const G4String &  aName);
    68 
     63  G4VPreCompoundFragment(const G4ParticleDefinition*,
     64                         G4VCoulombBarrier * aCoulombBarrier);
    6965 
    7066  virtual ~G4VPreCompoundFragment();
     
    7369  // operators
    7470  // ==========
    75  
    76   const G4VPreCompoundFragment&
    77   operator= (const G4VPreCompoundFragment &right);
    78  
    79   G4int operator==(const G4VPreCompoundFragment &right) const;
    80  
    81   G4int operator!=(const G4VPreCompoundFragment &right) const;
    8271 
    8372  friend std::ostream&
     
    8978  // Pure Virtual methods
    9079  // =====================
    91   virtual G4ReactionProduct * GetReactionProduct() const = 0;   
    9280 
    9381  // Initialization method
     
    10391  virtual G4double GetKineticEnergy(const G4Fragment & aFragment) = 0;
    10492
    105 public:
    106   inline G4double GetA() const;
     93  inline G4ReactionProduct * GetReactionProduct() const;       
     94
     95  inline G4int GetA() const;
    10796 
    108   inline G4double GetZ() const;
     97  inline G4int GetZ() const;
    10998 
    110   inline G4double GetRestA() const;
     99  inline G4int GetRestA() const;
    111100 
    112   inline G4double GetRestZ() const;
     101  inline G4int GetRestZ() const;
     102
     103  inline G4double ResidualA13() const;
    113104 
    114105  inline G4double GetCoulombBarrier() const;
     
    128119  inline G4double GetReducedMass() const;
    129120 
    130   inline const G4LorentzVector GetMomentum() const;
     121  inline const G4LorentzVector& GetMomentum() const;
    131122 
    132123  inline void  SetMomentum(const G4LorentzVector & value);
    133124 
    134   inline void  SetFragmentName(const G4String& aName);
    135  
    136125  inline const G4String GetName() const;
    137  
    138   inline void ResetStage();
    139 
    140   inline G4int GetStage() const;
    141 
    142   inline void IncrementStage();
    143126
    144127  //for inverse cross section choice
     
    147130  inline void UseSICB(G4bool);
    148131
     132protected:
    149133
     134  inline G4bool IsItPossible(const G4Fragment & aFragment) const;
     135
     136private:
     137
     138  // default constructor
     139  G4VPreCompoundFragment();
     140  // copy constructor
     141  G4VPreCompoundFragment(const G4VPreCompoundFragment &right);
     142  const G4VPreCompoundFragment&
     143  operator= (const G4VPreCompoundFragment &right); 
     144  G4int operator==(const G4VPreCompoundFragment &right) const;
     145  G4int operator!=(const G4VPreCompoundFragment &right) const;
    150146
    151147  // =============
     
    153149  // =============
    154150
    155 
    156 private:
    157  
    158   G4double theA;
    159  
    160   G4double theZ;
    161 private:
    162  
    163   G4double theRestNucleusA;
    164  
    165   G4double theRestNucleusZ;
    166 protected: 
    167   G4double theCoulombBarrier;
    168 private:
     151  const G4ParticleDefinition* particle;
    169152  G4VCoulombBarrier * theCoulombBarrierPtr;
    170153 
     154  G4int theA;
     155  G4int theZ;
     156  G4int theRestNucleusA;
     157  G4int theRestNucleusZ;
     158
     159  G4double theRestNucleusA13;
    171160  G4double theBindingEnergy;
     161  G4double theMaximalKineticEnergy;
     162  G4double theRestNucleusMass;
     163  G4double theReducedMass;
     164  G4double theMass;
    172165
    173   G4double theMaximalKineticEnergy;
     166  G4LorentzVector theMomentum;
    174167 
    175168protected:
     169
     170  G4PreCompoundParameters* theParameters;
     171  G4Pow* g4pow;
     172
    176173  G4double theEmissionProbability;
    177 private: 
    178   G4LorentzVector theMomentum;
    179  
    180   G4String theFragmentName;
     174  G4double theCoulombBarrier;
    181175
    182   G4int theStage;
    183 
    184 protected:
    185 //for inverse cross section choice
     176  //for inverse cross section choice
    186177  G4int OPTxs;
    187 //for superimposed Coulomb Barrier for inverse cross sections
     178  //for superimposed Coulomb Barrier for inverse cross sections
    188179  G4bool useSICB;
    189180};
  • trunk/source/processes/hadronic/models/pre_equilibrium/exciton_model/include/G4VPreCompoundFragment.icc

    r1337 r1340  
    2525//
    2626//
    27 // $Id: G4VPreCompoundFragment.icc,v 1.7 2008/09/22 10:18:36 ahoward Exp $
    28 // GEANT4 tag $Name: geant4-09-04-beta-01 $
     27// $Id: G4VPreCompoundFragment.icc,v 1.8 2010/08/28 15:16:55 vnivanch Exp $
     28// GEANT4 tag $Name: geant4-09-03-ref-09 $
    2929//
    3030// by V. Lara
     
    3434// JMQ (06 September 2008) Also external choice has been added for:
    3535//                      - superimposed Coulomb barrier (if useSICB=true)
     36// 23.08.2010 V.Ivanchenko general cleanup, move constructor and destructor
     37//            the source, make GetReactionProduct() and IsItPossible inlined
    3638
    37 inline G4double G4VPreCompoundFragment::GetA() const
     39inline G4bool G4VPreCompoundFragment::
     40IsItPossible(const G4Fragment & aFragment) const
     41{
     42  G4int pplus = aFragment.GetNumberOfCharged();
     43  G4int pneut = aFragment.GetNumberOfParticles()-pplus;
     44  return ((pneut >= theA - theZ) && (pplus >= theZ)
     45        && (theMaximalKineticEnergy > 0));
     46}
     47
     48
     49inline
     50G4ReactionProduct * G4VPreCompoundFragment::GetReactionProduct() const
     51{
     52  G4ReactionProduct * theReactionProduct =
     53    new G4ReactionProduct(const_cast<G4ParticleDefinition*>(particle));
     54  theReactionProduct->SetMomentum(GetMomentum().vect());
     55  theReactionProduct->SetTotalEnergy(GetMomentum().e());
     56  return theReactionProduct;
     57}
     58
     59inline G4int G4VPreCompoundFragment::GetA() const
    3860{
    3961  return theA;
    4062}
    4163
    42 inline G4double G4VPreCompoundFragment::GetZ() const
     64inline G4int G4VPreCompoundFragment::GetZ() const
    4365{
    4466  return theZ;
    4567}
    4668
    47 inline G4double G4VPreCompoundFragment::GetRestA() const
     69inline G4int G4VPreCompoundFragment::GetRestA() const
    4870{
    4971  return theRestNucleusA;
    5072}
    5173   
    52 inline G4double G4VPreCompoundFragment::GetRestZ() const
     74inline G4int G4VPreCompoundFragment::GetRestZ() const
    5375{
    5476  return theRestNucleusZ;
     77}
     78
     79inline G4double G4VPreCompoundFragment::ResidualA13() const
     80{
     81  return theRestNucleusA13;
    5582}
    5683   
     
    82109inline G4double G4VPreCompoundFragment::GetNuclearMass(void) const
    83110{
    84   return G4ParticleTable::GetParticleTable()->
    85       GetIonTable()->GetIonMass(static_cast<G4int>(theZ),static_cast<G4int>(theA));
     111  return theMass;
    86112}
    87 
    88113
    89114inline G4double G4VPreCompoundFragment::GetRestNuclearMass() const
    90115{
    91   return G4ParticleTable::GetParticleTable()->GetIonTable()->
    92     GetIonMass(static_cast<G4int>(theRestNucleusZ),static_cast<G4int>(theRestNucleusA));
     116  return theRestNucleusMass;
    93117}
    94 
    95118
    96119inline G4double G4VPreCompoundFragment::GetReducedMass() const
    97120{
    98   return GetRestNuclearMass()*GetNuclearMass()/
    99     (GetNuclearMass()+GetRestNuclearMass());
     121  return theReducedMass;
    100122}
    101123
    102 
    103 inline const G4LorentzVector G4VPreCompoundFragment::
    104 GetMomentum() const
     124inline
     125const G4LorentzVector& G4VPreCompoundFragment::GetMomentum() const
    105126{
    106127  return theMomentum;
    107128}
    108 
    109129   
    110 inline void G4VPreCompoundFragment::
    111 SetMomentum(const G4LorentzVector & value)
     130inline
     131void G4VPreCompoundFragment::SetMomentum(const G4LorentzVector & value)
    112132{
    113133  theMomentum = value;
    114 }
    115    
    116 inline void G4VPreCompoundFragment::
    117 SetFragmentName(const G4String& aName)
    118 {
    119   theFragmentName = aName;
    120134}
    121135
     
    123137GetName() const
    124138{
    125   return theFragmentName;
    126 }
    127    
    128 inline void G4VPreCompoundFragment::ResetStage()
    129 {
    130   theStage = 1;
    131 }
    132 
    133 inline G4int G4VPreCompoundFragment::GetStage() const
    134 {
    135   return theStage;
    136 }
    137 
    138 inline void G4VPreCompoundFragment::IncrementStage()
    139 {
    140   theStage++;
     139  return particle->GetParticleName();
    141140}
    142141
     
    145144{
    146145  OPTxs=opt;
    147   return;
    148146}
    149147
     
    152150{
    153151  useSICB=use;
    154   return;
    155152}
  • trunk/source/processes/hadronic/models/pre_equilibrium/exciton_model/include/G4VPreCompoundTransitions.hh

    r962 r1340  
    2424// ********************************************************************
    2525//
    26 //J. M. Quesada (May 08). New virtual classes have been added
     26// $Id: G4VPreCompoundTransitions.hh,v 1.6 2010/08/20 07:42:19 vnivanch Exp $
     27// GEANT4 tag $Name: geant4-09-03-ref-09 $
     28//
     29// J. M. Quesada (May 08). New virtual classes have been added Prob1,2,3
    2730// JMQ (06 September 2008) Also external choices have been added for:
    2831//                      - "never go back"  hipothesis (useNGB=true)
    2932//                      - CEM transition probabilities (useCEMtr=true) 
     33// 20.08.2010 V.Ivanchenko move constructor and destructor to the source
    3034
    3135#ifndef G4VPreCompoundTransitions_hh
     
    3842public:
    3943
    40   G4VPreCompoundTransitions():useNGB(false),useCEMtr(false) {}
    41   virtual ~G4VPreCompoundTransitions() {}
     44  G4VPreCompoundTransitions();
     45  virtual ~G4VPreCompoundTransitions();
    4246
    4347  virtual G4double CalculateProbability(const G4Fragment& aFragment) = 0;
    44   virtual G4Fragment PerformTransition(const G4Fragment&  aFragment) = 0;
    45 //J. M. Quesada (May.08) New virtual classes
    46   virtual G4double GetTransitionProb1()=0;
    47   virtual G4double GetTransitionProb2()=0;
    48   virtual G4double GetTransitionProb3()=0;
     48  virtual void PerformTransition(G4Fragment&  aFragment) = 0;
     49
     50  inline G4double GetTransitionProb1() const;
     51
     52  inline G4double GetTransitionProb2() const;
     53
     54  inline G4double GetTransitionProb3() const;
    4955
    5056  // for never go back hypothesis (if useNGB=true, default=false)
     
    5359  inline void UseCEMtr(G4bool use){useCEMtr=use;}
    5460
     61private:
     62
     63  G4VPreCompoundTransitions(const G4VPreCompoundTransitions &);
     64  const G4VPreCompoundTransitions& operator=(const G4VPreCompoundTransitions &right);
     65  G4bool operator==(const G4VPreCompoundTransitions &right) const;
     66  G4bool operator!=(const G4VPreCompoundTransitions &right) const;
     67
    5568protected:
     69
    5670  G4bool useNGB;
    5771  G4bool useCEMtr;
     72
     73  G4double TransitionProb1;
     74  G4double TransitionProb2;
     75  G4double TransitionProb3;
    5876};
    5977
     78  //J. M.Quesada (May. 08)
     79  inline G4double G4VPreCompoundTransitions::GetTransitionProb1() const
     80  {
     81    return TransitionProb1;
     82  }
     83  inline G4double G4VPreCompoundTransitions::GetTransitionProb2() const
     84  {
     85    return TransitionProb2;
     86  }
     87  inline G4double G4VPreCompoundTransitions::GetTransitionProb3() const
     88  {
     89    return TransitionProb3;
     90  }
     91
     92
    6093#endif
  • trunk/source/processes/hadronic/models/pre_equilibrium/exciton_model/src/G4GNASHTransitions.cc

    r819 r1340  
    2424// ********************************************************************
    2525//
     26// $Id: G4GNASHTransitions.cc,v 1.6 2010/08/20 07:42:19 vnivanch Exp $
     27// GEANT4 tag $Name: geant4-09-03-ref-09 $
     28//
     29// 20.08.2010 V.Ivanchenko move constructor and destructor to the source
     30
    2631#include "G4GNASHTransitions.hh"
    2732#include "G4PreCompoundParameters.hh"
    2833#include "G4HadronicException.hh"
    2934
    30 const G4GNASHTransitions & G4GNASHTransitions::
    31 operator=(const G4GNASHTransitions & )
    32 {
    33   throw G4HadronicException(__FILE__, __LINE__, "G4GNASHTransitions::operator= meant to not be accesable");
    34   return *this;
    35 }
     35G4GNASHTransitions::G4GNASHTransitions()
     36{}
    3637
    37 G4bool G4GNASHTransitions::operator==(const G4GNASHTransitions & ) const
    38 {
    39   return false;
    40 }
    41 
    42 G4bool G4GNASHTransitions::operator!=(const G4GNASHTransitions & ) const
    43 {
    44   return true;
    45 }
    46 
     38G4GNASHTransitions::~G4GNASHTransitions()
     39{}
    4740
    4841G4double G4GNASHTransitions::
     
    7265  Probability *= theMatrixElement;
    7366
    74 
    7567  return Probability;
    7668}
    7769
    78 G4Fragment G4GNASHTransitions::
    79 PerformTransition(const G4Fragment & aFragment)
     70void G4GNASHTransitions::PerformTransition(G4Fragment & result)
    8071{
    81   G4Fragment result(aFragment);
    8272  result.SetNumberOfParticles(result.GetNumberOfParticles()+1);
    8373  result.SetNumberOfHoles(result.GetNumberOfHoles()+1);
     
    9181      result.SetNumberOfCharged(result.GetNumberOfParticles());
    9282    }
    93 
    94   return result;
    9583}
  • trunk/source/processes/hadronic/models/pre_equilibrium/exciton_model/src/G4HETCAlpha.cc

    r819 r1340  
    2424// ********************************************************************
    2525//
     26// $Id: G4HETCAlpha.cc,v 1.4 2010/08/28 15:16:55 vnivanch Exp $
     27// GEANT4 tag $Name: geant4-09-03-ref-09 $
     28//
     29// by V. Lara
     30//
     31// Modified:
     32// 23.08.2010 V.Ivanchenko general cleanup, move constructor and destructor
     33//            the source, use G4Pow
     34
    2635#include "G4HETCAlpha.hh"
     36#include "G4Alpha.hh"
     37
     38G4HETCAlpha::G4HETCAlpha()
     39  : G4HETCChargedFragment(G4Alpha::Alpha(), &theAlphaCoulombBarrier)
     40{}
     41
     42G4HETCAlpha::~G4HETCAlpha()
     43{}
     44
     45G4double G4HETCAlpha::GetAlpha()
     46{
     47  G4double C = 0.0;
     48  G4int aZ = GetZ() + GetRestZ();
     49  if (aZ <= 30)
     50    {
     51      C = 0.10;
     52    }
     53  else if (aZ <= 50)
     54    {
     55      C = 0.1 + -((aZ-50.)/20.)*0.02;
     56    }
     57  else if (aZ < 70)
     58    {
     59      C = 0.08 + -((aZ-70.)/20.)*0.02;
     60    }
     61  else
     62    {
     63      C = 0.06;
     64    }
     65  return 1.0+C;
     66}
     67 
     68G4double G4HETCAlpha::GetBeta()
     69{
     70  return -GetCoulombBarrier();
     71}
     72 
     73G4double G4HETCAlpha::GetSpinFactor()
     74{
     75  return 1.0;
     76}
    2777
    2878G4double G4HETCAlpha::K(const G4Fragment & aFragment)
    2979{
    30   if (GetStage() != 1) return 1.0;
    31   // Number of protons in projectile
    32   G4double Pa = static_cast<G4int>(aFragment.GetParticleDefinition()->GetPDGCharge());
    33   // Number of neutrons in projectile
    34   G4double Na = aFragment.GetParticleDefinition()->GetBaryonNumber();
    35   G4double TargetA = aFragment.GetA() - Na;
    36   G4double TargetZ = aFragment.GetZ() - Pa;
    37   Na -= Pa;
    38   G4double r = TargetZ/TargetA;
     80  // Number of protons in emitted fragment
     81  G4int Pa = GetZ();
     82  // Number of neutrons in emitted fragment
     83  G4int Na = GetA() - Pa;
    3984
    40  
    41   G4double P = aFragment.GetNumberOfParticles();
    42   G4double H = aFragment.GetNumberOfHoles();
     85  G4int TargetZ = GetRestZ();
     86  G4int TargetA = GetRestA();
     87  G4double r = G4double(TargetZ)/G4double(TargetA);
     88
     89  G4int P = aFragment.GetNumberOfParticles();
     90  G4int H = aFragment.GetNumberOfHoles();
    4391
    4492  G4double result = 0.0;
     
    52100         Pa*(Pa-1.0)*Na*(Na-1.0));
    53101
    54       result /= 6.0*std::pow((TargetZ/TargetA)*((TargetA-TargetZ)/TargetA),2.0);
     102      result /= 6.0*r*r*(1. - r) *(1. - r);
    55103    }
    56 
    57104  return std::max(0.0,result);
    58 
    59105}
  • trunk/source/processes/hadronic/models/pre_equilibrium/exciton_model/src/G4HETCChargedFragment.cc

    r819 r1340  
    2424// ********************************************************************
    2525//
     26// $Id: G4HETCChargedFragment.cc,v 1.3 2010/08/28 15:16:55 vnivanch Exp $
     27// GEANT4 tag $Name: geant4-09-03-ref-09 $
     28//
    2629// by V. Lara
     30//
     31// Modified:
     32// 23.08.2010 V.Ivanchenko general cleanup, move constructor and destructor
     33//            the source, use G4Pow
     34//
    2735
    2836#include "G4HETCChargedFragment.hh"
     37#include "G4VCoulombBarrier.hh"
    2938#include "G4PreCompoundParameters.hh"
    3039
     40G4HETCChargedFragment::G4HETCChargedFragment(
     41  const G4ParticleDefinition* pd, G4VCoulombBarrier * aCoulombBarrier)
     42  : G4HETCFragment(pd, aCoulombBarrier)
     43{}
     44
     45G4HETCChargedFragment::~G4HETCChargedFragment()
     46{}
    3147
    3248G4double G4HETCChargedFragment::
    3349GetKineticEnergy(const G4Fragment & aFragment)
    3450{
    35   // Number of protons in projectile
    36   G4double Pa = aFragment.GetParticleDefinition()->GetPDGCharge();
    37   // Number of neutrons in projectile
    38   G4double Na = aFragment.GetParticleDefinition()->GetBaryonNumber();
    39   Na -= Pa;
    40  
    41   G4double Pb = aFragment.GetNumberOfParticles();
    42   G4double H = aFragment.GetNumberOfHoles();
     51  G4int Pb = aFragment.GetNumberOfParticles();
     52  G4int H = aFragment.GetNumberOfHoles();
    4353
    44   G4double Ab = std::max(0.0,(Pb*Pb+H*H+Pb-3*H)/4.0);
     54  G4double g0 = (6.0/pi2)*aFragment.GetA_asInt()*theParameters->GetLevelDensity();
     55
     56  G4double Ab = std::max(0.0,G4double(Pb*Pb+H*H+Pb-3*H)/(4.0*g0));
    4557  G4double Emax = GetMaximalKineticEnergy() - Ab;
    4658
    47   G4double x = BetaRand(static_cast<G4int>(Pb+H),2);
     59  G4double x = BetaRand(Pb + H, 2);
    4860 
    4961  return Emax - (Emax-GetCoulombBarrier())*x;
  • trunk/source/processes/hadronic/models/pre_equilibrium/exciton_model/src/G4HETCDeuteron.cc

    r819 r1340  
    2424// ********************************************************************
    2525//
     26// $Id: G4HETCDeuteron.cc,v 1.3 2010/08/28 15:16:55 vnivanch Exp $
     27// GEANT4 tag $Name: geant4-09-03-ref-09 $
     28//
     29// by V. Lara
     30//
     31// Modified:
     32// 23.08.2010 V.Ivanchenko general cleanup, move constructor and destructor
     33//            the source, use G4Pow
     34
    2635#include "G4HETCDeuteron.hh"
     36#include "G4Deuteron.hh"
     37
     38G4HETCDeuteron::G4HETCDeuteron()
     39  : G4HETCChargedFragment(G4Deuteron::Deuteron(), &theDeuteronCoulombBarrier)
     40{}
     41
     42G4HETCDeuteron::~G4HETCDeuteron()
     43{}
     44
     45G4double G4HETCDeuteron::GetAlpha()
     46{
     47  G4double C = 0.0;
     48  G4int aZ = GetZ() + GetRestZ();
     49  if (aZ >= 70)
     50    {
     51      C = 0.10;
     52    }
     53  else
     54    {
     55      C = ((((0.15417e-06*aZ) - 0.29875e-04)*aZ + 0.21071e-02)*aZ - 0.66612e-01)*aZ + 0.98375;
     56    }
     57  return 1.0 + C/2.0;
     58}
     59 
     60G4double G4HETCDeuteron::GetBeta()
     61{
     62  return -GetCoulombBarrier();
     63}
     64
     65G4double G4HETCDeuteron::GetSpinFactor()
     66{
     67  // 2s+1
     68  return 3.0;
     69}
    2770
    2871G4double G4HETCDeuteron::K(const G4Fragment & aFragment)
    2972{
    30   if (GetStage() != 1) return 1.0;
    31   // Number of protons in projectile
    32   G4double Pa = static_cast<G4int>(aFragment.GetParticleDefinition()->GetPDGCharge());
    33   // Number of neutrons in projectile
    34   G4double Na = aFragment.GetParticleDefinition()->GetBaryonNumber();
    35   G4double TargetA = aFragment.GetA() - Na;
    36   G4double TargetZ = aFragment.GetZ() - Pa;
    37   Na -= Pa;
    38   G4double r = TargetZ/TargetA;
     73  // Number of protons in emitted fragment
     74  G4int Pa = GetZ();
     75  // Number of neutrons in emitted fragment
     76  G4int Na = GetA() - Pa;
    3977
     78  G4int TargetZ = GetRestZ();
     79  G4int TargetA = GetRestA();
     80  G4double r = G4double(TargetZ)/G4double(TargetA);
    4081 
    41   G4double P = aFragment.GetNumberOfParticles();
    42   G4double H = aFragment.GetNumberOfHoles();
     82  G4int P = aFragment.GetNumberOfParticles();
     83  G4int H = aFragment.GetNumberOfHoles();
    4384
    4485  G4double result = 0.0;
     
    4788      result = 2.0* (H*(H-1.0)*r*(r-1.0)+H*(Na*r+Pa*(1.0-r)) + Pa*Na)/(P*(P-1.0));
    4889
    49       result /= (TargetZ/TargetA)*((TargetA-TargetZ)/TargetA);
     90      result /= r*(1.0 - r);
    5091    }
    51 
    5292  return std::max(0.0,result);
    53 
    5493}
  • trunk/source/processes/hadronic/models/pre_equilibrium/exciton_model/src/G4HETCEmissionFactory.cc

    r819 r1340  
    2424// ********************************************************************
    2525//
     26// $Id: G4HETCEmissionFactory.cc,v 1.5 2010/08/28 15:16:55 vnivanch Exp $
     27// GEANT4 tag $Name: geant4-09-03-ref-09 $
     28//
     29// by V. Lara
     30//
     31// Modified:
     32// 23.08.2010 V.Ivanchenko general cleanup, move constructor and destructor
     33//            the source
     34//
     35
    2636#include "G4HETCEmissionFactory.hh"
    2737
     
    3343#include "G4HETCAlpha.hh"
    3444
     45G4HETCEmissionFactory::G4HETCEmissionFactory()
     46{}
    3547
    36 const G4HETCEmissionFactory & G4HETCEmissionFactory::
    37 operator=(const G4HETCEmissionFactory & )
    38 {
    39   throw G4HadronicException(__FILE__, __LINE__, "G4HETCEmissionFactory::operator= meant to not be accessable.");
    40   return *this;
    41 }
    42 
    43 G4bool G4HETCEmissionFactory::
    44 operator==(const G4HETCEmissionFactory & ) const
    45 {
    46   throw G4HadronicException(__FILE__, __LINE__, "G4HETCEmissionFactory::operator== meant to not be accessable.");
    47   return false;
    48 }
    49 
    50 G4bool G4HETCEmissionFactory::
    51 operator!=(const G4HETCEmissionFactory & ) const
    52 {
    53   throw G4HadronicException(__FILE__, __LINE__, "G4HETCEmissionFactory::operator!= meant to not be accessable.");
    54   return true;
    55 }
    56 
     48G4HETCEmissionFactory::~G4HETCEmissionFactory()
     49{}
    5750
    5851std::vector<G4VPreCompoundFragment*> *  G4HETCEmissionFactory::
  • trunk/source/processes/hadronic/models/pre_equilibrium/exciton_model/src/G4HETCFragment.cc

    r819 r1340  
    2424// ********************************************************************
    2525//
     26// $Id: G4HETCFragment.cc,v 1.4 2010/08/28 15:16:55 vnivanch Exp $
     27// GEANT4 tag $Name: geant4-09-03-ref-09 $
     28//
    2629// by V. Lara
     30//
     31// Modified:
     32// 23.08.2010 V.Ivanchenko general cleanup, move constructor and destructor
     33//            the source, use G4Pow
    2734 
    2835#include "G4HETCFragment.hh"
     
    3037
    3138G4HETCFragment::
    32 G4HETCFragment(const G4HETCFragment & right) :
    33   G4VPreCompoundFragment(right)
     39G4HETCFragment(const G4ParticleDefinition* part,
     40               G4VCoulombBarrier* aCoulombBarrier)
     41  : G4VPreCompoundFragment(part, aCoulombBarrier)
    3442{
     43  G4double r0 = theParameters->Getr0();
     44  r2norm = r0*r0/(CLHEP::pi*CLHEP::hbarc*CLHEP::hbarc*CLHEP::hbarc);
    3545}
    3646
    37 G4HETCFragment::
    38 G4HETCFragment(const G4double anA,
    39                const G4double aZ,
    40                G4VCoulombBarrier* aCoulombBarrier,
    41                const G4String & aName) :
    42   G4VPreCompoundFragment(anA,aZ,aCoulombBarrier,aName)
     47G4HETCFragment::~G4HETCFragment()
    4348{}
    44 
    45 G4HETCFragment::~G4HETCFragment()
    46 {
    47 }
    48 
    49 const G4HETCFragment & G4HETCFragment::
    50 operator= (const G4HETCFragment & right)
    51 {
    52   if (&right != this) this->G4VPreCompoundFragment::operator=(right);
    53   return *this;
    54 }
    55 
    56 G4int G4HETCFragment::operator==(const G4HETCFragment & right) const
    57 {
    58   return G4VPreCompoundFragment::operator==(right);
    59 }
    60 
    61 G4int G4HETCFragment::operator!=(const G4HETCFragment & right) const
    62 {
    63   return G4VPreCompoundFragment::operator!=(right);
    64 }
    65 
    66 
    6749
    6850G4double G4HETCFragment::
     
    7052{
    7153  if (GetEnergyThreshold() <= 0.0)
    72   {
     54    {
    7355      theEmissionProbability = 0.0;
    7456      return 0.0;
    75   }   
     57    }   
    7658  // Coulomb barrier is the lower limit
    7759  // of integration over kinetic energy
     
    8062  // Excitation energy of nucleus after fragment emission is the upper limit
    8163  // of integration over kinetic energy
    82   G4double UpperLimit = this->GetMaximalKineticEnergy();
     64  G4double UpperLimit = GetMaximalKineticEnergy();
    8365 
    84   theEmissionProbability = IntegrateEmissionProbability(LowerLimit,UpperLimit,aFragment);
     66  theEmissionProbability =
     67    IntegrateEmissionProbability(LowerLimit,UpperLimit,aFragment);
    8568   
    8669  return theEmissionProbability;
     
    9275{
    9376 
    94   if ( !IsItPossible(aFragment) ) return 0.0;
    95 
    96   const G4double r0 = G4PreCompoundParameters::GetAddress()->Getr0();
     77  if ( !IsItPossible(aFragment) ) { return 0.0; }
    9778   
    9879  G4double U = aFragment.GetExcitationEnergy();
    99   G4double P = aFragment.GetNumberOfParticles();
    100   G4double H = aFragment.GetNumberOfHoles();
    101   G4double N = P + H;
    102   G4double Pb = P - GetA();
    103   G4double Nb = Pb + H;
    104   if (Nb <= 0.0) return 0.0;
    105  
    106   G4double A = (P*P+H*H+P-3*H)/4.0;
    107   G4double Ab = (Pb*Pb+H*H+Pb-3*H)/4.0;
     80
     81  G4int P  = aFragment.GetNumberOfParticles();
     82  G4int H  = aFragment.GetNumberOfHoles();
     83  G4int N  = P + H;
     84  G4int Pb = P - GetA();
     85  G4int Nb = Pb + H;
     86  if (Nb <= 0.0) { return 0.0; }
     87  G4double g = (6.0/pi2)*aFragment.GetA()*theParameters->GetLevelDensity();
     88  G4double gb = (6.0/pi2)*GetRestA()*theParameters->GetLevelDensity();
     89
     90  G4double A  = G4double(P*P+H*H+P-3*H)/(4.0*g);
     91  G4double Ab = G4double(Pb*Pb+H*H+Pb-3*H)/(4.0*gb);
    10892  U = std::max(U-A,0.0);
    109   if (U <= 0.0) return 0.0;
     93  if (U <= 0.0) { return 0.0; }
    11094
    111   G4double g = (6.0/pi2)*aFragment.GetA()*G4PreCompoundParameters::GetAddress()->GetLevelDensity();
    112   G4double gb = (6.0/pi2)*GetRestA()*G4PreCompoundParameters::GetAddress()->GetLevelDensity();
    113 
    114   G4double Pf = P;
    115   G4double Hf = H;
    116   G4double Nf = N-1.0;
    117   for (G4int i = 1; i < GetA(); i++)
     95  G4int Pf = P;
     96  G4int Hf = H;
     97  G4int Nf = N-1;
     98  for (G4int i = 1; i < GetA(); ++i)
    11899    {
    119100      Pf *= (P-i);
     
    125106  G4double Y = std::max(Up - Ab - Low, 0.0);
    126107
    127   G4double Probability = GetSpinFactor()/(pi*hbarc*hbarc*hbarc) * GetReducedMass() * GetAlpha() *
    128     r0 * r0 * std::pow(GetRestA(),2.0/3.0)/std::pow(U,N-1) * (std::pow(gb,Nb)/std::pow(g,N)) * Pf * Hf * Nf * K(aFragment) *
    129     std::pow(Y,Nb) * (X/Nb - Y/(Nb+1));
     108  G4double Probability = r2norm*GetSpinFactor()*GetReducedMass()*GetAlpha()
     109    *g4pow->Z23(GetRestA())*Pf*Hf*Nf*K(aFragment)*(X/Nb - Y/(Nb+1))
     110    *U*g4pow->powN(g*gb,Nb)/g4pow->powN(g*U,N);
     111
     112  //  G4double Probability = GetSpinFactor()/(pi*hbarc*hbarc*hbarc)
     113  //  * GetReducedMass() * GetAlpha() *
     114  //  r0 * r0 * std::pow->Z23(GetRestA())/std::pow->pow(U,G4double(N-1)) *
     115  //  (std::pow->(gb,Nb)/std::pow(g,N)) * Pf * Hf * Nf * K(aFragment) *
     116  //  std::pow(Y,Nb) * (X/Nb - Y/(Nb+1));
    130117
    131118  return Probability;
  • trunk/source/processes/hadronic/models/pre_equilibrium/exciton_model/src/G4HETCHe3.cc

    r819 r1340  
    2424// ********************************************************************
    2525//
     26// $Id: G4HETCHe3.cc,v 1.4 2010/08/28 15:16:55 vnivanch Exp $
     27// GEANT4 tag $Name: geant4-09-03-ref-09 $
     28//
     29// by V. Lara
     30//
     31// Modified:
     32// 23.08.2010 V.Ivanchenko general cleanup, move constructor and destructor
     33//            the source, use G4Pow
     34
    2635#include "G4HETCHe3.hh"
     36#include "G4He3.hh"
     37
     38G4HETCHe3::G4HETCHe3()
     39  : G4HETCChargedFragment(G4He3::He3(), &theHe3CoulombBarrier)
     40{}
     41
     42G4HETCHe3::~G4HETCHe3()
     43{}
     44
     45G4double G4HETCHe3::GetAlpha()
     46{
     47  G4double C = 0.0;
     48  G4int aZ = GetZ() + GetRestZ();
     49  if (aZ <= 30)
     50    {
     51      C = 0.10;
     52    }
     53  else if (aZ <= 50)
     54    {
     55      C = 0.1 + -((aZ-50.)/20.)*0.02;
     56    }
     57  else if (aZ < 70)
     58    {
     59      C = 0.08 + -((aZ-70.)/20.)*0.02;
     60    }
     61  else
     62    {
     63      C = 0.06;
     64    }
     65  return 1.0 + C*(4.0/3.0);
     66}
     67 
     68G4double G4HETCHe3::GetBeta()
     69{
     70  return -GetCoulombBarrier();
     71}
     72
     73G4double G4HETCHe3::GetSpinFactor()
     74{
     75  // 2s+1
     76  return 2.0;
     77}   
    2778
    2879G4double G4HETCHe3::K(const G4Fragment & aFragment)
    2980{
    30   if (GetStage() != 1) return 1.0;
    31   // Number of protons in projectile
    32   G4double Pa = static_cast<G4int>(aFragment.GetParticleDefinition()->GetPDGCharge());
    33   // Number of neutrons in projectile
    34   G4double Na = aFragment.GetParticleDefinition()->GetBaryonNumber();
    35   G4double TargetA = aFragment.GetA() - Na;
    36   G4double TargetZ = aFragment.GetZ() - Pa;
    37   Na -= Pa;
    38   G4double r = TargetZ/TargetA;
     81  // Number of protons in emitted fragment
     82  G4int Pa = GetZ();
     83  // Number of neutrons in emitted fragment
     84  G4int Na = GetA() - Pa;
    3985
     86  G4int TargetZ = GetRestZ();
     87  G4int TargetA = GetRestA();
     88  G4double r = G4double(TargetZ)/G4double(TargetA);
    4089
    41  
    42   G4double P = aFragment.GetNumberOfParticles();
    43   G4double H = aFragment.GetNumberOfHoles();
     90  G4int P = aFragment.GetNumberOfParticles();
     91  G4int H = aFragment.GetNumberOfHoles();
    4492
    4593  G4double result = 0.0;
     
    52100         Pa*Na*(Pa-1.0));
    53101
    54       result /= 3.0*std::pow(TargetZ/TargetA, 2.0) * ((TargetA-TargetZ)/TargetA);
     102      result /= 3.0*r*r*(1.0 - r);
    55103    }
    56 
    57104  return std::max(0.0,result);
    58 
    59105}
  • trunk/source/processes/hadronic/models/pre_equilibrium/exciton_model/src/G4HETCNeutron.cc

    r819 r1340  
    2424// ********************************************************************
    2525//
     26// $Id: G4HETCNeutron.cc,v 1.3 2010/08/28 15:16:55 vnivanch Exp $
     27// GEANT4 tag $Name: geant4-09-03-ref-09 $
     28//
     29// by V. Lara
     30//
     31// Modified:
     32// 23.08.2010 V.Ivanchenko general cleanup, move constructor and destructor
     33//            the source, use G4Pow
     34
    2635#include "G4HETCNeutron.hh"
     36#include "G4Neutron.hh"
    2737
     38G4HETCNeutron::G4HETCNeutron()
     39  : G4HETCFragment(G4Neutron::Neutron(), &theNeutronCoulombBarrier)
     40{}
     41
     42G4HETCNeutron::~G4HETCNeutron()
     43{}
     44
     45G4double G4HETCNeutron::GetAlpha()
     46{
     47  return 0.76+2.2/g4pow->Z13(GetRestA());
     48}
     49 
     50G4double G4HETCNeutron::GetBeta()
     51{
     52  return (2.12/g4pow->Z23(GetRestA())-0.05)*MeV/GetAlpha();
     53}
     54
     55G4double G4HETCNeutron::GetSpinFactor()
     56{
     57  // (2s+1)
     58  return 2.0;
     59}
     60 
    2861G4double G4HETCNeutron::K(const G4Fragment & aFragment)
    2962{
    30   if (GetStage() != 1) return 1.0;
    31   // Number of protons in projectile
    32   G4double Pa = static_cast<G4int>(aFragment.GetParticleDefinition()->GetPDGCharge());
    33   // Number of neutrons in projectile
    34   G4double Na = aFragment.GetParticleDefinition()->GetBaryonNumber();
    35   G4double TargetA = aFragment.GetA() - Na;
    36   G4double TargetZ = aFragment.GetZ() - Pa;
    37   Na -= Pa;
    38   G4double r = TargetZ/TargetA;
     63  // Number of protons in emitted fragment
     64  G4int Pa = GetZ();
     65  // Number of neutrons in emitted fragment
     66  G4int Na = GetA() - Pa;
     67
     68  G4int TargetZ = GetRestZ();
     69  G4int TargetA = GetRestA();
     70  G4double r = G4double(TargetZ)/G4double(TargetA);
    3971 
    40   G4double P = aFragment.GetNumberOfParticles();
    41   G4double H = aFragment.GetNumberOfHoles();
     72  G4int P = aFragment.GetNumberOfParticles();
     73  G4int H = aFragment.GetNumberOfHoles();
    4274 
    4375  G4double result = 0.0;
    4476  if (P > 0)
    4577    {
    46       result = (H*(1.0-r)+Na)/P;
    47 
    48       result /= (TargetA-TargetZ)/TargetA;
     78      result = (H + Na/(1.0-r))/P;
    4979    }
    5080 
     
    5282}
    5383
    54 
    5584G4double G4HETCNeutron::GetKineticEnergy(const G4Fragment & aFragment)
    5685{
    57   G4double H = aFragment.GetNumberOfHoles();
    58   G4double Pb = aFragment.GetNumberOfParticles() - GetA();
    59   G4double Nb = Pb + H;
     86  G4int H = aFragment.GetNumberOfHoles();
     87  G4int Pb = aFragment.GetNumberOfParticles();
     88  G4int Nb = Pb + H;
     89  G4double g0 = (6.0/pi2)*aFragment.GetA_asInt()*theParameters->GetLevelDensity();
    6090 
    61   G4double Ab = std::max(0.0,(Pb*Pb+H*H+Pb-3*H)/4.0);
     91  G4double Ab = std::max(0.0,G4double(Pb*Pb+H*H+Pb-3*H)/(4.0*g0));
    6292  G4double Emax = GetMaximalKineticEnergy() - Ab;
    6393 
    64   G4double cut = GetBeta() / (GetBeta()+Emax/(Nb+1));
     94  G4double cut = GetBeta() / (GetBeta()+Emax/G4double(Nb+1));
    6595  G4double x(0.0);
    6696  if (G4UniformRand() <= cut)
    6797    {
    68       x = BetaRand(static_cast<G4int>(Nb),1);
     98      x = BetaRand(Nb,1);
    6999    }
    70100  else
    71101    {
    72       x = BetaRand(static_cast<G4int>(Nb),2);
     102      x = BetaRand(Nb,2);
    73103    }
    74104
  • trunk/source/processes/hadronic/models/pre_equilibrium/exciton_model/src/G4HETCProton.cc

    r819 r1340  
    2424// ********************************************************************
    2525//
     26// $Id: G4HETCProton.cc,v 1.3 2010/08/28 15:16:55 vnivanch Exp $
     27// GEANT4 tag $Name: geant4-09-03-ref-09 $
     28//
     29// by V. Lara
     30//
     31// Modified:
     32// 23.08.2010 V.Ivanchenko general cleanup, move constructor and destructor
     33//            the source, use G4Pow
     34
    2635#include "G4HETCProton.hh"
     36#include "G4Proton.hh"
     37
     38G4HETCProton::G4HETCProton()
     39  : G4HETCChargedFragment(G4Proton::Proton(), &theProtonCoulombBarrier)
     40{}
     41
     42G4HETCProton::~G4HETCProton()
     43{}
     44
     45G4double G4HETCProton::GetAlpha()
     46{
     47  G4int aZ = GetRestZ();
     48  G4double C = 0.0;
     49  if (aZ >= 70)
     50    {
     51      C = 0.10;
     52    }
     53  else
     54    {
     55      C = ((((0.15417e-06*aZ) - 0.29875e-04)*aZ + 0.21071e-02)*aZ - 0.66612e-01)*aZ + 0.98375;
     56    }
     57  return 1.0 + C;
     58}
     59 
     60G4double G4HETCProton::GetBeta()
     61{
     62  return -GetCoulombBarrier();
     63}
     64 
     65G4double G4HETCProton::GetSpinFactor()
     66{
     67  // 2s+1
     68  return 2.0;
     69}
    2770
    2871G4double G4HETCProton::K(const G4Fragment & aFragment)
    2972{
    30   if (GetStage() != 1) return 1.0;
    31   // Number of protons in projectile
    32   G4double Pa = static_cast<G4int>(aFragment.GetParticleDefinition()->GetPDGCharge());
    33   // Number of neutrons in projectile
    34   G4double Na = aFragment.GetParticleDefinition()->GetBaryonNumber();
    35   G4double TargetA = aFragment.GetA() - Na;
    36   G4double TargetZ = aFragment.GetZ() - Pa;
    37   Na -= Pa;
    38   G4double r = TargetZ/TargetA;
     73  // Number of protons in emitted fragment
     74  G4int Pa = GetZ();
    3975
     76  G4int TargetZ = GetRestZ();
     77  G4int TargetA = GetRestA();
     78  G4double r = G4double(TargetZ)/G4double(TargetA);
    4079
    41   G4double P = aFragment.GetNumberOfParticles();
    42   G4double H = aFragment.GetNumberOfHoles();
     80  G4int P = aFragment.GetNumberOfParticles();
     81  G4int H = aFragment.GetNumberOfHoles();
    4382
    4483  G4double result = 0.0;
    4584  if (P > 0)
    4685    {
    47       result = (H*r + Pa)/P;
    48      
    49       result /= TargetZ/TargetA;
     86      result = (H*r + Pa)/P/r;
    5087    }
    5188
  • trunk/source/processes/hadronic/models/pre_equilibrium/exciton_model/src/G4HETCTriton.cc

    r819 r1340  
    2424// ********************************************************************
    2525//
     26// $Id: G4HETCTriton.cc,v 1.4 2010/08/28 15:16:55 vnivanch Exp $
     27// GEANT4 tag $Name: geant4-09-03-ref-09 $
     28//
     29// by V. Lara
     30//
     31// Modified:
     32// 23.08.2010 V.Ivanchenko general cleanup, move constructor and destructor
     33//            the source, use G4Pow
     34
    2635#include "G4HETCTriton.hh"
     36#include "G4Triton.hh"
     37
     38G4HETCTriton::G4HETCTriton()
     39  : G4HETCChargedFragment(G4Triton::Triton(), &theTritonCoulombBarrier)
     40{}
     41
     42G4HETCTriton::~G4HETCTriton()
     43{}
     44
     45G4double G4HETCTriton::GetAlpha()
     46{
     47  G4double C = 0.0;
     48  G4int aZ = GetZ() + GetRestZ();
     49  if (aZ >= 70)
     50    {
     51      C = 0.10;
     52    }
     53  else
     54    {
     55      C = ((((0.15417e-06*aZ) - 0.29875e-04)*aZ + 0.21071e-02)*aZ - 0.66612e-01)*aZ + 0.98375;
     56    }
     57 
     58  return 1.0 + C/3.0;
     59}
     60 
     61G4double G4HETCTriton::GetBeta()
     62{
     63  return -GetCoulombBarrier();
     64}
     65
     66G4double G4HETCTriton::GetSpinFactor()
     67{
     68  // 2s+1
     69  return 2.0;
     70}
    2771
    2872G4double G4HETCTriton::K(const G4Fragment & aFragment)
    2973{
    30   if (GetStage() != 1) return 1.0;
    31   // Number of protons in projectile
    32   G4double Pa = static_cast<G4int>(aFragment.GetParticleDefinition()->GetPDGCharge());
    33   // Number of neutrons in projectile
    34   G4double Na = aFragment.GetParticleDefinition()->GetBaryonNumber();
    35   G4double TargetA = aFragment.GetA() - Na;
    36   G4double TargetZ = aFragment.GetZ() - Pa;
    37   Na -= Pa;
    38   G4double r = TargetZ/TargetA;
     74  // Number of protons in emitted fragment
     75  G4int Pa = GetZ();
     76  // Number of neutrons in emitted fragment
     77  G4int Na = GetA() - Pa;
    3978
    40  
    41   G4double P = aFragment.GetNumberOfParticles();
    42   G4double H = aFragment.GetNumberOfHoles();
     79  G4int TargetZ = GetRestZ();
     80  G4int TargetA = GetRestA();
     81  G4double r = G4double(TargetZ)/G4double(TargetA);
     82
     83  G4int P = aFragment.GetNumberOfParticles();
     84  G4int H = aFragment.GetNumberOfHoles();
    4385
    4486  G4double result = 0.0;
     
    5193         Pa*Na*(Na-1.0));
    5294
    53       result /= 3.0*(TargetZ/TargetA)*std::pow((TargetA-TargetZ)/TargetA,2.0);
     95      result /= 3.0*r*(1.0 - r)*(1.0 - r);
    5496    }
    55 
    5697  return std::max(0.0,result);
    57 
    5898}
  • trunk/source/processes/hadronic/models/pre_equilibrium/exciton_model/src/G4LowEIonFragmentation.cc

    r1337 r1340  
    2424// ********************************************************************
    2525//
    26 //
    27 // $Id: G4LowEIonFragmentation.cc,v 1.5 2010/06/01 16:51:11 vnivanch Exp $
    28 // GEANT4 tag $Name: geant4-09-04-beta-01 $
     26// $Id: G4LowEIonFragmentation.cc,v 1.7 2010/09/08 16:38:09 gunter Exp $
     27// GEANT4 tag $Name: geant4-09-03-ref-09 $
    2928//
    3029//---------------------------------------------------------------------------
     
    7271
    7372  // Get Target A, Z
    74   G4double aTargetA = theNucleus.GetN();
    75   G4double aTargetZ = theNucleus.GetZ();
     73  G4int aTargetA = theNucleus.GetA_asInt();
     74  G4int aTargetZ = theNucleus.GetZ_asInt();
    7675
    7776  // Get Projectile A, Z
    78   G4double aProjectileA = thePrimary.GetDefinition()->GetBaryonNumber();
    79   G4double aProjectileZ = thePrimary.GetDefinition()->GetPDGCharge();
     77  G4int aProjectileA = thePrimary.GetDefinition()->GetBaryonNumber();
     78  G4int aProjectileZ = G4lrint(thePrimary.GetDefinition()->GetPDGCharge());
    8079
    8180  // Get Maximum radius of both
     
    131130    }
    132131  }
    133   hits ++;
     132  hits++;
    134133
    135134  // From target:
     
    157156  G4double compoundEnergy = thePrimary.GetTotalEnergy()*particlesFromProjectile/aProjectileA; 
    158157  G4double targetMass = G4ParticleTable::GetParticleTable()
    159                         ->GetIonTable()->GetIonMass(static_cast<G4int>(aTargetZ) ,static_cast<G4int>(aTargetA));
     158                        ->GetIonTable()->GetIonMass(aTargetZ, aTargetA);
    160159  compoundEnergy += targetMass;
    161160  G4LorentzVector fragment4Momentum(exciton3Momentum, compoundEnergy);
     
    163162  // take the nucleons and fill the Fragments
    164163  G4Fragment anInitialState;
    165   anInitialState.SetA(aTargetA+particlesFromProjectile);
    166   anInitialState.SetZ(aTargetZ+chargedFromProjectile);
     164  anInitialState.SetZandA_asInt(aTargetZ+chargedFromProjectile,
     165                                aTargetA+particlesFromProjectile);
    167166  // M.A. Cortes fix
    168167  //anInitialState.SetNumberOfParticles(particlesFromProjectile);
     
    187186 
    188187    G4Fragment initialState2;
    189     initialState2.SetA(aProjectileA-particlesFromProjectile);
    190     initialState2.SetZ(aProjectileZ-chargedFromProjectile);
     188    initialState2.SetZandA_asInt(aProjectileZ-chargedFromProjectile,
     189                                 aProjectileA-particlesFromProjectile);
    191190    initialState2.SetNumberOfHoles(static_cast<G4int>((aProjectileA-particlesFromProjectile)/2.0));
    192191    initialState2.SetNumberOfParticles(static_cast<G4int>((aProjectileZ-chargedFromProjectile)/2.0));
  • trunk/source/processes/hadronic/models/pre_equilibrium/exciton_model/src/G4PreCompoundAlpha.cc

    r1337 r1340  
    2424// ********************************************************************
    2525//
    26 //
    27 // $Id: G4PreCompoundAlpha.cc,v 1.6 2010/04/09 14:06:17 vnivanch Exp $
    28 // GEANT4 tag $Name: geant4-09-04-beta-01 $
     26// $Id: G4PreCompoundAlpha.cc,v 1.7 2010/08/28 15:16:55 vnivanch Exp $
     27// GEANT4 tag $Name: geant4-09-03-ref-09 $
    2928//
    3029// -------------------------------------------------------------------
     
    3938// Modified: 
    4039// 21.08.2008 J. M. Quesada add choice of options 
     40// 20.08.2010 V.Ivanchenko added G4Pow and G4PreCompoundParameters pointers
     41//                         use int Z and A and cleanup
    4142//
    4243
    4344#include "G4PreCompoundAlpha.hh"
    44 
    45 G4ReactionProduct * G4PreCompoundAlpha::GetReactionProduct() const
    46 {
    47   G4ReactionProduct * theReactionProduct =
    48     new G4ReactionProduct(G4Alpha::AlphaDefinition());
    49   theReactionProduct->SetMomentum(GetMomentum().vect());
    50   theReactionProduct->SetTotalEnergy(GetMomentum().e());
    51 #ifdef PRECOMPOUND_TEST
    52   theReactionProduct->SetCreatorModel("G4PrecompoundModel");
    53 #endif
    54   return theReactionProduct;
    55 }   
    56 
    57 G4double G4PreCompoundAlpha::FactorialFactor(const G4double N, const G4double P)
    58 {
    59   return
    60       (N-4.0)*(P-3.0)*(
    61                        (((N-3.0)*(P-2.0))/2.0) *(
    62                                                  (((N-2.0)*(P-1.0))/3.0) *(
    63                                                                            (((N-1.0)*P)/2.0)
    64                                                                            )
    65                                                  )
    66                        );
    67 }
    68  
    69 G4double G4PreCompoundAlpha::CoalescenceFactor(const G4double A)
    70 {
    71   return 4096.0/(A*A*A); 
     45#include "G4Alpha.hh"
     46
     47G4PreCompoundAlpha::G4PreCompoundAlpha()
     48  : G4PreCompoundIon(G4Alpha::Alpha(), &theAlphaCoulombBarrier)
     49{}
     50
     51G4PreCompoundAlpha::~G4PreCompoundAlpha()
     52{}
     53
     54G4double G4PreCompoundAlpha::FactorialFactor(G4int N, G4int P)
     55{
     56  return G4double((N-4)*(P-3)*(N-3)*(P-2)*(N-2)*(P-1)*(N-1)*P)/12.0;
     57}
     58 
     59G4double G4PreCompoundAlpha::CoalescenceFactor(G4int A)
     60{
     61  return 4096.0/G4double(A*A*A); 
    7262}   
    7363
    74 G4double G4PreCompoundAlpha::GetRj(const G4int NumberParticles, const G4int NumberCharged)
     64G4double G4PreCompoundAlpha::GetRj(G4int nParticles, G4int nCharged)
    7565{
    7666  G4double rj = 0.0;
    77   G4double denominator = NumberParticles*(NumberParticles-1)*(NumberParticles-2)*(NumberParticles-3);
    78   if(NumberCharged >=2 && (NumberParticles-NumberCharged) >=2 ) {
    79     rj = 6.0*static_cast<G4double>(NumberCharged*(NumberCharged-1)*(NumberParticles-NumberCharged)*
    80                                    (NumberParticles-NumberCharged-1))/static_cast<G4double>(denominator); 
     67  if(nCharged >=2 && (nParticles-nCharged) >=2 ) {
     68    G4double denominator =
     69      G4double(nParticles*(nParticles-1)*(nParticles-2)*(nParticles-3));
     70    rj = 6.0*nCharged*(nCharged-1)*(nParticles-nCharged)*(nParticles-nCharged-1)
     71      /denominator; 
    8172  }
    8273  return rj;
    8374}
    8475
    85 ////////////////////////////////////////////////////////////////////////////////////
     76/////////////////////////////////////////////////////////////////////////////////
    8677//J. M. Quesada (Dec 2007-June 2008): New inverse reaction cross sections
    8778//OPT=0 Dostrovski's parameterization
     
    8980//OPT=3,4 Kalbach's parameterization
    9081//
    91 G4double G4PreCompoundAlpha::CrossSection(const  G4double K)
    92 {
    93 
    94   ResidualA=GetRestA();
    95   ResidualZ=GetRestZ();
    96   theA=GetA();
    97   theZ=GetZ();
    98   ResidualAthrd=std::pow(ResidualA,0.33333);
    99   FragmentA=GetA()+GetRestA();
    100   FragmentAthrd=std::pow(FragmentA,0.33333);
    101 
    102 
    103   if (OPTxs==0) return GetOpt0( K);
    104   else if( OPTxs==1 || OPTxs==2) return GetOpt12( K);
    105   else if (OPTxs==3 || OPTxs==4)  return GetOpt34( K);
     82G4double G4PreCompoundAlpha::CrossSection(G4double K)
     83{
     84  ResidualA = GetRestA();
     85  ResidualZ = GetRestZ();
     86  theA = GetA();
     87  theZ = GetZ();
     88  ResidualAthrd = ResidualA13();
     89  FragmentA = theA + ResidualA;
     90  FragmentAthrd = g4pow->Z13(FragmentA);
     91
     92  if (OPTxs==0) { return GetOpt0( K); }
     93  else if( OPTxs==1 || OPTxs==2) { return GetOpt12( K); }
     94  else if (OPTxs==3 || OPTxs==4) { return GetOpt34( K); }
    10695  else{
    10796    std::ostringstream errOs;
     
    112101}
    113102
    114 // *********************** OPT=0 : Dostrovski's cross section  *****************************
    115 
    116 G4double G4PreCompoundAlpha::GetOpt0(const  G4double K)
    117 {
    118   const G4double r0 = G4PreCompoundParameters::GetAddress()->Getr0();
    119   // cross section is now given in mb (r0 is in mm) for the sake of consistency
    120   //with the rest of the options
    121   return 1.e+25*pi*(r0*ResidualAthrd)*(r0*ResidualAthrd)*GetAlpha()*(1.+GetBeta()/K);
    122 }
    123 //
    124 //----------------
    125 //
    126103G4double G4PreCompoundAlpha::GetAlpha()
    127104{
    128105  G4double C = 0.0;
    129   G4double aZ = GetZ() + GetRestZ();
     106  G4int aZ = theZ + ResidualZ;
    130107  if (aZ <= 30)
    131108    {
     
    134111  else if (aZ <= 50)
    135112    {
    136       C = 0.1 + -((aZ-50.)/20.)*0.02;
     113      C = 0.1 - (aZ-30)*0.001;
    137114    }
    138115  else if (aZ < 70)
    139116    {
    140       C = 0.08 + -((aZ-70.)/20.)*0.02;
     117      C = 0.08 - (aZ-50)*0.001;
    141118    }
    142119  else
     
    146123  return 1.0+C;
    147124}
    148 //
    149 //--------------------
    150 //
    151 G4double G4PreCompoundAlpha::GetBeta()
    152 {
    153   return -GetCoulombBarrier();
    154 }
    155 //
    156 //********************* OPT=1,2 : Chatterjee's cross section ************************
     125
     126//
     127//********************* OPT=1,2 : Chatterjee's cross section ********************
    157128//(fitting to cross section from Bechetti & Greenles OM potential)
    158129
    159 G4double G4PreCompoundAlpha::GetOpt12(const  G4double K)
    160 {
    161 
     130G4double G4PreCompoundAlpha::GetOpt12(G4double K)
     131{
    162132  G4double Kc=K;
    163133
    164134  // JMQ xsec is set constant above limit of validity
    165   if (K>50) Kc=50;
     135  if (K > 50*MeV) { Kc = 50*MeV; }
    166136
    167137  G4double landa ,mu ,nu ,p , Ec,q,r,ji,xs;
     
    182152  p = p0 + p1/Ec + p2/(Ec*Ec);
    183153  landa = landa0*ResidualA + landa1;
    184   mu = mu0*std::pow(ResidualA,mu1);
    185   nu = std::pow(ResidualA,mu1)*(nu0 + nu1*Ec + nu2*(Ec*Ec));
     154  G4double resmu1 = g4pow->powZ(ResidualA,mu1);
     155  mu = mu0*resmu1;
     156  nu = resmu1*(nu0 + nu1*Ec + nu2*(Ec*Ec));
    186157  q = landa - nu/(Ec*Ec) - 2*p*Ec;
    187158  r = mu + 2*nu/Ec + p*(Ec*Ec);
     
    194165             
    195166  return xs;
    196 
    197167}
    198168
    199169// *********** OPT=3,4 : Kalbach's cross sections (from PRECO code)*************
    200 G4double G4PreCompoundAlpha::GetOpt34(const  G4double K)
     170G4double G4PreCompoundAlpha::GetOpt34(G4double K)
    201171// c     ** alpha from huizenga and igo
    202172{
    203 
    204173  G4double landa, mu, nu, p , signor(1.),sig;
    205174  G4double ec,ecsq,xnulam,etest(0.),a;
     
    209178  G4double     spill= 1.e+18;
    210179
    211   G4double       p0 = 10.95;
     180  G4double     p0 = 10.95;
    212181  G4double     p1 = -85.2;
    213182  G4double     p2 = 1146.;
     
    228197  p = p0 + p1/ec + p2/ecsq;
    229198  landa = landa0*ResidualA + landa1;
    230   a = std::pow(ResidualA,mu1);
     199  a = g4pow->powZ(ResidualA,mu1);
    231200  mu = mu0 * a;
    232201  nu = a* (nu0+nu1*ec+nu2*ecsq); 
    233202  xnulam = nu / landa;
    234   if (xnulam > spill) xnulam=0.;
    235   if (xnulam >= flow) etest = 1.2 *std::sqrt(xnulam);
     203  if (xnulam > spill) { xnulam=0.; }
     204  if (xnulam >= flow) { etest = 1.2 *std::sqrt(xnulam); }
    236205
    237206  a = -2.*p*ec + landa - nu/ecsq;
     
    239208  ecut = 0.;
    240209  cut = a*a - 4.*p*b;
    241   if (cut > 0.) ecut = std::sqrt(cut);
     210  if (cut > 0.) { ecut = std::sqrt(cut); }
    242211  ecut = (ecut-a) / (p+p);
    243212  ecut2 = ecut;
    244 //JMQ 290310 for avoiding unphysical increase below minimum (at ecut)
    245 //ecut<0 means that there is no cut with energy axis, i.e. xs is set to 0 bellow minimum
    246 //  if (cut < 0.) ecut2 = ecut - 2.;
    247   if (cut < 0.) ecut2 = ecut;
    248   elab = K * FragmentA / ResidualA;
     213  //JMQ 290310 for avoiding unphysical increase below minimum (at ecut)
     214  // ecut<0 means that there is no cut with energy axis, i.e. xs is set
     215  // to 0 bellow minimum
     216  //  if (cut < 0.) ecut2 = ecut - 2.;
     217  if (cut < 0.) { ecut2 = ecut; }
     218  elab = K * FragmentA / G4double(ResidualA);
    249219  sig = 0.;
    250220 
    251221  if (elab <= ec) { //start for E<Ec
    252     if (elab > ecut2)  sig = (p*elab*elab+a*elab+b) * signor;
     222    if (elab > ecut2) { sig = (p*elab*elab+a*elab+b) * signor; }
    253223  }           //end for E<Ec
    254224  else {           //start for E>Ec
    255225    sig = (landa*elab+mu+nu/elab) * signor;
    256226    geom = 0.;
    257     if (xnulam < flow || elab < etest) return sig;
     227    if (xnulam < flow || elab < etest) { return sig; }
    258228    geom = std::sqrt(theA*K);
    259229    geom = 1.23*ResidualAthrd + ra + 4.573/geom;
     
    262232  }           //end for E>Ec
    263233  return sig;
    264  
    265 }
    266 
    267 //   ************************** end of cross sections *******************************
     234}
  • trunk/source/processes/hadronic/models/pre_equilibrium/exciton_model/src/G4PreCompoundDeuteron.cc

    r1337 r1340  
    2424// ********************************************************************
    2525//
    26 // $Id: G4PreCompoundDeuteron.cc,v 1.6 2010/04/09 14:06:17 vnivanch Exp $
    27 // GEANT4 tag $Name: geant4-09-04-beta-01 $
     26// $Id: G4PreCompoundDeuteron.cc,v 1.7 2010/08/28 15:16:55 vnivanch Exp $
     27// GEANT4 tag $Name: geant4-09-03-ref-09 $
    2828//
    2929// -------------------------------------------------------------------
     
    3838// Modified: 
    3939// 21.08.2008 J. M. Quesada add choice of options 
     40// 20.08.2010 V.Ivanchenko added G4Pow and G4PreCompoundParameters pointers
     41//                         use int Z and A and cleanup
    4042//
    4143
    4244#include "G4PreCompoundDeuteron.hh"
    43 
    44 G4ReactionProduct * G4PreCompoundDeuteron::GetReactionProduct() const
    45 {
    46   G4ReactionProduct * theReactionProduct =
    47     new G4ReactionProduct(G4Deuteron::DeuteronDefinition());
    48   theReactionProduct->SetMomentum(GetMomentum().vect());
    49   theReactionProduct->SetTotalEnergy(GetMomentum().e());
    50 #ifdef PRECOMPOUND_TEST
    51   theReactionProduct->SetCreatorModel("G4PrecompoundModel");
    52 #endif
    53   return theReactionProduct;
    54 }   
    55 
     45#include "G4Deuteron.hh"
     46
     47G4PreCompoundDeuteron::G4PreCompoundDeuteron()
     48  : G4PreCompoundIon(G4Deuteron::Deuteron(), &theDeuteronCoulombBarrier)
     49{}
     50
     51G4PreCompoundDeuteron::~G4PreCompoundDeuteron()
     52{}
    5653 
    57 G4double G4PreCompoundDeuteron::FactorialFactor(const G4double N, const G4double P)
    58 {
    59   return (N-1.0)*(N-2.0)*(P-1.0)*P/2.0;
     54G4double G4PreCompoundDeuteron::FactorialFactor(G4int N, G4int P)
     55{
     56  return G4double((N-1)*(N-2)*(P-1)*P)/2.0;
    6057}
    6158 
    62 G4double G4PreCompoundDeuteron::CoalescenceFactor(const G4double A)
    63 {
    64   return 16.0/A;
     59G4double G4PreCompoundDeuteron::CoalescenceFactor(G4int A)
     60{
     61  return 16.0/G4double(A);
    6562}   
    6663
    67 G4double G4PreCompoundDeuteron::GetRj(const G4int NumberParticles, const G4int NumberCharged)
     64G4double G4PreCompoundDeuteron::GetRj(G4int nParticles, const G4int nCharged)
    6865{
    6966  G4double rj = 0.0;
    70   G4double denominator = NumberParticles*(NumberParticles-1);
    71   if(NumberCharged >=1 && (NumberParticles-NumberCharged) >=1) {
    72     rj = 2.0*static_cast<G4double>(NumberCharged*(NumberParticles-NumberCharged))
    73       / static_cast<G4double>(denominator);
     67  if(nCharged >=1 && (nParticles-nCharged) >=1) {
     68    G4double denominator = G4double(nParticles*(nParticles-1));
     69    rj = 2*nCharged*(nParticles-nCharged)/denominator;
    7470  }
    7571  return rj;
    7672}
    7773
    78 ////////////////////////////////////////////////////////////////////////////////////
     74////////////////////////////////////////////////////////////////////////////////
    7975//J. M. Quesada (Dec 2007-June 2008): New inverse reaction cross sections
    8076//OPT=0 Dostrovski's parameterization
     
    8278//OPT=3,4 Kalbach's parameterization
    8379//
    84 G4double G4PreCompoundDeuteron::CrossSection(const  G4double K)
    85 {
    86 
    87   ResidualA=GetRestA();
    88   ResidualZ=GetRestZ();
    89   theA=GetA();
    90   theZ=GetZ();
    91   ResidualAthrd=std::pow(ResidualA,0.33333);
    92   FragmentA=GetA()+GetRestA();
    93   FragmentAthrd=std::pow(FragmentA,0.33333);
    94 
    95 
    96   if (OPTxs==0) return GetOpt0( K);
    97   else if( OPTxs==1 || OPTxs==2) return GetOpt12( K);
    98   else if (OPTxs==3 || OPTxs==4)  return GetOpt34( K);
     80G4double G4PreCompoundDeuteron::CrossSection(G4double K)
     81{
     82  ResidualA = GetRestA();
     83  ResidualZ = GetRestZ();
     84  theA = GetA();
     85  theZ = GetZ();
     86  ResidualAthrd = ResidualA13();
     87  FragmentA = theA + ResidualA;
     88  FragmentAthrd = g4pow->Z13(FragmentA);
     89
     90  if (OPTxs==0) { return GetOpt0( K); }
     91  else if( OPTxs==1 || OPTxs==2) { return GetOpt12( K); }
     92  else if (OPTxs==3 || OPTxs==4) { return GetOpt34( K); }
    9993  else{
    10094    std::ostringstream errOs;
     
    10599}
    106100
    107 // *********************** OPT=0 : Dostrovski's cross section  *****************************
    108 
    109 G4double G4PreCompoundDeuteron::GetOpt0(const  G4double K)
    110 {
    111   const G4double r0 = G4PreCompoundParameters::GetAddress()->Getr0();
    112   // cross section is now given in mb (r0 is in mm) for the sake of consistency
    113   //with the rest of the options
    114   return 1.e+25*pi*(r0*ResidualAthrd)*(r0*ResidualAthrd)*GetAlpha()*(1.+GetBeta()/K);
    115 }
    116 //
    117 //---------
    118 //
    119101G4double G4PreCompoundDeuteron::GetAlpha()
    120102{
    121103  G4double C = 0.0;
    122   G4double aZ = GetZ() + GetRestZ();
     104  G4int aZ = theZ + ResidualZ;
    123105  if (aZ >= 70)
    124106    {
     
    132114}
    133115//
    134 //---------
    135 //
    136 G4double G4PreCompoundDeuteron::GetBeta()
    137 {
    138   return -GetCoulombBarrier();
    139 }
    140 //
    141 //********************* OPT=1,2 : Chatterjee's cross section ************************
     116//********************* OPT=1,2 : Chatterjee's cross section ********************
    142117//(fitting to cross section from Bechetti & Greenles OM potential)
    143118
    144 G4double G4PreCompoundDeuteron::GetOpt12(const  G4double K)
    145 {
    146 
    147   G4double Kc=K;
    148 
    149 // JMQ xsec is set constat above limit of validity
    150   if (K>50) Kc=50;
     119G4double G4PreCompoundDeuteron::GetOpt12(G4double K)
     120{
     121  G4double Kc = K;
     122
     123  // JMQ xsec is set constat above limit of validity
     124  if (K > 50*MeV) { Kc = 50*MeV; }
    151125
    152126  G4double landa ,mu ,nu ,p , Ec,q,r,ji,xs;
    153   //G4double Eo(0),epsilon1(0),epsilon2(0),discri(0);
    154 
    155127 
    156128  G4double    p0 = -38.21;
     
    165137  G4double    nu2 = -5.924; 
    166138  G4double    delta=1.2;           
    167  
    168139
    169140  Ec = 1.44*theZ*ResidualZ/(1.5*ResidualAthrd+delta);
    170141  p = p0 + p1/Ec + p2/(Ec*Ec);
    171142  landa = landa0*ResidualA + landa1;
    172   mu = mu0*std::pow(ResidualA,mu1);
    173   nu = std::pow(ResidualA,mu1)*(nu0 + nu1*Ec + nu2*(Ec*Ec));
     143  G4double resmu1 = g4pow->powZ(ResidualA,mu1);
     144  mu = mu0*resmu1;
     145  nu = resmu1*(nu0 + nu1*Ec + nu2*(Ec*Ec));
    174146  q = landa - nu/(Ec*Ec) - 2*p*Ec;
    175147  r = mu + 2*nu/Ec + p*(Ec*Ec);
     
    182154             
    183155  return xs;
    184 
    185156}
    186157
    187158// *********** OPT=3,4 : Kalbach's cross sections (from PRECO code)*************
    188 G4double G4PreCompoundDeuteron::GetOpt34(const  G4double K)
     159G4double G4PreCompoundDeuteron::GetOpt34(G4double K)
    189160//     ** d from o.m. of perey and perey
    190161{
     
    196167  G4double     flow = 1.e-18;
    197168  G4double     spill= 1.e+18;
    198 
    199  
    200169
    201170  G4double     p0 = 0.798;
     
    210179  G4double     nu2 = -3.592;     
    211180 
    212 
    213181  G4double     ra=0.80;
    214182       
     
    219187  p = p0 + p1/ec + p2/ecsq;
    220188  landa = landa0*ResidualA + landa1;
    221   a = std::pow(ResidualA,mu1);
     189  a = g4pow->powZ(ResidualA,mu1);
    222190  mu = mu0 * a;
    223191  nu = a* (nu0+nu1*ec+nu2*ecsq); 
    224192  xnulam = nu / landa;
    225   if (xnulam > spill) xnulam=0.;
    226   if (xnulam >= flow) etest = 1.2 *std::sqrt(xnulam);
     193  if (xnulam > spill) { xnulam=0.; }
     194  if (xnulam >= flow) { etest = 1.2 *std::sqrt(xnulam); }
    227195
    228196  a = -2.*p*ec + landa - nu/ecsq;
     
    230198  ecut = 0.;
    231199  cut = a*a - 4.*p*b;
    232   if (cut > 0.) ecut = std::sqrt(cut);
     200  if (cut > 0.) { ecut = std::sqrt(cut); }
    233201  ecut = (ecut-a) / (p+p);
    234202  ecut2 = ecut;
    235 //JMQ 290310 for avoiding unphysical increase below minimum (at ecut)
    236 //ecut<0 means that there is no cut with energy axis, i.e. xs is set to 0 bellow minimum
    237 //  if (cut < 0.) ecut2 = ecut - 2.;
    238   if (cut < 0.) ecut2 = ecut;
    239   elab = K * FragmentA / ResidualA;
     203  //JMQ 290310 for avoiding unphysical increase below minimum (at ecut)
     204  //ecut<0 means that there is no cut with energy axis, i.e. xs is set
     205  //to 0 bellow minimum
     206  //  if (cut < 0.) ecut2 = ecut - 2.;
     207  if (cut < 0.) { ecut2 = ecut; }
     208  elab = K * FragmentA / G4double(ResidualA);
    240209  sig = 0.;
    241210
    242211  if (elab <= ec) { //start for E<Ec
    243     if (elab > ecut2)  sig = (p*elab*elab+a*elab+b) * signor;
     212    if (elab > ecut2) { sig = (p*elab*elab+a*elab+b) * signor; }
    244213  }           //end for E<Ec
    245214  else {           //start for E>Ec
    246215    sig = (landa*elab+mu+nu/elab) * signor;
    247216    geom = 0.;
    248     if (xnulam < flow || elab < etest) return sig;
     217    if (xnulam < flow || elab < etest) { return sig; }
    249218    geom = std::sqrt(theA*K);
    250219    geom = 1.23*ResidualAthrd + ra + 4.573/geom;
     
    253222  }           //end for E>Ec
    254223  return sig;
    255 
    256 }
    257 
    258 //   ************************** end of cross sections *******************************
    259 
    260 
    261 
    262 
     224}
  • trunk/source/processes/hadronic/models/pre_equilibrium/exciton_model/src/G4PreCompoundEmission.cc

    r1337 r1340  
    2424// ********************************************************************
    2525//
    26 //
    27 // $Id: G4PreCompoundEmission.cc,v 1.28 2010/02/25 10:27:36 vnivanch Exp $
    28 // GEANT4 tag $Name: geant4-09-04-beta-01 $
     26// $Id: G4PreCompoundEmission.cc,v 1.32 2010/09/01 15:11:10 vnivanch Exp $
     27// GEANT4 tag $Name: geant4-09-03-ref-09 $
    2928//
    3029// -------------------------------------------------------------------
     
    4140// 19.01.2010 V.Ivanchenko simplified computation of parameter an, sample cosTheta
    4241//                         instead of theta; protect all calls to sqrt
     42// 20.08.2010 V.Ivanchenko added G4Pow and G4PreCompoundParameters pointers
     43//                         use int Z and A and cleanup
    4344//
    4445
    4546#include "G4PreCompoundEmission.hh"
    4647#include "G4PreCompoundParameters.hh"
    47 
    4848#include "G4PreCompoundEmissionFactory.hh"
    4949#include "G4HETCEmissionFactory.hh"
    50 
    51 const G4PreCompoundEmission &
    52 G4PreCompoundEmission::operator=(const G4PreCompoundEmission &)
    53 {
    54   throw G4HadronicException(__FILE__, __LINE__,
    55                             "G4PreCompoundEmission::operator= meant to not be accessable");
    56   return *this;
    57 }
    58 
    59 
    60 G4bool G4PreCompoundEmission::operator==(const G4PreCompoundEmission &) const
    61 {
    62   return false;
    63 }
    64 
    65 G4bool G4PreCompoundEmission::operator!=(const G4PreCompoundEmission &) const
    66 {
    67   return true;
    68 }
     50#include "G4HadronicException.hh"
     51#include "G4Pow.hh"
     52#include "Randomize.hh"
    6953
    7054G4PreCompoundEmission::G4PreCompoundEmission()
    7155{
    7256  theFragmentsFactory = new G4PreCompoundEmissionFactory();
    73   theFragmentsVector = new G4PreCompoundFragmentVector(theFragmentsFactory->GetFragmentVector());
     57  theFragmentsVector =
     58    new G4PreCompoundFragmentVector(theFragmentsFactory->GetFragmentVector());
     59  g4pow = G4Pow::GetInstance();
     60  theParameters = G4PreCompoundParameters::GetAddress();
    7461}
    7562
    7663G4PreCompoundEmission::~G4PreCompoundEmission()
    7764{
    78   if (theFragmentsFactory) delete theFragmentsFactory;
    79   if (theFragmentsVector) delete theFragmentsVector;
     65  if (theFragmentsFactory) { delete theFragmentsFactory; }
     66  if (theFragmentsVector)  { delete theFragmentsVector; }
    8067}
    8168
    8269void G4PreCompoundEmission::SetDefaultModel()
    8370{
    84   if (theFragmentsFactory) delete theFragmentsFactory;
     71  if (theFragmentsFactory) { delete theFragmentsFactory; }
    8572  theFragmentsFactory = new G4PreCompoundEmissionFactory();
    8673  if (theFragmentsVector)
     
    9077  else
    9178    {
    92       theFragmentsVector = new G4PreCompoundFragmentVector(theFragmentsFactory->GetFragmentVector());
    93     }
    94   theFragmentsVector->ResetStage();
     79      theFragmentsVector =
     80        new G4PreCompoundFragmentVector(theFragmentsFactory->GetFragmentVector());
     81    }
    9582  return;
    9683}
     
    10693  else
    10794    {
    108       theFragmentsVector = new G4PreCompoundFragmentVector(theFragmentsFactory->GetFragmentVector());
    109     }
    110   theFragmentsVector->ResetStage();
     95      theFragmentsVector =
     96        new G4PreCompoundFragmentVector(theFragmentsFactory->GetFragmentVector());
     97    }
    11198  return;
    11299}
     
    114101G4ReactionProduct * G4PreCompoundEmission::PerformEmission(G4Fragment & aFragment)
    115102{
    116 #ifdef debug
    117   G4Fragment InitialState(aFragment);
    118 #endif
    119103  // Choose a Fragment for emission
    120   G4VPreCompoundFragment * theFragment = theFragmentsVector->ChooseFragment();
    121   if (theFragment == 0)
    122     {
    123       G4cerr <<  "G4PreCompoundEmission::PerformEmission : I couldn't choose a fragment\n"
     104  G4VPreCompoundFragment * thePreFragment = theFragmentsVector->ChooseFragment();
     105  if (thePreFragment == 0)
     106    {
     107      G4cout <<  "G4PreCompoundEmission::PerformEmission : I couldn't choose a fragment\n"
    124108             << "while trying to de-excite\n"
    125              << aFragment << '\n';
     109             << aFragment << G4endl;
    126110      throw G4HadronicException(__FILE__, __LINE__, "");
    127111    }
    128112  // Kinetic Energy of emitted fragment
    129   G4double KineticEnergyOfEmittedFragment = theFragment->GetKineticEnergy(aFragment);
     113  G4double kinEnergyOfEmittedFragment = thePreFragment->GetKineticEnergy(aFragment);
     114  if(kinEnergyOfEmittedFragment < 0.0) { kinEnergyOfEmittedFragment = 0.0; }
    130115 
    131116  // Calculate the fragment momentum (three vector)
    132   G4ThreeVector momentum = AngularDistribution(theFragment,aFragment,KineticEnergyOfEmittedFragment);
     117  AngularDistribution(thePreFragment,aFragment,kinEnergyOfEmittedFragment);
    133118 
    134119  // Mass of emittef fragment
    135   G4double EmittedMass = theFragment->GetNuclearMass();
     120  G4double EmittedMass = thePreFragment->GetNuclearMass();
    136121 
    137122  // Now we can calculate the four momentum
    138123  // both options are valid and give the same result but 2nd one is faster
    139   // G4LorentzVector EmittedMomentum(momentum,std::sqrt(momentum.mag2()+EmittedMass*EmittedMass));
    140   G4LorentzVector EmittedMomentum(momentum,EmittedMass+KineticEnergyOfEmittedFragment);
     124  G4LorentzVector Emitted4Momentum(theFinalMomentum,
     125                                   EmittedMass + kinEnergyOfEmittedFragment);
    141126   
    142127  // Perform Lorentz boost
    143   EmittedMomentum.boost(aFragment.GetMomentum().boostVector()); 
     128  G4LorentzVector Rest4Momentum = aFragment.GetMomentum();
     129  Emitted4Momentum.boost(Rest4Momentum.boostVector()); 
    144130
    145131  // Set emitted fragment momentum
    146   theFragment->SetMomentum(EmittedMomentum);   
    147 
     132  thePreFragment->SetMomentum(Emitted4Momentum);       
    148133
    149134  // NOW THE RESIDUAL NUCLEUS
    150135  // ------------------------
    151    
    152   // Now the residual nucleus.
    153   // The energy conservation says that
    154   G4double ResidualEcm =
    155     //    aFragment.GetGroundStateMass() + aFragment.GetExcitationEnergy() // initial energy in cm
    156     aFragment.GetMomentum().m()
    157     - (EmittedMass+KineticEnergyOfEmittedFragment);
    158 
    159   // Then the four momentum for residual is
    160   G4LorentzVector RestMomentum(-momentum,ResidualEcm);
    161   // This could save a Lorentz boost
    162   // G4LorentzVector RestMomentum2(aFragment.GetMomentum()-EmittedMomentum);
    163 
    164   // Just for test
    165   // Excitation energy
    166   //  G4double anU = ResidualEcm - theFragment->GetRestNuclearMass();
    167   // This is equivalent
    168   //  G4double anU = theFragment->GetMaximalKineticEnergy() - KineticEnergyOfEmittedFragment +
    169   //    theFragment->GetCoulombBarrier();
    170    
    171   // check that Excitation energy is >= 0
    172   G4double anU = RestMomentum.m()-theFragment->GetRestNuclearMass();
    173   if (anU < 0.0) {
    174     throw G4HadronicException(__FILE__, __LINE__,
    175                               "G4PreCompoundModel::DeExcite: Excitation energy less than 0!");
    176   }
    177      
     136
     137  Rest4Momentum -= Emitted4Momentum;
     138   
    178139  // Update nucleus parameters:
    179140  // --------------------------
     
    181142  // Number of excitons
    182143  aFragment.SetNumberOfParticles(aFragment.GetNumberOfParticles()-
    183                                  static_cast<G4int>(theFragment->GetA()));
     144                                 thePreFragment->GetA());
    184145  // Number of charges
    185146  aFragment.SetNumberOfCharged(aFragment.GetNumberOfCharged()-
    186                                static_cast<G4int>(theFragment->GetZ()));
    187    
    188   // Atomic number
    189   aFragment.SetA(theFragment->GetRestA());
    190    
    191   // Charge
    192   aFragment.SetZ(theFragment->GetRestZ());
    193 
    194    
    195   // Perform Lorentz boosts
    196   RestMomentum.boost(aFragment.GetMomentum().boostVector());
    197 
    198   // Update nucleus momentum
    199   aFragment.SetMomentum(RestMomentum);
     147                               thePreFragment->GetZ());
     148   
     149  // Z and A
     150  aFragment.SetZandA_asInt(thePreFragment->GetRestZ(),
     151                           thePreFragment->GetRestA());
     152   
     153  // Update nucleus momentum
     154  // A check on consistence of Z, A, and mass will be performed
     155  aFragment.SetMomentum(Rest4Momentum);
    200156       
    201157  // Create a G4ReactionProduct
    202   G4ReactionProduct * MyRP = theFragment->GetReactionProduct();
    203 #ifdef PRECOMPOUND_TEST
    204   MyRP->SetCreatorModel("G4PreCompoundModel");
    205 #endif
    206 #ifdef debug
    207   CheckConservation(InitialState,aFragment,MyRP);
    208 #endif
     158  G4ReactionProduct * MyRP = thePreFragment->GetReactionProduct();
     159
     160  //G4cout << "G4PreCompoundEmission::Fragment emitted" << G4endl;
     161  //G4cout << thePreFragment << G4endl;
     162
    209163  return MyRP;
    210164}
    211165
    212 G4ThreeVector
    213 G4PreCompoundEmission::AngularDistribution(G4VPreCompoundFragment * theFragment,
     166void
     167G4PreCompoundEmission::AngularDistribution(G4VPreCompoundFragment* thePreFragment,
    214168                                           const G4Fragment& aFragment,
    215                                            const G4double kinEnergyOfEmittedFrag) const
    216 {
    217   G4double p = aFragment.GetNumberOfParticles();
    218   G4double h = aFragment.GetNumberOfHoles();
     169                                           G4double ekin)
     170{
     171  G4int p = aFragment.GetNumberOfParticles();
     172  G4int h = aFragment.GetNumberOfHoles();
    219173  G4double U = aFragment.GetExcitationEnergy();
    220174
    221   G4double ekin = std::max(0.0, kinEnergyOfEmittedFrag);
    222        
    223175  // Emission particle separation energy
    224   G4double Bemission = theFragment->GetBindingEnergy();
     176  G4double Bemission = thePreFragment->GetBindingEnergy();
    225177
    226178  // Fermi energy
    227   G4double Ef = G4PreCompoundParameters::GetAddress()->GetFermiEnergy();
     179  G4double Ef = theParameters->GetFermiEnergy();
    228180       
    229181  //
     
    231183  //  G4double g = (6.0/pi2)*aFragment.GetA()*
    232184
    233   G4double g = (6.0/pi2)*aFragment.GetA()
    234     *G4PreCompoundParameters::GetAddress()->GetLevelDensity();
     185  G4double g = (6.0/pi2)*aFragment.GetA_asInt()*theParameters->GetLevelDensity();
    235186       
    236187  // Average exciton energy relative to bottom of nuclear well
    237   G4double Eav = 2.0*p*(p+1.0)/((p+h)*g);
     188  G4double Eav = 2*p*(p+1)/((p+h)*g);
    238189       
    239190  // Excitation energy relative to the Fermi Level
     
    241192  //  G4double Uf = U - KineticEnergyOfEmittedFragment - Bemission;
    242193
    243   G4double w_num = rho(p+1,h,g,Uf,Ef);
    244   G4double w_den = rho(p,h,g,Uf,Ef);
     194  G4double w_num = rho(p+1, h, g, Uf, Ef);
     195  G4double w_den = rho(p,   h, g, Uf, Ef);
    245196  if (w_num > 0.0 && w_den > 0.0)
    246197    {
     
    253204    }
    254205 
    255 
    256206  // VI + JMQ 19/01/2010 update computation of the parameter an
    257207  //
     
    262212    G4double zeta = std::max(1.0,9.3/std::sqrt(ekin/MeV));
    263213 
    264     an = 3.0*std::sqrt((ProjEnergy+Ef)*Eeff)/(zeta*Eav);
     214    // This should be the projectile energy. If I would know which is
     215    // the projectile (proton, neutron) I could remove the binding energy.
     216    // But, what happens if INC precedes precompound? This approximation
     217    // seems to work well enough
     218    G4double ProjEnergy = aFragment.GetExcitationEnergy();
     219
     220    an = 3*std::sqrt((ProjEnergy+Ef)*Eeff)/(zeta*Eav);
    265221
    266222    G4int ne = aFragment.GetNumberOfExcitons() - 1;
     
    283239  } 
    284240
    285   G4double phi = twopi*G4UniformRand();
     241  G4double phi = CLHEP::twopi*G4UniformRand();
    286242 
    287243  // Calculate the momentum magnitude of emitted fragment       
    288   G4double pmag = std::sqrt(ekin*(ekin + 2.0*theFragment->GetNuclearMass()));
     244  G4double pmag = std::sqrt(ekin*(ekin + 2.0*thePreFragment->GetNuclearMass()));
    289245 
    290246  G4double sint = std::sqrt((1.0-cost)*(1.0+cost));
    291247
    292   G4ThreeVector momentum(pmag*std::cos(phi)*sint,pmag*std::sin(phi)*sint,pmag*cost);
     248  theFinalMomentum.set(pmag*std::cos(phi)*sint,pmag*std::sin(phi)*sint,pmag*cost);
     249
    293250  // theta is the angle wrt the incident direction
    294   momentum.rotateUz(theIncidentDirection);
    295 
    296   return momentum;
    297 }
    298 
    299 G4double G4PreCompoundEmission::rho(const G4double p, const G4double h, const G4double g,
    300                                     const G4double E, const G4double Ef) const
     251  G4ThreeVector theIncidentDirection = aFragment.GetMomentum().vect().unit();
     252  theFinalMomentum.rotateUz(theIncidentDirection);
     253}
     254
     255G4double G4PreCompoundEmission::rho(G4int p, G4int h, G4double g,
     256                                    G4double E, G4double Ef) const
    301257{       
    302258  // 25.02.2010 V.Ivanchenko added more protections
     
    306262  if ( E - Aph < 0.0) { return 0.0; }
    307263 
    308   G4double logConst =  (p+h)*std::log(g) - logfactorial(p+h-1) - logfactorial(p) - logfactorial(h);
     264  G4double logConst =  (p+h)*std::log(g)
     265    - g4pow->logfactorial(p+h-1) - g4pow->logfactorial(p) - g4pow->logfactorial(h);
    309266
    310267  // initialise values using j=0
     
    312269  G4double t1=1;
    313270  G4double t2=1;
    314   G4double logt3=(p+h-1) * std::log(E-Aph) + logConst;
     271  G4double logt3 = (p+h-1) * std::log(E-Aph) + logConst;
    315272  const G4double logmax = 200.;
    316273  if(logt3 > logmax) { logt3 = logmax; }
     
    333290  return tot;
    334291}
    335 
    336 G4double G4PreCompoundEmission::factorial(G4double a) const
    337 {
    338   // Values of factorial function from 0 to 60
    339   const G4int factablesize = 61;
    340   static const G4double fact[factablesize] =
    341     {
    342       1.0, // 0!
    343       1.0, // 1!
    344       2.0, // 2!
    345       6.0, // 3!
    346       24.0, // 4!
    347       120.0, // 5!
    348       720.0, // 6!
    349       5040.0, // 7!
    350       40320.0, // 8!
    351       362880.0, // 9!
    352       3628800.0, // 10!
    353       39916800.0, // 11!
    354       479001600.0, // 12!
    355       6227020800.0, // 13!
    356       87178291200.0, // 14!
    357       1307674368000.0, // 15!
    358       20922789888000.0, // 16!
    359       355687428096000.0, // 17!
    360       6402373705728000.0, // 18!
    361       121645100408832000.0, // 19!
    362       2432902008176640000.0, // 20!
    363       51090942171709440000.0, // 21!
    364       1124000727777607680000.0, // 22!
    365       25852016738884976640000.0, // 23!
    366       620448401733239439360000.0, // 24!
    367       15511210043330985984000000.0, // 25!
    368       403291461126605635584000000.0, // 26!
    369       10888869450418352160768000000.0, // 27!
    370       304888344611713860501504000000.0, // 28!
    371       8841761993739701954543616000000.0, // 29!
    372       265252859812191058636308480000000.0, // 30!
    373       8222838654177922817725562880000000.0, // 31!
    374       263130836933693530167218012160000000.0, // 32!
    375       8683317618811886495518194401280000000.0, // 33!
    376       295232799039604140847618609643520000000.0, // 34!
    377       10333147966386144929666651337523200000000.0, // 35!
    378       371993326789901217467999448150835200000000.0, // 36!
    379       13763753091226345046315979581580902400000000.0, // 37!
    380       523022617466601111760007224100074291200000000.0, // 38!
    381       20397882081197443358640281739902897356800000000.0, // 39!
    382       815915283247897734345611269596115894272000000000.0, // 40!
    383       33452526613163807108170062053440751665152000000000.0, // 41!
    384       1405006117752879898543142606244511569936384000000000.0, // 42!
    385       60415263063373835637355132068513997507264512000000000.0, // 43!
    386       2658271574788448768043625811014615890319638528000000000.0, // 44!
    387       119622220865480194561963161495657715064383733760000000000.0, // 45!
    388       5502622159812088949850305428800254892961651752960000000000.0, // 46!
    389       258623241511168180642964355153611979969197632389120000000000.0, // 47!
    390       12413915592536072670862289047373375038521486354677760000000000.0, // 48!
    391       608281864034267560872252163321295376887552831379210240000000000.0, // 49!
    392       30414093201713378043612608166064768844377641568960512000000000000.0, // 50!
    393       1551118753287382280224243016469303211063259720016986112000000000000.0, // 51!
    394       80658175170943878571660636856403766975289505440883277824000000000000.0, // 52!
    395       4274883284060025564298013753389399649690343788366813724672000000000000.0, // 53!
    396       230843697339241380472092742683027581083278564571807941132288000000000000.0, // 54!
    397       12696403353658275925965100847566516959580321051449436762275840000000000000.0, // 55!
    398       710998587804863451854045647463724949736497978881168458687447040000000000000.0, // 56!
    399       40526919504877216755680601905432322134980384796226602145184481280000000000000.0, // 57!
    400       2350561331282878571829474910515074683828862318181142924420699914240000000000000.0, // 58!
    401       138683118545689835737939019720389406345902876772687432540821294940160000000000000.0, // 59!
    402       8320987112741390144276341183223364380754172606361245952449277696409600000000000000.0  // 60!
    403     };
    404   //    fact[0] = 1;
    405   //    for (G4int n = 1; n < 21; n++) {
    406   //      fact[n] = fact[n-1]*static_cast<G4double>(n);
    407   //    }
    408   G4double result(0.0);
    409   G4int ia = static_cast<G4int>(a);
    410   if (ia < factablesize)
    411     {
    412       result = fact[ia];
    413     }
    414   else
    415     {
    416       result = fact[factablesize-1];
    417       for (G4int n = factablesize; n < ia+1; ++n)
    418         {
    419           result *= static_cast<G4double>(n);
    420         }
    421     }
    422    
    423     return result;
    424 }
    425 G4double G4PreCompoundEmission::logfactorial(G4double a) const
    426 {
    427   // Values of logs of factorial function from 0 to 60
    428 
    429   G4double result(0.0);
    430   const G4int factablesize = 61;
    431   const G4double halfLn2pi = 0.918938533;      // 0.5 log(2* pi)
    432   static G4double logfact[factablesize];
    433   static bool needinit=true;
    434  
    435   if (needinit)
    436   {
    437       needinit=false;
    438       for ( G4int n=0; n < factablesize; ++n)
    439       {
    440          logfact[n]=std::log(factorial(n));
    441       }
    442   }
    443 
    444   G4int ia = static_cast<G4int>(a);
    445   if (ia < factablesize)
    446   {
    447       result = logfact[ia];
    448   } else {
    449       result = (ia+0.5)*std::log(G4double(ia)) - ia + halfLn2pi;
    450   }
    451    
    452   return result;
    453 }
    454 
    455 #ifdef debug
    456 void G4PreCompoundEmission::CheckConservation(const G4Fragment & theInitialState,
    457                                               const G4Fragment & theResidual,
    458                                               G4ReactionProduct * theEmitted) const
    459 {
    460   G4double ProductsEnergy = theEmitted->GetTotalEnergy() + theResidual.GetMomentum().e();
    461   G4ThreeVector ProductsMomentum(theEmitted->GetMomentum()+theResidual.GetMomentum().vect());
    462   G4int ProductsA = theEmitted->GetDefinition()->GetBaryonNumber() + theResidual.GetA();
    463   G4int ProductsZ = theEmitted->GetDefinition()->GetPDGCharge() + theResidual.GetZ();
    464 
    465   if (ProductsA != theInitialState.GetA()) {
    466     G4cout << "!!!!!!!!!! Baryonic Number Conservation Violation !!!!!!!!!!" << G4endl;
    467     G4cout << "G4PreCompoundEmission.cc: Barionic Number Conservation"
    468            << G4endl;
    469     G4cout << "Initial A = " << theInitialState.GetA()
    470            << "   Fragments A = " << ProductsA << "   Diference --> "
    471            << theInitialState.GetA() - ProductsA << G4endl;
    472   }
    473   if (ProductsZ != theInitialState.GetZ()) {
    474     G4cout << "!!!!!!!!!! Charge Conservation Violation !!!!!!!!!!" << G4endl;
    475     G4cout << "G4PreCompoundEmission.cc: Charge Conservation test"
    476            << G4endl;
    477     G4cout << "Initial Z = " << theInitialState.GetZ()
    478            << "   Fragments Z = " << ProductsZ << "   Diference --> "
    479            << theInitialState.GetZ() - ProductsZ << G4endl;
    480   }
    481   if (std::abs(ProductsEnergy-theInitialState.GetMomentum().e()) > 10.0*eV) {
    482     G4cout << "!!!!!!!!!! Energy Conservation Violation !!!!!!!!!!" << G4endl;
    483     G4cout << "G4PreCompoundEmission.cc: Energy Conservation test"
    484            << G4endl;
    485     G4cout << "Initial E = " << theInitialState.GetMomentum().e()/MeV << " MeV"
    486            << "   Fragments E = " << ProductsEnergy/MeV  << " MeV   Diference --> "
    487            << (theInitialState.GetMomentum().e() - ProductsEnergy)/MeV << " MeV" << G4endl;
    488   }
    489   if (std::abs(ProductsMomentum.x()-theInitialState.GetMomentum().x()) > 10.0*eV ||
    490       std::abs(ProductsMomentum.y()-theInitialState.GetMomentum().y()) > 10.0*eV ||
    491       std::abs(ProductsMomentum.z()-theInitialState.GetMomentum().z()) > 10.0*eV) {
    492     G4cout << "!!!!!!!!!! Momentum Conservation Violation !!!!!!!!!!" << G4endl;
    493     G4cout << "G4PreCompoundEmission.cc: Momentum Conservation test"
    494            << G4endl;
    495     G4cout << "Initial P = " << theInitialState.GetMomentum().vect() << " MeV"
    496            << "   Fragments P = " << ProductsMomentum  << " MeV   Diference --> "
    497            << theInitialState.GetMomentum().vect() - ProductsMomentum << " MeV" << G4endl;
    498   }
    499   return;
    500 }
    501 
    502 #endif
  • trunk/source/processes/hadronic/models/pre_equilibrium/exciton_model/src/G4PreCompoundEmissionFactory.cc

    r819 r1340  
    2424// ********************************************************************
    2525//
     26// $Id: G4PreCompoundEmissionFactory.cc,v 1.5 2010/08/28 15:16:55 vnivanch Exp $
     27// GEANT4 tag $Name: geant4-09-03-ref-09 $
     28//
     29
    2630#include "G4PreCompoundEmissionFactory.hh"
    2731
     
    3337#include "G4PreCompoundAlpha.hh"
    3438
     39G4PreCompoundEmissionFactory::G4PreCompoundEmissionFactory()
     40{}
    3541
    36 const G4PreCompoundEmissionFactory & G4PreCompoundEmissionFactory::
    37 operator=(const G4PreCompoundEmissionFactory & )
    38 {
    39   throw G4HadronicException(__FILE__, __LINE__, "G4PreCompoundEmissionFactory::operator= meant to not be accessable.");
    40   return *this;
    41 }
    42 
    43 G4bool G4PreCompoundEmissionFactory::
    44 operator==(const G4PreCompoundEmissionFactory & ) const
    45 {
    46   throw G4HadronicException(__FILE__, __LINE__, "G4PreCompoundEmissionFactory::operator== meant to not be accessable.");
    47   return false;
    48 }
    49 
    50 G4bool G4PreCompoundEmissionFactory::
    51 operator!=(const G4PreCompoundEmissionFactory & ) const
    52 {
    53   throw G4HadronicException(__FILE__, __LINE__, "G4PreCompoundEmissionFactory::operator!= meant to not be accessable.");
    54   return true;
    55 }
    56 
     42G4PreCompoundEmissionFactory::~G4PreCompoundEmissionFactory()
     43{}
    5744
    5845std::vector<G4VPreCompoundFragment*> *  G4PreCompoundEmissionFactory::
  • trunk/source/processes/hadronic/models/pre_equilibrium/exciton_model/src/G4PreCompoundFragment.cc

    r1337 r1340  
    2424// ********************************************************************
    2525//
    26 // $Id: G4PreCompoundFragment.cc,v 1.8 2009/02/10 16:01:37 vnivanch Exp $
    27 // GEANT4 tag $Name: geant4-09-04-beta-01 $
     26// $Id: G4PreCompoundFragment.cc,v 1.9 2010/08/28 15:16:55 vnivanch Exp $
     27// GEANT4 tag $Name: geant4-09-03-ref-09 $
    2828//
    2929// J. M. Quesada (August 2008). 
    3030// Based  on previous work by V. Lara
    31 // JMQ (06 September 2008) Also external choice has been added for:
    32 //                      - superimposed Coulomb barrier (if useSICB=true)
    3331//
     32// Modified:
     33// 06.09.2008 JMQ Also external choice has been added for:
     34//               - superimposed Coulomb barrier (if useSICB=true)
     35// 20.08.2010 V.Ivanchenko cleanup
     36//
     37
    3438#include "G4PreCompoundFragment.hh"
    3539
    3640G4PreCompoundFragment::
    37 G4PreCompoundFragment(const G4PreCompoundFragment &right) :
    38   G4VPreCompoundFragment(right)
     41G4PreCompoundFragment(const G4ParticleDefinition* part,
     42                      G4VCoulombBarrier* aCoulombBarrier)
     43  : G4VPreCompoundFragment(part,aCoulombBarrier)
    3944{}
    4045
    41 
    42 G4PreCompoundFragment::
    43 G4PreCompoundFragment(const G4double anA,
    44                       const G4double aZ,
    45                       G4VCoulombBarrier* aCoulombBarrier,
    46                       const G4String & aName):
    47   G4VPreCompoundFragment(anA,aZ,aCoulombBarrier,aName)
    48 {
    49 }
    50 
    51 
    52 
    5346G4PreCompoundFragment::~G4PreCompoundFragment()
    54 {
    55 }
    56 
    57 
    58 const G4PreCompoundFragment & G4PreCompoundFragment::
    59 operator= (const G4PreCompoundFragment & right)
    60 {
    61   if (&right != this) this->G4VPreCompoundFragment::operator=(right);
    62   return *this;
    63 }
    64 
    65 G4int G4PreCompoundFragment::operator==(const G4PreCompoundFragment & right) const
    66 {
    67   return G4VPreCompoundFragment::operator==(right);
    68 }
    69 
    70 G4int G4PreCompoundFragment::operator!=(const G4PreCompoundFragment & right) const
    71 {
    72   return G4VPreCompoundFragment::operator!=(right);
    73 }
    74 
     47{}
    7548
    7649G4double G4PreCompoundFragment::
    7750CalcEmissionProbability(const G4Fragment & aFragment)
    7851{
    79 // If  theCoulombBarrier effect is included in the emission probabilities
    80 //if (GetMaximalKineticEnergy() <= 0.0)
    81   G4double limit;
    82   if(OPTxs==0 ||  useSICB) limit= theCoulombBarrier;
    83   else limit=0.;
     52  //G4cout << theCoulombBarrier << "  " << GetMaximalKineticEnergy() << G4endl;
     53  // If  theCoulombBarrier effect is included in the emission probabilities
     54  //if (GetMaximalKineticEnergy() <= 0.0)
     55  G4double limit = 0.0;
     56  if(OPTxs==0 ||  useSICB) { limit = theCoulombBarrier; }
    8457  if (GetMaximalKineticEnergy() <= limit)
    8558    {
    8659      theEmissionProbability = 0.0;
    8760      return 0.0;
    88   }   
    89 // If  theCoulombBarrier effect is included in the emission probabilities
    90 //  G4double LowerLimit = 0.;
    91 // Coulomb barrier is the lower limit
    92 // of integration over kinetic energy
     61    }   
     62  // If  theCoulombBarrier effect is included in the emission probabilities
     63  //  G4double LowerLimit = 0.;
     64  // Coulomb barrier is the lower limit
     65  // of integration over kinetic energy
    9366  G4double LowerLimit = limit;
    9467
    95 // Excitation energy of nucleus after fragment emission is the upper limit of integration over kinetic energy
     68  // Excitation energy of nucleus after fragment emission is the upper
     69  //limit of integration over kinetic energy
    9670  G4double UpperLimit = GetMaximalKineticEnergy();
    9771 
    9872  theEmissionProbability =
    9973    IntegrateEmissionProbability(LowerLimit,UpperLimit,aFragment);
     74  /*
     75  G4cout << "## G4PreCompoundFragment::CalcEmisProb "
     76         << "Z= " << aFragment.GetZ_asInt()
     77         << " A= " << aFragment.GetA_asInt()
     78         << " Elow= " << LowerLimit/MeV
     79         << " Eup= " << UpperLimit/MeV
     80         << " prob= " << theEmissionProbability
     81         << G4endl;
     82  */
    10083  return theEmissionProbability;
    10184}
    10285
    10386G4double G4PreCompoundFragment::
    104 IntegrateEmissionProbability(const G4double & Low, const G4double & Up,
     87IntegrateEmissionProbability(G4double Low, G4double Up,
    10588                             const G4Fragment & aFragment)
    10689{
     
    134117  G4double Total = 0.0;
    135118
    136 
    137   for (G4int i = 0; i < N; i++)
     119  for (G4int i = 0; i < N; ++i)
    138120    {
    139       G4double KineticE = ((Up-Low)*x[i]+(Up+Low))/2.0;
     121      G4double KineticE = 0.5*((Up-Low)*x[i]+(Up+Low));
    140122      Total += w[i]*ProbabilityDistributionFunction(KineticE, aFragment);
    141123    }
    142   Total  *= (Up-Low)/2.0;
     124  Total  *= 0.5*(Up-Low);
    143125  return Total;
    144126}
    145 
    146 
    147 
    148127
    149128G4double G4PreCompoundFragment::
    150129GetKineticEnergy(const G4Fragment & aFragment)
    151130{
     131  //let's keep this way for consistency with CalcEmissionProbability method
     132  G4double V = 0.0;
     133  if(OPTxs==0 || useSICB) { V = theCoulombBarrier; }
    152134
    153 //      G4double V = this->GetCoulombBarrier();// alternative way for accessing the Coulomb barrier
    154 //                                             //should be equivalent (in fact it is)
    155   G4double V;
    156   if(OPTxs==0 || useSICB) V= theCoulombBarrier;//let's keep this way for consistency with CalcEmissionProbability method
    157   else V=0.;
    158 
    159   G4double Tmax =  GetMaximalKineticEnergy() ; 
     135  G4double Tmax = GetMaximalKineticEnergy(); 
     136  if(Tmax < V) { return 0.0; }
    160137  G4double T(0.0);
    161   G4double NormalizedProbability(1.0);
     138  G4double Probability(1.0);
     139  G4double maxProbability = GetEmissionProbability();
    162140  do
    163141    {
    164       T =V+ G4UniformRand()*(Tmax-V);
    165       NormalizedProbability = ProbabilityDistributionFunction(T,aFragment)/GetEmissionProbability();     
    166     }   while (G4UniformRand() > NormalizedProbability); 
     142      T = V + G4UniformRand()*(Tmax-V);
     143      Probability = ProbabilityDistributionFunction(T,aFragment);     
     144    }   while (maxProbability*G4UniformRand() > Probability); 
    167145  return T;
    168146}
  • trunk/source/processes/hadronic/models/pre_equilibrium/exciton_model/src/G4PreCompoundFragmentVector.cc

    r1337 r1340  
    2424// ********************************************************************
    2525//
    26 // $Id: G4PreCompoundFragmentVector.cc,v 1.11 2009/02/10 16:01:37 vnivanch Exp $
    27 // GEANT4 tag $Name: geant4-09-04-beta-01 $
     26// $Id: G4PreCompoundFragmentVector.cc,v 1.12 2010/08/28 15:16:55 vnivanch Exp $
     27// GEANT4 tag $Name: geant4-09-03-ref-09 $
    2828//
    2929// Hadronic Process: Nuclear Preequilibrium
    3030// by V. Lara
     31//
     32// Modified:
     33// 27.08.2010 V.Ivanchenko moved constructor and destructor to source,
     34//            simplify run time computations making inlined
     35//
    3136
    3237#include "G4PreCompoundFragmentVector.hh"
    33 #include "G4HadronicException.hh"
    3438
    35 const G4PreCompoundFragmentVector &
    36 G4PreCompoundFragmentVector::
    37 operator=(const G4PreCompoundFragmentVector &)
     39G4PreCompoundFragmentVector::G4PreCompoundFragmentVector(pcfvector * avector)
     40  : theChannels(0), nChannels(0)
    3841{
    39     throw G4HadronicException(__FILE__, __LINE__, "G4PreCompoundFragmentVector::operator= meant to not be accessable");
    40     return *this;
     42  SetVector(avector);
    4143}
    4244
     45G4PreCompoundFragmentVector::~G4PreCompoundFragmentVector()
     46{}
    4347
    44 G4bool G4PreCompoundFragmentVector::
    45 operator==(const G4PreCompoundFragmentVector &) const
     48void G4PreCompoundFragmentVector::SetVector(pcfvector * avector)
    4649{
    47     return false;
     50  theChannels = avector;
     51  if(theChannels) {
     52    nChannels = theChannels->size();
     53    probabilities.resize(nChannels);
     54  }
    4855}
    4956
    50 G4bool G4PreCompoundFragmentVector::
    51 operator!=(const G4PreCompoundFragmentVector &) const
    52 {
    53     return true;
     57//for inverse cross section choice
     58void G4PreCompoundFragmentVector::SetOPTxs(G4int opt)
     59{   
     60  for (G4int i=0; i< nChannels; ++i) {
     61    (*theChannels)[i]->SetOPTxs(opt);
     62  }
    5463}
    5564
    56 
    57 
    58 G4double G4PreCompoundFragmentVector::
    59 CalculateProbabilities(const G4Fragment & aFragment)
    60 {
    61   TotalEmissionProbability = 0.0;
    62   pcfvector::iterator aChannel;
    63   for (aChannel=theChannels->begin(); aChannel != theChannels->end();
    64        aChannel++)
    65     {
    66       // Calculate emission probailities
    67       // Compute total (integrated over kinetic energy) emission
    68       // probability of a fragment and
    69       // Summing channel emission probabilities
    70       TotalEmissionProbability += (*aChannel)->CalcEmissionProbability(aFragment);
    71     }
    72   return TotalEmissionProbability;
     65//for superimposed Coulomb Barrier for inverse  cross sections
     66void G4PreCompoundFragmentVector::UseSICB(G4bool use)
     67{   
     68  for (G4int i=0; i< nChannels; ++i) {
     69    (*theChannels)[i]->UseSICB(use);
     70  }
    7371}
    7472
    75 
    76 G4VPreCompoundFragment * G4PreCompoundFragmentVector::
    77 ChooseFragment(void)
    78 {
    79   const G4int NumOfFrags = theChannels->size();
    80   std::vector<G4double> running;
    81   running.reserve(NumOfFrags);
    82  
    83   pcfvector::iterator i;
    84   G4double accumulation = 0.0;
    85   for (i = theChannels->begin(); i != theChannels->end(); ++i) {
    86     accumulation += (*i)->GetEmissionProbability();
    87 
    88     running.push_back(accumulation);
    89   }
    90        
    91   // Choose an emission channel
    92   G4double aChannel = G4UniformRand()*TotalEmissionProbability;
    93   G4int ChosenChannel = -1;
    94   std::vector<G4double>::iterator ich;
    95   for (ich = running.begin(); ich != running.end(); ++ich)
    96     {
    97       if (aChannel <= *ich)
    98         {
    99 #ifdef G4NO_ISO_VECDIST
    100           std::vector<G4double>::difference_type n = 0;
    101           std::distance(running.begin(),ich,n);
    102           ChosenChannel = n;
    103 #else
    104           ChosenChannel = std::distance(running.begin(),ich);
    105 #endif
    106           break;
    107         }
    108     }
    109   running.clear();
    110   if (ChosenChannel < 0)
    111     {
    112       G4cerr
    113         << "G4PreCompoundFragmentVector::ChooseFragment: I can't determine a channel\n"
    114         << "Probabilities: ";
    115       for (i = theChannels->begin(); i != theChannels->end(); ++i)
    116         {
    117           G4cout << (*i)->GetEmissionProbability() << "  ";
    118         }
    119       G4cout << '\n';
    120       return 0;
    121     }
    122   else
    123     {
    124       for (i = theChannels->begin(); i != theChannels->end(); ++i)
    125         {
    126           (*i)->IncrementStage();
    127         }
    128     }
    129 
    130   return theChannels->operator[](ChosenChannel);
    131 }
  • trunk/source/processes/hadronic/models/pre_equilibrium/exciton_model/src/G4PreCompoundHe3.cc

    r1337 r1340  
    2424// ********************************************************************
    2525//
    26 //
    27 // $Id: G4PreCompoundHe3.cc,v 1.6 2010/04/09 14:06:17 vnivanch Exp $
    28 // GEANT4 tag $Name: geant4-09-04-beta-01 $
     26// $Id: G4PreCompoundHe3.cc,v 1.7 2010/08/28 15:16:55 vnivanch Exp $
     27// GEANT4 tag $Name: geant4-09-03-ref-09 $
    2928//
    3029// -------------------------------------------------------------------
     
    3938// Modified: 
    4039// 21.08.2008 J. M. Quesada add choice of options 
     40// 20.08.2010 V.Ivanchenko added G4Pow and G4PreCompoundParameters pointers
     41//                         use int Z and A and cleanup
    4142//
    4243 
    4344#include "G4PreCompoundHe3.hh"
    44 
    45 G4ReactionProduct * G4PreCompoundHe3::GetReactionProduct() const
    46 {
    47   G4ReactionProduct * theReactionProduct =
    48     new G4ReactionProduct(G4He3::He3Definition());
    49   theReactionProduct->SetMomentum(GetMomentum().vect());
    50   theReactionProduct->SetTotalEnergy(GetMomentum().e());
    51 #ifdef PRECOMPOUND_TEST
    52   theReactionProduct->SetCreatorModel("G4PrecompoundModel");
    53 #endif
    54   return theReactionProduct;
    55 }   
    56 
    57 G4double G4PreCompoundHe3::FactorialFactor(const G4double N, const G4double P)
    58 {
    59   return
    60       (N-3.0)*(P-2.0)*(
    61                        (((N-2.0)*(P-1.0))/2.0) *(
    62                                                  (((N-1.0)*P)/3.0)
    63                                                  )
    64                        );
    65 }
    66  
    67 G4double G4PreCompoundHe3::CoalescenceFactor(const G4double A)
    68 {
    69   return 243.0/(A*A);
     45#include "G4He3.hh"
     46
     47G4PreCompoundHe3::G4PreCompoundHe3()
     48  : G4PreCompoundIon(G4He3::He3(), &theHe3CoulombBarrier)
     49{}
     50
     51G4PreCompoundHe3::~G4PreCompoundHe3()
     52{}
     53
     54G4double G4PreCompoundHe3::FactorialFactor(G4int N, G4int P)
     55{
     56  return G4double((N-3)*(P-2)*(N-2)*(P-1)*(N-1)*P)/6.0;
     57}
     58 
     59G4double G4PreCompoundHe3::CoalescenceFactor(G4int A)
     60{
     61  return 243.0/G4double(A*A);
    7062}   
    7163
    72 G4double G4PreCompoundHe3::GetRj(const G4int NumberParticles, const G4int NumberCharged)
     64G4double G4PreCompoundHe3::GetRj(G4int nParticles, G4int nCharged)
    7365{
    7466  G4double rj = 0.0;
    75   G4double denominator = NumberParticles*(NumberParticles-1)*(NumberParticles-2);
    76   if(NumberCharged >=2 && (NumberParticles-NumberCharged) >= 1) {
    77     rj = 3.0*static_cast<G4double>(NumberCharged*(NumberCharged-1)*(NumberParticles-NumberCharged))
    78       / static_cast<G4double>(denominator); 
     67  if(nCharged >=2 && (nParticles-nCharged) >= 1) {
     68    G4double denominator = G4double(nParticles*(nParticles-1)*(nParticles-2));
     69    rj = G4double(3*nCharged*(nCharged-1)*(nParticles-nCharged))/denominator; 
    7970  }
    8071  return rj;
    8172}
    8273
    83 ////////////////////////////////////////////////////////////////////////////////////
     74////////////////////////////////////////////////////////////////////////////////
    8475//J. M. Quesada (Dec 2007-June 2008): New inverse reaction cross sections
    8576//OPT=0 Dostrovski's parameterization
     
    8778//OPT=3,4 Kalbach's parameterization
    8879//
    89 G4double G4PreCompoundHe3::CrossSection(const  G4double K)
    90 {
    91   ResidualA=GetRestA();
    92   ResidualZ=GetRestZ();
    93   theA=GetA();
    94   theZ=GetZ();
    95   ResidualAthrd=std::pow(ResidualA,0.33333);
    96   FragmentA=GetA()+GetRestA();
    97   FragmentAthrd=std::pow(FragmentA,0.33333);
    98 
     80G4double G4PreCompoundHe3::CrossSection(G4double K)
     81{
     82  ResidualA = GetRestA();
     83  ResidualZ = GetRestZ();
     84  theA = GetA();
     85  theZ = GetZ();
     86  ResidualAthrd = ResidualA13();
     87  FragmentA = theA + ResidualA;
     88  FragmentAthrd = g4pow->Z13(FragmentA);
    9989
    10090  if (OPTxs==0) return GetOpt0( K);
     
    10999}
    110100
    111 // *********************** OPT=0 : Dostrovski's cross section  *****************************
    112 
    113 G4double G4PreCompoundHe3::GetOpt0(const  G4double K)
    114 {
    115   const G4double r0 = G4PreCompoundParameters::GetAddress()->Getr0();
    116   // cross section is now given in mb (r0 is in mm) for the sake of consistency
    117   //with the rest of the options
    118   return 1.e+25*pi*(r0*ResidualAthrd)*(r0*ResidualAthrd)*GetAlpha()*(1.+GetBeta()/K);
    119 }
    120 //
    121 //----------------
    122 //
    123101G4double G4PreCompoundHe3::GetAlpha()
    124102{
    125103  G4double C = 0.0;
    126   G4double aZ = GetZ() + GetRestZ();
     104  G4int aZ = theZ + ResidualZ;
    127105  if (aZ <= 30)
    128106    {
     
    131109  else if (aZ <= 50)
    132110    {
    133       C = 0.1 + -((aZ-50.)/20.)*0.02;
     111      C = 0.1 - (aZ - 30)*0.001;
    134112    }
    135113  else if (aZ < 70)
    136114    {
    137       C = 0.08 + -((aZ-70.)/20.)*0.02;
     115      C = 0.08 - (aZ - 50)*0.001;
    138116    }
    139117  else
     
    143121  return 1.0 + C*(4.0/3.0);
    144122}
    145 //
    146 //--------------------
    147 //
    148 G4double G4PreCompoundHe3::GetBeta()
    149 {
    150   return -GetCoulombBarrier();
    151 }
    152 //
    153 //********************* OPT=1,2 : Chatterjee's cross section ************************
     123
     124//********************* OPT=1,2 : Chatterjee's cross section *****************
    154125//(fitting to cross section from Bechetti & Greenles OM potential)
    155126
    156127G4double G4PreCompoundHe3::GetOpt12(const  G4double K)
    157128{
    158 
    159   G4double Kc=K;
     129  G4double Kc = K;
    160130
    161131  // JMQ xsec is set constat above limit of validity
    162   if (K>50) Kc=50;
     132  if (K > 50*MeV) { Kc = 50*MeV; }
    163133
    164134  G4double landa ,mu ,nu ,p , Ec,q,r,ji,xs;
    165135
    166   G4double      p0 = -3.06;
     136  G4double     p0 = -3.06;
    167137  G4double     p1 = 278.5;
    168138  G4double     p2 = -1389.;
     
    179149  p = p0 + p1/Ec + p2/(Ec*Ec);
    180150  landa = landa0*ResidualA + landa1;
    181   mu = mu0*std::pow(ResidualA,mu1);
    182   nu = std::pow(ResidualA,mu1)*(nu0 + nu1*Ec + nu2*(Ec*Ec));
     151
     152  G4double resmu1 = g4pow->powZ(ResidualA,mu1);
     153  mu = mu0*resmu1;
     154  nu = resmu1*(nu0 + nu1*Ec + nu2*(Ec*Ec));
    183155  q = landa - nu/(Ec*Ec) - 2*p*Ec;
    184156  r = mu + 2*nu/Ec + p*(Ec*Ec);
     
    198170//c     ** 3he from o.m. of gibson et al
    199171{
    200 
    201172  G4double landa, mu, nu, p , signor(1.),sig;
    202173  G4double ec,ecsq,xnulam,etest(0.),a;
    203174  G4double b,ecut,cut,ecut2,geom,elab;
    204175
    205 
    206176  G4double     flow = 1.e-18;
    207177  G4double     spill= 1.e+18;
    208 
    209178
    210179  G4double     p0 = -2.88;
     
    227196  p = p0 + p1/ec + p2/ecsq;
    228197  landa = landa0*ResidualA + landa1;
    229   a = std::pow(ResidualA,mu1);
     198  a = g4pow->powZ(ResidualA,mu1);
    230199  mu = mu0 * a;
    231200  nu = a* (nu0+nu1*ec+nu2*ecsq); 
    232201  xnulam = nu / landa;
    233   if (xnulam > spill) xnulam=0.;
    234   if (xnulam >= flow) etest = 1.2 *std::sqrt(xnulam);
     202  if (xnulam > spill) { xnulam=0.; }
     203  if (xnulam >= flow) { etest = 1.2 *std::sqrt(xnulam); }
    235204 
    236205  a = -2.*p*ec + landa - nu/ecsq;
     
    241210  ecut = (ecut-a) / (p+p);
    242211  ecut2 = ecut;
    243 //JMQ 290310 for avoiding unphysical increase below minimum (at ecut)
    244 //ecut<0 means that there is no cut with energy axis, i.e. xs is set to 0 bellow minimum
    245 //  if (cut < 0.) ecut2 = ecut - 2.;
    246   if (cut < 0.) ecut2 = ecut;
     212  //JMQ 290310 for avoiding unphysical increase below minimum (at ecut)
     213  // ecut<0 means that there is no cut with energy axis, i.e. xs is set
     214  // to 0 bellow minimum
     215  //  if (cut < 0.) ecut2 = ecut - 2.;
     216  if (cut < 0.) { ecut2 = ecut; }
    247217  elab = K * FragmentA / ResidualA;
    248218  sig = 0.;
    249219 
    250220  if (elab <= ec) { //start for E<Ec
    251     if (elab > ecut2)  sig = (p*elab*elab+a*elab+b) * signor;
     221    if (elab > ecut2) { sig = (p*elab*elab+a*elab+b) * signor; }
    252222  }           //end for E<Ec
    253223  else {           //start for E>Ec
    254224    sig = (landa*elab+mu+nu/elab) * signor;
    255225    geom = 0.;
    256     if (xnulam < flow || elab < etest) return sig;
     226    if (xnulam < flow || elab < etest) { return sig; }
    257227    geom = std::sqrt(theA*K);
    258228    geom = 1.23*ResidualAthrd + ra + 4.573/geom;
     
    263233 
    264234}
    265 
    266 //   ************************** end of cross sections *******************************
    267 
    268 
    269 
    270 
  • trunk/source/processes/hadronic/models/pre_equilibrium/exciton_model/src/G4PreCompoundIon.cc

    r1337 r1340  
    2424// ********************************************************************
    2525//
    26 // $Id: G4PreCompoundIon.cc,v 1.16 2009/02/10 16:01:37 vnivanch Exp $
    27 // GEANT4 tag $Name: geant4-09-04-beta-01 $
     26// $Id: G4PreCompoundIon.cc,v 1.17 2010/08/28 15:16:55 vnivanch Exp $
     27// GEANT4 tag $Name: geant4-09-03-ref-09 $
    2828//
    2929// -------------------------------------------------------------------
     
    3838// Modified: 
    3939// 10.02.2009 J. M. Quesada fixed bug in density level of light fragments 
     40// 20.08.2010 V.Ivanchenko added G4Pow and G4PreCompoundParameters pointers
     41//                         use int Z and A and cleanup
    4042//
    4143
    4244#include "G4PreCompoundIon.hh"
    43 #include "G4PreCompoundParameters.hh"
    4445
    45 G4bool G4PreCompoundIon::IsItPossible(const G4Fragment& aFragment)
     46G4PreCompoundIon::
     47G4PreCompoundIon(const G4ParticleDefinition* part,
     48                 G4VCoulombBarrier* aCoulombBarrier)
     49  : G4PreCompoundFragment(part,aCoulombBarrier)
    4650{
    47   G4int pplus = aFragment.GetNumberOfCharged();   
    48   G4int pneut = aFragment.GetNumberOfParticles()-pplus;
    49   return (pneut >= (GetA()-GetZ()) && pplus >= GetZ());
     51  G4double r0 = theParameters->Getr0();
     52  fact = 0.75*CLHEP::millibarn/(CLHEP::pi*r0*r0*r0);
    5053}
    5154
     55G4PreCompoundIon::~G4PreCompoundIon()
     56{}
     57
    5258G4double G4PreCompoundIon::
    53 ProbabilityDistributionFunction(const G4double eKin,
     59ProbabilityDistributionFunction(G4double eKin,
    5460                                const G4Fragment& aFragment)
    5561{
    56   if ( !IsItPossible(aFragment) ) return 0.0;
    57  
    58   const G4double r0 = G4PreCompoundParameters::GetAddress()->Getr0();
     62  if ( !IsItPossible(aFragment) ) { return 0.0; }
     63  G4double efinal = eKin + GetBindingEnergy();
     64  //G4cout << "Efinal= " << efinal << " Ekin= " << eKin << G4endl;
     65  if(efinal <= 0.0 ) { return 0.0; }
    5966
    6067  G4double U = aFragment.GetExcitationEnergy();
    61   G4double P = aFragment.GetNumberOfParticles();
    62   G4double H = aFragment.GetNumberOfHoles();
    63   G4double N = P + H;
     68  G4int P = aFragment.GetNumberOfParticles();
     69  G4int H = aFragment.GetNumberOfHoles();
     70  G4int A = GetA();
     71  G4int N = P + H;
    6472
    65   G4double g0 = (6.0/pi2)*aFragment.GetA() *
    66     G4PreCompoundParameters::GetAddress()->GetLevelDensity();
    67  
    68   G4double g1 = (6.0/pi2)*GetRestA() *
    69     G4PreCompoundParameters::GetAddress()->GetLevelDensity();
     73  G4double g0 = (6.0/pi2)*aFragment.GetA_asInt()*theParameters->GetLevelDensity();
     74  G4double g1 = (6.0/pi2)*GetRestA()*theParameters->GetLevelDensity();
    7075
    7176  //JMQ 06/02/209  This is  THE BUG that was killing cluster emission
     
    7580  G4double gj = g1;
    7681
    77   G4double A0 = ((P*P+H*H+P-H)/4.0 - H/2.0)/g0;
     82  G4double A0 = G4double(P*P+H*H+P-3*H)/(4.0*g0);
     83  G4double A1 = std::max(0.0,(A0*g0 + A*(A-2*P-1)*0.25)/g1);
    7884
    79   G4double A1 = std::max(0.0,(A0*g0 + GetA()*(GetA()-2.0*P-1.0)/4.0)/g1);
    80 
    81   G4double Aj = GetA()*(GetA()+1.0)/4.0/gj;
    82 
    83 
    84   G4double E0 = std::max(0.0,U - A0);
    85   if (E0 == 0.0) return 0.0;
     85  G4double E0 = U - A0;
     86  //G4cout << "E0= " << E0 << G4endl;
     87  if (E0 <= 0.0) { return 0.0; }
    8688
    8789  G4double E1 = (std::max(0.0,GetMaximalKineticEnergy() - eKin - A1));
    8890
    89   G4double Ej = std::max(0.0,eKin + GetBindingEnergy() -Aj);
     91  G4double Aj = A*(A+1)/(4.0*gj);
     92  G4double Ej = std::max(0.0,efinal - Aj);
     93
     94  G4double rj = GetRj(P, aFragment.GetNumberOfCharged());
     95  G4double xs = CrossSection(eKin);
     96
     97  //G4cout << "rj= " << rj << " xs= " << xs << G4endl;
    9098
    9199  // JMQ 10/02/09 reshaping of the formula (unnecessary std::pow elimitated)
     100  /*
     101  G4double r0 = theParameters->Getr0();
    92102  G4double pA = (3.0/4.0) * std::sqrt(std::max(0.0, 2.0/(GetReducedMass()*
    93                 (eKin+GetBindingEnergy()))))/(pi * r0 * r0 *r0* GetRestA())*
     103                (eKin+GetBindingEnergy()))))/(pi * r0 * r0 *r0* GetRestA())*
    94104                eKin*CrossSection(eKin)*millibarn*
    95                 CoalescenceFactor(aFragment.GetA()) * FactorialFactor(N,P)*
    96                 GetRj(aFragment.GetNumberOfParticles(), aFragment.GetNumberOfCharged());
     105                CoalescenceFactor(aFragment.GetA_asInt()) * FactorialFactor(N,P)*
     106       GetRj(aFragment.GetNumberOfParticles(), aFragment.GetNumberOfCharged());
    97107
    98108  G4double pB = std::pow((g1*E1)/(g0*E0),N-GetA()-1.0)*(g1/g0);
    99  
    100109  G4double pC = std::pow((gj*Ej)/(g0*E0),GetA()-1.0)*(gj/g0)/E0;
    101 
    102   G4double Probability = pA * pB * pC;
    103 
    104   return Probability;
     110  pA *= pB * pC;
     111  */
     112 
     113  G4double pA = fact*eKin*xs*rj
     114    * CoalescenceFactor(aFragment.GetA_asInt()) * FactorialFactor(N,P)
     115    * std::sqrt(2.0/(GetReducedMass()*efinal))
     116    * g4pow->powN(g1*E1/(g0*E0), N-A-1)
     117    * g4pow->powN(gj*Ej/(g0*E0), A-1)*gj*g1/(g0*g0*E0*GetRestA());
     118   
     119  return pA;
    105120}
  • trunk/source/processes/hadronic/models/pre_equilibrium/exciton_model/src/G4PreCompoundModel.cc

    r1337 r1340  
    2424// ********************************************************************
    2525//
    26 //
    27 // $Id: G4PreCompoundModel.cc,v 1.20 2010/06/11 17:26:43 vnivanch Exp $
    28 // GEANT4 tag $Name: geant4-09-04-beta-01 $
     26// $Id: G4PreCompoundModel.cc,v 1.25 2010/10/11 13:54:59 vnivanch Exp $
     27// GEANT4 tag $Name: geant4-09-03-ref-09 $
    2928//
    3029// by V. Lara
    3130//
    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:
     31// Modified:
     32// 01.04.2008 J.M.Quesada Several changes. Soft cut-off switched off.
     33// 01.05.2008 J.M.Quesada Protection against non-physical preeq.
     34//                        transitional regime has been set
     35// 03.09.2008 J.M.Quesada for external choice of inverse cross section option
     36// 06.09.2008 J.M.Quesada Also external choices have been added for:
    3937//                      - superimposed Coulomb barrier (useSICB=true)
    4038//                      - "never go back"  hipothesis (useNGB=true)
    4139//                      - soft cutoff from preeq. to equlibrium (useSCO=true)
    4240//                      - CEM transition probabilities (useCEMtr=true) 
    43 
     41// 20.08.2010 V.Ivanchenko Cleanup of the code:
     42//                      - integer Z and A;
     43//                      - emission and transition classes created at initialisation
     44//                      - options are set at initialisation
     45//                      - do not use copy-constructors for G4Fragment 
    4446
    4547#include "G4PreCompoundModel.hh"
     
    4850#include "G4GNASHTransitions.hh"
    4951#include "G4ParticleDefinition.hh"
    50 
     52#include "G4Proton.hh"
     53#include "G4Neutron.hh"
     54
     55#include "G4NucleiProperties.hh"
     56#include "G4PreCompoundParameters.hh"
     57#include "Randomize.hh"
     58#include "G4DynamicParticle.hh"
     59#include "G4ParticleTypes.hh"
     60#include "G4ParticleTable.hh"
     61#include "G4LorentzVector.hh"
    5162
    5263#ifdef PRECOMPOUND_TEST
     
    5869  : G4VPreCompoundModel(value), useHETCEmission(false), useGNASHTransition(false),
    5970    OPTxs(3), useSICB(false), useNGB(false), useSCO(false), useCEMtr(true)
    60 {}
     71{
     72  theParameters = G4PreCompoundParameters::GetAddress();
     73
     74  theEmission = new G4PreCompoundEmission();
     75  if(useHETCEmission) { theEmission->SetHETCModel(); }
     76  else { theEmission->SetDefaultModel(); }
     77  theEmission->SetOPTxs(OPTxs);
     78  theEmission->UseSICB(useSICB);
     79
     80  if(useGNASHTransition) { theTransition = new G4GNASHTransitions; }
     81  else { theTransition = new G4PreCompoundTransitions(); }
     82  theTransition->UseNGB(useNGB);
     83  theTransition->UseCEMtr(useCEMtr);
     84
     85  proton = G4Proton::Proton();
     86  neutron = G4Neutron::Neutron();
     87}
    6188
    6289G4PreCompoundModel::~G4PreCompoundModel()
    63 {}
    64 
    65 G4PreCompoundModel::G4PreCompoundModel()
    66   : G4VPreCompoundModel(0), useHETCEmission(false), useGNASHTransition(false),
    67     OPTxs(3), useSICB(false), useNGB(false), useSCO(false), useCEMtr(true)
    68 {}
    69 
    70 G4PreCompoundModel::G4PreCompoundModel(const G4PreCompoundModel &)
    71 : G4VPreCompoundModel()
    72 {}
    73 
    74 const G4PreCompoundModel & G4PreCompoundModel::operator=(const G4PreCompoundModel &)
    7590{
    76   throw G4HadronicException(__FILE__, __LINE__, "G4PreCompoundModel::operator= meant to not be accessable");
    77   return *this;
    78 }
    79 
    80 
    81 G4bool G4PreCompoundModel::operator==(const G4PreCompoundModel &) const
    82 {
    83   return false;
    84 }
    85 
    86 G4bool G4PreCompoundModel::operator!=(const G4PreCompoundModel &) const
    87 {
    88   return true;
    89 }
    90 
    91 
    92 
    93 // Additional Declarations
    94 
    95 G4HadFinalState * G4PreCompoundModel::ApplyYourself(const G4HadProjectile & thePrimary,
    96                                                     G4Nucleus & theNucleus)
     91  delete theEmission;
     92  delete theTransition;
     93}
     94
     95/////////////////////////////////////////////////////////////////////////////////////////
     96
     97G4HadFinalState* G4PreCompoundModel::ApplyYourself(const G4HadProjectile & thePrimary,
     98                                                   G4Nucleus & theNucleus)
    9799
     100  const G4ParticleDefinition* primary = thePrimary.GetDefinition();
     101  if(primary != neutron && primary != proton) {
     102    std::ostringstream errOs;
     103    errOs << "BAD primary type in G4PreCompoundModel: "
     104          << primary->GetParticleName() <<G4endl;
     105    throw G4HadronicException(__FILE__, __LINE__, errOs.str());
     106  }
     107  G4int Zp = 0;
     108  G4int Ap = 1;
     109  if(primary == proton) { Zp = 1; }
     110
     111  G4int A = theNucleus.GetA_asInt();
     112  G4int Z = theNucleus.GetZ_asInt();
     113
     114  // 4-Momentum
     115  G4LorentzVector p = thePrimary.Get4Momentum();
     116  G4double mass = G4NucleiProperties::GetNuclearMass(A, Z);
     117  p += G4LorentzVector(0.0,0.0,0.0,mass);
     118
    98119  // prepare fragment
    99   G4Fragment anInitialState;
    100   // This si for GNASH transitions
    101   anInitialState.SetParticleDefinition(const_cast<G4ParticleDefinition *>(thePrimary.GetDefinition()));
    102 
    103   G4int anA=static_cast<G4int>(theNucleus.GetN());
    104   anA += thePrimary.GetDefinition()->GetBaryonNumber();
    105 
    106   anInitialState.SetA(anA);
    107  
    108   G4int aZ=static_cast<G4int>(theNucleus.GetZ());
    109   aZ += static_cast<G4int>(thePrimary.GetDefinition()->GetPDGCharge());
    110 
    111   anInitialState.SetZ(aZ);
    112  
    113   // Assume the projectile is a nucleon
    114  
     120  G4Fragment anInitialState(A + Ap, Z + Zp, p);
     121  anInitialState.SetNumberOfParticles(2);
     122  anInitialState.SetNumberOfHoles(1);
     123  anInitialState.SetNumberOfCharged(1);
     124  anInitialState.SetCreationTime(thePrimary.GetGlobalTime());
     125  /*
    115126  // Number of Excited Particles
    116127  anInitialState.SetNumberOfParticles(1+thePrimary.GetDefinition()->GetBaryonNumber());
     
    129140  // Number of Holes
    130141  anInitialState.SetNumberOfHoles(1);
    131  
    132   // pre-compound nucleus energy.
    133   G4double anEnergy = 0;
    134   G4double nucleusMass =  G4ParticleTable::GetParticleTable()->GetIonTable()->GetIonMass(static_cast<G4int>(theNucleus.GetZ()),
    135                                                                                          static_cast<G4int>(theNucleus.GetN()));
    136   anEnergy =  nucleusMass + thePrimary.GetTotalEnergy();
    137  
    138   // Momentum
    139   G4ThreeVector p = thePrimary.Get4Momentum().vect();
    140 
    141   // 4-momentum
    142   G4LorentzVector momentum(p, anEnergy);
    143   anInitialState.SetMomentum(momentum);
    144  
    145 #ifdef PRECOMPOUND_TEST
    146   G4PreCompoundModel::theInitialFragmentForTest = anInitialState;
    147 #endif
     142  */
    148143 
    149144  // call excitation handler
    150   const G4Fragment aFragment(anInitialState);
    151   G4ReactionProductVector * result = DeExcite(aFragment);
     145  //  const G4Fragment aFragment(anInitialState);
     146  G4ReactionProductVector * result = DeExcite(anInitialState);
    152147
    153148#ifdef PRECOMPOUND_TEST
     
    180175}
    181176
    182 
    183177/////////////////////////////////////////////////////////////////////////////////////////
    184 /////////////////////////////////////////////////////////////////////////////////////////
    185 
    186 G4ReactionProductVector* G4PreCompoundModel::DeExcite(const G4Fragment & theInitialState) const
     178
     179G4ReactionProductVector* G4PreCompoundModel::DeExcite(G4Fragment& aFragment)
    187180{
    188  
    189181  G4ReactionProductVector * Result = new G4ReactionProductVector;
    190  
    191   // Copy of the initial state
    192   G4Fragment aFragment(theInitialState);
    193 
    194   if (aFragment.GetExcitationEnergy() < 10*eV)
    195     {
    196       // Perform Equilibrium Emission
    197       PerformEquilibriumEmission(aFragment,Result);
    198       return Result;
    199     }
    200  
    201   if (aFragment.GetA() < 5) {
    202     G4ReactionProduct * theRP = new G4ReactionProduct(G4ParticleTable::GetParticleTable()->
    203                                                       GetIon(static_cast<G4int>(aFragment.GetZ()),
    204                                                              static_cast<G4int>(aFragment.GetA()),
    205                                                              aFragment.GetExcitationEnergy()));
    206     theRP->SetMomentum(aFragment.GetMomentum().vect());
    207     theRP->SetTotalEnergy(aFragment.GetMomentum().e());   
    208     Result->push_back(theRP);
     182  G4double Eex = aFragment.GetExcitationEnergy();
     183  G4int A = aFragment.GetA_asInt();
     184
     185  //G4cout << "### G4PreCompoundModel::DeExcite" << G4endl;
     186  //G4cout << aFragment << G4endl;
     187 
     188  // Perform Equilibrium Emission
     189  if (A < 5 || Eex < keV /*|| Eex > 3.*MeV*A*/) {
     190    PerformEquilibriumEmission(aFragment, Result);
    209191    return Result;
    210192  }
    211193 
    212   G4PreCompoundEmission aEmission;
    213   if (useHETCEmission) aEmission.SetHETCModel();
    214   aEmission.SetUp(theInitialState);
    215  
    216   //for cross section options
    217  
    218   if (OPTxs!= 0 && OPTxs!=1 && OPTxs !=2 && OPTxs !=3 && OPTxs !=4  ) {
    219     std::ostringstream errOs;
    220     errOs << "BAD CROSS SECTION OPTION in G4PreCompoundModel.cc !!"  <<G4endl;
    221     throw G4HadronicException(__FILE__, __LINE__, errOs.str());}
    222   else aEmission.SetOPTxs(OPTxs);
    223  
    224   //for the choice of superimposed Coulomb Barrier for inverse cross sections
    225  
    226    aEmission.UseSICB(useSICB);
    227  
    228  
    229   //----------
    230  
    231   G4VPreCompoundTransitions * aTransition = 0;
    232   if (useGNASHTransition)
    233     {
    234       aTransition = new G4GNASHTransitions;
    235     }
    236   else
    237     {
    238       aTransition = new G4PreCompoundTransitions;
    239       // for the choice of "never go back" hypothesis and CEM transition probabilities 
    240       if (useNGB) aTransition->UseNGB(useNGB);
    241       if (useCEMtr) aTransition->UseCEMtr(useCEMtr);
    242     }
    243  
    244   // Main loop. It is performed until equilibrium deexcitation.
    245   //G4int fragment=0;
    246  
     194  // main loop 
    247195  for (;;) {
    248196   
     
    252200   
    253201    // Initialize fragment according with the nucleus parameters
    254     aEmission.Initialize(aFragment);
    255    
    256    
    257    
    258     G4double g = (6.0/pi2)*aFragment.GetA()*
    259       G4PreCompoundParameters::GetAddress()->GetLevelDensity();
    260    
    261    
    262    
    263    
    264     G4int EquilibriumExcitonNumber = static_cast<G4int>(std::sqrt(2.0*g*aFragment.GetExcitationEnergy())+ 0.5);
    265 //   
    266 //    G4cout<<"Neq="<<EquilibriumExcitonNumber<<G4endl;
    267 //
    268 // J. M. Quesada (Jan. 08)  equilibrium hole number could be used as preeq.- evap. delimiter (IAEA report)
    269 //    G4int EquilibriumHoleNumber = static_cast<G4int>(0.2*std::sqrt(g*aFragment.GetExcitationEnergy())+ 0.5);
    270    
    271 // Loop for transitions, it is performed while there are preequilibrium transitions.
     202    theEmission->Initialize(aFragment);
     203   
     204    G4double g = (6.0/pi2)*aFragment.GetA_asInt()*theParameters->GetLevelDensity();
     205   
     206    G4int EquilibriumExcitonNumber =
     207      static_cast<G4int>(std::sqrt(2.0*g*aFragment.GetExcitationEnergy())+ 0.5);
     208    //   
     209    //    G4cout<<"Neq="<<EquilibriumExcitonNumber<<G4endl;
     210    //
     211    // J. M. Quesada (Jan. 08)  equilibrium hole number could be used as preeq.
     212    // evap. delimiter (IAEA report)
     213   
     214    // Loop for transitions, it is performed while there are preequilibrium transitions.
    272215    G4bool ThereIsTransition = false;
    273216   
     
    278221    //        G4cout<<" Ex. Energy="<<aFragment.GetExcitationEnergy()<<G4endl;
    279222    //        G4cout<<"N. excitons="<<NE<<"  N. Part="<<NP<<"N. Holes ="<<NH<<G4endl;
    280        
    281    
    282223    //G4int transition=0;
    283     do
    284       {
    285         //transition++;
    286         //G4cout<<"transition number .."<<transition<<G4endl;
    287         //G4cout<<" n ="<<aFragment.GetNumberOfExcitons()<<G4endl;
    288         G4bool go_ahead = false;
    289         // soft cutoff criterium as an "ad-hoc" solution to force increase in  evaporation 
    290         //       G4double test = static_cast<G4double>(aFragment.GetNumberOfHoles());
    291         G4double test = static_cast<G4double>(aFragment.GetNumberOfExcitons());
    292        
    293        
    294         if (test < EquilibriumExcitonNumber) go_ahead=true;
    295         //J. M. Quesada (Apr. 08): soft-cutoff switched off by default
    296         if (useSCO) {
    297           if (test < EquilibriumExcitonNumber)
    298             //  if (test < EquilibriumHoleNumber)
    299             {
    300               test /= static_cast<G4double>(EquilibriumExcitonNumber);
    301               //     test /= static_cast<G4double>(EquilibriumHoleNumber);
    302               test -= 1.0;
     224    do {
     225      //transition++;
     226      //G4cout<<"transition number .."<<transition<<G4endl;
     227      //G4cout<<" n ="<<aFragment.GetNumberOfExcitons()<<G4endl;
     228      G4bool go_ahead = false;
     229      // soft cutoff criterium as an "ad-hoc" solution to force increase in  evaporation 
     230      //       G4double test = static_cast<G4double>(aFragment.GetNumberOfHoles());
     231      G4int test = aFragment.GetNumberOfExcitons();
     232      if (test < EquilibriumExcitonNumber) { go_ahead=true; }
     233
     234      //J. M. Quesada (Apr. 08): soft-cutoff switched off by default
     235      if (useSCO) {
     236        if (test < EquilibriumExcitonNumber)
     237          {
     238            G4double x = G4double(test)/G4double(EquilibriumExcitonNumber) - 1;
     239            if( G4UniformRand() < 1.0 -  std::exp(-x*x/0.32) ) { go_ahead = true; }
     240            /*
    303241              test = test*test;
    304242              test /= 0.32;
    305243              test = 1.0 - std::exp(-test);
    306244              go_ahead = (G4UniformRand() < test);
    307              
    308             }
    309         }
     245            */
     246          }
     247      }
    310248       
    311         //JMQ: WARNING:  CalculateProbability MUST be called prior to Get methods !! (O values would be returned otherwise)
    312         G4double TotalTransitionProbability = aTransition->CalculateProbability(aFragment);
    313         G4double P1=aTransition->GetTransitionProb1();
    314         G4double P2=aTransition->GetTransitionProb2();
    315         G4double P3=aTransition->GetTransitionProb3();
    316         //       G4cout<<"P1="<<P1<<" P2="<<P2<<"  P3="<<P3<<G4endl;
     249      // JMQ: WARNING:  CalculateProbability MUST be called prior to Get methods !!
     250      // (O values would be returned otherwise)
     251      G4double TotalTransitionProbability =
     252        theTransition->CalculateProbability(aFragment);
     253      G4double P1 = theTransition->GetTransitionProb1();
     254      G4double P2 = theTransition->GetTransitionProb2();
     255      G4double P3 = theTransition->GetTransitionProb3();
     256      //G4cout<<"P1="<<P1<<" P2="<<P2<<"  P3="<<P3<<G4endl;
     257     
     258      //J.M. Quesada (May. 08). Physical criterium (lamdas)  PREVAILS over
     259      //                        approximation (critical exciton number)
     260      if(P1 <= P2+P3) { go_ahead = false; }
    317261       
    318        
    319         //J.M. Quesada (May. 08). Physical criterium (lamdas)  PREVAILS over approximation (critical exciton number)
    320         if(P1<=(P2+P3)) go_ahead=false;
    321        
    322         if (go_ahead &&  aFragment.GetA() > 4)
    323           {                             
    324             G4double TotalEmissionProbability = aEmission.GetTotalProbability(aFragment);
    325             //
    326             //  G4cout<<"TotalEmissionProbability="<<TotalEmissionProbability<<G4endl;
    327             //
    328             // Check if number of excitons is greater than 0
    329             // else perform equilibrium emission
    330             if (aFragment.GetNumberOfExcitons() <= 0)
    331               {
    332                 // Perform Equilibrium Emission
    333 #ifdef debug // ------------- debug -----------------------------------------
    334                 CheckConservation(theInitialState,aFragment,Result);
    335 #endif // ------------------- debug -----------------------------------------
    336                 PerformEquilibriumEmission(aFragment,Result);
    337                 delete aTransition;
    338                 return Result;
    339               }
     262      if (go_ahead &&  aFragment.GetA_asInt() > 4)
     263        {
     264                               
     265          G4double TotalEmissionProbability =
     266            theEmission->GetTotalProbability(aFragment);
     267          //
     268          //  G4cout<<"TotalEmissionProbability="<<TotalEmissionProbability<<G4endl;
     269          //
     270          // Check if number of excitons is greater than 0
     271          // else perform equilibrium emission
     272          if (aFragment.GetNumberOfExcitons() <= 0)
     273            {
     274              PerformEquilibriumEmission(aFragment,Result);
     275              return Result;
     276            }
    340277           
    341             //      G4PreCompoundTransitions aTransition(aFragment);
     278          //J.M.Quesada (May 08) this has already been done in order to decide 
     279          //                     what to do (preeq-eq)
     280          // Sum of all probabilities
     281          G4double TotalProbability = TotalEmissionProbability
     282            + TotalTransitionProbability;
    342283           
    343             //J.M.Quesada (May 08) this has already been done in order to decide what to do (preeq-eq)
    344             // Sum of transition probabilities
    345             //      G4double TotalTransitionProbability = aTransition->CalculateProbability(aFragment);
    346            
    347             // Sum of all probabilities
    348             G4double TotalProbability = TotalEmissionProbability + TotalTransitionProbability;
    349            
    350             // Select subprocess
    351             if (G4UniformRand() > TotalEmissionProbability/TotalProbability)
    352               {
    353                 // It will be transition to state with a new number of excitons
    354                 ThereIsTransition = true;               
    355                 // Perform the transition
    356                 aFragment = aTransition->PerformTransition(aFragment);
    357               }
    358             else
    359               {
    360                 // It will be fragment emission
    361                 ThereIsTransition = false;
    362                 Result->push_back(aEmission.PerformEmission(aFragment));
    363               }
    364           }
    365         else
    366           {
    367             // Perform Equilibrium Emission
    368 #ifdef debug
    369             CheckConservation(theInitialState,aFragment,Result);
    370 #endif
    371             PerformEquilibriumEmission(aFragment,Result);
    372             delete aTransition;
    373             return Result;
    374           }
    375       } while (ThereIsTransition);   // end of do loop
     284          // Select subprocess
     285          if (TotalProbability*G4UniformRand() > TotalEmissionProbability)
     286            {
     287              // It will be transition to state with a new number of excitons
     288              ThereIsTransition = true;         
     289              // Perform the transition
     290              theTransition->PerformTransition(aFragment);
     291            }
     292          else
     293            {
     294              // It will be fragment emission
     295              ThereIsTransition = false;
     296              Result->push_back(theEmission->PerformEmission(aFragment));
     297            }
     298        }
     299      else
     300        {
     301          PerformEquilibriumEmission(aFragment,Result);
     302          return Result;
     303        }
     304    } while (ThereIsTransition);   // end of do loop
    376305  } // end of for (;;) loop
    377 }
    378 
    379 
    380 
    381 
    382 void G4PreCompoundModel::PerformEquilibriumEmission(const G4Fragment & aFragment,
    383                                                     G4ReactionProductVector * Result) const
    384 {
    385   G4ReactionProductVector * theEquilibriumResult;
    386 
    387   theEquilibriumResult = GetExcitationHandler()->BreakItUp(aFragment);
    388  
    389   Result->insert(Result->end(),theEquilibriumResult->begin(), theEquilibriumResult->end());
    390 
    391   delete theEquilibriumResult;
    392   return;
    393 }
    394 
     306  return Result;
     307}
     308
     309/////////////////////////////////////////////////////////////////////////////////////////
     310//       Initialisation
     311/////////////////////////////////////////////////////////////////////////////////////////
     312
     313void G4PreCompoundModel::UseHETCEmission()
     314{
     315  useHETCEmission = true;
     316  theEmission->SetHETCModel();
     317}
     318
     319void G4PreCompoundModel::UseDefaultEmission()
     320{
     321  useHETCEmission = false;
     322  theEmission->SetDefaultModel();
     323}
     324
     325void G4PreCompoundModel::UseGNASHTransition() {
     326  useGNASHTransition = true;
     327  delete theTransition;
     328  theTransition = new G4GNASHTransitions;
     329  theTransition->UseNGB(useNGB);
     330  theTransition->UseCEMtr(useCEMtr);
     331}
     332
     333void G4PreCompoundModel::UseDefaultTransition() {
     334  useGNASHTransition = false;
     335  delete theTransition;
     336  theTransition = new G4PreCompoundTransitions();
     337  theTransition->UseNGB(useNGB);
     338  theTransition->UseCEMtr(useCEMtr);
     339}
     340
     341void G4PreCompoundModel::SetOPTxs(G4int opt)
     342{
     343  OPTxs = opt;
     344  theEmission->SetOPTxs(OPTxs);
     345}
     346
     347void G4PreCompoundModel::UseSICB()
     348{
     349  useSICB = true;
     350  theEmission->UseSICB(useSICB);
     351}
     352
     353void G4PreCompoundModel::UseNGB() 
     354{
     355  useNGB = true;
     356}
     357
     358void G4PreCompoundModel::UseSCO() 
     359{
     360  useSCO = true;
     361}
     362
     363void G4PreCompoundModel::UseCEMtr()
     364{
     365  useCEMtr = true;
     366}
     367
     368/////////////////////////////////////////////////////////////////////////////////////////
    395369
    396370#ifdef debug
  • trunk/source/processes/hadronic/models/pre_equilibrium/exciton_model/src/G4PreCompoundNeutron.cc

    r1337 r1340  
    2424// ********************************************************************
    2525//
    26 //
    27 // $Id: G4PreCompoundNeutron.cc,v 1.4 2009/02/11 18:06:00 vnivanch Exp $
    28 // GEANT4 tag $Name: geant4-09-04-beta-01 $
     26// $Id: G4PreCompoundNeutron.cc,v 1.5 2010/08/28 15:16:55 vnivanch Exp $
     27// GEANT4 tag $Name: geant4-09-03-ref-09 $
    2928//
    3029// -------------------------------------------------------------------
     
    4039// 21.08.2008 J. M. Quesada add choice of options 
    4140// 10.02.2009 J. M. Quesada set default opt3
     41// 20.08.2010 V.Ivanchenko added G4Pow and G4PreCompoundParameters pointers
     42//                         use int Z and A and cleanup
    4243//
    4344
    4445#include "G4PreCompoundNeutron.hh"
    45 
    46 G4ReactionProduct * G4PreCompoundNeutron::GetReactionProduct() const
    47 {
    48   G4ReactionProduct * theReactionProduct =
    49     new G4ReactionProduct(G4Neutron::NeutronDefinition());
    50   theReactionProduct->SetMomentum(GetMomentum().vect());
    51   theReactionProduct->SetTotalEnergy(GetMomentum().e());
    52 #ifdef PRECOMPOUND_TEST
    53   theReactionProduct->SetCreatorModel("G4PrecompoundModel");
    54 #endif
    55   return theReactionProduct;
    56 }
    57 
    58 G4double G4PreCompoundNeutron::GetRj(const G4int NumberParticles, const G4int NumberCharged)
     46#include "G4Neutron.hh"
     47
     48G4PreCompoundNeutron::G4PreCompoundNeutron()
     49  : G4PreCompoundNucleon(G4Neutron::Neutron(), &theNeutronCoulombBarrier)
     50{}
     51
     52G4PreCompoundNeutron::~G4PreCompoundNeutron()
     53{}
     54
     55G4double G4PreCompoundNeutron::GetRj(G4int nParticles, G4int nCharged)
    5956{
    6057  G4double rj = 0.0;
    61   if(NumberParticles > 0) rj = static_cast<G4double>(NumberParticles - NumberCharged)/
    62                             static_cast<G4double>(NumberParticles);
     58  if(nParticles > 0) {
     59    rj = static_cast<G4double>(nParticles - nCharged)/
     60      static_cast<G4double>(nParticles);
     61  }
    6362  return rj;
    6463}
     
    7271G4double G4PreCompoundNeutron::CrossSection(const  G4double K)
    7372{
    74   ResidualA=GetRestA();
    75   ResidualZ=GetRestZ();
    76   theA=GetA();
    77   theZ=GetZ();
    78   ResidualAthrd=std::pow(ResidualA,0.33333);
    79   FragmentA=GetA()+GetRestA();
    80   FragmentAthrd=std::pow(FragmentA,0.33333);
    81 
    82   if (OPTxs==0) return GetOpt0( K);
    83   else if( OPTxs==1 || OPTxs==2) return GetOpt12( K);
    84   else if (OPTxs==3 || OPTxs==4)  return GetOpt34( K);
     73  ResidualA = GetRestA();
     74  ResidualZ = GetRestZ();
     75  theA = GetA();
     76  theZ = GetZ();
     77  ResidualAthrd = ResidualA13();
     78  FragmentA = theA + ResidualA;
     79  FragmentAthrd = g4pow->Z13(FragmentA);
     80
     81  if (OPTxs==0) { return GetOpt0( K); }
     82  else if( OPTxs==1 || OPTxs==2) { return GetOpt12( K); }
     83  else if (OPTxs==3 || OPTxs==4) { return GetOpt34( K); }
    8584  else{
    8685    std::ostringstream errOs;
     
    9190}
    9291
    93 // *********************** OPT=0 : Dostrovski's cross section  *****************************
    94 
    95 G4double G4PreCompoundNeutron::GetOpt0(const  G4double K)
    96 {
    97  
    98   const G4double r0 = G4PreCompoundParameters::GetAddress()->Getr0();
    99   // cross section is now given in mb (r0 is in mm) for the sake of consistency
    100   //with the rest of the options
    101   return 1.e+25*pi*(r0*ResidualAthrd)*(r0*ResidualAthrd)*GetAlpha()*(1.+GetBeta()/K);
    102 }
    103 //
    104 //-------
    105 //
    10692G4double G4PreCompoundNeutron::GetAlpha()
    10793{
    108   //   return 0.76+2.2/std::pow(GetRestA(),1.0/3.0);
    10994  return 0.76+2.2/ResidualAthrd;
    11095}
    111 //
    112 //------------
    113 //
     96
    11497G4double G4PreCompoundNeutron::GetBeta()
    11598{
     
    117100  return (2.12/(ResidualAthrd*ResidualAthrd)-0.05)*MeV/GetAlpha();
    118101}
    119 //
    120 
    121 //********************* OPT=1,2 : Chatterjee's cross section ************************
     102
     103//********************* OPT=1,2 : Chatterjee's cross section *******************
    122104//(fitting to cross section from Bechetti & Greenles OM potential)
    123105
    124 G4double G4PreCompoundNeutron::GetOpt12(const  G4double K)
    125 {
    126 
     106G4double G4PreCompoundNeutron::GetOpt12(G4double K)
     107{
    127108  G4double Kc=K;
    128109
    129 // Pramana (Bechetti & Greenles) for neutrons is chosen
    130 
    131 // JMQ  xsec is set constat above limit of validity
    132  if (K>50) Kc=50;
     110  // Pramana (Bechetti & Greenles) for neutrons is chosen
     111
     112  // JMQ  xsec is set constat above limit of validity
     113  if (K > 50*MeV) { Kc = 50*MeV; }
    133114
    134115 G4double landa, landa0, landa1, mu, mu0, mu1,nu, nu0, nu1, nu2,xs;
     
    155136}
    156137
    157 
    158138// *********** OPT=3,4 : Kalbach's cross sections (from PRECO code)*************
    159 G4double G4PreCompoundNeutron::GetOpt34(const  G4double K)
    160 {
    161  
     139G4double G4PreCompoundNeutron::GetOpt34(G4double K)
     140{
    162141  G4double landa, landa0, landa1, mu, mu0, mu1,nu, nu0, nu1, nu2;
    163142  G4double p, p0, p1, p2;
     
    177156  p2=0.;
    178157
    179 
    180158  flow = 1.e-18;
    181159  spill= 1.0e+18;
    182160
    183161  // PRECO xs for neutrons is choosen
    184 
    185162  p0 = -312.;
    186163  p1= 0.;
     
    194171  nu2 = 1280.8;
    195172
    196   if (ResidualA < 40.) signor=0.7+ResidualA*0.0075;
    197   if (ResidualA > 210.) signor = 1. + (ResidualA-210.)/250.;
     173  if (ResidualA < 40)  { signor =0.7 + ResidualA*0.0075; }
     174  if (ResidualA > 210) { signor = 1. + (ResidualA-210)/250.; }
    198175  landa = landa0/ResidualAthrd + landa1;
    199176  mu = mu0*ResidualAthrd + mu1*ResidualAthrd*ResidualAthrd;
     
    201178
    202179  // JMQ very low energy behaviour corrected (problem  for A (apprx.)>60)
    203   if (nu < 0.)nu=-nu;
     180  if (nu < 0.) { nu=-nu; }
    204181
    205182  ec = 0.5;
     
    216193  ecut = 0.;
    217194  cut = a*a - 4.*p*b;
    218   if (cut > 0.) ecut = std::sqrt(cut);
     195  if (cut > 0.) { ecut = std::sqrt(cut); }
    219196  ecut = (ecut-a) / (p+p);
    220197  ecut2 = ecut;
    221   if (cut < 0.) ecut2 = ecut - 2.;
    222   elab = K * FragmentA / ResidualA;
     198  if (cut < 0.) { ecut2 = ecut - 2.; }
     199  elab = K * FragmentA / G4double(ResidualA);
    223200  sig = 0.;
    224201  if (elab <= ec) { //start for E<Ec
    225     if (elab > ecut2)  sig = (p*elab*elab+a*elab+b) * signor;               
     202    if (elab > ecut2) { sig = (p*elab*elab+a*elab+b) * signor; }               
    226203  }              //end for E<Ec
    227204  else {           //start for  E>Ec
    228205    sig = (landa*elab+mu+nu/elab) * signor;
    229206    geom = 0.;
    230     if (xnulam < flow || elab < etest) return sig;
     207    if (xnulam < flow || elab < etest) { return sig; }
    231208    geom = std::sqrt(theA*K);
    232209    geom = 1.23*ResidualAthrd + ra + 4.573/geom;
     
    235212
    236213  }
    237   return sig;}
    238 
    239 //   ************************** end of cross sections *******************************
    240 
    241 
     214  return sig;
     215}
  • trunk/source/processes/hadronic/models/pre_equilibrium/exciton_model/src/G4PreCompoundNucleon.cc

    r1337 r1340  
    2424// ********************************************************************
    2525//
    26 //
    27 // $Id: G4PreCompoundNucleon.cc,v 1.13 2009/02/11 18:06:00 vnivanch Exp $
    28 // GEANT4 tag $Name: geant4-09-04-beta-01 $
     26// $Id: G4PreCompoundNucleon.cc,v 1.14 2010/08/28 15:16:55 vnivanch Exp $
     27// GEANT4 tag $Name: geant4-09-03-ref-09 $
    2928//
    3029// -------------------------------------------------------------------
     
    3938// Modified: 
    4039// 10.02.2009 J. M. Quesada cleanup
     40// 20.08.2010 V.Ivanchenko added G4Pow and G4PreCompoundParameters pointers
     41//                         use int Z and A and cleanup
    4142//
    4243
    4344#include "G4PreCompoundNucleon.hh"
    44 #include "G4PreCompoundParameters.hh"
    4545
    46 G4bool G4PreCompoundNucleon::IsItPossible(const G4Fragment& aFragment)
     46G4PreCompoundNucleon::
     47G4PreCompoundNucleon(const G4ParticleDefinition* part,
     48                      G4VCoulombBarrier* aCoulombBarrier)
     49  : G4PreCompoundFragment(part,aCoulombBarrier)
    4750{
    48   G4int pplus = aFragment.GetNumberOfCharged();   
    49   G4int pneut = aFragment.GetNumberOfParticles()-pplus;
    50   return (pneut >= (GetA()-GetZ()) && pplus >= GetZ());
     51  fact = 2*CLHEP::millibarn/(CLHEP::pi2*CLHEP::hbarc*CLHEP::hbarc*CLHEP::hbarc);
    5152}
    5253
     54G4PreCompoundNucleon::~G4PreCompoundNucleon()
     55{}
     56
    5357G4double G4PreCompoundNucleon::
    54 ProbabilityDistributionFunction(const G4double eKin,
     58ProbabilityDistributionFunction(G4double eKin,
    5559                                const G4Fragment& aFragment)
    5660{
    57   if ( !IsItPossible(aFragment) ) return 0.0;
     61  if ( !IsItPossible(aFragment) ) { return 0.0; }
    5862
    5963  G4double U = aFragment.GetExcitationEnergy();
    60   G4double P = aFragment.GetNumberOfParticles();
    61   G4double H = aFragment.GetNumberOfHoles();
    62   G4double N = P + H;
     64  G4int P = aFragment.GetNumberOfParticles();
     65  G4int H = aFragment.GetNumberOfHoles();
     66  G4int N = P + H;
     67
     68  G4double g0 = (6.0/pi2)*aFragment.GetA_asInt()*theParameters->GetLevelDensity();
     69  G4double g1 = (6.0/pi2)*GetRestA()*theParameters->GetLevelDensity();
    6370 
    64   G4double g0 = (6.0/pi2)*aFragment.GetA() *
    65     G4PreCompoundParameters::GetAddress()->GetLevelDensity();
    66  
    67   G4double g1 = (6.0/pi2)*GetRestA() *
    68     G4PreCompoundParameters::GetAddress()->GetLevelDensity();
     71  G4double A0 = G4double(P*P+H*H+P-3*H)/(4.0*g0);
     72  G4double A1 = (A0 - 0.5*P)/g1; 
    6973
    70   G4double A0 = ((P*P+H*H+P-H)/4.0 - H/2.0)/g0;
     74  G4double E0 = U - A0;
     75  if (E0 <= 0.0) { return 0.0; }
    7176
    72   G4double A1 = (A0 - P/2.0)/g1;
     77  G4double E1 = U - eKin - GetBindingEnergy() - A1;
     78  if (E1 <= 0.0) { return 0.0; }
     79
     80  G4double rj = GetRj(P, aFragment.GetNumberOfCharged());
     81  G4double xs = CrossSection(eKin);
     82
     83  if (rj <0.0 || xs < 0.0) { 
     84    std::ostringstream errOs;
     85    G4cout<<"WARNING:  NEGATIVE VALUES "<<G4endl;     
     86    errOs << "Rj=" << rj <<"  xsec("
     87          <<eKin/MeV<<" MeV)= "<< xs <<"  A= "<<GetA()<<"  Z= "<<GetZ()
     88          <<G4endl;
     89    throw G4HadronicException(__FILE__, __LINE__, errOs.str());
     90  }
     91
     92  G4double Probability = fact * GetReducedMass() * rj * xs * eKin * P * (N-1)
     93    * g4pow->powN(g1*E1/(g0*E0),N-2) * g1 / (E0*g0*g0);
    7394 
    74   G4double E0 = std::max(0.0,U - A0);
    75   if (E0 == 0.0) return 0.0;
    76   G4double E1 = std::max(0.0,U - eKin - GetBindingEnergy() - A1);
    77   if (E1 == 0.0) return 0.0;
    78 
    79 
     95  /*
    8096  G4double Probability = 1.0/pi2*2.0/(hbarc*hbarc*hbarc) * GetReducedMass()
    8197    * GetRj(aFragment.GetNumberOfParticles(), aFragment.GetNumberOfCharged()) 
    82     * eKin*CrossSection(eKin)*millibarn * P*(N-1.0) * std::pow(g1*E1/(g0*E0),N-2.0)/E0 * g1/(g0*g0);
    83 
    84   if (GetRj(aFragment.GetNumberOfParticles(), aFragment.GetNumberOfCharged())<0.0
    85       || CrossSection(eKin) <0) { 
    86     std::ostringstream errOs;
    87     G4cout<<"WARNING:  NEGATIVE VALUES "<<G4endl;     
    88     errOs << "Rj=" << GetRj(aFragment.GetNumberOfParticles(), aFragment.GetNumberOfCharged())
    89           <<G4endl;
    90     errOs <<"  xsec("<<eKin<<" MeV) ="<<CrossSection(eKin)<<G4endl;
    91     errOs <<"  A="<<GetA()<<"  Z="<<GetZ()<<G4endl;
    92     throw G4HadronicException(__FILE__, __LINE__, errOs.str());
    93   }
     98    * eKin*CrossSection(eKin)*millibarn * P*(N-1.0) *
     99   std::pow(g1*E1/(g0*E0),N-2.0)/E0 * g1/(g0*g0);
     100  */
    94101
    95102  return Probability;
  • trunk/source/processes/hadronic/models/pre_equilibrium/exciton_model/src/G4PreCompoundParameters.cc

    r1337 r1340  
    2424// ********************************************************************
    2525//
    26 //
    27 // $Id: G4PreCompoundParameters.cc,v 1.3 2006/06/29 20:59:29 gunter Exp $
    28 // GEANT4 tag $Name: geant4-09-04-beta-01 $
     26// $Id: G4PreCompoundParameters.cc,v 1.4 2010/08/18 14:07:24 vnivanch Exp $
     27// GEANT4 tag $Name: geant4-09-03-ref-09 $
    2928//
    3029// by V. Lara
     30//
     31// 18.08.2010 V.Ivanchenko make this class as a standard singleton
     32//
    3133
    3234#include "G4PreCompoundParameters.hh"
    3335
    34 
    35 G4PreCompoundParameters G4PreCompoundParameters::thePreCompoundParameters;
     36G4PreCompoundParameters* G4PreCompoundParameters::theParameters = 0;
    3637
    3738G4PreCompoundParameters * G4PreCompoundParameters::GetAddress()
    38 { return &thePreCompoundParameters; }
     39{
     40  if(0 == theParameters) {
     41    static G4PreCompoundParameters par;
     42    theParameters = &par;
     43  }
     44  return theParameters;
     45}
    3946
     47G4PreCompoundParameters::G4PreCompoundParameters()
     48  : fLevelDensity(0.10/MeV),
     49    fR0(1.5*fermi),
     50    fTransitions_r0(0.6*fermi),
     51    fFermiEnergy(35.0*MeV)
     52{}
     53
     54G4PreCompoundParameters::~G4PreCompoundParameters()
     55{}
     56
     57
  • trunk/source/processes/hadronic/models/pre_equilibrium/exciton_model/src/G4PreCompoundProton.cc

    r1337 r1340  
    2424// ********************************************************************
    2525//
    26 //
    27 // $Id: G4PreCompoundProton.cc,v 1.5 2010/04/09 14:06:17 vnivanch Exp $
    28 // GEANT4 tag $Name: geant4-09-04-beta-01 $
     26// $Id: G4PreCompoundProton.cc,v 1.6 2010/08/28 15:16:55 vnivanch Exp $
     27// GEANT4 tag $Name: geant4-09-03-ref-09 $
    2928//
    3029// -------------------------------------------------------------------
     
    3938// Modified: 
    4039// 21.08.2008 J. M. Quesada added external choice of inverse cross section option
    41 // 21.08.2008 J. M. Quesada added external choice for superimposed Coulomb barrier
    42 //                          (if useSICB=true)
     40// 21.08.2008 J. M. Quesada added external choice for superimposed Coulomb
     41//                          barrier (if useSICB=true)
     42// 20.08.2010 V.Ivanchenko added G4Pow and G4PreCompoundParameters pointers
     43//                         use int Z and A and cleanup
    4344//
    4445
    4546#include "G4PreCompoundProton.hh"
    46 
    47 G4ReactionProduct * G4PreCompoundProton::GetReactionProduct() const
    48 {
    49   G4ReactionProduct * theReactionProduct =
    50     new G4ReactionProduct(G4Proton::ProtonDefinition());
    51   theReactionProduct->SetMomentum(GetMomentum().vect());
    52   theReactionProduct->SetTotalEnergy(GetMomentum().e());
    53 #ifdef PRECOMPOUND_TEST
    54   theReactionProduct->SetCreatorModel("G4PrecompoundModel");
    55 #endif
    56   return theReactionProduct;
    57 }
    58 
    59 G4double G4PreCompoundProton::GetRj(const G4int NumberParticles, const G4int NumberCharged)
     47#include "G4Proton.hh"
     48
     49G4PreCompoundProton::G4PreCompoundProton()
     50  : G4PreCompoundNucleon(G4Proton::Proton(), &theProtonCoulombBarrier)
     51{}
     52
     53G4PreCompoundProton::~G4PreCompoundProton()
     54{}
     55
     56G4double G4PreCompoundProton::GetRj(G4int nParticles, G4int nCharged)
    6057{
    6158  G4double rj = 0.0;
    62   if(NumberParticles > 0) rj = static_cast<G4double>(NumberCharged)/static_cast<G4double>(NumberParticles);
     59  if(nParticles > 0) {
     60    rj = static_cast<G4double>(nCharged)/static_cast<G4double>(nParticles);
     61  }
    6362  return rj;
    6463}
     
    7170//OPT=3 Kalbach's parameterization
    7271//
    73 G4double G4PreCompoundProton::CrossSection(const  G4double K)
    74 {
    75   //G4cout<<" In G4PreCompoundProton OPTxs="<<OPTxs<<G4endl;
    76   //G4cout<<" In G4PreCompoundProton useSICB="<<useSICB<<G4endl;
    77 
    78   ResidualA=GetRestA();
    79   ResidualZ=GetRestZ();
    80   theA=GetA();
    81   theZ=GetZ();
    82   ResidualAthrd=std::pow(ResidualA,0.33333);
    83   FragmentA=GetA()+GetRestA();
    84   FragmentAthrd=std::pow(FragmentA,0.33333);
    85 
    86   if (OPTxs==0) return GetOpt0(K);
    87   else if( OPTxs==1) return GetOpt1(K);
    88   else if( OPTxs==2|| OPTxs==4) return GetOpt2(K);
    89   else if (OPTxs==3)  return GetOpt3(K);
     72G4double G4PreCompoundProton::CrossSection(G4double K)
     73{
     74  ResidualA = GetRestA();
     75  ResidualZ = GetRestZ();
     76  theA = GetA();
     77  theZ = GetZ();
     78  ResidualAthrd = ResidualA13();
     79  FragmentA = theA + ResidualA;
     80  FragmentAthrd = g4pow->Z13(FragmentA);
     81
     82  if (OPTxs==0) { return GetOpt0(K); }
     83  else if( OPTxs==1) { return GetOpt1(K); }
     84  else if( OPTxs==2|| OPTxs==4) { return GetOpt2(K); }
     85  else if (OPTxs==3)  { return GetOpt3(K); }
    9086  else{
    9187    std::ostringstream errOs;
     
    9692}
    9793
    98 // *********************** OPT=0 : Dostrovski's cross section  *****************************
    99 
    100 G4double G4PreCompoundProton::GetOpt0(const  G4double K)
    101 {
    102   const G4double r0 = G4PreCompoundParameters::GetAddress()->Getr0();
    103   // cross section is now given in mb (r0 is in mm) for the sake of consistency
    104   //with the rest of the options
    105   return 1.e+25*pi*(r0*ResidualAthrd)*(r0*ResidualAthrd)*GetAlpha()*(1.+GetBeta()/K);
    106 }
    107 //
    108 //------------
    109 //
    11094G4double G4PreCompoundProton::GetAlpha()
    11195{
    112   G4double aZ = static_cast<G4double>(GetRestZ());
     96  G4int aZ = ResidualZ;
    11397  G4double C = 0.0;
    11498  if (aZ >= 70)
     
    122106  return 1.0 + C;
    123107}
    124 //
    125 //-------------------
    126 // 
     108
    127109G4double G4PreCompoundProton::GetBeta()
    128110{
    129111  return -GetCoulombBarrier();
    130112}
    131 //
    132  
    133 //********************* OPT=1 : Chatterjee's cross section ************************
     113 
     114//********************* OPT=1 : Chatterjee's cross section *********************
    134115//(fitting to cross section from Bechetti & Greenles OM potential)
    135116
    136 G4double G4PreCompoundProton::GetOpt1(const  G4double K)
     117G4double G4PreCompoundProton::GetOpt1(G4double K)
    137118{
    138119  G4double Kc=K;
    139120
    140121  // JMQ  xsec is set constat above limit of validity
    141   if (K>50)  Kc=50;
     122  if (K > 50*MeV) { Kc = 50*MeV; }
    142123
    143124  G4double landa, landa0, landa1, mu, mu0, mu1,nu, nu0, nu1, nu2,xs;
     
    159140  p = p0 + p1/Ec + p2/(Ec*Ec);
    160141  landa = landa0*ResidualA + landa1;
    161   mu = mu0*std::pow(ResidualA,mu1);
    162   nu = std::pow(ResidualA,mu1)*(nu0 + nu1*Ec + nu2*(Ec*Ec));
     142
     143  G4double resmu1 = g4pow->powZ(ResidualA,mu1);
     144  mu = mu0*resmu1;
     145  nu = resmu1*(nu0 + nu1*Ec + nu2*(Ec*Ec));
    163146  q = landa - nu/(Ec*Ec) - 2*p*Ec;
    164147  r = mu + 2*nu/Ec + p*(Ec*Ec);
     
    170153
    171154  return xs;
    172 
    173 }
    174 
    175 //************* OPT=2 : Welisch's proton reaction cross section ************************
    176 
    177 G4double G4PreCompoundProton::GetOpt2(const  G4double K)
    178 {
    179 
    180   G4double rnpro,rnneu,eekin,ekin,ff1,ff2,ff3,r0,fac,fac1,fac2,b0,xine_th(0);
     155}
     156
     157//************* OPT=2 : Welisch's proton reaction cross section ***************
     158
     159G4double G4PreCompoundProton::GetOpt2(G4double K)
     160{
     161
     162  G4double eekin,ekin,ff1,ff2,ff3,r0,fac,fac1,fac2,b0,xine_th(0);
    181163 
    182   //This is redundant when the Coulomb  barrier is overimposed to all cross sections
    183   //It should be kept when Coulomb barrier only imposed at OPTxs=2
    184 
    185   if(!useSICB && K<=theCoulombBarrier) return xine_th=0.0;
     164  // This is redundant when the Coulomb  barrier is overimposed to all
     165  // cross sections
     166  // It should be kept when Coulomb barrier only imposed at OPTxs=2
     167
     168  if(!useSICB && K<=theCoulombBarrier) { return 0.0; }
    186169
    187170  eekin=K;
    188   rnpro=ResidualZ;
    189   rnneu=ResidualA-ResidualZ;
     171  G4int rnneu=ResidualA-ResidualZ;
    190172  ekin=eekin/1000;
    191173  r0=1.36*1.e-15;
     
    194176  fac1=b0*(1.-1./ResidualAthrd);
    195177  fac2=1.;
    196   if(rnneu > 1.5) fac2=std::log(rnneu);
     178  if(rnneu > 1.5) { fac2 = g4pow->logZ(rnneu); }
    197179  xine_th= 1.e+31*fac*fac2*(1.+ResidualAthrd-fac1);
    198180  xine_th=(1.-0.15*std::exp(-ekin))*xine_th/(1.00-0.0007*ResidualA);   
    199   ff1=0.70-0.0020*ResidualA ;
     181  ff1=0.70-0.0020*ResidualA;
    200182  ff2=1.00+1/ResidualA;
    201183  ff3=0.8+18/ResidualA-0.002*ResidualA;
     
    215197  }
    216198  return xine_th;
    217            
    218 }
    219 
     199}
    220200
    221201// *********** OPT=3 : Kalbach's cross sections (from PRECO code)*************
     
    247227  G4double ec,ecsq,xnulam,etest(0.),ra(0.),a,w,c,signor(1.),signor2,sig;
    248228  G4double b,ecut,cut,ecut2,geom,elab;
    249  
    250  
     229   
    251230  G4double      flow = 1.e-18;
    252231  G4double       spill= 1.e+18;
    253  
    254  
    255  
    256   if (ResidualA <= 60.)  signor = 0.92;
    257   else if (ResidualA < 100.) signor = 0.8 + ResidualA*0.002;
    258  
     232   
     233  if (ResidualA <= 60.)  { signor = 0.92; }
     234  else if (ResidualA < 100.) { signor = 0.8 + ResidualA*0.002; }
    259235 
    260236  ec = 1.44 * theZ * ResidualZ / (1.5*ResidualAthrd+ra);
     
    262238  p = p0 + p1/ec + p2/ecsq;
    263239  landa = landa0*ResidualA + landa1;
    264   a = std::pow(ResidualA,mu1);
     240  a = g4pow->powZ(ResidualA,mu1);
    265241  mu = mu0 * a;
    266242  nu = a* (nu0+nu1*ec+nu2*ecsq);
     
    270246 
    271247  xnulam = nu / landa;
    272   if (xnulam > spill) xnulam=0.;
    273   if (xnulam >= flow) etest =std::sqrt(xnulam) + 7.;
     248  if (xnulam > spill) { xnulam=0.; }
     249  if (xnulam >= flow) { etest =std::sqrt(xnulam) + 7.; }
    274250 
    275251  a = -2.*p*ec + landa - nu/ecsq;
     
    277253  ecut = 0.;
    278254  cut = a*a - 4.*p*b;
    279   if (cut > 0.) ecut = std::sqrt(cut);
     255  if (cut > 0.) { ecut = std::sqrt(cut); }
    280256  ecut = (ecut-a) / (p+p);
    281257  ecut2 = ecut;
    282 //JMQ 290310 for avoiding unphysical increase below minimum (at ecut)
    283 //ecut<0 means that there is no cut with energy axis, i.e. xs is set to 0 bellow minimum
    284 //  if (cut < 0.) ecut2 = ecut - 2.;
    285   if (cut < 0.) ecut2 = ecut;
     258  //JMQ 290310 for avoiding unphysical increase below minimum (at ecut)
     259  // ecut<0 means that there is no cut with energy axis, i.e. xs is set
     260  // to 0 bellow minimum
     261  //  if (cut < 0.) ecut2 = ecut - 2.;
     262  if (cut < 0.) { ecut2 = ecut; }
    286263  elab = K * FragmentA / ResidualA;
    287264  sig = 0.;
    288265  if (elab <= ec) { //start for E<Ec
    289     if (elab > ecut2)  sig = (p*elab*elab+a*elab+b) * signor;
     266    if (elab > ecut2) { sig = (p*elab*elab+a*elab+b) * signor; }
    290267   
    291268    signor2 = (ec-elab-c) / w;
     
    308285   
    309286  }   //end for E>Ec
    310 
    311287  return sig;
    312288}
    313 
    314 //   ************************** end of cross sections *******************************
    315 
    316 
    317 
  • trunk/source/processes/hadronic/models/pre_equilibrium/exciton_model/src/G4PreCompoundTransitions.cc

    r1337 r1340  
    2424// ********************************************************************
    2525//
    26 // $Id: G4PreCompoundTransitions.cc,v 1.22 2009/11/21 18:03:13 vnivanch Exp $
    27 // GEANT4 tag $Name: geant4-09-04-beta-01 $
     26// $Id: G4PreCompoundTransitions.cc,v 1.27 2010/10/20 00:47:46 vnivanch Exp $
     27// GEANT4 tag $Name: geant4-09-03-ref-09 $
    2828//
    2929// -------------------------------------------------------------------
     
    3737//
    3838// Modified: 
    39 // 16.02.2008 J. M. Quesada fixed bugs
    40 // 06.09.2008 J. M. Quesada added external choices for:
     39// 16.02.2008 J.M.Quesada fixed bugs
     40// 06.09.2008 J.M.Quesada added external choices for:
    4141//                      - "never go back"  hipothesis (useNGB=true)
    4242//                      -  CEM transition probabilities (useCEMtr=true)
    43 
    44 // 30.10.09 J.M.Quesada: CEM transition probabilities have been renormalized
     43// 30.10.2009 J.M.Quesada: CEM transition probabilities have been renormalized
    4544//                       (IAEA benchmark)
    46 //
     45// 20.08.2010 V.Ivanchenko move constructor and destructor to the source and
     46//                         optimise the code
     47//
     48
    4749#include "G4PreCompoundTransitions.hh"
    4850#include "G4HadronicException.hh"
    49 
    50 const G4PreCompoundTransitions & G4PreCompoundTransitions::
    51 operator=(const G4PreCompoundTransitions &)
     51#include "G4PreCompoundParameters.hh"
     52#include "G4Proton.hh"
     53#include "Randomize.hh"
     54#include "G4Pow.hh"
     55
     56G4PreCompoundTransitions::G4PreCompoundTransitions()
    5257{
    53   throw G4HadronicException(__FILE__, __LINE__, "G4PreCompoundTransitions::operator= meant to not be accessable");
    54   return *this;
     58  proton = G4Proton::Proton();
     59  FermiEnergy = G4PreCompoundParameters::GetAddress()->GetFermiEnergy();
     60  r0 = G4PreCompoundParameters::GetAddress()->GetTransitionsr0();
     61  aLDP = G4PreCompoundParameters::GetAddress()->GetLevelDensity();
     62  g4pow = G4Pow::GetInstance();
    5563}
    5664
    57 
    58 G4bool G4PreCompoundTransitions::operator==(const G4PreCompoundTransitions &) const
    59 {
    60   return false;
    61 }
    62 
    63 G4bool G4PreCompoundTransitions::operator!=(const G4PreCompoundTransitions &) const
    64 {
    65   return true;
    66 }
    67 
    68 
     65G4PreCompoundTransitions::~G4PreCompoundTransitions()
     66{}
     67
     68// Calculates transition probabilities with
     69// DeltaN = +2 (Trans1) -2 (Trans2) and 0 (Trans3)
    6970G4double G4PreCompoundTransitions::
    7071CalculateProbability(const G4Fragment & aFragment)
    7172{
    72   //G4cout<<"In G4PreCompoundTransitions.cc  useNGB="<<useNGB<<G4endl;
    73   //G4cout<<"In G4PreCompoundTransitions.cc  useCEMtr="<<useCEMtr<<G4endl;
    74 
    75   // Fermi energy
    76   const G4double FermiEnergy = G4PreCompoundParameters::GetAddress()->GetFermiEnergy();
     73  // Number of holes
     74  G4int H = aFragment.GetNumberOfHoles();
     75  // Number of Particles
     76  G4int P = aFragment.GetNumberOfParticles();
     77  // Number of Excitons
     78  G4int N = P+H;
     79  // Nucleus
     80  G4int A = aFragment.GetA_asInt();
     81  G4int Z = aFragment.GetZ_asInt();
     82  G4double U = aFragment.GetExcitationEnergy();
     83
     84  //G4cout << aFragment << G4endl;
    7785 
    78   // Nuclear radius
    79   const G4double r0 = G4PreCompoundParameters::GetAddress()->GetTransitionsr0();
    80    
    81   // In order to calculate the level density parameter
    82   // G4EvaporationLevelDensityParameter theLDP;
    83 
    84   // Number of holes
    85   G4double H = aFragment.GetNumberOfHoles();
    86   // Number of Particles
    87   G4double P = aFragment.GetNumberOfParticles();
    88   // Number of Excitons
    89   G4double N = P+H;
    90   // Nucleus
    91   G4double A = aFragment.GetA();
    92   G4double Z = static_cast<G4double>(aFragment.GetZ());
    93   G4double U = aFragment.GetExcitationEnergy();
    94  
    95   if(U<10*eV) return 0.0;
     86  if(U < 10*eV) { return 0.0; }
    9687 
    9788  //J. M. Quesada (Feb. 08) new physics
    98   // OPT=1 Transitions are calculated according to Gudima's paper (original in G4PreCompound from VL)
     89  // OPT=1 Transitions are calculated according to Gudima's paper
     90  //       (original in G4PreCompound from VL)
    9991  // OPT=2 Transitions are calculated according to Gupta's formulae
    10092  //
    101  
    102  
    103  
    10493  if (useCEMtr){
    10594
    106    
    10795    // Relative Energy (T_{rel})
    108     G4double RelativeEnergy = (8.0/5.0)*FermiEnergy + U/N;
     96    G4double RelativeEnergy = 1.6*FermiEnergy + U/G4double(N);
    10997   
    11098    // Sample kind of nucleon-projectile
    11199    G4bool ChargedNucleon(false);
    112100    G4double chtest = 0.5;
    113     if (P > 0) chtest = aFragment.GetNumberOfCharged()/P;
    114     if (G4UniformRand() < chtest) ChargedNucleon = true;
     101    if (P > 0) {
     102      chtest = G4double(aFragment.GetNumberOfCharged())/G4double(P);
     103    }
     104    if (G4UniformRand() < chtest) { ChargedNucleon = true; }
    115105   
    116106    // Relative Velocity:
    117107    // <V_{rel}>^2
    118108    G4double RelativeVelocitySqr(0.0);
    119     if (ChargedNucleon) RelativeVelocitySqr = 2.0*RelativeEnergy/proton_mass_c2;
    120     else RelativeVelocitySqr = 2.0*RelativeEnergy/neutron_mass_c2;
     109    if (ChargedNucleon) {
     110      RelativeVelocitySqr = 2.0*RelativeEnergy/CLHEP::proton_mass_c2;
     111    } else {
     112      RelativeVelocitySqr = 2.0*RelativeEnergy/CLHEP::neutron_mass_c2;
     113    }
    121114   
    122115    // <V_{rel}>
     
    124117   
    125118    // Proton-Proton Cross Section
    126     G4double ppXSection = (10.63/RelativeVelocitySqr - 29.92/RelativeVelocity + 42.9)*millibarn;
     119    G4double ppXSection =
     120      (10.63/RelativeVelocitySqr - 29.92/RelativeVelocity + 42.9)
     121      * CLHEP::millibarn;
    127122    // Proton-Neutron Cross Section
    128     G4double npXSection = (34.10/RelativeVelocitySqr - 82.20/RelativeVelocity + 82.2)*millibarn;
     123    G4double npXSection =
     124      (34.10/RelativeVelocitySqr - 82.20/RelativeVelocity + 82.2)
     125      * CLHEP::millibarn;
    129126   
    130127    // Averaged Cross Section: \sigma(V_{rel})
     
    134131      {
    135132        //JMQ: small bug fixed
    136         //      AveragedXSection = ((Z-1.0) * ppXSection + (A-Z-1.0) * npXSection) / (A-1.0);
    137         AveragedXSection = ((Z-1.0) * ppXSection + (A-Z) * npXSection) / (A-1.0);
     133        //AveragedXSection=((Z-1.0) * ppXSection + (A-Z-1.0) * npXSection)/(A-1.0);
     134        AveragedXSection = ((Z-1)*ppXSection + (A-Z)*npXSection)/G4double(A-1);
    138135      }
    139136    else
    140137      {
    141         AveragedXSection = ((A-Z-1.0) * ppXSection + Z * npXSection) / (A-1.0);
     138        AveragedXSection = ((A-Z-1)*ppXSection + Z*npXSection)/G4double(A-1);
     139        //AveragedXSection = ((A-Z-1)*npXSection + Z*ppXSection)/G4double(A-1);
    142140      }
    143141   
     
    146144   
    147145    // This factor is introduced to take into account the Pauli principle
    148     G4double PauliFactor = 1.0 - (7.0/5.0)*FermiRelRatio;
    149     if (FermiRelRatio > 0.5) PauliFactor += (2.0/5.0)*FermiRelRatio*std::pow(2.0 - (1.0/FermiRelRatio), 5.0/2.0);
    150    
     146    G4double PauliFactor = 1.0 - 1.4*FermiRelRatio;
     147    if (FermiRelRatio > 0.5) {
     148      G4double x = 2.0 - 1.0/FermiRelRatio;
     149      PauliFactor += 0.4*FermiRelRatio*x*x*std::sqrt(x);
     150      //PauliFactor +=
     151      //(2.0/5.0)*FermiRelRatio*std::pow(2.0 - (1.0/FermiRelRatio), 5.0/2.0);
     152    }
    151153    // Interaction volume
    152     //  G4double Vint = (4.0/3.0)*pi*std::pow(2.0*r0 + hbarc/(proton_mass_c2*RelativeVelocity) , 3.0);
    153     G4double xx=2.0*r0 + hbarc/(proton_mass_c2*RelativeVelocity);
    154     G4double Vint = (4.0/3.0)*pi*xx*xx*xx;
     154    //  G4double Vint = (4.0/3.0)
     155    //*pi*std::pow(2.0*r0 + hbarc/(proton_mass_c2*RelativeVelocity) , 3.0);
     156    G4double xx = 2.0*r0 + hbarc/(CLHEP::proton_mass_c2*RelativeVelocity);
     157    //    G4double Vint = (4.0/3.0)*CLHEP::pi*xx*xx*xx;
     158    G4double Vint = CLHEP::pi*xx*xx*xx/0.75;
    155159   
    156160    // Transition probability for \Delta n = +2
    157161   
    158     TransitionProb1 = AveragedXSection*PauliFactor*std::sqrt(2.0*RelativeEnergy/proton_mass_c2)/Vint;
    159 
    160 //JMQ 281009  phenomenological factor in order to increase equilibrium contribution
    161 //   G4double factor=5.0;
    162 //   TransitionProb1 *= factor;
    163 //
    164     if (TransitionProb1 < 0.0) TransitionProb1 = 0.0;
    165    
    166     G4double a = G4PreCompoundParameters::GetAddress()->GetLevelDensity();
     162    TransitionProb1 = AveragedXSection*PauliFactor
     163      *std::sqrt(2.0*RelativeEnergy/CLHEP::proton_mass_c2)/Vint;
     164
     165    //JMQ 281009  phenomenological factor in order to increase
     166    //   equilibrium contribution
     167    //   G4double factor=5.0;
     168    //   TransitionProb1 *= factor;
     169    //
     170    if (TransitionProb1 < 0.0) { TransitionProb1 = 0.0; }
     171   
    167172    // GE = g*E where E is Excitation Energy
    168     G4double GE = (6.0/pi2)*a*A*U;
    169    
    170     G4double Fph = ((P*P+H*H+P-H)/4.0 - H/2.0);
    171    
    172     //G4bool NeverGoBack(false);
    173     G4bool NeverGoBack;
    174     if(useNGB)  NeverGoBack=true;
    175     else NeverGoBack=false;
    176    
     173    G4double GE = (6.0/pi2)*aLDP*A*U;
     174   
     175    //G4double Fph = ((P*P+H*H+P-H)/4.0 - H/2.0);
     176    G4double Fph = G4double(P*P+H*H+P-3*H)/4.0;
     177   
     178    G4bool NeverGoBack(false);
     179    if(useNGB) { NeverGoBack=true; }
    177180   
    178181    //JMQ/AH  bug fixed: if (U-Fph < 0.0) NeverGoBack = true;
    179     if (GE-Fph < 0.0) NeverGoBack = true;
     182    if (GE-Fph < 0.0) { NeverGoBack = true; }
    180183   
    181184    // F(p+1,h+1)
    182185    G4double Fph1 = Fph + N/2.0;
    183186   
    184     G4double ProbFactor = std::pow((GE-Fph)/(GE-Fph1),N+1.0);
    185    
     187    G4double ProbFactor = g4pow->powN((GE-Fph)/(GE-Fph1),N+1);
    186188   
    187189    if (NeverGoBack)
    188190      {
    189       TransitionProb2 = 0.0;
    190       TransitionProb3 = 0.0;
     191        TransitionProb2 = 0.0;
     192        TransitionProb3 = 0.0;
    191193      }
    192194    else
    193195      {
    194196        // Transition probability for \Delta n = -2 (at F(p,h) = 0)
    195         TransitionProb2 = TransitionProb1 * ProbFactor * (P*H*(N+1.0)*(N-2.0))/((GE-Fph)*(GE-Fph));
    196         if (TransitionProb2 < 0.0) TransitionProb2 = 0.0;
     197        TransitionProb2 =
     198          TransitionProb1 * ProbFactor * (P*H*(N+1)*(N-2))/((GE-Fph)*(GE-Fph));
     199        if (TransitionProb2 < 0.0) { TransitionProb2 = 0.0; }
    197200       
    198201        // Transition probability for \Delta n = 0 (at F(p,h) = 0)
    199         TransitionProb3 = TransitionProb1* ((N+1.0)/N) * ProbFactor  * (P*(P-1.0) + 4.0*P*H + H*(H-1.0))/(GE-Fph);
    200         if (TransitionProb3 < 0.0) TransitionProb3 = 0.0;
    201       }
    202    
    203     //  G4cout<<"U = "<<U<<G4endl;
    204     //  G4cout<<"N="<<N<<"  P="<<P<<"  H="<<H<<G4endl;
    205     //  G4cout<<"l+ ="<<TransitionProb1<<"  l- ="<< TransitionProb2<<"  l0 ="<< TransitionProb3<<G4endl;
    206     return TransitionProb1 + TransitionProb2 + TransitionProb3;
    207   }
    208  
    209   else  {
    210     //JMQ: Transition probabilities from Gupta's work
    211    
    212     G4double a = G4PreCompoundParameters::GetAddress()->GetLevelDensity();
     202        TransitionProb3 = TransitionProb1*(N+1)* ProbFactor 
     203          * (P*(P-1) + 4.0*P*H + H*(H-1))/(N*(GE-Fph));
     204        if (TransitionProb3 < 0.0) { TransitionProb3 = 0.0; }
     205      }
     206  } else {
     207    //JMQ: Transition probabilities from Gupta's work   
    213208    // GE = g*E where E is Excitation Energy
    214     G4double GE = (6.0/pi2)*a*A*U;
     209    G4double GE = (6.0/pi2)*aLDP*A*U;
    215210 
    216211    G4double Kmfp=2.;
    217212       
    218     TransitionProb1=1./Kmfp*3./8.*1./c_light*1.0e-9*(1.4e+21*U-2./(N+1)*6.0e+18*U*U);
    219     if (TransitionProb1 < 0.0) TransitionProb1 = 0.0;
    220    
    221     if (useNGB){
    222       TransitionProb2=0.;
    223       TransitionProb3=0.;
    224     }
    225     else{       
    226       if (N<=1) TransitionProb2=0. ;   
    227       else  TransitionProb2=1./Kmfp*3./8.*1./c_light*1.0e-9*(N-1.)*(N-2.)*P*H/(GE*GE)*(1.4e+21*U - 2./(N-1)*6.0e+18*U*U);     
     213    //TransitionProb1=1./Kmfp*3./8.*1./c_light*1.0e-9*(1.4e+21*U-2./(N+1)*6.0e+18*U*U);
     214    TransitionProb1 = 3.0e-9*(1.4e+21*U - 1.2e+19*U*U/G4double(N+1))
     215      /(8*Kmfp*CLHEP::c_light);
     216    if (TransitionProb1 < 0.0) { TransitionProb1 = 0.0; }
     217
     218    TransitionProb2=0.;
     219    TransitionProb3=0.;
     220   
     221    if (!useNGB && N > 1) {
     222      // TransitionProb2=1./Kmfp*3./8.*1./c_light*1.0e-9*(N-1.)*(N-2.)*P*H/(GE*GE)*(1.4e+21*U - 2./(N-1)*6.0e+18*U*U);     
     223      TransitionProb2 =
     224        3.0e-9*(N-2)*P*H*(1.4e+21*U*(N-1) - 1.2e+19*U*U)/(8*Kmfp*c_light*GE*GE);     
    228225      if (TransitionProb2 < 0.0) TransitionProb2 = 0.0;
    229       TransitionProb3=0.;
    230     }
    231    
    232       //  G4cout<<"U = "<<U<<G4endl;
    233     //  G4cout<<"N="<<N<<"  P="<<P<<"  H="<<H<<G4endl;
    234     //  G4cout<<"l+ ="<<TransitionProb1<<"  l- ="<< TransitionProb2<<"  l0 ="<< TransitionProb3<<G4endl;
    235     return TransitionProb1 + TransitionProb2 + TransitionProb3;
     226    }
    236227  }
     228  //  G4cout<<"U = "<<U<<G4endl;
     229  //  G4cout<<"N="<<N<<"  P="<<P<<"  H="<<H<<G4endl;
     230  //  G4cout<<"l+ ="<<TransitionProb1<<"  l- ="<< TransitionProb2
     231  //   <<"  l0 ="<< TransitionProb3<<G4endl;
     232  return TransitionProb1 + TransitionProb2 + TransitionProb3;
    237233}
    238234
    239 
    240 G4Fragment G4PreCompoundTransitions::PerformTransition(const G4Fragment & aFragment)
     235void G4PreCompoundTransitions::PerformTransition(G4Fragment & result)
    241236{
    242   G4Fragment result(aFragment);
    243   G4double ChosenTransition = G4UniformRand()*(TransitionProb1 + TransitionProb2 + TransitionProb3);
     237  G4double ChosenTransition =
     238    G4UniformRand()*(TransitionProb1 + TransitionProb2 + TransitionProb3);
    244239  G4int deltaN = 0;
    245   G4int Nexcitons = result.GetNumberOfExcitons();
     240  //  G4int Nexcitons = result.GetNumberOfExcitons();
     241  G4int Npart     = result.GetNumberOfParticles();
     242  G4int Ncharged  = result.GetNumberOfCharged();
     243  G4int Nholes    = result.GetNumberOfHoles();
    246244  if (ChosenTransition <= TransitionProb1)
    247245    {
     
    255253    }
    256254
    257   // AH/JMQ: Randomly decrease the number of charges if deltaN is -2 and in proportion
    258   // to the number charges w.r.t. number of particles,  PROVIDED that there are charged particles
    259   if(deltaN < 0 && G4UniformRand() <=
    260      static_cast<G4double>(result.GetNumberOfCharged())/static_cast<G4double>(result.GetNumberOfParticles())
    261      && (result.GetNumberOfCharged() >= 1)) {
    262     result.SetNumberOfCharged(result.GetNumberOfCharged()+deltaN/2); // deltaN is negative!
    263   }
     255  // AH/JMQ: Randomly decrease the number of charges if deltaN is -2 and 
     256  // in proportion to the number charges w.r.t. number of particles, 
     257  // PROVIDED that there are charged particles
     258  deltaN /= 2;
     259
     260  //G4cout << "deltaN= " << deltaN << G4endl;
    264261
    265262  // JMQ the following lines have to be before SetNumberOfCharged, otherwise the check on
    266263  // number of charged vs. number of particles fails
    267   result.SetNumberOfParticles(result.GetNumberOfParticles()+deltaN/2);
    268   result.SetNumberOfHoles(result.GetNumberOfHoles()+deltaN/2);
    269 
    270   // With weight Z/A, number of charged particles is increased with +1
    271   if ( ( deltaN > 0 ) &&
    272       (G4UniformRand() <= static_cast<G4double>(result.GetZ()-result.GetNumberOfCharged())/
    273        std::max(static_cast<G4double>(result.GetA()-Nexcitons),1.)))
    274     {
    275       result.SetNumberOfCharged(result.GetNumberOfCharged()+deltaN/2);
    276     }
     264  result.SetNumberOfParticles(Npart+deltaN);
     265  result.SetNumberOfHoles(Nholes+deltaN);
     266
     267  if(deltaN < 0) {
     268    if( Ncharged >= 1 && G4int(Npart*G4UniformRand()) <= Ncharged)
     269      {
     270        result.SetNumberOfCharged(Ncharged+deltaN); // deltaN is negative!
     271      }
     272
     273  } else if ( deltaN > 0 ) {
     274    // With weight Z/A, number of charged particles is increased with +1
     275    G4int A = result.GetA_asInt();
     276    G4int Z = result.GetZ_asInt();
     277    if( G4int(std::max(1, A - Npart)*G4UniformRand()) <= Z)
     278      {
     279        result.SetNumberOfCharged(Ncharged+deltaN);
     280      }
     281  }
    277282 
    278283  // Number of charged can not be greater that number of particles
    279   if ( result.GetNumberOfParticles() < result.GetNumberOfCharged() )
     284  if ( Npart < Ncharged )
    280285    {
    281       result.SetNumberOfCharged(result.GetNumberOfParticles());
    282     }
    283  
    284   return result;
     286      result.SetNumberOfCharged(Npart);
     287    }
     288  //G4cout << "### After transition" << G4endl;
     289  //G4cout << result << G4endl;
    285290}
    286291
  • trunk/source/processes/hadronic/models/pre_equilibrium/exciton_model/src/G4PreCompoundTriton.cc

    r1337 r1340  
    2424// ********************************************************************
    2525//
    26 //
    27 // $Id: G4PreCompoundTriton.cc,v 1.6 2010/04/09 14:06:17 vnivanch Exp $
    28 // GEANT4 tag $Name: geant4-09-04-beta-01 $
     26// $Id: G4PreCompoundTriton.cc,v 1.7 2010/08/28 15:16:55 vnivanch Exp $
     27// GEANT4 tag $Name: geant4-09-03-ref-09 $
    2928//
    3029// -------------------------------------------------------------------
     
    3938// Modified: 
    4039// 21.08.2008 J. M. Quesada add choice of options 
     40// 20.08.2010 V.Ivanchenko added G4Pow and G4PreCompoundParameters pointers
     41//                         use int Z and A and cleanup
    4142//
    4243 
    4344#include "G4PreCompoundTriton.hh"
    44 
    45 
    46 G4ReactionProduct * G4PreCompoundTriton::GetReactionProduct() const
    47 {
    48   G4ReactionProduct * theReactionProduct =
    49     new G4ReactionProduct(G4Triton::TritonDefinition());
    50   theReactionProduct->SetMomentum(GetMomentum().vect());
    51   theReactionProduct->SetTotalEnergy(GetMomentum().e());
    52 #ifdef PRECOMPOUND_TEST
    53   theReactionProduct->SetCreatorModel("G4PrecompoundModel");
    54 #endif
    55   return theReactionProduct;
    56 }   
    57 
    58 G4double G4PreCompoundTriton::FactorialFactor(const G4double N, const G4double P)
    59 {
    60   return
    61       (N-3.0)*(P-2.0)*(
    62                        (((N-2.0)*(P-1.0))/2.0) *(
    63                                                  (((N-1.0)*P)/3.0)
    64                                                  )
    65                        );
     45#include "G4Triton.hh"
     46
     47G4PreCompoundTriton::G4PreCompoundTriton()
     48  : G4PreCompoundIon(G4Triton::Triton(), &theTritonCoulombBarrier)
     49{}
     50
     51G4PreCompoundTriton::~G4PreCompoundTriton()
     52{}
     53
     54G4double G4PreCompoundTriton::FactorialFactor(G4int N, const G4int P)
     55{
     56  return G4double((N-3)*(P-2)*(N-2)*(P-1)*(N-1)*P)/6.0;
    6657}
    6758 
    68 G4double G4PreCompoundTriton::CoalescenceFactor(const G4double A)
    69 {
    70   return 243.0/(A*A);
     59G4double G4PreCompoundTriton::CoalescenceFactor(G4int A)
     60{
     61  return 243.0/G4double(A*A);
    7162}   
    7263
    73 G4double G4PreCompoundTriton::GetRj(const G4int NumberParticles, const G4int NumberCharged)
     64G4double G4PreCompoundTriton::GetRj(G4int nParticles, G4int nCharged)
    7465{
    7566  G4double rj = 0.0;
    76   G4double denominator = NumberParticles*(NumberParticles-1)*(NumberParticles-2);
    77   if(NumberCharged >= 1 && (NumberParticles-NumberCharged) >= 2) {
    78     rj = 3.0*static_cast<G4double>(NumberCharged*(NumberParticles-NumberCharged)*(NumberParticles-NumberCharged-1))
    79       /static_cast<G4double>(denominator);
     67  if(nCharged >= 1 && (nParticles-nCharged) >= 2) {
     68    G4double denominator =
     69      G4double(nParticles*(nParticles-1)*(nParticles-2));
     70    rj = G4double(3*nCharged*(nParticles-nCharged)*(nParticles-nCharged-1))
     71      /denominator;
    8072  }
    8173  return rj;
    8274}
    8375
    84 ////////////////////////////////////////////////////////////////////////////////////
     76//////////////////////////////////////////////////////////////////////////////////
    8577//J. M. Quesada (Dec 2007-June 2008): New inverse reaction cross sections
    8678//OPT=0 Dostrovski's parameterization
     
    8880//OPT=3,4 Kalbach's parameterization
    8981//
    90 G4double G4PreCompoundTriton::CrossSection(const  G4double K)
    91 {
    92   ResidualA=GetRestA();
    93   ResidualZ=GetRestZ();
    94   theA=GetA();
    95   theZ=GetZ();
    96   ResidualAthrd=std::pow(ResidualA,0.33333);
    97   FragmentA=GetA()+GetRestA();
    98   FragmentAthrd=std::pow(FragmentA,0.33333);
    99 
    100   if (OPTxs==0) return GetOpt0( K);
    101   else if( OPTxs==1 || OPTxs==2) return GetOpt12( K);
    102   else if (OPTxs==3 || OPTxs==4)  return GetOpt34( K);
     82G4double G4PreCompoundTriton::CrossSection(G4double K)
     83{
     84  ResidualA = GetRestA();
     85  ResidualZ = GetRestZ();
     86  theA = GetA();
     87  theZ = GetZ();
     88  ResidualAthrd = ResidualA13();
     89  FragmentA = theA + ResidualA;
     90  FragmentAthrd = g4pow->Z13(FragmentA);
     91
     92  if (OPTxs==0) { return GetOpt0( K); }
     93  else if( OPTxs==1 || OPTxs==2) { return GetOpt12( K); }
     94  else if (OPTxs==3 || OPTxs==4) { return GetOpt34( K); }
    10395  else{
    10496    std::ostringstream errOs;
     
    109101}
    110102
    111 // *********************** OPT=0 : Dostrovski's cross section  *****************************
    112 
    113 G4double G4PreCompoundTriton::GetOpt0(const  G4double K)
    114 {
    115   const G4double r0 = G4PreCompoundParameters::GetAddress()->Getr0();
    116   // cross section is now given in mb (r0 is in mm) for the sake of consistency
    117   //with the rest of the options
    118   return 1.e+25*pi*(r0*ResidualAthrd)*(r0*ResidualAthrd)*GetAlpha()*(1.+GetBeta()/K);
    119 }
    120 //
    121 //---------
    122 //
    123103G4double G4PreCompoundTriton::GetAlpha()
    124104{
    125105  G4double C = 0.0;
    126   G4double aZ = GetZ() + GetRestZ();
     106  G4int aZ = theZ + ResidualZ;
    127107  if (aZ >= 70)
    128108    {
     
    136116  return 1.0 + C/3.0;
    137117}
    138 //
    139 //-------------
    140 //
    141 G4double G4PreCompoundTriton::GetBeta()
    142 {
    143   return -GetCoulombBarrier();
    144 }
    145 //
    146 //********************* OPT=1,2 : Chatterjee's cross section ************************
     118
     119//
     120//********************* OPT=1,2 : Chatterjee's cross section *****************
    147121//(fitting to cross section from Bechetti & Greenles OM potential)
    148122
    149 G4double G4PreCompoundTriton::GetOpt12(const  G4double K)
    150 {
    151 
     123G4double G4PreCompoundTriton::GetOpt12(G4double K)
     124{
    152125  G4double Kc=K;
    153126
    154127  // JMQ xsec is set constat above limit of validity
    155   if (K>50) Kc=50;
     128  if (K > 50*MeV) { Kc=50*MeV; }
    156129
    157130  G4double landa ,mu ,nu ,p , Ec,q,r,ji,xs;
     
    172145  p = p0 + p1/Ec + p2/(Ec*Ec);
    173146  landa = landa0*ResidualA + landa1;
    174   mu = mu0*std::pow(ResidualA,mu1);
    175   nu = std::pow(ResidualA,mu1)*(nu0 + nu1*Ec + nu2*(Ec*Ec));
     147
     148  G4double resmu1 = g4pow->powZ(ResidualA,mu1);
     149  mu = mu0*resmu1;
     150  nu = resmu1*(nu0 + nu1*Ec + nu2*(Ec*Ec));
    176151  q = landa - nu/(Ec*Ec) - 2*p*Ec;
    177152  r = mu + 2*nu/Ec + p*(Ec*Ec);
     
    184159             
    185160  return xs;
    186 
    187161}
    188162
    189163// *********** OPT=3,4 : Kalbach's cross sections (from PRECO code)*************
    190 G4double G4PreCompoundTriton::GetOpt34(const  G4double K)
     164G4double G4PreCompoundTriton::GetOpt34(G4double K)
    191165//     ** t from o.m. of hafele, flynn et al
    192166{
    193 
    194167  G4double landa, mu, nu, p , signor(1.),sig;
    195168  G4double ec,ecsq,xnulam,etest(0.),a;
    196169  G4double b,ecut,cut,ecut2,geom,elab;
    197170
    198 
    199171  G4double     flow = 1.e-18;
    200172  G4double     spill= 1.e+18;
    201 
    202173
    203174  G4double     p0 = -21.45;
     
    220191  p = p0 + p1/ec + p2/ecsq;
    221192  landa = landa0*ResidualA + landa1;
    222   a = std::pow(ResidualA,mu1);
     193  a = g4pow->powZ(ResidualA,mu1);
    223194  mu = mu0 * a;
    224195  nu = a* (nu0+nu1*ec+nu2*ecsq); 
    225196  xnulam = nu / landa;
    226   if (xnulam > spill) xnulam=0.;
    227   if (xnulam >= flow) etest = 1.2 *std::sqrt(xnulam);
     197  if (xnulam > spill) { xnulam=0.; }
     198  if (xnulam >= flow) { etest = 1.2 *std::sqrt(xnulam); }
    228199 
    229200  a = -2.*p*ec + landa - nu/ecsq;
     
    231202  ecut = 0.;
    232203  cut = a*a - 4.*p*b;
    233   if (cut > 0.) ecut = std::sqrt(cut);
     204  if (cut > 0.) { ecut = std::sqrt(cut); }
    234205  ecut = (ecut-a) / (p+p);
    235206  ecut2 = ecut;
    236 //JMQ 290310 for avoiding unphysical increase below minimum (at ecut)
    237 //ecut<0 means that there is no cut with energy axis, i.e. xs is set to 0 bellow minimum
    238 //  if (cut < 0.) ecut2 = ecut - 2.;
    239   if (cut < 0.) ecut2 = ecut;
    240   elab = K * FragmentA / ResidualA;
     207  //JMQ 290310 for avoiding unphysical increase below minimum (at ecut)
     208  // ecut<0 means that there is no cut with energy axis, i.e. xs is set
     209  // to 0 bellow minimum
     210  //  if (cut < 0.) ecut2 = ecut - 2.;
     211  if (cut < 0.) { ecut2 = ecut; }
     212  elab = K * FragmentA / G4double(ResidualA);
    241213  sig = 0.;
    242214 
    243215  if (elab <= ec) { //start for E<Ec
    244     if (elab > ecut2)  sig = (p*elab*elab+a*elab+b) * signor;
     216    if (elab > ecut2) { sig = (p*elab*elab+a*elab+b) * signor; }
    245217  }           //end for E<Ec
    246218  else {           //start for E>Ec
    247219    sig = (landa*elab+mu+nu/elab) * signor;
    248220    geom = 0.;
    249     if (xnulam < flow || elab < etest) return sig;
     221    if (xnulam < flow || elab < etest) { return sig; }
    250222    geom = std::sqrt(theA*K);
    251223    geom = 1.23*ResidualAthrd + ra + 4.573/geom;
     
    254226  }           //end for E>Ec
    255227  return sig;
    256 
    257 }
    258 
    259 //   ************************** end of cross sections *******************************
     228}
  • trunk/source/processes/hadronic/models/pre_equilibrium/exciton_model/src/G4VPreCompoundEmissionFactory.cc

    r819 r1340  
    2424// ********************************************************************
    2525//
    26 
     26// $Id: G4VPreCompoundEmissionFactory.cc,v 1.5 2010/08/28 15:16:55 vnivanch Exp $
     27// GEANT4 tag $Name: geant4-09-03-ref-09 $
     28//
    2729// by V. Lara
    2830
    2931#include "G4VPreCompoundEmissionFactory.hh"
    30 #include "G4HadronicException.hh"
    3132
    32 const G4VPreCompoundEmissionFactory &
    33 G4VPreCompoundEmissionFactory::operator=(const G4VPreCompoundEmissionFactory & )
     33G4VPreCompoundEmissionFactory::G4VPreCompoundEmissionFactory()
     34  : fragvector(0)
     35{}
     36
     37G4VPreCompoundEmissionFactory::~G4VPreCompoundEmissionFactory()
    3438{
    35   throw G4HadronicException(__FILE__, __LINE__, "G4VPreCompoundEmissionFactory::operator= meant to not be accessable.");
    36   return *this;
    37 }
    38 
    39 G4bool
    40 G4VPreCompoundEmissionFactory::operator==(const G4VPreCompoundEmissionFactory & ) const
    41 {
    42   throw G4HadronicException(__FILE__, __LINE__, "G4VPreCompoundEmissionFactory::operator== meant to not be accessable.");
    43   return false;
    44 }
    45 
    46 G4bool
    47 G4VPreCompoundEmissionFactory::operator!=(const G4VPreCompoundEmissionFactory & ) const
    48 {
    49   throw G4HadronicException(__FILE__, __LINE__, "G4VPreCompoundEmissionFactory::operator!= meant to not be accessable.");
    50   return true;
     39  if (fragvector != 0)
     40    std::for_each(fragvector->begin(), fragvector->end(),
     41                  DeleteFragment());
     42  delete fragvector;
    5143}
    5244
    5345
    54 
    55 
    56 G4VPreCompoundEmissionFactory::~G4VPreCompoundEmissionFactory()
    57 {
    58   if (_fragvector != 0)
    59     std::for_each(_fragvector->begin(), _fragvector->end(),
    60                     DeleteFragment());
    61   delete _fragvector;
    62 }
    63 
    64 
    65 std::vector<G4VPreCompoundFragment*> *
    66 G4VPreCompoundEmissionFactory::GetFragmentVector()
    67 {
    68   // Lazy initialization
    69   if (_fragvector == 0)
    70     _fragvector = CreateFragmentVector();
    71   return _fragvector;
    72 }
    73 
  • trunk/source/processes/hadronic/models/pre_equilibrium/exciton_model/src/G4VPreCompoundFragment.cc

    r1337 r1340  
    2424// ********************************************************************
    2525//
    26 // $Id: G4VPreCompoundFragment.cc,v 1.12 2009/02/10 16:01:37 vnivanch Exp $
    27 // GEANT4 tag $Name: geant4-09-04-beta-01 $
     26// $Id: G4VPreCompoundFragment.cc,v 1.13 2010/08/28 15:16:55 vnivanch Exp $
     27// GEANT4 tag $Name: geant4-09-03-ref-09 $
    2828//
    29 // J. M. Quesada (August 2008). 
    30 // Based  on previous work by V. Lara
     29// J. M. Quesada (August 2008).  Based  on previous work by V. Lara
    3130//
    32  
     31// Modified:
     32// 20.08.2010 V.Ivanchenko added G4Pow and G4PreCompoundParameters pointers
     33//                         use int Z and A and cleanup
     34
    3335#include "G4VPreCompoundFragment.hh"
    3436#include "G4PreCompoundParameters.hh"
     37#include "G4NucleiProperties.hh"
    3538
    36 G4VPreCompoundFragment::
    37 G4VPreCompoundFragment(const G4VPreCompoundFragment & right)
     39G4VPreCompoundFragment::G4VPreCompoundFragment(
     40  const G4ParticleDefinition* part, G4VCoulombBarrier* aCoulombBarrier)
     41  : particle(part), theCoulombBarrierPtr(aCoulombBarrier),
     42    theRestNucleusA(0),theRestNucleusZ(0),theBindingEnergy(0.0),
     43    theMaximalKineticEnergy(-MeV),theRestNucleusMass(0.0),
     44    theReducedMass(0.0),theMomentum(0.,0.,0.,0.),
     45    theEmissionProbability(0.0),theCoulombBarrier(0.0)
    3846{
    39   theA = right.theA;
    40   theZ = right.theZ;
    41   theRestNucleusA = right.theRestNucleusA;
    42   theRestNucleusZ = right.theRestNucleusZ;
    43   theCoulombBarrier = right.theCoulombBarrier;
    44   theCoulombBarrierPtr = right.theCoulombBarrierPtr;
    45   theMaximalKineticEnergy = right.theMaximalKineticEnergy;
    46   theEmissionProbability = right.theEmissionProbability;
    47   theMomentum = right.theMomentum;
    48   theFragmentName = right.theFragmentName;
    49   theStage = right.theStage;
     47  theA = particle->GetBaryonNumber();
     48  theZ = G4int(particle->GetPDGCharge()/eplus + 0.1);
     49  theMass = particle->GetPDGMass();
     50  theParameters = G4PreCompoundParameters::GetAddress();
     51  g4pow = G4Pow::GetInstance();
    5052}
    5153
    52 G4VPreCompoundFragment::
    53 G4VPreCompoundFragment(const G4double anA,
    54                        const G4double aZ,
    55                        G4VCoulombBarrier* aCoulombBarrier,
    56                        const G4String & aName):
    57   theA(anA),theZ(aZ),
    58   theRestNucleusA(0.0),theRestNucleusZ(0.0),theCoulombBarrier(0.0),
    59   theCoulombBarrierPtr(aCoulombBarrier),
    60   theBindingEnergy(0.0), theMaximalKineticEnergy(-1.0),
    61   theEmissionProbability(0.0), theMomentum(0.0,0.0,0.0,0.0),
    62   theFragmentName(aName),theStage(0)
     54G4VPreCompoundFragment::~G4VPreCompoundFragment()
    6355{}
    64 
    65 
    66 
    67 G4VPreCompoundFragment::~G4VPreCompoundFragment()
    68 {
    69 }
    70 
    71 
    72 const G4VPreCompoundFragment & G4VPreCompoundFragment::
    73 operator= (const G4VPreCompoundFragment & right)
    74 {
    75   if (this != &right) {
    76     theA = right.theA;
    77     theZ = right.theZ;
    78     theRestNucleusA = right.theRestNucleusA;
    79     theRestNucleusZ = right.theRestNucleusZ;
    80     theCoulombBarrier = right.theCoulombBarrier;
    81     theCoulombBarrierPtr = right.theCoulombBarrierPtr;
    82     theMaximalKineticEnergy = right.theMaximalKineticEnergy;
    83     theEmissionProbability = right.theEmissionProbability;
    84     theMomentum = right.theMomentum;
    85     theFragmentName = right.theFragmentName;
    86     theStage = right.theStage;
    87   }
    88   return *this;
    89 }
    90 
    91 G4int G4VPreCompoundFragment::operator==(const G4VPreCompoundFragment & right) const
    92 {
    93   return (this == (G4VPreCompoundFragment *) &right);
    94 }
    95 
    96 G4int G4VPreCompoundFragment::operator!=(const G4VPreCompoundFragment & right) const
    97 {
    98   return (this != (G4VPreCompoundFragment *) &right);
    99 }
    100 
    10156
    10257std::ostream&
     
    10762}
    10863
    109 
    11064std::ostream&
    11165operator << (std::ostream &out, const G4VPreCompoundFragment *theFragment)
     
    11569   
    11670  out
    117     << "PreCompound Model Emitted Fragment: A = "
     71    << "PreCompoundModel Emitted Fragment: A = "
    11872    << std::setprecision(3) << theFragment->theA
    11973    << ", Z = " << std::setprecision(3) << theFragment->theZ;
     
    13084   
    13185    out.setf(old_floatfield,std::ios::floatfield);
    132    
    13386    return out;
    13487}
    135 
    13688
    13789void G4VPreCompoundFragment::
    13890Initialize(const G4Fragment & aFragment)
    13991{
    140   theRestNucleusA = aFragment.GetA() - theA;
    141   theRestNucleusZ = aFragment.GetZ() - theZ;
     92  theRestNucleusA = aFragment.GetA_asInt() - theA;
     93  theRestNucleusZ = aFragment.GetZ_asInt() - theZ;
     94  theRestNucleusA13 = g4pow->Z13(theRestNucleusA);
    14295
    14396  if ((theRestNucleusA < theRestNucleusZ) ||
     
    149102      return;
    150103    }
    151  
    152  
     104   
    153105  // Calculate Coulomb barrier
    154106  theCoulombBarrier = theCoulombBarrierPtr->
    155     GetCoulombBarrier(static_cast<G4int>(theRestNucleusA),static_cast<G4int>(theRestNucleusZ),
     107    GetCoulombBarrier(theRestNucleusA,theRestNucleusZ,
    156108                      aFragment.GetExcitationEnergy());
    157109
     110  // Calculate masses
     111  theRestNucleusMass =
     112    G4NucleiProperties::GetNuclearMass(theRestNucleusA, theRestNucleusZ);
     113  theReducedMass = theRestNucleusMass*theMass/(theRestNucleusMass + theMass);
    158114
    159115  // Compute Binding Energies for fragments
    160116  // (needed to separate a fragment from the nucleus)
     117  theBindingEnergy = theRestNucleusMass + theMass - aFragment.GetGroundStateMass();
    161118 
    162   theBindingEnergy = G4NucleiProperties::GetMassExcess(static_cast<G4int>(theA),static_cast<G4int>(theZ)) +
    163     G4NucleiProperties::GetMassExcess(static_cast<G4int>(theRestNucleusA),static_cast<G4int>(theRestNucleusZ)) -
    164     G4NucleiProperties::GetMassExcess(static_cast<G4int>(aFragment.GetA()),static_cast<G4int>(aFragment.GetZ()));
     119  //theBindingEnergy = G4NucleiProperties::GetMassExcess(static_cast<G4int>(theA),static_cast<G4int>(theZ)) +
     120  //G4NucleiProperties::GetMassExcess(static_cast<G4int>(theRestNucleusA),static_cast<G4int>(theRestNucleusZ)) -
     121  //G4NucleiProperties::GetMassExcess(static_cast<G4int>(aFragment.GetA()),static_cast<G4int>(aFragment.GetZ()));
    165122 
    166123  // Compute Maximal Kinetic Energy which can be carried by fragments after separation
    167124  // This is the true (assimptotic) maximal kinetic energy
    168   G4double m = aFragment.GetMomentum().m();
    169   G4double rm = GetRestNuclearMass();
    170   G4double em = GetNuclearMass();
     125  G4double m  = aFragment.GetMomentum().m();
     126  G4double rm = theRestNucleusMass;
     127  G4double em = theMass;
    171128  theMaximalKineticEnergy = ((m - rm)*(m + rm) + em*em)/(2.0*m) - em;
    172129 
    173  
    174130  return;
    175131}
    176 
    177 
    178 
    179 
Note: See TracChangeset for help on using the changeset viewer.