Ignore:
Timestamp:
Jun 18, 2010, 11:42:07 AM (14 years ago)
Author:
garnier
Message:

update geant4-09-04-beta-cand-01 interfaces-V09-03-09 vis-V09-03-08

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/source/processes/hadronic/models/de_excitation/gem_evaporation/include/G4GEMProbability.hh

    r819 r1315  
    2424// ********************************************************************
    2525//
     26// $Id: G4GEMProbability.hh,v 1.4 2010/05/19 10:21:16 vnivanch Exp $
     27// GEANT4 tag $Name: geant4-09-04-beta-cand-01 $
     28//
     29//---------------------------------------------------------------------
     30//
     31// Geant4 header G4GEMProbability
    2632//
    2733//
     
    2935// by V. Lara (Sept 2001)
    3036//
    31 
    32 
     37// 18.05.2010 V.Ivanchenko trying to speedup the most slow method
     38//            by usage of G4Pow, integer Z and A; moved constructor,
     39//            destructor and virtual functions to source
     40//
    3341
    3442#ifndef G4GEMProbability_h
     
    4250#include "G4PairingCorrection.hh"
    4351
     52class G4Pow;
     53
    4454class G4GEMProbability : public G4VEmissionProbability
    4555{
    4656public:
    47     // Only available constructor
    48     G4GEMProbability(const G4int anA, const G4int aZ, const G4double aSpin) :
    49         theA(anA), theZ(aZ), Spin(aSpin), theCoulombBarrierPtr(0),
    50         ExcitationEnergies(0), ExcitationSpins(0), ExcitationLifetimes(0), Normalization(1.0)
    51         {
    52             theEvapLDPptr = new G4EvaporationLevelDensityParameter;
    53         }
     57
     58  // Default constructor - should not be used
     59  G4GEMProbability();
     60
     61  // Only available constructor
     62  G4GEMProbability(const G4int anA, const G4int aZ, const G4double aSpin);
    5463   
    55     ~G4GEMProbability()
    56         {
    57             if (theEvapLDPptr != 0) delete theEvapLDPptr;
    58         }
     64  virtual ~G4GEMProbability();
    5965
     66  inline G4int GetZ_asInt(void) const { return theZ; }
     67       
     68  inline G4int GetA_asInt(void) const { return theA;}
     69       
     70  inline G4double GetZ(void) const { return theZ; }
     71       
     72  inline G4double GetA(void) const { return theA;}
    6073
    61        
    62     G4double GetZ(void) const { return theZ; }
    63        
    64     G4double GetA(void) const { return theA;}
     74  inline G4double GetSpin(void) const { return Spin; }
    6575
    66     G4double GetSpin(void) const { return Spin; }
     76  inline G4double GetNormalization(void) const { return Normalization; }
     77   
     78  inline void SetCoulomBarrier(const G4VCoulombBarrier * aCoulombBarrierStrategy)
     79  {
     80    theCoulombBarrierPtr = aCoulombBarrierStrategy;
     81  }
    6782
    68     G4double GetNormalization(void) const { return Normalization; }
     83  inline G4double GetCoulombBarrier(const G4Fragment& fragment) const
     84  {
     85    G4double res = 0.0;
     86    if (theCoulombBarrierPtr)
     87      {
     88        G4int Acomp = fragment.GetA_asInt();
     89        G4int Zcomp = fragment.GetZ_asInt();
     90        res = theCoulombBarrierPtr->GetCoulombBarrier(Acomp-theA, Zcomp-theZ,
     91          fragment.GetExcitationEnergy()-fPairCorr->GetPairingCorrection(Acomp,Zcomp));
     92      }
     93    return res;
     94  }
    6995   
    70     void SetCoulomBarrier(const G4VCoulombBarrier * aCoulombBarrierStrategy)
    71         {
    72             theCoulombBarrierPtr = aCoulombBarrierStrategy;
    73         }
    74 
    75     G4double GetCoulombBarrier(const G4Fragment& fragment) const
    76         {
    77             if (theCoulombBarrierPtr)
    78               {
    79                 G4int Acompound = static_cast<G4int>(fragment.GetA());
    80                 G4int Zcompound = static_cast<G4int>(fragment.GetZ());
    81                 return theCoulombBarrierPtr->GetCoulombBarrier(Acompound-theA, Zcompound-theZ,
    82                                                                fragment.GetExcitationEnergy()-
    83                                                                G4PairingCorrection::GetInstance()->
    84                                                                GetPairingCorrection(Acompound,Zcompound));
    85               }
    86             else
    87               {
    88                 return 0.0;
    89               }
    90         }
    91    
    92 
    93     virtual G4double CalcAlphaParam(const G4Fragment & ) const {return 1.0;}
    94     virtual G4double CalcBetaParam(const G4Fragment & ) const {return 1.0;}
     96  virtual G4double CalcAlphaParam(const G4Fragment & ) const;
     97  virtual G4double CalcBetaParam(const G4Fragment & ) const;
    9598   
    9699protected:
    97100 
    98     void SetExcitationEnergiesPtr(std::vector<G4double> * anExcitationEnergiesPtr)
    99         {
    100             ExcitationEnergies = anExcitationEnergiesPtr;
    101         }
     101  inline void SetExcitationEnergiesPtr(std::vector<G4double> * anExcitationEnergiesPtr)
     102  {
     103    ExcitationEnergies = anExcitationEnergiesPtr;
     104  }
    102105 
    103     void SetExcitationSpinsPtr(std::vector<G4double> * anExcitationSpinsPtr)
    104         {
    105             ExcitationSpins = anExcitationSpinsPtr;
    106         }
     106  inline void SetExcitationSpinsPtr(std::vector<G4double> * anExcitationSpinsPtr)
     107  {
     108    ExcitationSpins = anExcitationSpinsPtr;
     109  }
    107110
    108     void SetExcitationLifetimesPtr(std::vector<G4double> * anExcitationLifetimesPtr)
    109         {
    110             ExcitationLifetimes = anExcitationLifetimesPtr;
    111         }
     111  inline void SetExcitationLifetimesPtr(std::vector<G4double> * anExcitationLifetimesPtr)
     112  {
     113    ExcitationLifetimes = anExcitationLifetimesPtr;
     114  }
    112115
    113     void SetCoulombBarrierStrategy(G4VCoulombBarrier * aCoulombBarrier)
    114         {
    115             theCoulombBarrierPtr = aCoulombBarrier;
    116         }
     116  inline void SetCoulombBarrierStrategy(G4VCoulombBarrier * aCoulombBarrier)
     117  {
     118    theCoulombBarrierPtr = aCoulombBarrier;
     119  }
    117120
    118  
    119     // Default constructor
    120     G4GEMProbability() {}
    121121private:
    122     // Copy constructor
    123     G4GEMProbability(const G4GEMProbability &right);
     122
     123  // Copy constructor
     124  G4GEMProbability(const G4GEMProbability &right);
    124125   
    125     const G4GEMProbability & operator=(const G4GEMProbability &right);
    126     G4bool operator==(const G4GEMProbability &right) const;
    127     G4bool operator!=(const G4GEMProbability &right) const;
     126  const G4GEMProbability & operator=(const G4GEMProbability &right);
     127  G4bool operator==(const G4GEMProbability &right) const;
     128  G4bool operator!=(const G4GEMProbability &right) const;
    128129   
    129130public:
    130     G4double EmissionProbability(const G4Fragment & fragment, const G4double anEnergy);
     131
     132  G4double EmissionProbability(const G4Fragment & fragment, const G4double anEnergy);
    131133 
    132134private:
    133135
    134     G4double CalcProbability(const G4Fragment & fragment, const G4double MaximalKineticEnergy,
    135                              const G4double V);
    136     virtual G4double CCoeficient(const G4double ) const {return 0.0;};
     136  G4double CalcProbability(const G4Fragment & fragment, const G4double MaximalKineticEnergy,
     137                           const G4double V);
    137138
     139  virtual G4double CCoeficient(const G4double ) const;
     140
     141  inline G4double I0(const G4double t);
     142  inline G4double I1(const G4double t, const G4double tx);
     143  inline G4double I2(const G4double s, const G4double sx);
     144  G4double I3(const G4double s, const G4double sx);
    138145   
    139     G4double I0(const G4double t);
    140     G4double I1(const G4double t, const G4double tx);
    141     G4double I2(const G4double s, const G4double sx);
    142     G4double I3(const G4double s, const G4double sx);
     146  // Data Members
     147
     148  G4Pow*   fG4pow;
     149  G4PairingCorrection* fPairCorr;
    143150   
    144     // Data Members
     151  G4VLevelDensityParameter * theEvapLDPptr;
     152       
     153  G4int theA;
     154  G4int theZ;
    145155   
    146     G4VLevelDensityParameter * theEvapLDPptr;
    147        
    148     G4int theA;
    149     G4int theZ;
     156  // Spin is fragment spin
     157  G4double Spin;
     158
     159  // Coulomb Barrier
     160  const G4VCoulombBarrier * theCoulombBarrierPtr;
     161 
     162  // Resonances Energy
     163  std::vector<G4double> * ExcitationEnergies;
    150164   
    151     // Spin is fragment spin
    152     G4double Spin;
     165  // Resonances Spin
     166  std::vector<G4double> * ExcitationSpins;
    153167
    154     // Coulomb Barrier
    155     const G4VCoulombBarrier * theCoulombBarrierPtr;
     168  // Resonances half lifetime
     169  std::vector<G4double> * ExcitationLifetimes;
    156170
    157    
    158     // Resonances Energy
    159     std::vector<G4double> * ExcitationEnergies;
    160    
    161     // Resonances Spin
    162     std::vector<G4double> * ExcitationSpins;
    163 
    164     // Resonances half lifetime
    165     std::vector<G4double> * ExcitationLifetimes;
    166 
    167 
    168     // Normalization
    169     G4double Normalization;
     171  // Normalization
     172  G4double Normalization;
    170173   
    171174};
    172175
     176inline G4double G4GEMProbability::I0(const G4double t)
     177{
     178  return std::exp(t) - 1.0;
     179}
     180
     181inline G4double G4GEMProbability::I1(const G4double t, const G4double tx)
     182{
     183  return (t - tx + 1.0)*std::exp(tx) - t - 1.0;
     184}
     185
     186
     187inline G4double G4GEMProbability::I2(const G4double s, const G4double sx)
     188{
     189  G4double S = 1.0/std::sqrt(s);
     190  G4double Sx = 1.0/std::sqrt(sx);
     191 
     192  G4double p1 = S*S*S*( 1.0 + S*S*( 1.5 + 3.75*S*S) );
     193  G4double p2 = Sx*Sx*Sx*( 1.0 + Sx*Sx*( 1.5 + 3.75*Sx*Sx) )*std::exp(sx-s);
     194 
     195  return p1-p2;
     196}
     197
    173198
    174199#endif
Note: See TracChangeset for help on using the changeset viewer.