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