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

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

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

Legend:

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

    r1228 r1315  
    1414     * Please list in reverse chronological order (last date on top)
    1515     ---------------------------------------------------------------
     16
     1703 Lun 2010 Vladimir Ivanchenko (hadr-cross-V09-03-05)
     18- G4NeutronElasticXS, G4NeutronInelasticXS, G4NeutronCaptureXS - substitute
     19     environment variable G4NEUTRONXS by G4NEUTRONXSDATA
     20
     2102 Jun 2010 Gunter Folger       (hadr-cross-V09-03-04)
     22- fix compilation error on Windows: use G4lrint not lrint
     23
     2429 Apr 2010 Gunter Folger       (hadr-cross-V09-03-03)
     25------------------------------------------------------------
     26- G4CrossSectionDataStore integer Z and A transition
     27   ( note that cross sections data sets still have G4double in interface)
     28   
     2925 Mar 2010 Vladimir Ivanchenko (hadr-cross-V09-03-02)
     30------------------------------------------------------------
     31- G4CrossSectionDataSetRegistry - do not pop_back vector of pointers
     32   when DeRegister cross section data set - big fixed for Windows
     33
     3417 Mar 2010 Gabriele Cosmo (hadr-cross-V09-03-01)
     35------------------------------------------------------------
     36- Cache computation of std::pow() in GetCaptureCrossSection() method of
     37  G4HadronCrossSections, to avoid repeated calls with same argument.
     38
     3926 Feb 2010 Vladimir Ivanchenko (hadr-cross-V09-03-00)
     40------------------------------------------------------------
     41- G4UPiNuclearCrossSection - fixed bug for high Z (>83) atoms
    1642
    17439 Dec 2009 Gunter Folger       (hadr-cross-V09-02-18)
  • trunk/source/processes/hadronic/cross_sections/include/G4CrossSectionDataStore.hh

    r1228 r1315  
    2424// ********************************************************************
    2525//
    26 // $Id: G4CrossSectionDataStore.hh,v 1.14 2009/01/24 11:54:47 vnivanch Exp $
    27 // GEANT4 tag $Name: geant4-09-03 $
     26// $Id: G4CrossSectionDataStore.hh,v 1.15 2010/04/29 14:46:08 gunter Exp $
     27// GEANT4 tag $Name: geant4-09-04-beta-cand-01 $
    2828//
    2929// -------------------------------------------------------------------
     
    7777                           G4double Z, G4double A, G4double aTemperature);
    7878
     79  G4double GetCrossSection(const G4DynamicParticle*,
     80                           G4int Z, G4int A, G4double aTemperature);
     81
    7982  // to replace GetMicroscopicCrossSection
    8083  G4double GetCrossSection(const G4DynamicParticle*, const G4Material*);
  • trunk/source/processes/hadronic/cross_sections/include/G4HadronCrossSections.hh

    r1228 r1315  
    2525//
    2626//
    27 // GEANT4 tag $Name: geant4-09-03 $
     27// GEANT4 tag $Name: geant4-09-04-beta-cand-01 $
    2828//
    2929//
     
    9393public:
    9494
    95    G4HadronCrossSections() : prevParticleDefinition(0), verboseLevel(0)
     95   G4HadronCrossSections()
     96     : prevParticleDefinition(0), lastEkx(0.), lastEkxPower(0.), verboseLevel(0)
    9697   {
    9798   }
     
    184185   G4Element* prevElement;
    185186   G4double prevKineticEnergy;
     187   G4double lastEkx, lastEkxPower;
    186188
    187189   static G4bool correctInelasticNearZero;
  • trunk/source/processes/hadronic/cross_sections/include/G4UPiNuclearCrossSection.hh

    r962 r1315  
    105105  G4double           elow;
    106106  G4double           elowest;
    107   G4double           APower[92];
     107  G4double           APower[93];
    108108
    109109  const G4ParticleDefinition* piPlus;
  • trunk/source/processes/hadronic/cross_sections/src/G4CrossSectionDataSetRegistry.cc

    r1228 r1315  
    2525//
    2626//
    27 // $Id: G4CrossSectionDataSetRegistry.cc,v 1.6 2009/12/02 15:59:59 vnivanch Exp $
    28 // GEANT4 tag $Name: geant4-09-03 $
     27// $Id: G4CrossSectionDataSetRegistry.cc,v 1.7 2010/03/25 15:28:22 vnivanch Exp $
     28// GEANT4 tag $Name: geant4-09-04-beta-cand-01 $
    2929//
    3030// -------------------------------------------------------------------
     
    9797      if(xSections[i] == p) {
    9898        xSections[i] = 0;
    99         if(i == n-1) { xSections.pop_back(); }
    10099        return;
    101100      }
  • trunk/source/processes/hadronic/cross_sections/src/G4CrossSectionDataStore.cc

    r1228 r1315  
    2424// ********************************************************************
    2525//
    26 // $Id: G4CrossSectionDataStore.cc,v 1.16 2009/01/24 11:54:47 vnivanch Exp $
    27 // GEANT4 tag $Name: geant4-09-03 $
     26// $Id: G4CrossSectionDataStore.cc,v 1.18 2010/06/02 09:33:16 gunter Exp $
     27// GEANT4 tag $Name: geant4-09-04-beta-cand-01 $
    2828//
    2929// -------------------------------------------------------------------
     
    3737// Modifications:
    3838// 23.01.2009 V.Ivanchenko add destruction of data sets
     39// 29.04.2010 G.Folger     modifictaions for integer A & Z
    3940//
    4041//
     
    123124G4CrossSectionDataStore::GetCrossSection(const G4DynamicParticle* aParticle,
    124125                                         G4double Z, G4double A,
     126                                         G4double aTemperature)
     127{
     128  G4int iZ=G4lrint(Z);
     129  G4int iA=G4lrint(A);
     130  return GetCrossSection(aParticle, iZ, iA,aTemperature);
     131  }
     132
     133
     134G4double
     135G4CrossSectionDataStore::GetCrossSection(const G4DynamicParticle* aParticle,
     136                                         G4int Z, G4int A,
    125137                                         G4double aTemperature)
    126138{
     
    197209  // element have been selected
    198210  inCharge = whichDataSetInCharge(particle, anElement);
    199   G4double ZZ = anElement->GetZ();
    200   G4double AA;
     211  G4int ZZ = G4lrint(anElement->GetZ());
     212  G4int AA;
    201213
    202214  // Collect abundance weighted cross sections and A values for each isotope
     
    208220  if (0 < nIsoPerElement) {
    209221    G4IsotopeVector* isoVector = anElement->GetIsotopeVector();
    210     AA = G4double((*isoVector)[0]->GetN());
     222    AA =(*isoVector)[0]->GetN();
    211223    if(1 < nIsoPerElement) {
    212224
     
    218230      G4bool elementXS = false;
    219231      for (i = 0; i<nIsoPerElement; i++) {
    220         if (inCharge->IsZAApplicable(particle, ZZ, G4double((*isoVector)[i]->GetN()))) {
     232        if (inCharge->IsZAApplicable(particle, ZZ,(*isoVector)[i]->GetN())) {
    221233          iso_xs = inCharge->GetIsoCrossSection(particle, (*isoVector)[i], aTemp);
    222234        } else if (elementXS == false) {
     
    231243      for (i = 0; i<nIsoPerElement; i++) {
    232244        if(cross <= xsec[i]) {
    233           AA = G4double((*isoVector)[i]->GetN());
     245          AA = (*isoVector)[i]->GetN();
    234246          break;
    235247        }
     
    241253
    242254    G4StableIsotopes theDefaultIsotopes; 
    243     G4int Z = G4int(ZZ + 0.5);
    244     const G4int nIso = theDefaultIsotopes.GetNumberOfIsotopes(Z);
    245     G4int index = theDefaultIsotopes.GetFirstIsotope(Z);
    246     AA = G4double(theDefaultIsotopes.GetIsotopeNucleonCount(index));
     255//-- Int ZZ    G4int Z = G4int(ZZ + 0.5);
     256    const G4int nIso = theDefaultIsotopes.GetNumberOfIsotopes(ZZ);
     257    G4int index = theDefaultIsotopes.GetFirstIsotope(ZZ);
     258    AA = theDefaultIsotopes.GetIsotopeNucleonCount(index);
    247259   
    248260    if(1 < nIso) {
     
    254266
    255267      for (i = 0; i<nIso; i++) {
    256         AA = G4double(theDefaultIsotopes.GetIsotopeNucleonCount(index+i));
     268        AA = theDefaultIsotopes.GetIsotopeNucleonCount(index+i);
    257269        if (inCharge->IsZAApplicable(particle, ZZ, AA )) {
    258270          iso_xs = inCharge->GetIsoZACrossSection(particle, ZZ, AA, aTemp);
     
    267279      for (i = 0; i<nIso; i++) {
    268280        if(cross <= xsec[i]) {
    269           AA = G4double(theDefaultIsotopes.GetIsotopeNucleonCount(index+i));
     281          AA = theDefaultIsotopes.GetIsotopeNucleonCount(index+i);
    270282          break;
    271283        }
  • trunk/source/processes/hadronic/cross_sections/src/G4HadronCrossSections.cc

    r1228 r1315  
    2525//
    2626//
    27 // GEANT4 tag $Name: geant4-09-03 $
     27// GEANT4 tag $Name: geant4-09-04-beta-cand-01 $
    2828//
    2929//
     
    15851585                          G4double ZZ, G4double /*AA*/)
    15861586{
    1587    if (GetParticleCode(aParticle) != 16) return 0.;
     1587   if (GetParticleCode(aParticle) != 16)  { return 0.; }
    15881588   G4double ek = aParticle->GetKineticEnergy()/GeV;
    1589    if (ek > 0.0327) return 0.;
     1589   if (ek > 0.0327)  { return 0.; }
    15901590
    15911591   G4double ekx = std::max(ek, 1.e-9);
     1592   if( ekx != lastEkx )
     1593   {
     1594     lastEkx = ekx;
     1595     lastEkxPower = std::pow(ekx*1.e6, 0.577);
     1596   }
     1597
    15921598   G4int izno = static_cast<G4int> (ZZ + 0.01);
    15931599   if (izno > 100) izno = 100;      // Not in GHESIG
    15941600   izno = izno - 1;      // For array indexing
    1595    G4double sigcap = 11.12*cscap[izno]/std::pow(ekx*1.e6, 0.577);
     1601   G4double sigcap = 11.12*cscap[izno]/lastEkxPower;
    15961602   // Convert cross section from mb to default units
    15971603   sigcap = sigcap*millibarn;
  • trunk/source/processes/hadronic/cross_sections/src/G4NeutronCaptureXS.cc

    r1228 r1315  
    2424// ********************************************************************
    2525//
    26 // $Id: G4NeutronCaptureXS.cc,v 1.2 2009/11/19 12:36:53 vnivanch Exp $
    27 // GEANT4 tag $Name: geant4-09-03 $
     26// $Id: G4NeutronCaptureXS.cc,v 1.3 2010/06/03 11:50:21 vnivanch Exp $
     27// GEANT4 tag $Name: geant4-09-04-beta-cand-01 $
    2828//
    2929// -------------------------------------------------------------------
     
    129129  // check environment variable
    130130  // Build the complete string identifying the file with the data set
    131   char* path = getenv("G4NEUTRONXS");
     131  char* path = getenv("G4NEUTRONXSDATA");
    132132  if (!path){
    133     G4cout << "G4NEUTRONXS environment variable not set" << G4endl;
     133    G4cout << "G4NEUTRONXSDATA environment variable not set" << G4endl;
    134134  }
    135135
     
    162162  // check environment variable
    163163  // Build the complete string identifying the file with the data set
    164     path = getenv("G4NEUTRONXS");
     164    path = getenv("G4NEUTRONXSDATA");
    165165    if (!path) {
    166166      if(verboseLevel > 1) {
    167         G4cout << "G4NEUTRONXS environment variable not set" << G4endl;
     167        G4cout << "G4NEUTRONXSDATA environment variable not set" << G4endl;
    168168      }
    169169      return;
  • trunk/source/processes/hadronic/cross_sections/src/G4NeutronElasticXS.cc

    r1228 r1315  
    2424// ********************************************************************
    2525//
    26 // $Id: G4NeutronElasticXS.cc,v 1.3 2009/11/19 12:01:54 vnivanch Exp $
    27 // GEANT4 tag $Name: geant4-09-03 $
     26// $Id: G4NeutronElasticXS.cc,v 1.4 2010/06/03 11:50:21 vnivanch Exp $
     27// GEANT4 tag $Name: geant4-09-04-beta-cand-01 $
    2828//
    2929// -------------------------------------------------------------------
     
    140140  // check environment variable
    141141  // Build the complete string identifying the file with the data set
    142   char* path = getenv("G4NEUTRONXS");
     142  char* path = getenv("G4NEUTRONXSDATA");
    143143  if (!path){
    144     G4cout << "G4NEUTRONXS environment variable not set" << G4endl;
     144    G4cout << "G4NEUTRONXSDATA environment variable not set" << G4endl;
    145145  }
    146146
     
    178178  // check environment variable
    179179  // Build the complete string identifying the file with the data set
    180     path = getenv("G4NEUTRONXS");
     180    path = getenv("G4NEUTRONXSDATA");
    181181    if (!path) {
    182182      if(verboseLevel > 1) {
    183         G4cout << "G4NEUTRONXS environment variable not set" << G4endl;
     183        G4cout << "G4NEUTRONXSDATA environment variable not set" << G4endl;
    184184      }
    185185      return;
     
    217217    ggXsection->GetCrossSection(dynParticle, Elem);
    218218    G4double sig2 = ggXsection->GetElasticGlauberGribovXsc();
    219     if(sig2 > 0.) coeff[Z] = sig1/sig2;
     219    if(sig2 > 0.) { coeff[Z] = sig1/sig2; }
    220220  }
    221   if(!dp) delete dynParticle;
    222 }
     221  if(!dp) { delete dynParticle; }
     222}
  • trunk/source/processes/hadronic/cross_sections/src/G4NeutronInelasticXS.cc

    r1228 r1315  
    2424// ********************************************************************
    2525//
    26 // $Id: G4NeutronInelasticXS.cc,v 1.3 2009/11/19 12:00:40 vnivanch Exp $
    27 // GEANT4 tag $Name: geant4-09-03 $
     26// $Id: G4NeutronInelasticXS.cc,v 1.4 2010/06/03 11:50:21 vnivanch Exp $
     27// GEANT4 tag $Name: geant4-09-04-beta-cand-01 $
    2828//
    2929// -------------------------------------------------------------------
     
    140140  // check environment variable
    141141  // Build the complete string identifying the file with the data set
    142   char* path = getenv("G4NEUTRONXS");
     142  char* path = getenv("G4NEUTRONXSDATA");
    143143  if (!path){
    144     G4cout << "G4NEUTRONXS environment variable not set" << G4endl;
     144    G4cout << "G4NEUTRONXSDATA environment variable not set" << G4endl;
    145145  }
    146146
     
    178178  // check environment variable
    179179  // Build the complete string identifying the file with the data set
    180     path = getenv("G4NEUTRONXS");
     180    path = getenv("G4NEUTRONXSDATA");
    181181    if (!path) {
    182182      if(verboseLevel > 1) {
    183         G4cout << "G4NEUTRONXS environment variable not set" << G4endl;
     183        G4cout << "G4NEUTRONXSDATA environment variable not set" << G4endl;
    184184      }
    185185      return;
     
    217217    ggXsection->GetCrossSection(dynParticle, Elem);
    218218    G4double sig2 = ggXsection->GetInelasticGlauberGribovXsc();
    219     if(sig2 > 0.) coeff[Z] = sig1/sig2;
     219    if(sig2 > 0.) { coeff[Z] = sig1/sig2; }
    220220  }
    221   if(!dp) delete dynParticle;
    222 }
     221  if(!dp) { delete dynParticle; }
     222}
  • trunk/source/processes/hadronic/cross_sections/src/G4UPiNuclearCrossSection.cc

    r1196 r1315  
    106106  if(idx >= NZ) idx = NZ - 1;
    107107  G4int iz2 = theZ[idx];
    108 
     108  //  G4cout << "U: iz= " << iz << " iz2= " << iz2 << "  "
     109  //  << APower[iz] << "  " << APower[iz2]<<G4endl;
    109110  G4double x2 = (((*table)[idx])->Value(ekin))*APower[iz]/APower[iz2];
    110111
     
    184185    theA.push_back(nist->GetAtomicMassAmu(iz[i]));
    185186  }
    186   for(i=1; i<92; i++) {
     187  for(i=1; i<93; i++) {
    187188    APower[i] = std::pow(nist->GetAtomicMassAmu(i),aPower);
    188189  }
Note: See TracChangeset for help on using the changeset viewer.