Ignore:
Timestamp:
May 28, 2009, 4:26:57 PM (15 years ago)
Author:
garnier
Message:

maj sur la beta de geant 4.9.3

Location:
trunk/source/processes/hadronic/cross_sections
Files:
32 edited

Legend:

Unmodified
Added
Removed
  • trunk/source/processes/hadronic/cross_sections/History

    r1007 r1055  
    1515     ---------------------------------------------------------------
    1616
    17 01 December 2008 Vladimir Ivantchenko (hadr-cross-V09-01-07)
     1721 March 2009 Vladimir Ivanchenko (hadr-cross-V09-02-04)
     18------------------------------------------------------------
     19- G4IonsKoxCrossSection, G4IonsShenCrossSection, G4TripathiCrossSection,
     20  G4TripathiLightCrossSection - added protections against numerical
     21                                exceptions (V.Grichine)
     22- G4GGNuclNuclCrossSection - Glauber-Gribov new cross section for ions
     23                             (V.Grichine) 
     24
     2525 February 2009 Vladimir Ivanchenko (hadr-cross-V09-02-03)
     26------------------------------------------------------------
     27- G4CrossSectionDataStore - added protection to the Clean method
     28
     2914 February 2009 Vladimir Ivanchenko (hadr-cross-V09-02-02)
     30------------------------------------------------------------
     31- G4CrossSectionDataStore - added Clean method
     32
     3306 February 2009 Vladimir Ivanchenko (hadr-cross-V09-02-01)
     34------------------------------------------------------------
     35
     3624 January 2009 Vladimir Ivanchenko (hadr-cross-V09-02-00)
     37------------------------------------------------------------
     38- G4CrossSectionDataStore - moved constructor and destructor to source,
     39                            added destruction of data sets, use STL
     40                            vector instead of C-array
     41- G4CrossSectionDataSetRegistry - new singleton to keep pointers to
     42                            cross section data sets
     43- G4VCrossSectiondataSet - constructor and detructor moved to source and
     44                           registration/deregistration added
     45
     4601 December 2008 Vladimir Ivanchenko (hadr-cross-V09-01-07)
    1847------------------------------------------------------------
    1948G4BGGPionElasticXS, G4BGGPionInelasticXS, G4BGGNucleonInelasticXS,
  • trunk/source/processes/hadronic/cross_sections/include/G4BGGNucleonElasticXS.hh

    r1007 r1055  
    2525//
    2626// $Id: G4BGGNucleonElasticXS.hh,v 1.2 2008/12/01 16:50:23 vnivanch Exp $
    27 // GEANT4 tag $Name: geant4-09-02 $
     27// GEANT4 tag $Name: geant4-09-03-beta-cand-01 $
    2828//
    2929// -------------------------------------------------------------------
  • trunk/source/processes/hadronic/cross_sections/include/G4BGGNucleonInelasticXS.hh

    r1007 r1055  
    2525//
    2626// $Id: G4BGGNucleonInelasticXS.hh,v 1.2 2008/12/01 16:50:23 vnivanch Exp $
    27 // GEANT4 tag $Name: geant4-09-02 $
     27// GEANT4 tag $Name: geant4-09-03-beta-cand-01 $
    2828//
    2929// -------------------------------------------------------------------
  • trunk/source/processes/hadronic/cross_sections/include/G4BGGPionElasticXS.hh

    r1007 r1055  
    2525//
    2626// $Id: G4BGGPionElasticXS.hh,v 1.2 2008/12/01 16:50:23 vnivanch Exp $
    27 // GEANT4 tag $Name: geant4-09-02 $
     27// GEANT4 tag $Name: geant4-09-03-beta-cand-01 $
    2828//
    2929// -------------------------------------------------------------------
  • trunk/source/processes/hadronic/cross_sections/include/G4BGGPionInelasticXS.hh

    r1007 r1055  
    2525//
    2626// $Id: G4BGGPionInelasticXS.hh,v 1.2 2008/12/01 16:50:23 vnivanch Exp $
    27 // GEANT4 tag $Name: geant4-09-02 $
     27// GEANT4 tag $Name: geant4-09-03-beta-cand-01 $
    2828//
    2929// -------------------------------------------------------------------
  • trunk/source/processes/hadronic/cross_sections/include/G4CrossSectionDataSetRegistry.hh

    r966 r1055  
    2525//
    2626// $Id: G4CrossSectionDataSetRegistry.hh,v 1.2 2009/02/14 19:22:19 vnivanch Exp $
    27 // GEANT4 tag $Name: geant4-09-02-ref-02 $
     27// GEANT4 tag $Name: geant4-09-03-beta-cand-01 $
    2828//
    2929// -------------------------------------------------------------------
  • trunk/source/processes/hadronic/cross_sections/include/G4CrossSectionDataStore.hh

    r1007 r1055  
    2424// ********************************************************************
    2525//
     26// $Id: G4CrossSectionDataStore.hh,v 1.14 2009/01/24 11:54:47 vnivanch Exp $
     27// GEANT4 tag $Name: geant4-09-03-beta-cand-01 $
     28//
     29// -------------------------------------------------------------------
     30//
     31// GEANT4 Class header file
     32//
     33//
     34// File name:     G4CrossSectionDataStore
     35//
     36//
     37// Modifications:
     38// 23.01.2009 V.Ivanchenko move constructor and destructor to source,
     39//                         use STL vector instead of C-array
     40//
     41
    2642// Class Description
    2743// This is the class to which cross section data sets may be registered.
     
    4056#include "G4Material.hh"
    4157#include "G4VCrossSectionDataSet.hh"
     58#include <vector>
    4259
    4360class G4Nucleus;
     
    4764public:
    4865
    49    G4CrossSectionDataStore() :
    50       NDataSetList(0), verboseLevel(0)
    51    {}
     66  G4CrossSectionDataStore();
    5267
    53    ~G4CrossSectionDataStore()
    54    {}
     68  ~G4CrossSectionDataStore();
    5569
    56    G4double GetCrossSection(const G4DynamicParticle*,
    57                             const G4Element*, G4double aTemperature);
     70  G4double GetCrossSection(const G4DynamicParticle*,
     71                           const G4Element*, G4double aTemperature);
    5872
    59    G4double GetCrossSection(const G4DynamicParticle*,
    60                             const G4Isotope*, G4double aTemperature);
     73  G4double GetCrossSection(const G4DynamicParticle*,
     74                           const G4Isotope*, G4double aTemperature);
    6175
    62    G4double GetCrossSection(const G4DynamicParticle*,
    63                             G4double Z, G4double A, G4double aTemperature);
     76  G4double GetCrossSection(const G4DynamicParticle*,
     77                           G4double Z, G4double A, G4double aTemperature);
    6478
    65    // to replace GetMicroscopicCrossSection
    66    G4double GetCrossSection(const G4DynamicParticle*, const G4Material*);
     79  // to replace GetMicroscopicCrossSection
     80  G4double GetCrossSection(const G4DynamicParticle*, const G4Material*);
    6781
    68    std::pair<G4double/*Z*/, G4double/*A*/>
    69   SelectRandomIsotope(const G4DynamicParticle*, const G4Material*);
     82  //std::pair<G4double/*Z*/, G4double/*A*/>
     83  // SelectRandomIsotope(const G4DynamicParticle*, const G4Material*);
    7084
    71    G4Element* SampleZandA(const G4DynamicParticle*, const G4Material*,
    72                           G4Nucleus& target);
     85  G4Element* SampleZandA(const G4DynamicParticle*, const G4Material*,
     86                         G4Nucleus& target);
    7387
    74    void AddDataSet(G4VCrossSectionDataSet*);
     88  void AddDataSet(G4VCrossSectionDataSet*);
    7589
    76    void BuildPhysicsTable(const G4ParticleDefinition&);
     90  void BuildPhysicsTable(const G4ParticleDefinition&);
    7791
    78    void DumpPhysicsTable(const G4ParticleDefinition&);
     92  void DumpPhysicsTable(const G4ParticleDefinition&);
    7993
    80   void SetVerboseLevel(G4int value)
    81    {
    82       verboseLevel = value;
    83    }
     94  inline void SetVerboseLevel(G4int value)
     95  {
     96    verboseLevel = value;
     97  }
    8498
    85   G4int GetVerboseLevel()
    86    {
    87       return verboseLevel;
    88    }
     99  inline G4int GetVerboseLevel()
     100  {
     101    return verboseLevel;
     102  }
    89103
    90104private:
    91105
     106  G4VCrossSectionDataSet* whichDataSetInCharge(const G4DynamicParticle*,
     107                                               const G4Element*);
    92108
    93    G4VCrossSectionDataSet* whichDataSetInCharge(const G4DynamicParticle*,
    94                             const G4Element*);
    95 
    96    enum { NDataSetMax = 100 };
    97    G4VCrossSectionDataSet* DataSetList[NDataSetMax];
    98    G4int NDataSetList;
    99    G4int verboseLevel;
     109  std::vector<G4VCrossSectionDataSet*> DataSetList;
     110  G4int NDataSetList;
     111  G4int verboseLevel;
    100112};
    101113
  • trunk/source/processes/hadronic/cross_sections/include/G4ElectroNuclearCrossSection.hh

    r1007 r1055  
    2525//
    2626//
    27 // GEANT4 tag $Name: geant4-09-02 $
     27// GEANT4 tag $Name: geant4-09-03-beta-cand-01 $
    2828//
    2929//
  • trunk/source/processes/hadronic/cross_sections/include/G4GGNuclNuclCrossSection.hh

    r966 r1055  
    7171                                G4double Z, G4double A,
    7272                                G4double aTemperature = 0.0);
     73
     74  G4double GetCoulombBarier(const G4DynamicParticle*,
     75                                G4double Z, G4double A, G4double pR, G4double tR);
    7376
    7477  virtual
  • trunk/source/processes/hadronic/cross_sections/include/G4HadronCrossSections.hh

    r1007 r1055  
    2525//
    2626//
    27 // GEANT4 tag $Name: geant4-09-02 $
     27// GEANT4 tag $Name: geant4-09-03-beta-cand-01 $
    2828//
    2929//
  • trunk/source/processes/hadronic/cross_sections/include/G4PhotoNuclearCrossSection.hh

    r1007 r1055  
    2525//
    2626//
    27 // GEANT4 tag $Name: geant4-09-02 $
     27// GEANT4 tag $Name: geant4-09-03-beta-cand-01 $
    2828//
    2929//
  • trunk/source/processes/hadronic/cross_sections/include/G4VCrossSectionDataSet.hh

    r1007 r1055  
    2424// ********************************************************************
    2525//
     26// $Id: G4VCrossSectionDataSet.hh,v 1.13 2009/01/24 11:54:47 vnivanch Exp $
     27// GEANT4 tag $Name: geant4-09-03-beta-cand-01 $
    2628//
    27 // GEANT4 physics abstract class: G4VCrossSectionData -- header file
    28 // F.W. Jones, TRIUMF, 20-JAN-97
     29// -------------------------------------------------------------------
     30//
     31// GEANT4 Class header file
     32//
     33//
     34// File name:    G4VCrossSectionDataSet
     35//
     36// Author  F.W. Jones, TRIUMF, 20-JAN-97
     37//
     38// Modifications:
     39// 23.01.2009 V.Ivanchenko move constructor and destructor to source
     40//
     41 
    2942//
    3043// Class Description
     
    4356class G4VCrossSectionDataSet
    4457{
    45 public:
    46 
    47    G4VCrossSectionDataSet() :
    48       verboseLevel(0)
    49    {}
    50 
    51    virtual ~G4VCrossSectionDataSet()
    52    {}
    53 
    5458public: //with description
    5559
    56    // The following methods need to be implemented for each new data set.
    57    virtual
    58    G4bool IsApplicable(const G4DynamicParticle*, const G4Element*) = 0;
     60  G4VCrossSectionDataSet();
    5961
    60    virtual
    61    G4bool IsZAApplicable(const G4DynamicParticle*, G4double /*Z*/, G4double /*A*/);
     62  virtual ~G4VCrossSectionDataSet();
    6263
    63    virtual
    64    G4double GetCrossSection(const G4DynamicParticle*,
    65                             const G4Element*,
    66                             G4double aTemperature = 0.) = 0;
     64  // The following methods need to be implemented for each new data set.
     65  virtual
     66  G4bool IsApplicable(const G4DynamicParticle*, const G4Element*) = 0;
    6767
    68    virtual
    69    G4double GetIsoCrossSection(const G4DynamicParticle*, const G4Isotope*,
    70                                G4double aTemperature = 0.);
     68  virtual
     69  G4bool IsZAApplicable(const G4DynamicParticle*, G4double /*Z*/, G4double /*A*/);
    7170
    72    virtual
    73    G4double GetIsoZACrossSection(const G4DynamicParticle*, G4double /*Z*/,
    74                                  G4double /*A*/, G4double aTemperature = 0.);
     71  virtual
     72  G4double GetCrossSection(const G4DynamicParticle*,
     73                           const G4Element*,
     74                           G4double aTemperature = 0.) = 0;
    7575
    76    virtual
    77    void BuildPhysicsTable(const G4ParticleDefinition&) = 0;
     76  virtual
     77  G4double GetIsoCrossSection(const G4DynamicParticle*, const G4Isotope*,
     78                              G4double aTemperature = 0.);
    7879
    79    virtual
    80    void DumpPhysicsTable(const G4ParticleDefinition&) = 0;
     80  virtual
     81  G4double GetIsoZACrossSection(const G4DynamicParticle*, G4double /*Z*/,
     82                                G4double /*A*/, G4double aTemperature = 0.);
     83
     84  virtual
     85  void BuildPhysicsTable(const G4ParticleDefinition&) = 0;
     86
     87  virtual
     88  void DumpPhysicsTable(const G4ParticleDefinition&) = 0;
    8189
    8290public: // Without Description
    8391
    84   void SetVerboseLevel(G4int value)
    85    {
    86       verboseLevel = value;
    87    }
     92  inline void SetVerboseLevel(G4int value)
     93  {
     94    verboseLevel = value;
     95  }
    8896
    89   G4int GetVerboseLevel()
    90    {
    91       return verboseLevel;
    92    }
     97  inline G4int GetVerboseLevel()
     98  {
     99    return verboseLevel;
     100  }
    93101
    94102protected:
    95103
    96    G4int verboseLevel;
     104  G4int verboseLevel;
    97105};
    98106
  • trunk/source/processes/hadronic/cross_sections/src/G4BGGNucleonElasticXS.cc

    r1007 r1055  
    2525//
    2626// $Id: G4BGGNucleonElasticXS.cc,v 1.3 2008/12/01 16:50:23 vnivanch Exp $
    27 // GEANT4 tag $Name: geant4-09-02 $
     27// GEANT4 tag $Name: geant4-09-03-beta-cand-01 $
    2828//
    2929// -------------------------------------------------------------------
  • trunk/source/processes/hadronic/cross_sections/src/G4BGGNucleonInelasticXS.cc

    r1007 r1055  
    2525//
    2626// $Id: G4BGGNucleonInelasticXS.cc,v 1.3 2008/12/01 16:50:23 vnivanch Exp $
    27 // GEANT4 tag $Name: geant4-09-02 $
     27// GEANT4 tag $Name: geant4-09-03-beta-cand-01 $
    2828//
    2929// -------------------------------------------------------------------
  • trunk/source/processes/hadronic/cross_sections/src/G4BGGPionElasticXS.cc

    r1007 r1055  
    2525//
    2626// $Id: G4BGGPionElasticXS.cc,v 1.3 2008/12/01 16:50:23 vnivanch Exp $
    27 // GEANT4 tag $Name: geant4-09-02 $
     27// GEANT4 tag $Name: geant4-09-03-beta-cand-01 $
    2828//
    2929// -------------------------------------------------------------------
  • trunk/source/processes/hadronic/cross_sections/src/G4BGGPionInelasticXS.cc

    r1007 r1055  
    2525//
    2626// $Id: G4BGGPionInelasticXS.cc,v 1.3 2008/12/01 16:50:23 vnivanch Exp $
    27 // GEANT4 tag $Name: geant4-09-02 $
     27// GEANT4 tag $Name: geant4-09-03-beta-cand-01 $
    2828//
    2929// -------------------------------------------------------------------
  • trunk/source/processes/hadronic/cross_sections/src/G4CrossSectionDataSetRegistry.cc

    r968 r1055  
    2626//
    2727// $Id: G4CrossSectionDataSetRegistry.cc,v 1.3 2009/02/25 16:27:36 vnivanch Exp $
    28 // GEANT4 tag $Name: geant4-09-02-ref-02 $
     28// GEANT4 tag $Name: geant4-09-03-beta-cand-01 $
    2929//
    3030// -------------------------------------------------------------------
  • trunk/source/processes/hadronic/cross_sections/src/G4CrossSectionDataStore.cc

    r1007 r1055  
    2424// ********************************************************************
    2525//
     26// $Id: G4CrossSectionDataStore.cc,v 1.16 2009/01/24 11:54:47 vnivanch Exp $
     27// GEANT4 tag $Name: geant4-09-03-beta-cand-01 $
     28//
     29// -------------------------------------------------------------------
     30//
     31// GEANT4 Class file
     32//
     33//
     34// File name:     G4CrossSectionDataStore
     35//
     36//
     37// Modifications:
     38// 23.01.2009 V.Ivanchenko add destruction of data sets
     39//
    2640//
    2741
     
    3347#include "G4Nucleus.hh"
    3448
     49G4CrossSectionDataStore::G4CrossSectionDataStore() :
     50  NDataSetList(0), verboseLevel(0)
     51{}
     52
     53G4CrossSectionDataStore::~G4CrossSectionDataStore()
     54{}
    3555
    3656G4double
     
    392412  return anElement;
    393413}
    394 */
    395414
    396415std::pair<G4double, G4double>
     
    513532  return std::pair<G4double, G4double>(ZZ, AA);
    514533}
    515 
     534*/
    516535
    517536void
    518537G4CrossSectionDataStore::AddDataSet(G4VCrossSectionDataSet* aDataSet)
    519538{
    520    if (NDataSetList == NDataSetMax) {
    521       G4cout << "WARNING: G4CrossSectionDataStore::AddDataSet: "<<G4endl;
    522       G4cout << "         reached maximum number of data sets";
    523       G4cout << "         data set not added !!!!!!!!!!!!!!!!";
    524       return;
    525    }
    526    DataSetList[NDataSetList] = aDataSet;
    527    NDataSetList++;
    528 }
    529 
     539  DataSetList.push_back(aDataSet);
     540  NDataSetList++;
     541}
    530542
    531543void
     
    533545BuildPhysicsTable(const G4ParticleDefinition& aParticleType)
    534546{
    535    if (NDataSetList == 0)
    536    {
    537      G4Exception("G4CrossSectionDataStore", "007", FatalException,
    538                  "BuildPhysicsTable: no data sets registered");
    539      return;
    540    }
    541    for (G4int i = NDataSetList-1; i >= 0; i--) {
     547  if(NDataSetList > 0) {
     548    for (G4int i=0; i<NDataSetList; i++) {
    542549      DataSetList[i]->BuildPhysicsTable(aParticleType);
    543    }
     550    }
     551  }
    544552}
    545553
     
    549557DumpPhysicsTable(const G4ParticleDefinition& aParticleType)
    550558{
    551    if (NDataSetList == 0) {
    552       G4cout << "WARNING - G4CrossSectionDataStore::DumpPhysicsTable: no data sets registered"<<G4endl;
    553       return;
    554    }
    555    for (G4int i = NDataSetList-1; i >= 0; i--) {
    556       DataSetList[i]->DumpPhysicsTable(aParticleType);
    557    }
    558 }
     559  if (NDataSetList == 0) {
     560    G4cout << "WARNING - G4CrossSectionDataStore::DumpPhysicsTable: "
     561           << " no data sets registered"<<G4endl;
     562    return;
     563  }
     564  for (G4int i = NDataSetList-1; i >= 0; i--) {
     565    DataSetList[i]->DumpPhysicsTable(aParticleType);
     566  }
     567}
  • trunk/source/processes/hadronic/cross_sections/src/G4ElectroNuclearCrossSection.cc

    r1007 r1055  
    2626//
    2727// $Id: G4ElectroNuclearCrossSection.cc,v 1.29 2008/10/24 19:15:17 dennis Exp $
    28 // GEANT4 tag $Name: geant4-09-02 $
     28// GEANT4 tag $Name: geant4-09-03-beta-cand-01 $
    2929//
    3030//
  • trunk/source/processes/hadronic/cross_sections/src/G4GGNuclNuclCrossSection.cc

    r968 r1055  
    4242G4GGNuclNuclCrossSection::G4GGNuclNuclCrossSection()
    4343: fUpperLimit( 100000 * GeV ),
    44   fLowerLimit( 0.1 * GeV ),
     44  fLowerLimit( 0.1 * MeV ),
    4545  fRadiusConst( 1.08*fermi )  // 1.1, 1.3 ?
    4646{
     
    115115GetIsoZACrossSection(const G4DynamicParticle* aParticle, G4double tZ, G4double tA, G4double)
    116116{
    117   G4double xsection, sigma, cofInelastic = 2.4, cofTotal = 2.0, nucleusSquare, ratio;
     117  G4double xsection, sigma, cofInelastic = 2.4, cofTotal = 2.0, nucleusSquare, cB, ratio;
    118118
    119119  G4double pZ = aParticle->GetDefinition()->GetPDGCharge();
     
    132132  G4double pR = GetNucleusRadius(pA);
    133133
    134   sigma = (pZ*tZ+pN*tN)*GetHadronNucleonXscNS(theProton, pTkin, theProton) +
     134  cB = GetCoulombBarier(aParticle, tZ, tA, pR, tR);
     135
     136  if(cB > 0.)
     137  {
     138
     139    sigma = (pZ*tZ+pN*tN)*GetHadronNucleonXscNS(theProton, pTkin, theProton) +
    135140          (pZ*tN+pN*tZ)*GetHadronNucleonXscNS(theProton, pTkin, theNeutron);
    136141
    137   nucleusSquare = cofTotal*pi*( pR*pR + tR*tR );   // basically 2piRR
    138 
    139   ratio = sigma/nucleusSquare;
    140 
    141   xsection =  nucleusSquare*std::log( 1. + ratio );
    142 
    143   fTotalXsc = xsection;
    144 
    145   fInelasticXsc = nucleusSquare*std::log( 1. + cofInelastic*ratio )/cofInelastic;
    146 
    147   fElasticXsc   = fTotalXsc - fInelasticXsc;
    148    
    149   G4double difratio = ratio/(1.+ratio);
    150 
    151   fDiffractionXsc = 0.5*nucleusSquare*( difratio - std::log( 1. + difratio ) );
    152 
    153   // production to be checked !!! edit MK xsc
    154 
    155   sigma = (pZ*tZ+pN*tN)*GetHadronNucleonXscMK(theProton, pTkin, theProton) +
     142    nucleusSquare = cofTotal*pi*( pR*pR + tR*tR );   // basically 2piRR
     143
     144    ratio = sigma/nucleusSquare;
     145
     146    xsection =  nucleusSquare*std::log( 1. + ratio );
     147
     148    fTotalXsc = xsection;
     149
     150    fTotalXsc *= cB;
     151
     152    fInelasticXsc = nucleusSquare*std::log( 1. + cofInelastic*ratio )/cofInelastic;
     153
     154    fInelasticXsc *= cB;
     155
     156    fElasticXsc   = fTotalXsc - fInelasticXsc;
     157
     158    // if (fElasticXsc < DBL_MIN) fElasticXsc = DBL_MIN;
     159    /*   
     160    G4double difratio = ratio/(1.+ratio);
     161
     162    fDiffractionXsc = 0.5*nucleusSquare*( difratio - std::log( 1. + difratio ) );
     163    */
     164    // production to be checked !!! edit MK xsc
     165
     166    sigma = (pZ*tZ+pN*tN)*GetHadronNucleonXscMK(theProton, pTkin, theProton) +
    156167          (pZ*tN+pN*tZ)*GetHadronNucleonXscMK(theProton, pTkin, theNeutron);
    157168 
    158   ratio = sigma/nucleusSquare;
    159 
    160   fProductionXsc = nucleusSquare*std::log( 1. + cofInelastic*ratio )/cofInelastic;
    161 
    162   if (fElasticXsc < 0.) fElasticXsc = 0.;
    163 
    164   return xsection;
    165 }
     169    ratio = sigma/nucleusSquare;
     170
     171    fProductionXsc = nucleusSquare*std::log( 1. + cofInelastic*ratio )/cofInelastic;
     172
     173    if (fElasticXsc < 0.) fElasticXsc = 0.;
     174  }
     175  else
     176  {
     177    fInelasticXsc  = 0.;
     178    fTotalXsc      = 0.;
     179    fElasticXsc    = 0.;
     180    fProductionXsc = 0.;
     181  }
     182  return fInelasticXsc;   // xsection;
     183}
     184
     185////////////////////////////////////////////////////////////////////////////////////////
     186//
     187//
     188
     189G4double G4GGNuclNuclCrossSection::
     190GetCoulombBarier(const G4DynamicParticle* aParticle, G4double tZ, G4double tA, G4double pR, G4double tR)
     191{
     192  G4double ratio;
     193  G4double pZ = aParticle->GetDefinition()->GetPDGCharge();
     194
     195
     196  G4double pTkin = aParticle->GetKineticEnergy();
     197  // G4double pPlab = aParticle->GetTotalMomentum();
     198  G4double pM    = aParticle->GetDefinition()->GetPDGMass();
     199  // G4double tM    = tZ*proton_mass_c2 + (tA-tZ)*neutron_mass_c2; // ~ 1% accuracy
     200  G4double tM    = G4ParticleTable::GetParticleTable()->GetIonTable()->GetIonMass( G4int(tZ), G4int(tA) );
     201  G4double pElab = pTkin + pM;
     202  G4double totEcm  = std::sqrt(pM*pM + tM*tM + 2.*pElab*tM);
     203  // G4double pPcm  = pPlab*tM/totEcm;
     204  // G4double pTcm  = std::sqrt(pM*pM + pPcm*pPcm) - pM;
     205  G4double totTcm  = totEcm - pM -tM;
     206
     207  G4double bC    = fine_structure_const*hbarc*pZ*tZ;
     208           bC   /= pR + tR;
     209           bC   /= 2.;  // 4., 2. parametrisation cof ??? vmg
     210
     211           // G4cout<<"pTkin = "<<pTkin/GeV<<"; pPlab = "
     212           // <<pPlab/GeV<<"; bC = "<<bC/GeV<<"; pTcm = "<<pTcm/GeV<<G4endl;
     213
     214  if( totTcm <= bC ) ratio = 0.;
     215  else             ratio = 1. - bC/totTcm;
     216
     217  // if(ratio < DBL_MIN) ratio = DBL_MIN;
     218  if( ratio < 0.) ratio = 0.;
     219
     220  // G4cout <<"ratio = "<<ratio<<G4endl;
     221  return ratio;
     222}
     223
    166224
    167225//////////////////////////////////////////////////////////////////////////
  • trunk/source/processes/hadronic/cross_sections/src/G4HadronCaptureDataSet.cc

    r1007 r1055  
    2626//
    2727// $Id: G4HadronCaptureDataSet.cc,v 1.8 2006/06/29 19:57:35 gunter Exp $
    28 // GEANT4 tag $Name: geant4-09-02 $
     28// GEANT4 tag $Name: geant4-09-03-beta-cand-01 $
    2929//
    3030//
  • trunk/source/processes/hadronic/cross_sections/src/G4HadronCrossSections.cc

    r1007 r1055  
    2525//
    2626//
    27 // GEANT4 tag $Name: geant4-09-02 $
     27// GEANT4 tag $Name: geant4-09-03-beta-cand-01 $
    2828//
    2929//
  • trunk/source/processes/hadronic/cross_sections/src/G4HadronElasticDataSet.cc

    r1007 r1055  
    2626//
    2727// $Id: G4HadronElasticDataSet.cc,v 1.8 2006/06/29 19:57:39 gunter Exp $
    28 // GEANT4 tag $Name: geant4-09-02 $
     28// GEANT4 tag $Name: geant4-09-03-beta-cand-01 $
    2929//
    3030//
  • trunk/source/processes/hadronic/cross_sections/src/G4HadronFissionDataSet.cc

    r1007 r1055  
    2626//
    2727// $Id: G4HadronFissionDataSet.cc,v 1.8 2006/06/29 19:57:41 gunter Exp $
    28 // GEANT4 tag $Name: geant4-09-02 $
     28// GEANT4 tag $Name: geant4-09-03-beta-cand-01 $
    2929//
    3030//
  • trunk/source/processes/hadronic/cross_sections/src/G4HadronInelasticDataSet.cc

    r1007 r1055  
    2626//
    2727// $Id: G4HadronInelasticDataSet.cc,v 1.8 2006/06/29 19:57:43 gunter Exp $
    28 // GEANT4 tag $Name: geant4-09-02 $
     28// GEANT4 tag $Name: geant4-09-03-beta-cand-01 $
    2929//
    3030//
  • trunk/source/processes/hadronic/cross_sections/src/G4IonsKoxCrossSection.cc

    r819 r1055  
    4444
    4545// Apply energy check, if less than lower limit then 0 value is returned
    46    if (  ke_per_N < lowerLimit )
    47       return xsection;
     46   // if (  ke_per_N < lowerLimit ) return xsection;
    4847
    4948   G4int At = int (AA + 0.5);
     
    5756
    5857   G4double Bc = Zt * Zp / ( ( rc / fermi ) * (  cubicrAp + cubicrAt ) );   // rc divide fermi
     58   G4double targ_mass = G4ParticleTable::GetParticleTable()->GetIonTable()->GetIonMass( Zt , At );
     59   G4double proj_mass = aParticle->GetMass();
     60   G4double proj_momentum = aParticle->GetMomentum().mag();
     61
     62   G4double Ecm = calEcm ( proj_mass , targ_mass , proj_momentum );
     63   if( Ecm <= Bc) return xsection;
    5964
    6065   G4double Rvol = r0 * (  cubicrAp + cubicrAt );
     
    6974
    7075   G4double Rint = Rvol + Rsurf;
    71 
    72    G4double targ_mass = G4ParticleTable::GetParticleTable()->GetIonTable()->GetIonMass( Zt , At );
    73    G4double proj_mass = aParticle->GetMass();
    74    G4double proj_momentum = aParticle->GetMomentum().mag();
    75 
    76    G4double Ecm = calEcm ( proj_mass , targ_mass , proj_momentum );
    7776
    7877   xsection = pi * Rint * Rint * ( 1 - Bc / ( Ecm / MeV ) );
  • trunk/source/processes/hadronic/cross_sections/src/G4IonsShenCrossSection.cc

    r819 r1055  
    4747
    4848// Apply energy check, if less than lower limit then 0 value is returned
    49    if (  ke_per_N < lowerLimit )
    50       return xsection;
     49   // if (  ke_per_N < lowerLimit ) return xsection;
    5150
    5251   G4int At = G4int(AA);
     
    6362   G4double r = Rt + Rp + 3.2;   // in fm
    6463   G4double b = 1.0;   // in MeV/fm
     64   G4double targ_mass = G4ParticleTable::GetParticleTable()->GetIonTable()->GetIonMass( Zt , At );
     65   G4double proj_mass = aParticle->GetMass();
     66   G4double proj_momentum = aParticle->GetMomentum().mag();
     67
     68   G4double Ecm = calEcmValue ( proj_mass , targ_mass , proj_momentum );
    6569
    6670   G4double B = 1.44 * Zt * Zp / r - b * Rt * Rp / ( Rt + Rp );
    67 
     71   if(Ecm <= B) return xsection;
    6872   //G4double ke_per_N = aParticle->GetKineticEnergy() / Ap;
    6973
     
    7478   G4double R2 = 1.0 * ( At - 2 * Zt ) * Zp / ( Ap * At );
    7579
    76    G4double targ_mass = G4ParticleTable::GetParticleTable()->GetIonTable()->GetIonMass( Zt , At );
    77    G4double proj_mass = aParticle->GetMass();
    78    G4double proj_momentum = aParticle->GetMomentum().mag();
    79 
    80    G4double Ecm = calEcmValue ( proj_mass , targ_mass , proj_momentum );
    8180
    8281   G4double R3 = 0.176 / std::pow ( G4double(Ecm) , G4double(one_third) ) * cubicrAt * cubicrAp / ( cubicrAt + cubicrAp );
  • trunk/source/processes/hadronic/cross_sections/src/G4PhotoNuclearCrossSection.cc

    r1007 r1055  
    2626//
    2727// The lust update: M.V. Kossov, CERN/ITEP(Moscow) 17-June-02
    28 // GEANT4 tag $Name: geant4-09-02 $
     28// GEANT4 tag $Name: geant4-09-03-beta-cand-01 $
    2929//
    3030//
  • trunk/source/processes/hadronic/cross_sections/src/G4PiData.cc

    r1007 r1055  
    2424// ********************************************************************
    2525//
    26 // GEANT4 tag $Name: geant4-09-02 $
     26// GEANT4 tag $Name: geant4-09-03-beta-cand-01 $
    2727//
    2828// --------------------------------------------------------------------
  • trunk/source/processes/hadronic/cross_sections/src/G4TripathiCrossSection.cc

    r819 r1055  
    3939                G4double /*temperature*/)
    4040{
    41   G4double result = 0;
     41  G4double result = 0.;
    4242 
    4343  const G4double targetAtomicNumber = AA;
     
    6060  pTarget = pTarget+pProjectile;
    6161  G4double E_cm = (pTarget.mag()-targetMass-pProjectile.m())/MeV;
    62  
     62  if(E_cm <= DBL_MIN) return result; 
    6363  // done
    6464  G4double r_rms_p = 0.6 * myNuleonRadius *
     
    7878  //done
    7979  G4double B = 1.44*nProjProtons*nTargetProtons/Radius;
    80  
     80  if(E_cm <= B) return result;
    8181  // done
    8282  G4double Energy = kineticEnergy/projectileAtomicNumber;
     
    133133                 (1-B/E_cm);
    134134 
    135   if(result < 0) result = 0;
     135  if(result < 0.) result = 0.;
    136136  return result*m2;
    137137
  • trunk/source/processes/hadronic/cross_sections/src/G4TripathiLightCrossSection.cc

    r819 r1055  
    153153  pT = pT + pP;
    154154  G4double E_cm = (pT.mag()-mT-pP.m())/MeV;
     155  if(E_cm <= DBL_MIN) return result; 
     156
     157
    155158//
    156159//
     
    169172
    170173  G4double B = 1.44 * ZP * ZT / Radius;
    171 //
     174  if(E_cm <= B) return result;
     175
    172176//
    173177// Now determine other parameters associated with the parametric
     
    289293  if (!lowEnergyCheck)
    290294  {
    291     if (result < 0.0)
    292       result = 0.0;
     295    if (result < 0.0)  result = 0.0;
    293296    else if (E < 6.0*MeV)
    294297    {
  • trunk/source/processes/hadronic/cross_sections/src/G4VCrossSectionDataSet.cc

    r1007 r1055  
    2424// ********************************************************************
    2525//
    26 // $Id: G4VCrossSectionDataSet.cc,v 1.7 2006/12/29 02:05:48 dennis Exp $
    27 //
     26// $Id: G4VCrossSectionDataSet.cc,v 1.8 2009/01/24 11:54:47 vnivanch Exp $
     27// GEANT4 tag $Name: geant4-09-03-beta-cand-01 $
     28//
     29// -------------------------------------------------------------------
     30//
     31// GEANT4 Class file
     32//
     33//
     34// File name:    G4VCrossSectionDataSet
     35//
     36// Author  F.W. Jones, TRIUMF, 20-JAN-97
     37//
     38// Modifications:
     39// 23.01.2009 V.Ivanchenko move constructor and destructor to source
     40//
    2841
    2942#include "G4VCrossSectionDataSet.hh"
     43#include "G4CrossSectionDataSetRegistry.hh"
     44
     45G4VCrossSectionDataSet::G4VCrossSectionDataSet() :
     46  verboseLevel(0)
     47{
     48  G4CrossSectionDataSetRegistry::Instance()->Register(this);
     49}
     50
     51G4VCrossSectionDataSet::~G4VCrossSectionDataSet()
     52{
     53  G4CrossSectionDataSetRegistry::Instance()->DeRegister(this);
     54}
    3055
    3156// Override this method to test for particle and isotope applicability
Note: See TracChangeset for help on using the changeset viewer.