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/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;
Note: See TracChangeset for help on using the changeset viewer.