Changeset 1315 for trunk/source/processes/hadronic/models/coherent_elastic/src/G4UHadronElasticProcess.cc
- Timestamp:
- Jun 18, 2010, 11:42:07 AM (14 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/source/processes/hadronic/models/coherent_elastic/src/G4UHadronElasticProcess.cc
r1228 r1315 24 24 // ******************************************************************** 25 25 // 26 // $Id: G4UHadronElasticProcess.cc,v 1. 39 2008/10/22 08:16:40 vnivanchExp $27 // GEANT4 tag $Name: geant4-09-0 3$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 $ 28 28 // 29 29 // Geant4 Hadron Elastic Scattering Process -- header file … … 39 39 // 23.01.07 V.Ivanchnko add cross section interfaces with Z and A 40 40 // 02.05.07 V.Ivanchnko add He3 41 // 13.01.10: M.Kosov: Use G4Q(Pr/Neut)ElasticCS instead of G4QElasticCS 41 42 // 42 43 … … 46 47 #include "G4HadronElasticDataSet.hh" 47 48 #include "G4VQCrossSection.hh" 48 #include "G4QElasticCrossSection.hh" 49 #include "G4QProtonElasticCrossSection.hh" 50 #include "G4QNeutronElasticCrossSection.hh" 49 51 #include "G4QCHIPSWorld.hh" 50 52 #include "G4Element.hh" … … 64 66 thEnergy = 19.0*MeV; 65 67 verboseLevel= 1; 66 qCManager = 0; 68 pCManager = G4QProtonElasticCrossSection::GetPointer(); 69 nCManager = G4QNeutronElasticCrossSection::GetPointer(); 67 70 } 68 71 … … 73 76 void G4UHadronElasticProcess::SetQElasticCrossSection(G4VQCrossSection* p) 74 77 { 75 qCManager = p;78 pCManager = p; 76 79 } 77 80 … … 81 84 if(first) { 82 85 first = false; 83 if(!qCManager) qCManager = G4QElasticCrossSection::GetPointer();84 86 theParticle = &aParticleType; 85 87 pPDG = theParticle->GetPDGEncoding(); … … 172 174 if(ni == 0) { 173 175 G4int N = G4int(elm->GetN()+0.5) - iz; 174 x = qCManager->GetCrossSection(false,momentum,iz,N,pPDG);175 xsecH[0] = x;176 176 #ifdef G4VERBOSE 177 177 if(verboseLevel>1) … … 179 179 << " N= " << N << " pdg= " << pPDG 180 180 << " 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; 183 187 } else { 184 188 G4double* ab = elm->GetRelativeAbundanceVector(); … … 195 199 << " N= " << N << " pdg= " << pPDG 196 200 << " 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; 200 207 x += y; 201 208 xsecH[j] = x;
Note: See TracChangeset
for help on using the changeset viewer.