- Timestamp:
- Jun 18, 2010, 11:42:07 AM (14 years ago)
- 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 24 24 // ******************************************************************** 25 25 // 26 // $Id: G4CHIPSElastic.cc,v 1. 3 2009/10/08 18:56:57 vnivanchExp $27 // GEANT4 tag $Name: geant4-09-0 3$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 $ 28 28 // 29 29 //--------------------------------------------------------------------- … … 34 34 // 35 35 // Modified: 36 // 13.01.10: M.Kosov: Use G4Q(Pr/Neut)ElasticCS instead of G4QElasticCS 36 37 // 37 38 //--------------------------------------------------------------------- … … 42 43 #include "G4VQCrossSection.hh" 43 44 #include "G4ParticleDefinition.hh" 44 #include "G4QElasticCrossSection.hh" 45 #include "G4QProtonElasticCrossSection.hh" 46 #include "G4QNeutronElasticCrossSection.hh" 45 47 46 G4VQCrossSection* G4CHIPSElastic::xsManager = 0; 48 G4VQCrossSection* G4CHIPSElastic::pxsManager = 0; 49 G4VQCrossSection* G4CHIPSElastic::nxsManager = 0; 47 50 48 51 G4CHIPSElastic::G4CHIPSElastic() : G4VHadronElastic("hElasticCHIPS") 49 52 { 50 if(!xsManager) {xsManager = G4QElasticCrossSection::GetPointer();} 53 if(!pxsManager) 54 { 55 pxsManager = G4QProtonElasticCrossSection::GetPointer(); 56 nxsManager = G4QNeutronElasticCrossSection::GetPointer(); 57 } 51 58 } 52 59 … … 62 69 else if(Z == 2 && N == 1) N = 2; 63 70 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); 65 74 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 } 67 80 else t = G4VHadronElastic::SampleInvariantT(p, plab, Z, A); 68 81 return t; -
trunk/source/processes/hadronic/models/coherent_elastic/src/G4HadronElastic.cc
r1228 r1315 24 24 // ******************************************************************** 25 25 // 26 // $Id: G4HadronElastic.cc,v 1.6 5 2009/10/08 18:56:57 vnivanchExp $27 // GEANT4 tag $Name: geant4-09-0 3$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 $ 28 28 // 29 29 // … … 62 62 // p and He targets only 63 63 // 11-May-07 V.Ivanchenko remove unused method Defs1 64 // 13.01.10: M.Kosov: Use G4Q(Pr/Neut)ElasticCS instead of G4QElasticCS 64 65 // 65 66 … … 68 69 #include "G4ParticleDefinition.hh" 69 70 #include "G4IonTable.hh" 70 #include "G4QElasticCrossSection.hh" 71 #include "G4QProtonElasticCrossSection.hh" 72 #include "G4QNeutronElasticCrossSection.hh" 71 73 #include "G4VQCrossSection.hh" 72 74 #include "G4ElasticHadrNucleusHE.hh" … … 79 81 #include "G4PionMinus.hh" 80 82 81 G4VQCrossSection* G4HadronElastic::qCManager = 0; 83 G4VQCrossSection* G4HadronElastic::pCManager = 0; 84 G4VQCrossSection* G4HadronElastic::nCManager = 0; 82 85 83 86 G4HadronElastic::G4HadronElastic(G4ElasticHadrNucleusHE* HModel) … … 93 96 plabLowLimit = 20.0*MeV; 94 97 95 if(!qCManager) {qCManager = G4QElasticCrossSection::GetPointer();} 98 if(!pCManager) 99 { 100 pCManager = G4QProtonElasticCrossSection::GetPointer(); 101 nCManager = G4QNeutronElasticCrossSection::GetPointer(); 102 } 96 103 if(!hElastic) hElastic = new G4ElasticHadrNucleusHE(); 97 104 … … 112 119 G4VQCrossSection* G4HadronElastic::GetCS() 113 120 { 114 return qCManager; 121 return pCManager; 122 //if (PDG==2212) return pCManager; 123 //else if(PDG==2112) return nCManager; 124 //return 0; 115 125 } 116 126 … … 200 210 if(gtype == fQElastic) { 201 211 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; 205 214 } 206 215 if(Z == 1 && N == 2) N = 1; 207 216 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); 209 220 210 221 // 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 } 212 227 else if(plab > plabLowLimit) gtype = fLElastic; 213 228 else gtype = fSWave; -
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; -
trunk/source/processes/hadronic/models/coherent_elastic/src/G4WHadronElasticProcess.cc
r1228 r1315 24 24 // ******************************************************************** 25 25 // 26 // $Id: G4WHadronElasticProcess.cc,v 1. 2 2009/09/22 16:21:46 vnivanchExp $27 // GEANT4 tag $Name: geant4-09-0 3$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 $ 28 28 // 29 29 // Geant4 Hadron Elastic Scattering Process … … 39 39 // 23.01.07 V.Ivanchenko add cross section interfaces with Z and A 40 40 // 02.05.07 V.Ivanchenko add He3 41 // 13.01.10: M.Kosov: Commented not used G4QElasticCrossSection & G4QCHIPSWorld 41 42 // 42 43 … … 46 47 #include "G4HadronElasticDataSet.hh" 47 48 #include "G4VQCrossSection.hh" 48 #include "G4QElasticCrossSection.hh"49 #include "G4QCHIPSWorld.hh"49 //#include "G4QElasticCrossSection.hh" 50 //#include "G4QCHIPSWorld.hh" 50 51 #include "G4Element.hh" 51 52 #include "G4ElementVector.hh"
Note: See TracChangeset
for help on using the changeset viewer.