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

Location:
trunk/source/processes/hadronic/models/coherent_elastic/src
Files:
4 edited

Legend:

Unmodified
Added
Removed
  • trunk/source/processes/hadronic/models/coherent_elastic/src/G4CHIPSElastic.cc

    r1228 r1315  
    2424// ********************************************************************
    2525//
    26 // $Id: G4CHIPSElastic.cc,v 1.3 2009/10/08 18:56:57 vnivanch Exp $
    27 // GEANT4 tag $Name: geant4-09-03 $
     26// $Id: G4CHIPSElastic.cc,v 1.4 2010/01/13 15:42:06 mkossov Exp $
     27// GEANT4 tag $Name: geant4-09-04-beta-cand-01 $
    2828//
    2929//---------------------------------------------------------------------
     
    3434// 
    3535// Modified:
     36// 13.01.10: M.Kosov: Use G4Q(Pr/Neut)ElasticCS instead of G4QElasticCS
    3637//
    3738//---------------------------------------------------------------------
     
    4243#include "G4VQCrossSection.hh"
    4344#include "G4ParticleDefinition.hh"
    44 #include "G4QElasticCrossSection.hh"
     45#include "G4QProtonElasticCrossSection.hh"
     46#include "G4QNeutronElasticCrossSection.hh"
    4547
    46 G4VQCrossSection* G4CHIPSElastic::xsManager = 0;
     48G4VQCrossSection* G4CHIPSElastic::pxsManager = 0;
     49G4VQCrossSection* G4CHIPSElastic::nxsManager = 0;
    4750
    4851G4CHIPSElastic::G4CHIPSElastic() : G4VHadronElastic("hElasticCHIPS")
    4952{
    50   if(!xsManager) {xsManager = G4QElasticCrossSection::GetPointer();}
     53  if(!pxsManager)
     54  {
     55    pxsManager = G4QProtonElasticCrossSection::GetPointer();
     56    nxsManager = G4QNeutronElasticCrossSection::GetPointer();
     57  }
    5158}
    5259
     
    6269  else if(Z == 2 && N == 1) N = 2;
    6370  G4int projPDG = p->GetPDGEncoding();
    64   G4double cs = xsManager->GetCrossSection(false,plab,Z,N,projPDG);
     71  G4double cs = 0.;
     72  if     (projPDG==2212) cs = pxsManager->GetCrossSection(false,plab,Z,N,projPDG);
     73  else if(projPDG==2112) cs = nxsManager->GetCrossSection(false,plab,Z,N,projPDG);
    6574  G4double t = 0.0;
    66   if(cs > 0.0) t = xsManager->GetExchangeT(Z,N,projPDG);
     75  if(cs > 0.0)
     76  {
     77    if     (projPDG==2212) t = pxsManager->GetExchangeT(Z,N,projPDG);
     78    else if(projPDG==2112) t = nxsManager->GetExchangeT(Z,N,projPDG);
     79  }
    6780  else         t = G4VHadronElastic::SampleInvariantT(p, plab, Z, A);
    6881  return t;
  • trunk/source/processes/hadronic/models/coherent_elastic/src/G4HadronElastic.cc

    r1228 r1315  
    2424// ********************************************************************
    2525//
    26 // $Id: G4HadronElastic.cc,v 1.65 2009/10/08 18:56:57 vnivanch Exp $
    27 // GEANT4 tag $Name: geant4-09-03 $
     26// $Id: G4HadronElastic.cc,v 1.66 2010/01/13 15:42:06 mkossov Exp $
     27// GEANT4 tag $Name: geant4-09-04-beta-cand-01 $
    2828//
    2929//
     
    6262//                        p and He targets only 
    6363// 11-May-07 V.Ivanchenko remove unused method Defs1
     64// 13.01.10: M.Kosov: Use G4Q(Pr/Neut)ElasticCS instead of G4QElasticCS
    6465//
    6566
     
    6869#include "G4ParticleDefinition.hh"
    6970#include "G4IonTable.hh"
    70 #include "G4QElasticCrossSection.hh"
     71#include "G4QProtonElasticCrossSection.hh"
     72#include "G4QNeutronElasticCrossSection.hh"
    7173#include "G4VQCrossSection.hh"
    7274#include "G4ElasticHadrNucleusHE.hh"
     
    7981#include "G4PionMinus.hh"
    8082
    81 G4VQCrossSection* G4HadronElastic::qCManager = 0;
     83G4VQCrossSection* G4HadronElastic::pCManager = 0;
     84G4VQCrossSection* G4HadronElastic::nCManager = 0;
    8285
    8386G4HadronElastic::G4HadronElastic(G4ElasticHadrNucleusHE* HModel)
     
    9396  plabLowLimit     = 20.0*MeV;
    9497
    95   if(!qCManager) {qCManager = G4QElasticCrossSection::GetPointer();}
     98  if(!pCManager)
     99  {
     100    pCManager = G4QProtonElasticCrossSection::GetPointer();
     101    nCManager = G4QNeutronElasticCrossSection::GetPointer();
     102  }
    96103  if(!hElastic) hElastic = new G4ElasticHadrNucleusHE();
    97104
     
    112119G4VQCrossSection* G4HadronElastic::GetCS()
    113120{
    114   return qCManager;
     121  return pCManager;
     122  //if     (PDG==2212) return pCManager;
     123  //else if(PDG==2112) return nCManager;
     124  //return 0;
    115125}
    116126
     
    200210  if(gtype == fQElastic) {
    201211    if (verboseLevel >1) {
    202       G4cout << "G4HadronElastic: Z= " << Z << " N= "
    203              << N << " pdg= " <<  projPDG
    204              << " mom(GeV)= " << plab/GeV << "  " << qCManager << G4endl;
     212      G4cout << "G4HadronElastic: Z= " << Z << " N= "  << N << " pdg= " <<  projPDG
     213               << " mom(GeV)= " << plab/GeV<<", pC="<<pCManager<<", nC="<<nCManager<<G4endl;
    205214    }
    206215    if(Z == 1 && N == 2) N = 1;
    207216    else if(Z == 2 && N == 1) N = 2;
    208     G4double cs = qCManager->GetCrossSection(false,plab,Z,N,projPDG);
     217    G4double cs = 0.;
     218    if     (projPDG==2212) cs = pCManager->GetCrossSection(false,plab,Z,N,projPDG);
     219    else if(projPDG==2112) cs = nCManager->GetCrossSection(false,plab,Z,N,projPDG);
    209220
    210221    // check if cross section is reasonable
    211     if(cs > 0.0) t = qCManager->GetExchangeT(Z,N,projPDG);
     222    if(cs > 0.0)
     223    {
     224      if     (projPDG==2212) t = pCManager->GetExchangeT(Z,N,projPDG);
     225      else if(projPDG==2112) t = nCManager->GetExchangeT(Z,N,projPDG);
     226    }
    212227    else if(plab > plabLowLimit) gtype = fLElastic;
    213228    else gtype = fSWave;
  • trunk/source/processes/hadronic/models/coherent_elastic/src/G4UHadronElasticProcess.cc

    r1228 r1315  
    2424// ********************************************************************
    2525//
    26 // $Id: G4UHadronElasticProcess.cc,v 1.39 2008/10/22 08:16:40 vnivanch Exp $
    27 // GEANT4 tag $Name: geant4-09-03 $
     26// $Id: G4UHadronElasticProcess.cc,v 1.41 2010/01/26 13:34:01 mkossov Exp $
     27// GEANT4 tag $Name: geant4-09-04-beta-cand-01 $
    2828//
    2929// Geant4 Hadron Elastic Scattering Process -- header file
     
    3939// 23.01.07 V.Ivanchnko add cross section interfaces with Z and A
    4040// 02.05.07 V.Ivanchnko add He3
     41// 13.01.10: M.Kosov: Use G4Q(Pr/Neut)ElasticCS instead of G4QElasticCS
    4142//
    4243
     
    4647#include "G4HadronElasticDataSet.hh"
    4748#include "G4VQCrossSection.hh"
    48 #include "G4QElasticCrossSection.hh"
     49#include "G4QProtonElasticCrossSection.hh"
     50#include "G4QNeutronElasticCrossSection.hh"
    4951#include "G4QCHIPSWorld.hh"
    5052#include "G4Element.hh"
     
    6466  thEnergy    = 19.0*MeV;
    6567  verboseLevel= 1;
    66   qCManager   = 0;
     68  pCManager   = G4QProtonElasticCrossSection::GetPointer();
     69  nCManager   = G4QNeutronElasticCrossSection::GetPointer();
    6770}
    6871
     
    7376void G4UHadronElasticProcess::SetQElasticCrossSection(G4VQCrossSection* p)
    7477{
    75   qCManager = p;
     78  pCManager = p;
    7679}
    7780
     
    8184  if(first) {
    8285    first = false;
    83     if(!qCManager) qCManager = G4QElasticCrossSection::GetPointer();
    8486    theParticle = &aParticleType;
    8587    pPDG = theParticle->GetPDGEncoding();
     
    172174    if(ni == 0) {
    173175      G4int N = G4int(elm->GetN()+0.5) - iz;
    174       x = qCManager->GetCrossSection(false,momentum,iz,N,pPDG);
    175       xsecH[0] = x;
    176176#ifdef G4VERBOSE
    177177      if(verboseLevel>1)
     
    179179               << " N= "  << N << " pdg= " << pPDG
    180180               << " mom(GeV)= " << momentum/GeV
    181                << "  " << qCManager << G4endl;
    182 #endif
     181               << ", pC=" << pCManager << ", nC=" << nCManager << G4endl;
     182#endif
     183      x = 0.;
     184      if     (pPDG==2212) x = pCManager->GetCrossSection(false,momentum,iz,N,pPDG);
     185      else if(pPDG==2112) x = nCManager->GetCrossSection(false,momentum,iz,N,pPDG);
     186      xsecH[0] = x;
    183187    } else {
    184188      G4double* ab = elm->GetRelativeAbundanceVector();
     
    195199                 << " N= "  << N << " pdg= " << pPDG
    196200                 << " mom(GeV)= " << momentum/GeV
    197                  << "  " << qCManager << G4endl;
    198 #endif
    199         G4double y = ab[j]*qCManager->GetCrossSection(false,momentum,iz,N,pPDG);
     201                 << ", pC=" << pCManager << ", nC=" << pCManager << G4endl;
     202#endif
     203      G4double qxs=0.;
     204      if     (pPDG==2212) qxs=pCManager->GetCrossSection(false,momentum,iz,N,pPDG);
     205      else if(pPDG==2112) qxs=nCManager->GetCrossSection(false,momentum,iz,N,pPDG);
     206        G4double y = ab[j]*qxs;
    200207        x += y;
    201208        xsecH[j] = x;
  • trunk/source/processes/hadronic/models/coherent_elastic/src/G4WHadronElasticProcess.cc

    r1228 r1315  
    2424// ********************************************************************
    2525//
    26 // $Id: G4WHadronElasticProcess.cc,v 1.2 2009/09/22 16:21:46 vnivanch Exp $
    27 // GEANT4 tag $Name: geant4-09-03 $
     26// $Id: G4WHadronElasticProcess.cc,v 1.3 2010/01/13 15:42:06 mkossov Exp $
     27// GEANT4 tag $Name: geant4-09-04-beta-cand-01 $
    2828//
    2929// Geant4 Hadron Elastic Scattering Process
     
    3939// 23.01.07 V.Ivanchenko add cross section interfaces with Z and A
    4040// 02.05.07 V.Ivanchenko add He3
     41// 13.01.10: M.Kosov: Commented not used G4QElasticCrossSection & G4QCHIPSWorld
    4142//
    4243
     
    4647#include "G4HadronElasticDataSet.hh"
    4748#include "G4VQCrossSection.hh"
    48 #include "G4QElasticCrossSection.hh"
    49 #include "G4QCHIPSWorld.hh"
     49//#include "G4QElasticCrossSection.hh"
     50//#include "G4QCHIPSWorld.hh"
    5051#include "G4Element.hh"
    5152#include "G4ElementVector.hh"
Note: See TracChangeset for help on using the changeset viewer.