- Timestamp:
- Jun 18, 2010, 11:42:07 AM (14 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/source/processes/electromagnetic/lowenergy/src/G4DNARuddIonisationModel.cc
r1228 r1315 24 24 // ******************************************************************** 25 25 // 26 // $Id: G4DNARuddIonisationModel.cc,v 1.1 0 2009/08/13 11:32:47sincerti Exp $27 // GEANT4 tag $Name: geant4-09-0 3$26 // $Id: G4DNARuddIonisationModel.cc,v 1.17 2010/04/07 20:08:31 sincerti Exp $ 27 // GEANT4 tag $Name: geant4-09-04-beta-cand-01 $ 28 28 // 29 29 … … 271 271 // InitialiseElementSelectors(particle,cuts); 272 272 273 // Test if water material274 275 flagMaterialIsWater= false;276 densityWater = 0;277 278 const G4ProductionCutsTable* theCoupleTable = G4ProductionCutsTable::GetProductionCutsTable();279 280 if(theCoupleTable)281 {282 G4int numOfCouples = theCoupleTable->GetTableSize();283 284 if(numOfCouples>0)285 {286 for (G4int i=0; i<numOfCouples; i++)287 {288 const G4MaterialCutsCouple* couple = theCoupleTable->GetMaterialCutsCouple(i);289 const G4Material* material = couple->GetMaterial();290 291 if (material->GetName() == "G4_WATER")292 {293 G4double density = material->GetAtomicNumDensityVector()[1];294 flagMaterialIsWater = true;295 densityWater = density;296 297 if (verboseLevel > 3)298 G4cout << "****** Water material is found with density(cm^-3)=" << density/(cm*cm*cm) << G4endl;299 }300 301 }302 303 } // if(numOfCouples>0)304 305 } // if (theCoupleTable)306 307 273 } 308 274 309 275 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo.... 310 276 311 G4double G4DNARuddIonisationModel::CrossSectionPerVolume(const G4Material* ,277 G4double G4DNARuddIonisationModel::CrossSectionPerVolume(const G4Material* material, 312 278 const G4ParticleDefinition* particleDefinition, 313 279 G4double k, … … 355 321 G4double sigma=0; 356 322 357 if ( flagMaterialIsWater)323 if (material->GetName() == "G4_WATER") 358 324 { 359 325 const G4String& particleName = particleDefinition->GetParticleName(); … … 421 387 G4cout << "---> Kinetic energy(eV)=" << k/eV << G4endl; 422 388 G4cout << " - Cross section per water molecule (cm^2)=" << tmp1/cm/cm << G4endl; 423 G4cout << " - Cross section per water molecule (cm^-1)=" << tmp1*densityWater/(1./cm) << G4endl; 389 G4cout << " - Cross section per water molecule (cm^-1)=" << 390 tmp1*material->GetAtomicNumDensityVector()[1]/(1./cm) << G4endl; 424 391 } 425 return tmp1* densityWater;392 return tmp1*material->GetAtomicNumDensityVector()[1]; 426 393 } 427 394 … … 434 401 G4cout << "---> Kinetic energy(eV)=" << k/eV << G4endl; 435 402 G4cout << " - Cross section per water molecule (cm^2)=" << tmp2/cm/cm << G4endl; 436 G4cout << " - Cross section per water molecule (cm^-1)=" << tmp2*densityWater/(1./cm) << G4endl; 403 G4cout << " - Cross section per water molecule (cm^-1)=" << tmp2* 404 material->GetAtomicNumDensityVector()[1]/(1./cm) << G4endl; 437 405 } 438 return tmp2* densityWater;406 return tmp2*material->GetAtomicNumDensityVector()[1]; 439 407 } 440 408 } … … 454 422 G4cout << "---> Kinetic energy(eV)=" << k/eV << G4endl; 455 423 G4cout << " - Cross section per water molecule (cm^2)=" << sigma/cm/cm << G4endl; 456 G4cout << " - Cross section per water molecule (cm^-1)=" << sigma*densityWater/(1./cm) << G4endl; 424 G4cout << " - Cross section per water molecule (cm^-1)=" << sigma* 425 material->GetAtomicNumDensityVector()[1]/(1./cm) << G4endl; 457 426 } 458 427 459 428 } // if (waterMaterial) 460 429 461 return sigma* densityWater;430 return sigma*material->GetAtomicNumDensityVector()[1]; 462 431 463 432 } … … 562 531 fvect->push_back(dp); 563 532 564 /*565 // creating neutral water molechule...566 567 G4DNAGenericMoleculeManager *instance;568 instance = G4DNAGenericMoleculeManager::Instance();569 G4ParticleDefinition* waterDef = NULL;570 G4Molecule* water = instance->GetMolecule("H2O");571 waterDef = (G4ParticleDefinition*)water;572 573 direction.set(0.,0.,0.);574 575 //G4DynamicParticle* dynamicWater = new G4DynamicParticle(waterDef, direction, bindingEnergy);576 G4DynamicMolecule* dynamicWater = new G4DynamicMolecule(water, direction, bindingEnergy);577 //dynamicWater->RemoveElectron(ionizationShell, 1);578 579 G4DynamicMolecule* dynamicWater2 = new G4DynamicMolecule(water, direction, bindingEnergy);580 G4DynamicMolecule* dynamicWater3 = new G4DynamicMolecule(water, direction, bindingEnergy);581 // insertion inside secondaries582 583 fvect->push_back(dynamicWater);584 fvect->push_back(dynamicWater2);585 fvect->push_back(dynamicWater3);586 */587 533 } 588 534 … … 623 569 G4double crossSectionMaximum = 0.; 624 570 625 for(G4double value=waterStructure.IonisationEnergy(shell); value<= 4.*waterStructure.IonisationEnergy(shell); value+=0.1*eV)571 for(G4double value=waterStructure.IonisationEnergy(shell); value<=5.*waterStructure.IonisationEnergy(shell) && k>=value ; value+=0.1*eV) 626 572 { 627 573 G4double differentialCrossSection = DifferentialCrossSection(particleDefinition, k, value, shell); … … 710 656 G4double alphaConst ; 711 657 658 const G4double Bj[5] = {12.61*eV, 14.73*eV, 18.55*eV, 32.20*eV, 539.7*eV}; 659 712 660 if (j == 4) 713 661 { … … 746 694 747 695 G4double wBig = (energyTransfer - waterStructure.IonisationEnergy(ionizationLevelIndex)); 748 G4double w = wBig / waterStructure.IonisationEnergy(ionizationLevelIndex); 696 if (wBig<0) return 0.; 697 698 G4double w = wBig / Bj[ionizationLevelIndex]; 749 699 G4double Ry = 13.6*eV; 750 700 … … 764 714 } 765 715 766 G4double S = 4.*pi * Bohr_radius*Bohr_radius * n * std::pow((Ry/ waterStructure.IonisationEnergy(ionizationLevelIndex)),2);767 G4double v2 = tau / waterStructure.IonisationEnergy(ionizationLevelIndex);716 G4double S = 4.*pi * Bohr_radius*Bohr_radius * n * std::pow((Ry/Bj[ionizationLevelIndex]),2); 717 G4double v2 = tau / Bj[ionizationLevelIndex]; 768 718 G4double v = std::sqrt(v2); 769 G4double wc = 4.*v2 - 2.*v - (Ry/(4.* waterStructure.IonisationEnergy(ionizationLevelIndex)));719 G4double wc = 4.*v2 - 2.*v - (Ry/(4.*Bj[ionizationLevelIndex])); 770 720 771 721 G4double L1 = (C1* std::pow(v,(D1))) / (1.+ E1*std::pow(v, (D1+4.))); … … 777 727 G4double F2 = (L2*H2)/(L2+H2); 778 728 779 G4double sigma = CorrectionFactor(particleDefinition, k/eV) 780 * Gj[j] * (S/waterStructure.IonisationEnergy(ionizationLevelIndex)) 729 G4double sigma = CorrectionFactor(particleDefinition, k) 730 * Gj[j] * (S/Bj[ionizationLevelIndex]) 731 * ( (F1+w*F2) / ( std::pow((1.+w),3) * ( 1.+std::exp(alphaConst*(w-wc)/v))) ); 732 733 if ( (particleDefinition == instance->GetIon("hydrogen")) && (ionizationLevelIndex==4)) 734 735 sigma = Gj[j] * (S/Bj[ionizationLevelIndex]) 781 736 * ( (F1+w*F2) / ( std::pow((1.+w),3) * ( 1.+std::exp(alphaConst*(w-wc)/v))) ); 782 737 … … 823 778 ) 824 779 { 825 sigma = Gj[j] * (S/ waterStructure.IonisationEnergy(ionizationLevelIndex)) * ( (F1+w*F2) / ( std::pow((1.+w),3) * ( 1.+std::exp(alphaConst*(w-wc)/v))) );780 sigma = Gj[j] * (S/Bj[ionizationLevelIndex]) * ( (F1+w*F2) / ( std::pow((1.+w),3) * ( 1.+std::exp(alphaConst*(w-wc)/v))) ); 826 781 827 782 G4double zEff = particleDefinition->GetPDGCharge() / eplus + particleDefinition->GetLeptonNumber(); … … 916 871 if (particleDefinition == instance->GetIon("hydrogen")) 917 872 { 918 G4double value = (std::log (k/eV)-4.2)/0.5;873 G4double value = (std::log10(k/eV)-4.2)/0.5; 919 874 return((0.8/(1+std::exp(value))) + 0.9); 920 875 } … … 932 887 // BEGIN PART 1/2 OF ELECTRON CORRECTION 933 888 934 // add ONE or TWO electron-water excitation for alpha+ and helium889 // add ONE or TWO electron-water ionisation for alpha+ and helium 935 890 936 891 G4DNAGenericIonsManager *instance; 937 892 instance = G4DNAGenericIonsManager::Instance(); 938 893 G4double kElectron(0); 939 G4double electronComponent(0); 894 940 895 G4DNACrossSectionDataSet * electronDataset = new G4DNACrossSectionDataSet (new G4LogLogInterpolation, eV, (1./3.343e22)*m*m); 941 896 … … 949 904 kElectron = k * 0.511/3728; 950 905 951 electronComponent = electronDataset->FindValue(kElectron);952 953 906 } 954 955 delete electronDataset;956 907 957 908 // END PART 1/2 OF ELECTRON CORRECTION … … 982 933 983 934 // BEGIN PART 2/2 OF ELECTRON CORRECTION 984 935 // Use only electron partial cross sections 936 985 937 if (particle == instance->GetIon("alpha+")->GetParticleName()) 986 {valuesBuffer[i]=table->GetComponent(i)->FindValue(k) + electron Component; }987 938 {valuesBuffer[i]=table->GetComponent(i)->FindValue(k) + electronDataset->GetComponent(i)->FindValue(kElectron); } 939 988 940 if (particle == instance->GetIon("helium")->GetParticleName()) 989 {valuesBuffer[i]=table->GetComponent(i)->FindValue(k) + 2*electron Component; }990 941 {valuesBuffer[i]=table->GetComponent(i)->FindValue(k) + 2*electronDataset->GetComponent(i)->FindValue(kElectron); } 942 991 943 // BEGIN PART 2/2 OF ELECTRON CORRECTION 992 944 … … 1001 953 { 1002 954 i--; 955 1003 956 1004 957 if (valuesBuffer[i] > value) 1005 958 { 1006 959 delete[] valuesBuffer; 960 961 if (electronDataset) delete electronDataset; 962 1007 963 return i; 1008 964 } … … 1018 974 G4Exception("G4DNARuddIonisationModel::RandomSelect: attempting to calculate cross section for wrong particle"); 1019 975 } 976 977 delete electronDataset; 1020 978 1021 979 return level;
Note: See TracChangeset
for help on using the changeset viewer.