Changeset 1196 for trunk/source/processes/hadronic/models/coherent_elastic
- Timestamp:
- Nov 25, 2009, 5:13:58 PM (15 years ago)
- Location:
- trunk/source/processes/hadronic/models/coherent_elastic
- Files:
-
- 14 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/source/processes/hadronic/models/coherent_elastic/GNUmakefile
r819 r1196 1 # $Id: GNUmakefile,v 1. 5 2006/04/18 16:53:05 vnivanchExp $1 # $Id: GNUmakefile,v 1.7 2009/11/16 19:20:18 mkossov Exp $ 2 2 # ----------------------------------------------------------- 3 3 # GNUmakefile for hadronic library. Gabriele Cosmo, 18/9/96. … … 20 20 -I$(G4BASE)/geometry/management/include \ 21 21 -I$(G4BASE)/processes/management/include \ 22 -I$(G4BASE)/processes/cuts/include \ 22 23 -I$(G4BASE)/processes/hadronic/management/include/ \ 23 24 -I$(G4BASE)/processes/hadronic/models/management/include/ \ 24 -I$(G4BASE)/processes/hadronic/models/chiral_inv_phase_space/interface/include/ \25 25 -I$(G4BASE)/processes/hadronic/models/chiral_inv_phase_space/body/include/ \ 26 -I$(G4BASE)/processes/hadronic/models/chiral_inv_phase_space/cross_sections/include/ \ 26 27 -I$(G4BASE)/processes/hadronic/models/neutron_hp/include/ \ 27 28 -I$(G4BASE)/processes/hadronic/util/include \ -
trunk/source/processes/hadronic/models/coherent_elastic/History
r1055 r1196 15 15 --------------------------------------------------------------- 16 16 17 19 November 2009 - M.Kosov (hadr-cohe-V09-02-03) 18 ------------------------------------------------------ 19 - Correct dependencies on CHIPS 20 21 08 October 2009 - V.Ivanchenko (hadr-cohe-V09-02-02) 22 ------------------------------------------------------ 23 - G4CHIPSElastic, G4HadronElastic - use static pointer to G4VQCrossSection 24 in order to gurantee unique version 25 of CHIPS cross section class 26 27 05 October 2009 - V.Ivanchenko (hadr-cohe-V09-02-01) 28 ------------------------------------------------------ 29 - Make a correct tag format 30 31 22 September 2009 - V.Ivanchenko (hadr-cohe-V09-01-09) 32 ------------------------------------------------------ 33 Migrated to the hadronic model design of elastic scattering 34 G4WHadronElasticProcess - new elastic process 35 G4VHadronElastic - base class for elastic models with default 36 GHEISHA model 37 G4ElasticHadrNucleusHE - capable to work with old and new interfaces 38 G4CHIPSElastic - model interface to CHIPS parameterization 39 G4HadronElastic - remove hand made NaN finder and G4cout at destructor 17 40 18 41 02 March 2009 - D. Wright for V.Grichine (hadr-cohe-V09-02-00) -
trunk/source/processes/hadronic/models/coherent_elastic/include/G4ChargeExchange.hh
r1007 r1196 25 25 // 26 26 // 27 // $Id: G4ChargeExchange.hh,v 1. 4 2008/11/19 18:28:36 vnivanch Exp $28 // GEANT4 tag $Name: geant4-09-0 2$27 // $Id: G4ChargeExchange.hh,v 1.6 2009/09/22 16:21:46 vnivanch Exp $ 28 // GEANT4 tag $Name: geant4-09-03-cand-01 $ 29 29 // 30 30 // -
trunk/source/processes/hadronic/models/coherent_elastic/include/G4ChargeExchangeProcess.hh
r1007 r1196 26 26 // 27 27 // $Id: G4ChargeExchangeProcess.hh,v 1.3 2008/11/20 12:35:19 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/include/G4DiffuseElastic.hh
r1055 r1196 25 25 // 26 26 // 27 // $Id: G4DiffuseElastic.hh,v 1.1 5 2009/02/20 15:38:07 grichineExp $28 // GEANT4 tag $Name: geant4-09-03- beta-cand-01 $27 // $Id: G4DiffuseElastic.hh,v 1.17 2009/09/22 16:21:46 vnivanch Exp $ 28 // GEANT4 tag $Name: geant4-09-03-cand-01 $ 29 29 // 30 30 // -
trunk/source/processes/hadronic/models/coherent_elastic/include/G4ElasticHadrNucleusHE.hh
r1007 r1196 25 25 // 26 26 // 27 // $Id: G4ElasticHadrNucleusHE.hh,v 1.4 5 2007/12/19 18:27:16 vnivanch Exp $28 // GEANT4 tag $Name: geant4-09-0 2$27 // $Id: G4ElasticHadrNucleusHE.hh,v 1.47 2009/09/22 16:21:46 vnivanch Exp $ 28 // GEANT4 tag $Name: geant4-09-03-cand-01 $ 29 29 // 30 30 // G4ElasticHadrNucleusHe.hh … … 51 51 #include "G4ParticleChange.hh" 52 52 #include "G4Nucleus.hh" 53 54 #include "G4HadronicInteraction.hh" 53 #include "G4VHadronElastic.hh" 55 54 56 55 class G4NistManager; … … 72 71 73 72 G4ElasticData(const G4ParticleDefinition* h, 74 73 G4int Z, G4double A, G4double* eGeV); 75 74 76 75 ~G4ElasticData(){} … … 106 105 // 107 106 108 class G4ElasticHadrNucleusHE : public G4 HadronicInteraction107 class G4ElasticHadrNucleusHE : public G4VHadronElastic 109 108 { 110 109 public: … … 114 113 virtual ~G4ElasticHadrNucleusHE(); 115 114 116 G4HadFinalState * ApplyYourself(const G4HadProjectile& aTrack, 117 G4Nucleus& G4Nucleus); 118 119 G4double SampleT(const G4ParticleDefinition* p, G4double plab, 115 virtual G4double SampleInvariantT(const G4ParticleDefinition* p, 116 G4double plab, 117 G4int Z, G4int A); 118 119 G4double SampleT(const G4ParticleDefinition* p, 120 G4double plab, 120 121 G4int Z, G4int A); 122 121 123 G4double HadronNucleusQ2_2(G4ElasticData * pElD, G4int Z, 122 124 G4double plabGeV, G4double tmax); -
trunk/source/processes/hadronic/models/coherent_elastic/include/G4HadronElastic.hh
r1007 r1196 25 25 // 26 26 // 27 // $Id: G4HadronElastic.hh,v 1. 27 2008/05/19 09:59:44vnivanch Exp $28 // GEANT4 tag $Name: geant4-09-0 2$27 // $Id: G4HadronElastic.hh,v 1.31 2009/10/08 18:56:57 vnivanch Exp $ 28 // GEANT4 tag $Name: geant4-09-03-cand-01 $ 29 29 // 30 30 // … … 108 108 G4double rr); 109 109 110 G4VQCrossSection* qCManager; 110 static G4VQCrossSection* qCManager; 111 111 112 G4ElasticHadrNucleusHE* hElastic; 112 113 … … 123 124 G4double lowestEnergyLimit; 124 125 G4double plabLowLimit; 125 126 G4int nnans;127 G4int npos;128 G4int nneg;129 G4int neneg;130 126 131 127 }; -
trunk/source/processes/hadronic/models/coherent_elastic/include/G4UHadronElasticProcess.hh
r1007 r1196 26 26 // 27 27 // $Id: G4UHadronElasticProcess.hh,v 1.10 2006/11/16 20:09:13 vnivanch Exp $ 28 // GEANT4 tag $Name: geant4-09-0 2$28 // GEANT4 tag $Name: geant4-09-03-cand-01 $ 29 29 // 30 30 // Geant4 Hadron Elastic Scattering Process -- header file -
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.