- Timestamp:
- Nov 25, 2009, 5:13:58 PM (15 years ago)
- Location:
- trunk/source/processes/hadronic/models/coherent_elastic/src
- Files:
-
- 6 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/source/processes/hadronic/models/coherent_elastic/src/G4ChargeExchange.cc
r1055 r1196 25 25 // 26 26 // 27 // $Id: G4ChargeExchange.cc,v 1.1 3 2008/11/20 12:35:19vnivanch Exp $28 // GEANT4 tag $Name: geant4-09-03- beta-cand-01 $27 // $Id: G4ChargeExchange.cc,v 1.16 2009/09/22 16:21:46 vnivanch Exp $ 28 // GEANT4 tag $Name: geant4-09-03-cand-01 $ 29 29 // 30 30 // … … 312 312 dd = 10.; 313 313 } 314 G4double x1 = (1.0 - exp(-tmax*bb))*aa/bb;315 G4double x2 = (1.0 - exp(-tmax*dd))*cc/dd;314 G4double x1 = (1.0 - std::exp(-tmax*bb))*aa/bb; 315 G4double x2 = (1.0 - std::exp(-tmax*dd))*cc/dd; 316 316 317 317 G4double t; -
trunk/source/processes/hadronic/models/coherent_elastic/src/G4ChargeExchangeProcess.cc
r1007 r1196 26 26 // 27 27 // $Id: G4ChargeExchangeProcess.cc,v 1.15 2008/11/27 16:43:00 vnivanch Exp $ 28 // GEANT4 tag $Name: geant4-09-0 2$28 // GEANT4 tag $Name: geant4-09-03-cand-01 $ 29 29 // 30 30 // -
trunk/source/processes/hadronic/models/coherent_elastic/src/G4DiffuseElastic.cc
r1055 r1196 24 24 // ******************************************************************** 25 25 // 26 // $Id: G4DiffuseElastic.cc,v 1.2 3 2009/03/02 09:17:43 grichineExp $27 // GEANT4 tag $Name: geant4-09-03- beta-cand-01 $26 // $Id: G4DiffuseElastic.cc,v 1.25 2009/09/22 16:21:46 vnivanch Exp $ 27 // GEANT4 tag $Name: geant4-09-03-cand-01 $ 28 28 // 29 29 // -
trunk/source/processes/hadronic/models/coherent_elastic/src/G4ElasticHadrNucleusHE.cc
r1007 r1196 25 25 // 26 26 // 27 // $Id: G4ElasticHadrNucleusHE.cc,v 1. 79 2008/01/14 10:39:13vnivanch Exp $28 // GEANT4 tag $Name: geant4-09-0 2$27 // $Id: G4ElasticHadrNucleusHE.cc,v 1.81 2009/09/22 16:21:46 vnivanch Exp $ 28 // GEANT4 tag $Name: geant4-09-03-cand-01 $ 29 29 // 30 30 // … … 220 220 221 221 G4ElasticHadrNucleusHE::G4ElasticHadrNucleusHE() 222 :G4HadronicInteraction("G4ElasticHadrNucleusHE") 222 : G4VHadronElastic("hElasticGlauber") 223 // :G4HadronicInteraction("G4ElasticHadrNucleusHE") 223 224 { 224 225 verboseLevel = 0; … … 299 300 // 300 301 // 301 302 /* 302 303 G4HadFinalState * G4ElasticHadrNucleusHE::ApplyYourself( 303 304 const G4HadProjectile &aTrack, … … 457 458 return &theParticleChange; 458 459 } 459 460 */ 460 461 ////////////////////////////////////////////////////////////////////////// 461 462 // 462 463 // 463 464 464 G4double G4ElasticHadrNucleusHE:: 465 SampleT( const G4ParticleDefinition* p, 466 G4double inLabMom, G4int Z, G4int N) 465 G4double 466 G4ElasticHadrNucleusHE::SampleInvariantT(const G4ParticleDefinition* p, 467 G4double inLabMom, 468 G4int Z, G4int N) 467 469 { 468 470 G4double plab = inLabMom/GeV; // (GeV/c) … … 542 544 } 543 545 return Q2*GeV2; 546 } 547 548 ////////////////////////////////////////////////////////////////////////// 549 // 550 // 551 552 G4double 553 G4ElasticHadrNucleusHE::SampleT(const G4ParticleDefinition* p, 554 G4double inLabMom, 555 G4int Z, G4int N) 556 { 557 return SampleInvariantT(p, inLabMom, Z, N); 544 558 } 545 559 -
trunk/source/processes/hadronic/models/coherent_elastic/src/G4HadronElastic.cc
r1007 r1196 24 24 // ******************************************************************** 25 25 // 26 // $Id: G4HadronElastic.cc,v 1.6 1 2008/08/05 07:37:39vnivanch Exp $27 // GEANT4 tag $Name: geant4-09-0 2$26 // $Id: G4HadronElastic.cc,v 1.65 2009/10/08 18:56:57 vnivanch Exp $ 27 // GEANT4 tag $Name: geant4-09-03-cand-01 $ 28 28 // 29 29 // … … 79 79 #include "G4PionMinus.hh" 80 80 81 G4VQCrossSection* G4HadronElastic::qCManager = 0; 82 81 83 G4HadronElastic::G4HadronElastic(G4ElasticHadrNucleusHE* HModel) 82 84 : G4HadronicInteraction("G4HadronElastic"), hElastic(HModel) … … 91 93 plabLowLimit = 20.0*MeV; 92 94 93 qCManager = G4QElasticCrossSection::GetPointer();95 if(!qCManager) {qCManager = G4QElasticCrossSection::GetPointer();} 94 96 if(!hElastic) hElastic = new G4ElasticHadrNucleusHE(); 95 97 … … 101 103 thePionMinus= G4PionMinus::PionMinus(); 102 104 103 nnans = 0;104 npos = 0;105 nneg = 0;106 neneg = 0;107 105 } 108 106 … … 110 108 { 111 109 delete hElastic; 112 if( (nnans + npos + nneg + neneg) > 0 ) {113 G4cout << "### G4HadronElastic destructor Warnings: ";114 if(nnans > 0) G4cout << "### N(nans) = " << nnans;115 if(npos > 0) G4cout << "### N(cost > 1)= " << npos;116 if(nneg > 0) G4cout << "### N(cost <-1)= " << nneg;117 if(neneg > 0) G4cout << "### N(E < 0)= " << neneg;118 G4cout << "###" << G4endl;119 }120 110 } 121 111 … … 234 224 } 235 225 236 // NaN finder 237 if(!(t < 0.0 || t >= 0.0)) { 238 if (verboseLevel > 0) { 226 if(gtype == fSWave) t = G4UniformRand()*tmax; 227 228 if(verboseLevel>1) { 229 G4cout <<"type= " << gtype <<" t= " << t << " tmax= " << tmax 230 << " ptot= " << ptot << G4endl; 231 } 232 // Sampling in CM system 233 G4double phi = G4UniformRand()*twopi; 234 G4double cost = 1. - 2.0*t/tmax; 235 G4double sint; 236 237 // problem in sampling 238 if(cost > 1.0 || cost < -1.0) { 239 if(verboseLevel > 0) { 239 240 G4cout << "G4HadronElastic:WARNING: Z= " << Z << " N= " 240 << N << " pdg= " << projPDG241 << N << " " << aParticle->GetDefinition()->GetParticleName() 241 242 << " mom(GeV)= " << plab/GeV 242 243 << " the model type " << gtype; … … 244 245 else if(gtype == fLElastic) G4cout << " LElastic "; 245 246 else if(gtype == fHElastic) G4cout << " HElastic "; 246 G4cout << " S-wave will be sampled"247 G4cout << " cost= " << cost 247 248 << G4endl; 248 249 } 249 t = 0.0;250 nnans++;251 }252 253 if(gtype == fSWave) t = G4UniformRand()*tmax;254 255 if(verboseLevel>1) {256 G4cout <<"type= " << gtype <<" t= " << t << " tmax= " << tmax257 << " ptot= " << ptot << G4endl;258 }259 // Sampling in CM system260 G4double phi = G4UniformRand()*twopi;261 G4double cost = 1. - 2.0*t/tmax;262 G4double sint;263 264 // problem in sampling265 if(cost >= 1.0) {266 250 cost = 1.0; 267 251 sint = 0.0; 268 npos++;269 } else if(cost < -1 ) {270 /*271 G4cout << "G4HadronElastic:WARNING: Z= " << Z << " N= "272 << N << " " << aParticle->GetDefinition()->GetParticleName()273 << " mom(GeV)= " << plab/GeV274 << " the model type " << gtype;275 if(gtype == fQElastic) G4cout << " CHIPS ";276 else if(gtype == fLElastic) G4cout << " LElastic ";277 else if(gtype == fHElastic) G4cout << " HElastic ";278 G4cout << " cost= " << cost279 << G4endl;280 */281 cost = 1.0;282 sint = 0.0;283 nneg++;284 252 285 253 // normal situation … … 305 273 if(eFinal <= lowestEnergyLimit) { 306 274 if(eFinal < 0.0 && verboseLevel > 0) { 307 neneg++;308 275 G4cout << "G4HadronElastic WARNING ekin= " << eFinal 309 276 << " after scattering of " -
trunk/source/processes/hadronic/models/coherent_elastic/src/G4UHadronElasticProcess.cc
r1007 r1196 25 25 // 26 26 // $Id: G4UHadronElasticProcess.cc,v 1.39 2008/10/22 08:16:40 vnivanch Exp $ 27 // GEANT4 tag $Name: geant4-09-0 2$27 // GEANT4 tag $Name: geant4-09-03-cand-01 $ 28 28 // 29 29 // Geant4 Hadron Elastic Scattering Process -- header file
Note: See TracChangeset
for help on using the changeset viewer.