Changeset 1192 for trunk/source/processes/electromagnetic/lowenergy/src
- Timestamp:
- Nov 19, 2009, 2:53:25 PM (15 years ago)
- Location:
- trunk/source/processes/electromagnetic/lowenergy/src
- Files:
-
- 127 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/source/processes/electromagnetic/lowenergy/src/G4AtomicDeexcitation.cc
r1055 r1192 26 26 // 27 27 // $Id: G4AtomicDeexcitation.cc,v 1.11 28 // GEANT4 tag $Name: geant4-09-03-beta-cand-01$28 // GEANT4 tag $Name: emlowen-V09-02-64 $ 29 29 // 30 30 // Authors: Elena Guardincerri (Elena.Guardincerri@ge.infn.it) … … 295 295 if(shellNum == maxNumOfShells) 296 296 { 297 // G4cout << "G4AtomicDeexcitation warning: No Auger transition found" << G4endl; 298 // G4cout << "Absorbed enrgy deposited locally" << G4endl; 299 G4Exception("G4AtomicDeexcitation: No Auger transition found"); 297 298 //G4Exception("G4AtomicDeexcitation: No Auger transition found"); 300 299 return 0; 301 300 } … … 303 302 while (shellId != (transitionManager->ReachableAugerShell(Z,shellNum)->FinalShellId()) ) ; 304 303 } 305 /* {306 307 if(shellNum == maxNumOfShells-1)308 {309 G4Exception("G4AtomicDeexcitation: No Auger tramsition found");310 }311 shellNum++;312 }*/313 314 315 304 316 305 -
trunk/source/processes/electromagnetic/lowenergy/src/G4AtomicTransitionManager.cc
r1007 r1192 26 26 // 27 27 // $Id: G4AtomicTransitionManager.cc,v 1.2 ???? 28 // GEANT4 tag $Name: geant4-09-02$28 // GEANT4 tag $Name: emlowen-V09-02-64 $ 29 29 // 30 30 // Authors: Elena Guardincerri (Elena.Guardincerri@ge.infn.it) … … 366 366 } 367 367 368 if (totalRadTransProb > 1) { 369 G4Exception( "Wrong Total Probability"); 370 return 0; 371 } 368 372 G4double totalNonRadTransProb= (1 - totalRadTransProb); 369 373 -
trunk/source/processes/electromagnetic/lowenergy/src/G4AugerData.cc
r1055 r1192 508 508 for (size_t a = 0; a <= NumberOfAuger(Z,i,id); a++) { 509 509 510 G4double e = StartShellEnergy(Z,i,id,a) 510 G4double e = StartShellEnergy(Z,i,id,a)/MeV; 511 511 G4double p = StartShellProb(Z,i,id,a); 512 512 G4int augerId = AugerShellId(Z, i, id, a); -
trunk/source/processes/electromagnetic/lowenergy/src/G4BremsstrahlungCrossSectionHandler.cc
r1055 r1192 24 24 // ******************************************************************** 25 25 // 26 // $Id: G4BremsstrahlungCrossSectionHandler.cc,v 1.1 0 2009/03/03 11:19:18 pandolaExp $27 // GEANT4 tag $Name: geant4-09-03-beta-cand-01$26 // $Id: G4BremsstrahlungCrossSectionHandler.cc,v 1.12 2009/09/27 10:47:42 sincerti Exp $ 27 // GEANT4 tag $Name: emlowen-V09-02-64 $ 28 28 // 29 29 // ------------------------------------------------------------------- … … 38 38 // Creation date: 25 September 2001 39 39 // 40 // Modifications: 40 // Modifications: 41 // 41 42 // 10.10.2001 MGP Revision to improve code quality and consistency with design 42 43 // 21.01.2003 VI cut per region 43 44 // 03.03.2009 LP Added public method to make a easier migration of 44 45 // G4LowEnergyBremsstrahlung to G4LivermoreBremsstrahlungModel 46 // 47 // 15 Jul 2009 Nicolas A. Karakatsanis 48 // 49 // - BuildCrossSectionForMaterials method was revised in order to calculate the 50 // logarithmic values of the loaded data. 51 // It retrieves the data values from the G4EMLOW data files but, then, calculates the 52 // respective log values and loads them to seperate data structures. 53 // The EM data sets, initialized this way, contain both non-log and log values. 54 // These initialized data sets can enhance the computing performance of data interpolation 55 // operations 56 // 57 // 58 // 45 59 // 46 60 // ------------------------------------------------------------------- … … 83 97 G4DataVector* energies; 84 98 G4DataVector* cs; 99 100 G4DataVector* log_energies; 101 G4DataVector* log_cs; 102 85 103 G4int nOfBins = energyVector.size(); 86 104 … … 105 123 106 124 G4int Z = (G4int) ((*elementVector)[i]->GetZ()); 125 107 126 energies = new G4DataVector; 108 127 cs = new G4DataVector; 128 129 log_energies = new G4DataVector; 130 log_cs = new G4DataVector; 131 109 132 G4double density = nAtomsPerVolume[i]; 110 133 … … 113 136 G4double e = energyVector[bin]; 114 137 energies->push_back(e); 138 if (e==0.) e=1e-300; 139 log_energies->push_back(std::log10(e)); 115 140 G4double value = 0.0; 116 141 … … 123 148 } 124 149 cs->push_back(value); 150 151 if (value==0.) value=1e-300; 152 log_cs->push_back(std::log10(value)); 125 153 } 126 154 G4VDataSetAlgorithm* algol = interp->Clone(); 127 G4VEMDataSet* elSet = new G4EMDataSet(i,energies,cs,algol,1.,1.); 155 156 //G4VEMDataSet* elSet = new G4EMDataSet(i,energies,cs,algol,1.,1.); 157 158 G4VEMDataSet* elSet = new G4EMDataSet(i,energies,cs,log_energies,log_cs,algol,1.,1.); 159 128 160 setForMat->AddComponent(elSet); 129 161 } -
trunk/source/processes/electromagnetic/lowenergy/src/G4BremsstrahlungParameters.cc
r1007 r1192 25 25 // 26 26 // 27 // $Id: G4BremsstrahlungParameters.cc,v 1. 19 2006/06/29 19:38:44 gunterExp $28 // GEANT4 tag $Name: geant4-09-02$27 // $Id: G4BremsstrahlungParameters.cc,v 1.20 2009/06/10 13:32:36 mantero Exp $ 28 // GEANT4 tag $Name: emlowen-V09-02-64 $ 29 29 // 30 30 // Author: Maria Grazia Pia (Maria.Grazia.Pia@cern.ch) -
trunk/source/processes/electromagnetic/lowenergy/src/G4CompositeEMDataSet.cc
r1007 r1192 25 25 // 26 26 // 27 // $Id: G4CompositeEMDataSet.cc,v 1.1 3 2008/03/17 13:40:53 piaExp $28 // GEANT4 tag $Name: geant4-09-02$27 // $Id: G4CompositeEMDataSet.cc,v 1.15 2009/09/25 07:41:34 sincerti Exp $ 28 // GEANT4 tag $Name: emlowen-V09-02-64 $ 29 29 // 30 30 // Author: Maria Grazia Pia (Maria.Grazia.Pia@cern.ch) … … 33 33 // ----------- 34 34 // 1 Aug 2001 MGP Created 35 // 36 // 15 Jul 2009 Nicolas A. Karakatsanis 37 // 38 // - LoadNonLogData method was created to load only the non-logarithmic data from G4EMLOW 39 // dataset. It is essentially performing the data loading operations as in the past. 40 // 41 // - LoadData method was revised in order to calculate the logarithmic values of the data 42 // It retrieves the data values from the G4EMLOW data files but, then, calculates the 43 // respective log values and loads them to seperate data structures. 44 // 45 // - SetLogEnergiesData method was cretaed to set logarithmic values to G4 data vectors. 46 // The EM data sets, initialized this way, contain both non-log and log values. 47 // These initialized data sets can enhance the computing performance of data interpolation 48 // operations 35 49 // 36 50 // ------------------------------------------------------------------- … … 114 128 } 115 129 130 void G4CompositeEMDataSet::SetLogEnergiesData(G4DataVector* argEnergies, 131 G4DataVector* argData, 132 G4DataVector* argLogEnergies, 133 G4DataVector* argLogData, 134 G4int argComponentId) 135 { 136 G4VEMDataSet * component(components[argComponentId]); 137 138 if (component) 139 { 140 component->SetLogEnergiesData(argEnergies, argData, argLogEnergies, argLogData, 0); 141 return; 142 } 143 144 std::ostringstream message; 145 message << "G4CompositeEMDataSet::SetEnergiesData - component " << argComponentId << " not found"; 146 147 G4Exception(message.str().c_str()); 148 } 149 150 116 151 G4bool G4CompositeEMDataSet::LoadData(const G4String& argFileName) 117 152 { … … 131 166 } 132 167 168 169 G4bool G4CompositeEMDataSet::LoadNonLogData(const G4String& argFileName) 170 { 171 CleanUpComponents(); 172 173 for (G4int z(minZ); z<maxZ; z++) 174 { 175 G4VEMDataSet* component = new G4EMDataSet(z, algorithm->Clone(), unitEnergies, unitData); 176 if (!component->LoadNonLogData(argFileName)) 177 { 178 delete component; 179 return false; 180 } 181 AddComponent(component); 182 } 183 return true; 184 } 133 185 134 186 -
trunk/source/processes/electromagnetic/lowenergy/src/G4CrossSectionChargeDecrease.cc
r1055 r1192 24 24 // ******************************************************************** 25 25 // 26 // $Id: G4CrossSectionChargeDecrease.cc,v 1. 5 2009/05/02 15:07:47 sincertiExp $27 // GEANT4 tag $Name: geant4-09-03-beta-cand-01$26 // $Id: G4CrossSectionChargeDecrease.cc,v 1.7 2009/06/11 15:47:08 mantero Exp $ 27 // GEANT4 tag $Name: emlowen-V09-02-64 $ 28 28 29 29 #include "G4CrossSectionChargeDecrease.hh" -
trunk/source/processes/electromagnetic/lowenergy/src/G4CrossSectionChargeDecreasePartial.cc
r1007 r1192 24 24 // ******************************************************************** 25 25 // 26 // $Id: G4CrossSectionChargeDecreasePartial.cc,v 1. 2 2008/07/14 20:47:34 sincertiExp $27 // GEANT4 tag $Name: geant4-09-02$26 // $Id: G4CrossSectionChargeDecreasePartial.cc,v 1.3 2009/06/10 13:32:36 mantero Exp $ 27 // GEANT4 tag $Name: emlowen-V09-02-64 $ 28 28 29 29 #include "G4CrossSectionChargeDecreasePartial.hh" -
trunk/source/processes/electromagnetic/lowenergy/src/G4CrossSectionChargeIncrease.cc
r1055 r1192 24 24 // ******************************************************************** 25 25 // 26 // $Id: G4CrossSectionChargeIncrease.cc,v 1. 5 2009/05/02 15:07:47 sincertiExp $27 // GEANT4 tag $Name: geant4-09-03-beta-cand-01$26 // $Id: G4CrossSectionChargeIncrease.cc,v 1.7 2009/06/11 15:47:08 mantero Exp $ 27 // GEANT4 tag $Name: emlowen-V09-02-64 $ 28 28 29 29 #include "G4CrossSectionChargeIncrease.hh" -
trunk/source/processes/electromagnetic/lowenergy/src/G4CrossSectionChargeIncreasePartial.cc
r1007 r1192 24 24 // ******************************************************************** 25 25 // 26 // $Id: G4CrossSectionChargeIncreasePartial.cc,v 1. 2 2008/07/14 20:47:34 sincertiExp $27 // GEANT4 tag $Name: geant4-09-02$26 // $Id: G4CrossSectionChargeIncreasePartial.cc,v 1.3 2009/06/10 13:32:36 mantero Exp $ 27 // GEANT4 tag $Name: emlowen-V09-02-64 $ 28 28 29 29 #include "G4CrossSectionChargeIncreasePartial.hh" -
trunk/source/processes/electromagnetic/lowenergy/src/G4CrossSectionChargeTransferCH.cc
r1007 r1192 25 25 // 26 26 // 27 // $Id: G4CrossSectionChargeTransferCH.cc,v 1. 3 2008/03/25 16:00:20 piaExp $28 // GEANT4 tag $Name: geant4-09-02$27 // $Id: G4CrossSectionChargeTransferCH.cc,v 1.4 2009/06/10 13:32:36 mantero Exp $ 28 // GEANT4 tag $Name: emlowen-V09-02-64 $ 29 29 // 30 30 // Contact Author: Maria Grazia Pia (Maria.Grazia.Pia@cern.ch) -
trunk/source/processes/electromagnetic/lowenergy/src/G4CrossSectionChargeTransferExp.cc
r1007 r1192 25 25 // 26 26 // 27 // $Id: G4CrossSectionChargeTransferExp.cc,v 1. 5 2008/06/27 12:22:25 sincertiExp $28 // GEANT4 tag $Name: geant4-09-02$27 // $Id: G4CrossSectionChargeTransferExp.cc,v 1.6 2009/06/10 13:32:36 mantero Exp $ 28 // GEANT4 tag $Name: emlowen-V09-02-64 $ 29 29 // 30 30 // Contact Author: Maria Grazia Pia (Maria.Grazia.Pia@cern.ch) -
trunk/source/processes/electromagnetic/lowenergy/src/G4CrossSectionElasticChampion.cc
r1055 r1192 24 24 // ******************************************************************** 25 25 // 26 // $Id: G4CrossSectionElasticChampion.cc,v 1. 5 2009/05/02 15:07:47 sincertiExp $27 // GEANT4 tag $Name: geant4-09-03-beta-cand-01$26 // $Id: G4CrossSectionElasticChampion.cc,v 1.7 2009/06/11 15:47:08 mantero Exp $ 27 // GEANT4 tag $Name: emlowen-V09-02-64 $ 28 28 // ------------------------------------------------------------------- 29 29 -
trunk/source/processes/electromagnetic/lowenergy/src/G4CrossSectionElasticScreenedRutherford.cc
r1007 r1192 26 26 // 27 27 // $Id: G4CrossSectionElasticScreenedRutherford.cc,v 1.1 2007/10/12 23:11:41 pia Exp $ 28 // GEANT4 tag $Name: geant4-09-02$28 // GEANT4 tag $Name: emlowen-V09-02-64 $ 29 29 // 30 30 // Contact Author: Maria Grazia Pia (Maria.Grazia.Pia@cern.ch) -
trunk/source/processes/electromagnetic/lowenergy/src/G4CrossSectionElasticScreenedRutherfordHE.cc
r1055 r1192 24 24 // ******************************************************************** 25 25 // 26 // $Id: G4CrossSectionElasticScreenedRutherfordHE.cc,v 1. 3 2009/05/02 15:07:47 sincertiExp $27 // GEANT4 tag $Name: geant4-09-03-beta-cand-01$26 // $Id: G4CrossSectionElasticScreenedRutherfordHE.cc,v 1.5 2009/06/11 15:47:08 mantero Exp $ 27 // GEANT4 tag $Name: emlowen-V09-02-64 $ 28 28 29 29 #include "G4CrossSectionElasticScreenedRutherfordHE.hh" -
trunk/source/processes/electromagnetic/lowenergy/src/G4CrossSectionElasticScreenedRutherfordLE.cc
r1055 r1192 24 24 // ******************************************************************** 25 25 // 26 // $Id: G4CrossSectionElasticScreenedRutherfordLE.cc,v 1. 3 2009/05/02 15:07:47 sincertiExp $27 // GEANT4 tag $Name: geant4-09-03-beta-cand-01$26 // $Id: G4CrossSectionElasticScreenedRutherfordLE.cc,v 1.5 2009/06/11 15:47:08 mantero Exp $ 27 // GEANT4 tag $Name: emlowen-V09-02-64 $ 28 28 29 29 #include "G4CrossSectionElasticScreenedRutherfordLE.hh" -
trunk/source/processes/electromagnetic/lowenergy/src/G4CrossSectionExcitationBorn.cc
r1055 r1192 24 24 // ******************************************************************** 25 25 // 26 // $Id: G4CrossSectionExcitationBorn.cc,v 1. 5 2009/05/02 15:07:47 sincertiExp $27 // GEANT4 tag $Name: geant4-09-03-beta-cand-01$26 // $Id: G4CrossSectionExcitationBorn.cc,v 1.7 2009/06/11 15:47:08 mantero Exp $ 27 // GEANT4 tag $Name: emlowen-V09-02-64 $ 28 28 29 29 #include "G4CrossSectionExcitationBorn.hh" -
trunk/source/processes/electromagnetic/lowenergy/src/G4CrossSectionExcitationBornPartial.cc
r1007 r1192 24 24 // ******************************************************************** 25 25 // 26 // $Id: G4CrossSectionExcitationBornPartial.cc,v 1. 3 2008/07/14 20:47:34 sincertiExp $27 // GEANT4 tag $Name: geant4-09-02$26 // $Id: G4CrossSectionExcitationBornPartial.cc,v 1.4 2009/06/10 13:32:36 mantero Exp $ 27 // GEANT4 tag $Name: emlowen-V09-02-64 $ 28 28 29 29 #include "G4CrossSectionExcitationBornPartial.hh" -
trunk/source/processes/electromagnetic/lowenergy/src/G4CrossSectionExcitationEmfietzoglou.cc
r1055 r1192 24 24 // ******************************************************************** 25 25 // 26 // $Id: G4CrossSectionExcitationEmfietzoglou.cc,v 1. 6 2009/05/02 15:07:47 sincertiExp $27 // GEANT4 tag $Name: geant4-09-03-beta-cand-01$26 // $Id: G4CrossSectionExcitationEmfietzoglou.cc,v 1.8 2009/06/11 15:47:08 mantero Exp $ 27 // GEANT4 tag $Name: emlowen-V09-02-64 $ 28 28 29 29 #include "G4CrossSectionExcitationEmfietzoglou.hh" -
trunk/source/processes/electromagnetic/lowenergy/src/G4CrossSectionExcitationEmfietzoglouPartial.cc
r1007 r1192 24 24 // ******************************************************************** 25 25 // 26 // $Id: G4CrossSectionExcitationEmfietzoglouPartial.cc,v 1. 3 2008/07/14 20:47:34 sincertiExp $27 // GEANT4 tag $Name: geant4-09-02$26 // $Id: G4CrossSectionExcitationEmfietzoglouPartial.cc,v 1.4 2009/06/10 13:32:36 mantero Exp $ 27 // GEANT4 tag $Name: emlowen-V09-02-64 $ 28 28 29 29 #include "G4CrossSectionExcitationEmfietzoglouPartial.hh" -
trunk/source/processes/electromagnetic/lowenergy/src/G4CrossSectionExcitationMillerGreen.cc
r1055 r1192 24 24 // ******************************************************************** 25 25 // 26 // $Id: G4CrossSectionExcitationMillerGreen.cc,v 1. 5 2009/05/02 15:07:47 sincertiExp $27 // GEANT4 tag $Name: geant4-09-03-beta-cand-01$26 // $Id: G4CrossSectionExcitationMillerGreen.cc,v 1.7 2009/06/11 15:47:08 mantero Exp $ 27 // GEANT4 tag $Name: emlowen-V09-02-64 $ 28 28 29 29 #include "G4CrossSectionExcitationMillerGreen.hh" -
trunk/source/processes/electromagnetic/lowenergy/src/G4CrossSectionExcitationMillerGreenPartial.cc
r1055 r1192 24 24 // ******************************************************************** 25 25 // 26 // $Id: G4CrossSectionExcitationMillerGreenPartial.cc,v 1. 3 2009/01/20 07:40:53 sincertiExp $27 // GEANT4 tag $Name: geant4-09-03-beta-cand-01$26 // $Id: G4CrossSectionExcitationMillerGreenPartial.cc,v 1.4 2009/06/10 13:32:36 mantero Exp $ 27 // GEANT4 tag $Name: emlowen-V09-02-64 $ 28 28 29 29 #include "G4CrossSectionExcitationMillerGreenPartial.hh" -
trunk/source/processes/electromagnetic/lowenergy/src/G4CrossSectionHandler.cc
r1007 r1192 25 25 // 26 26 // 27 // $Id: G4CrossSectionHandler.cc,v 1. 18 2006/06/29 19:38:48 gunterExp $28 // GEANT4 tag $Name: geant4-09-02$27 // $Id: G4CrossSectionHandler.cc,v 1.21 2009/09/27 10:47:42 sincerti Exp $ 28 // GEANT4 tag $Name: emlowen-V09-02-64 $ 29 29 // 30 30 // Author: Maria Grazia Pia (Maria.Grazia.Pia@cern.ch) … … 35 35 // 19 Jul 2002 VI Create composite data set for material 36 36 // 24 Apr 2003 VI Cut per region mfpt 37 // 38 // 15 Jul 2009 Nicolas A. Karakatsanis 39 // 40 // - BuildCrossSectionForMaterials method was revised in order to calculate the 41 // logarithmic values of the loaded data. 42 // It retrieves the data values from the G4EMLOW data files but, then, calculates the 43 // respective log values and loads them to seperate data structures. 44 // The EM data sets, initialized this way, contain both non-log and log values. 45 // These initialized data sets can enhance the computing performance of data interpolation 46 // operations 37 47 // 38 48 // ------------------------------------------------------------------- … … 66 76 G4DataVector* data; 67 77 78 G4DataVector* log_energies; 79 G4DataVector* log_data; 80 68 81 std::vector<G4VEMDataSet*>* matCrossSections = new std::vector<G4VEMDataSet*>; 69 82 … … 95 108 data = new G4DataVector; 96 109 110 log_energies = new G4DataVector; 111 log_data = new G4DataVector; 112 97 113 98 114 for (size_t bin=0; bin<nOfBins; bin++) … … 100 116 G4double e = energyVector[bin]; 101 117 energies->push_back(e); 118 if (e==0.) e=1e-300; 119 log_energies->push_back(std::log10(e)); 102 120 G4double cross = density*FindValue(Z,e); 103 121 data->push_back(cross); 122 if (cross==0.) cross=1e-300; 123 log_data->push_back(std::log10(cross)); 104 124 } 105 125 106 126 G4VDataSetAlgorithm* algo1 = interpolationAlgo->Clone(); 107 G4VEMDataSet* elSet = new G4EMDataSet(i,energies,data,algo1,1.,1.); 127 128 // G4VEMDataSet* elSet = new G4EMDataSet(i,energies,data,algo1,1.,1.); 129 130 G4VEMDataSet* elSet = new G4EMDataSet(i,energies,data,log_energies,log_data,algo1,1.,1.); 131 108 132 setForMat->AddComponent(elSet); 109 133 } -
trunk/source/processes/electromagnetic/lowenergy/src/G4CrossSectionIonisationBorn.cc
r1055 r1192 24 24 // ******************************************************************** 25 25 // 26 // $Id: G4CrossSectionIonisationBorn.cc,v 1. 5 2009/05/02 15:07:47 sincertiExp $27 // GEANT4 tag $Name: geant4-09-03-beta-cand-01$26 // $Id: G4CrossSectionIonisationBorn.cc,v 1.7 2009/06/11 15:47:08 mantero Exp $ 27 // GEANT4 tag $Name: emlowen-V09-02-64 $ 28 28 29 29 #include "G4CrossSectionIonisationBorn.hh" -
trunk/source/processes/electromagnetic/lowenergy/src/G4CrossSectionIonisationBornElectron.cc
r1007 r1192 26 26 // 27 27 // $Id: G4CrossSectionIonisationBornElectron.cc,v 1.2 2007/11/08 18:51:34 pia Exp $ 28 // GEANT4 tag $Name: geant4-09-02$28 // GEANT4 tag $Name: emlowen-V09-02-64 $ 29 29 // 30 30 // Contact Author: Maria Grazia Pia (Maria.Grazia.Pia@cern.ch) -
trunk/source/processes/electromagnetic/lowenergy/src/G4CrossSectionIonisationBornPartial.cc
r1055 r1192 24 24 // ******************************************************************** 25 25 // 26 // $Id: G4CrossSectionIonisationBornPartial.cc,v 1. 5 2009/01/20 07:40:53 sincertiExp $27 // GEANT4 tag $Name: geant4-09-03-beta-cand-01$26 // $Id: G4CrossSectionIonisationBornPartial.cc,v 1.6 2009/06/10 13:32:36 mantero Exp $ 27 // GEANT4 tag $Name: emlowen-V09-02-64 $ 28 28 29 29 #include "G4CrossSectionIonisationBornPartial.hh" -
trunk/source/processes/electromagnetic/lowenergy/src/G4CrossSectionIonisationBornPartialElectron.cc
r1007 r1192 26 26 // 27 27 // $Id: G4CrossSectionIonisationBornPartialElectron.cc,v 1.1 2007/10/15 08:57:54 pia Exp $ 28 // GEANT4 tag $Name: geant4-09-02$28 // GEANT4 tag $Name: emlowen-V09-02-64 $ 29 29 // 30 30 // Contact Author: Maria Grazia Pia (Maria.Grazia.Pia@cern.ch) -
trunk/source/processes/electromagnetic/lowenergy/src/G4CrossSectionIonisationRudd.cc
r1055 r1192 24 24 // ******************************************************************** 25 25 // 26 // $Id: G4CrossSectionIonisationRudd.cc,v 1. 5 2009/05/02 15:07:47 sincertiExp $27 // GEANT4 tag $Name: geant4-09-03-beta-cand-01$26 // $Id: G4CrossSectionIonisationRudd.cc,v 1.7 2009/06/11 15:47:08 mantero Exp $ 27 // GEANT4 tag $Name: emlowen-V09-02-64 $ 28 28 29 29 #include "G4CrossSectionIonisationRudd.hh" -
trunk/source/processes/electromagnetic/lowenergy/src/G4CrossSectionIonisationRuddPartial.cc
r1007 r1192 24 24 // ******************************************************************** 25 25 // 26 // $Id: G4CrossSectionIonisationRuddPartial.cc,v 1. 4 2008/07/14 20:47:34 sincertiExp $27 // GEANT4 tag $Name: geant4-09-02$26 // $Id: G4CrossSectionIonisationRuddPartial.cc,v 1.5 2009/06/10 13:32:36 mantero Exp $ 27 // GEANT4 tag $Name: emlowen-V09-02-64 $ 28 28 29 29 #include "G4CrossSectionIonisationRuddPartial.hh" -
trunk/source/processes/electromagnetic/lowenergy/src/G4CrossSectionKill.cc
r1007 r1192 26 26 // 27 27 // $Id: G4CrossSectionKill.cc,v 1.1 2007/11/09 20:26:12 pia Exp $ 28 // GEANT4 tag $Name: geant4-09-02$28 // GEANT4 tag $Name: emlowen-V09-02-64 $ 29 29 // 30 30 // Contact Author: Maria Grazia Pia (Maria.Grazia.Pia@cern.ch) -
trunk/source/processes/electromagnetic/lowenergy/src/G4CrossSectionPsCreationChampion.cc
r1007 r1192 24 24 // ******************************************************************** 25 25 // 26 // $Id: G4CrossSectionPsCreationChampion.cc,v 1. 1 2008/07/16 19:01:07 sincertiExp $27 // GEANT4 tag $Name: geant4-09-02$26 // $Id: G4CrossSectionPsCreationChampion.cc,v 1.2 2009/06/10 13:32:36 mantero Exp $ 27 // GEANT4 tag $Name: emlowen-V09-02-64 $ 28 28 // ------------------------------------------------------------------- 29 29 -
trunk/source/processes/electromagnetic/lowenergy/src/G4CrossSectionPsCreationChampionPartial.cc
r1007 r1192 24 24 // ******************************************************************** 25 25 // 26 // $Id: G4CrossSectionPsCreationChampionPartial.cc,v 1. 1 2008/07/16 19:01:07 sincertiExp $27 // GEANT4 tag $Name: geant4-09-02$26 // $Id: G4CrossSectionPsCreationChampionPartial.cc,v 1.2 2009/06/10 13:32:36 mantero Exp $ 27 // GEANT4 tag $Name: emlowen-V09-02-64 $ 28 28 // ------------------------------------------------------------------- 29 29 -
trunk/source/processes/electromagnetic/lowenergy/src/G4DNABornExcitationModel.cc
r1058 r1192 24 24 // ******************************************************************** 25 25 // 26 // $Id: G4DNABornExcitationModel.cc,v 1. 3 2009/02/16 11:00:11sincerti Exp $27 // GEANT4 tag $Name: geant4-09-03-beta-cand-01$26 // $Id: G4DNABornExcitationModel.cc,v 1.7 2009/08/31 14:03:29 sincerti Exp $ 27 // GEANT4 tag $Name: emlowen-V09-02-64 $ 28 28 // 29 29 … … 42 42 43 43 lowEnergyLimit = 500 * keV; 44 highEnergyLimit = 10 * MeV;44 highEnergyLimit = 100 * MeV; 45 45 SetLowEnergyLimit(lowEnergyLimit); 46 46 SetHighEnergyLimit(highEnergyLimit); … … 60 60 // 61 61 62 G4cout << "Born excitation model is constructed " << G4endl 63 << "Energy range: " 64 << lowEnergyLimit / keV << " keV - " 65 << highEnergyLimit / MeV << " MeV" 66 << G4endl; 67 62 if( verboseLevel>0 ) 63 { 64 G4cout << "Born excitation model is constructed " << G4endl 65 << "Energy range: " 66 << lowEnergyLimit / keV << " keV - " 67 << highEnergyLimit / MeV << " MeV" 68 << G4endl; 69 } 70 68 71 } 69 72 … … 109 112 } 110 113 111 G4cout << "Born excitation model is initialized " << G4endl 112 << "Energy range: " 113 << LowEnergyLimit() / keV << " keV - " 114 << HighEnergyLimit() / MeV << " MeV " << G4endl; 115 114 if( verboseLevel>0 ) 115 { 116 G4cout << "Born excitation model is initialized " << G4endl 117 << "Energy range: " 118 << LowEnergyLimit() / keV << " keV - " 119 << HighEnergyLimit() / MeV << " MeV " << G4endl; 120 } 121 116 122 if(!isInitialised) 117 123 { … … 144 150 const G4Material* material = couple->GetMaterial(); 145 151 146 size_t j = material->GetNumberOfElements(); 147 while (j>0) 152 if (material->GetName() == "G4_WATER") 148 153 { 149 j--; 150 const G4Element* element(material->GetElement(j)); 151 if (element->GetZ() == 8.) 152 { 153 G4double density = material->GetAtomicNumDensityVector()[j]; 154 if (density > 0.) 155 { 156 flagMaterialIsWater = true; 157 densityWater = density; 158 159 if (verboseLevel > 3) 160 G4cout << "Water material is found with density(cm^-3)=" << density/(cm*cm*cm) << G4endl; 161 } 162 } 154 G4double density = material->GetAtomicNumDensityVector()[1]; 155 flagMaterialIsWater = true; 156 densityWater = density; 157 158 if (verboseLevel > 3) 159 G4cout << "****** Water material is found with density(cm^-3)=" << density/(cm*cm*cm) << G4endl; 163 160 } 164 161 165 162 } 166 } // if(numOfCouples>0) 163 164 } // if(numOfCouples>0) 167 165 168 166 } // if (theCoupleTable) -
trunk/source/processes/electromagnetic/lowenergy/src/G4DNABornIonisationModel.cc
r1058 r1192 1 // 1 2 // ******************************************************************** 2 3 // * License and Disclaimer * … … 23 24 // ******************************************************************** 24 25 // 25 // $Id: G4DNABornIonisationModel.cc,v 1. 4 2009/02/16 11:00:11sincerti Exp $26 // GEANT4 tag $Name: geant4-09-03-beta-cand-01$26 // $Id: G4DNABornIonisationModel.cc,v 1.14 2009/11/12 03:08:58 sincerti Exp $ 27 // GEANT4 tag $Name: emlowen-V09-02-64 $ 27 28 // 28 29 29 30 #include "G4DNABornIonisationModel.hh" 31 //#include "G4DynamicMolecule.hh" 30 32 31 33 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo.... … … 47 49 // 4 = entering in methods 48 50 49 G4cout << "Born ionisation model is constructed " << G4endl; 51 if( verboseLevel>0 ) 52 { 53 G4cout << "Born ionisation model is constructed " << G4endl; 54 } 50 55 } 51 56 … … 100 105 tableFile[electron] = fileElectron; 101 106 102 lowEnergyLimit[electron] = 1 2.61* eV;103 highEnergyLimit[electron] = 30. * keV;107 lowEnergyLimit[electron] = 11. * eV; 108 highEnergyLimit[electron] = 1. * MeV; 104 109 105 110 // Cross section … … 154 159 155 160 lowEnergyLimit[proton] = 500. * keV; 156 highEnergyLimit[proton] = 10 . * MeV;161 highEnergyLimit[proton] = 100. * MeV; 157 162 158 163 // Cross section … … 210 215 } 211 216 212 G4cout << "Born ionisation model is initialized " << G4endl 213 << "Energy range: " 214 << LowEnergyLimit() / eV << " eV - " 215 << HighEnergyLimit() / keV << " keV for " 216 << particle->GetParticleName() 217 << G4endl; 218 217 if( verboseLevel>0 ) 218 { 219 G4cout << "Born ionisation model is initialized " << G4endl 220 << "Energy range: " 221 << LowEnergyLimit() / eV << " eV - " 222 << HighEnergyLimit() / keV << " keV for " 223 << particle->GetParticleName() 224 << G4endl; 225 } 226 219 227 // 220 228 … … 249 257 const G4Material* material = couple->GetMaterial(); 250 258 251 size_t j = material->GetNumberOfElements(); 252 while (j>0) 259 if (material->GetName() == "G4_WATER") 253 260 { 254 j--; 255 const G4Element* element(material->GetElement(j)); 256 if (element->GetZ() == 8.) 257 { 258 G4double density = material->GetAtomicNumDensityVector()[j]; 259 if (density > 0.) 260 { 261 flagMaterialIsWater = true; 262 densityWater = density; 263 264 if (verboseLevel > 3) 265 G4cout << "Water material is found with density(cm^-3)=" << density/(cm*cm*cm) << G4endl; 266 } 267 } 261 G4double density = material->GetAtomicNumDensityVector()[1]; 262 flagMaterialIsWater = true; 263 densityWater = density; 264 265 if (verboseLevel > 3) 266 G4cout << "****** Water material is found with density(cm^-3)=" << density/(cm*cm*cm) << G4endl; 268 267 } 269 268 270 269 } 271 } // if(numOfCouples>0) 270 271 } // if(numOfCouples>0) 272 272 273 273 } // if (theCoupleTable) … … 429 429 G4DynamicParticle* dp = new G4DynamicParticle (G4Electron::Electron(),deltaDirection,secondaryKinetic) ; 430 430 fvect->push_back(dp); 431 /* 432 // creating neutral water molechule... 433 434 G4DNAGenericMoleculeManager *instance; 435 instance = G4DNAGenericMoleculeManager::Instance(); 436 G4ParticleDefinition* waterDef = NULL; 437 G4Molecule* water = instance->GetMolecule("H2O"); 438 waterDef = (G4ParticleDefinition*)water; 439 440 direction.set(0.,0.,0.); 441 442 //G4DynamicParticle* dynamicWater = new G4DynamicParticle(waterDef, direction, bindingEnergy); 443 G4DynamicMolecule* dynamicWater = new G4DynamicMolecule(water, direction, bindingEnergy); 444 445 446 //dynamicWater->RemoveElectron(ionizationShell, 1); 447 448 G4DynamicMolecule* dynamicWater2 = new G4DynamicMolecule(water, direction, bindingEnergy); 449 G4DynamicMolecule* dynamicWater3 = new G4DynamicMolecule(water, direction, bindingEnergy); 450 451 fvect->push_back(dynamicWater); 452 fvect->push_back(dynamicWater2); 453 fvect->push_back(dynamicWater3); 454 */ 431 455 } 432 456 … … 444 468 else maximumEnergyTransfer = (k+waterStructure.IonisationEnergy(shell))/2.; 445 469 470 // SI : original method 471 /* 446 472 G4double crossSectionMaximum = 0.; 447 473 for(G4double value=waterStructure.IonisationEnergy(shell); value<=maximumEnergyTransfer; value+=0.1*eV) … … 450 476 if(differentialCrossSection >= crossSectionMaximum) crossSectionMaximum = differentialCrossSection; 451 477 } 478 */ 479 480 481 // SI : alternative method 482 483 G4double crossSectionMaximum = 0.; 484 485 G4double minEnergy = waterStructure.IonisationEnergy(shell); 486 G4double maxEnergy = maximumEnergyTransfer; 487 G4int nEnergySteps = 50; 488 489 G4double value(minEnergy); 490 G4double stpEnergy(std::pow(maxEnergy/value, 1./static_cast<G4double>(nEnergySteps-1))); 491 G4int step(nEnergySteps); 492 while (step>0) 493 { 494 step--; 495 G4double differentialCrossSection = DifferentialCrossSection(particleDefinition, k/eV, value/eV, shell); 496 if(differentialCrossSection >= crossSectionMaximum) crossSectionMaximum = differentialCrossSection; 497 value*=stpEnergy; 498 } 499 // 452 500 453 501 G4double secondaryElectronKineticEnergy=0.; … … 552 600 553 601 // SI : the following condition avoids situations where energyTransfer >last vector element 554 if (energyTransfer <= eVecm[(*t1)].back() )602 if (energyTransfer <= eVecm[(*t1)].back() && energyTransfer <= eVecm[(*t2)].back() ) 555 603 { 556 604 std::vector<double>::iterator e12 = std::upper_bound(eVecm[(*t1)].begin(),eVecm[(*t1)].end(), energyTransfer); -
trunk/source/processes/electromagnetic/lowenergy/src/G4DNAChampionElasticModel.cc
r1058 r1192 24 24 // ******************************************************************** 25 25 // 26 // $Id: G4DNAChampionElasticModel.cc,v 1. 5 2009/04/29 17:25:21sincerti Exp $27 // GEANT4 tag $Name: geant4-09-03-beta-cand-01$26 // $Id: G4DNAChampionElasticModel.cc,v 1.10 2009/11/03 15:04:25 sincerti Exp $ 27 // GEANT4 tag $Name: emlowen-V09-02-64 $ 28 28 // 29 29 … … 43 43 killBelowEnergy = 8.23*eV; // Minimum e- energy for energy loss by excitation 44 44 lowEnergyLimit = 0 * eV; 45 lowEnergyLimitOfModel = 7 * eV; // The model lower energy is 7eV45 lowEnergyLimitOfModel = 7.4 * eV; // The model lower energy is 7.4 eV 46 46 highEnergyLimit = 10 * MeV; 47 47 SetLowEnergyLimit(lowEnergyLimit); … … 56 56 // 4 = entering in methods 57 57 58 G4cout << "Champion Elastic model is constructed " << G4endl 59 << "Energy range: " 60 << lowEnergyLimit / eV << " eV - " 61 << highEnergyLimit / MeV << " MeV" 62 << G4endl; 63 58 if( verboseLevel>0 ) 59 { 60 G4cout << "Champion Elastic model is constructed " << G4endl 61 << "Energy range: " 62 << lowEnergyLimit / eV << " eV - " 63 << highEnergyLimit / MeV << " MeV" 64 << G4endl; 65 } 64 66 } 65 67 … … 174 176 G4cout << "Loaded cross section files for Champion Elastic model" << G4endl; 175 177 176 G4cout << "Champion Elastic model is initialized " << G4endl 177 << "Energy range: " 178 << LowEnergyLimit() / eV << " eV - " 179 << HighEnergyLimit() / MeV << " MeV" 180 << G4endl; 178 if( verboseLevel>0 ) 179 { 180 G4cout << "Champion Elastic model is initialized " << G4endl 181 << "Energy range: " 182 << LowEnergyLimit() / eV << " eV - " 183 << HighEnergyLimit() / MeV << " MeV" 184 << G4endl; 185 } 181 186 182 187 if(!isInitialised) … … 210 215 const G4Material* material = couple->GetMaterial(); 211 216 212 size_t j = material->GetNumberOfElements(); 213 while (j>0) 217 if (material->GetName() == "G4_WATER") 214 218 { 215 j--; 216 const G4Element* element(material->GetElement(j)); 217 if (element->GetZ() == 8.) 218 { 219 G4double density = material->GetAtomicNumDensityVector()[j]; 220 if (density > 0.) 221 { 222 flagMaterialIsWater = true; 223 densityWater = density; 224 225 if (verboseLevel > 3) 226 G4cout << "Water material is found with density(cm^-3)=" << density/(cm*cm*cm) << G4endl; 227 } 228 } 219 G4double density = material->GetAtomicNumDensityVector()[1]; 220 flagMaterialIsWater = true; 221 densityWater = density; 222 223 if (verboseLevel > 3) 224 G4cout << "****** Water material is found with density(cm^-3)=" << density/(cm*cm*cm) << G4endl; 229 225 } 230 226 231 227 } 232 } // if(numOfCouples>0) 228 229 } // if(numOfCouples>0) 233 230 234 231 } // if (theCoupleTable) -
trunk/source/processes/electromagnetic/lowenergy/src/G4DNAChargeDecrease.cc
r1058 r1192 25 25 // 26 26 // $Id: G4DNAChargeDecrease.cc,v 1.3 2009/03/04 13:28:49 sincerti Exp $ 27 // GEANT4 tag $Name: geant4-09-03-beta-cand-01$27 // GEANT4 tag $Name: emlowen-V09-02-64 $ 28 28 29 29 #include "G4DNAChargeDecrease.hh" -
trunk/source/processes/electromagnetic/lowenergy/src/G4DNAChargeIncrease.cc
r1058 r1192 25 25 // 26 26 // $Id: G4DNAChargeIncrease.cc,v 1.3 2009/03/04 13:28:49 sincerti Exp $ 27 // GEANT4 tag $Name: geant4-09-03-beta-cand-01$27 // GEANT4 tag $Name: emlowen-V09-02-64 $ 28 28 29 29 #include "G4DNAChargeIncrease.hh" -
trunk/source/processes/electromagnetic/lowenergy/src/G4DNACrossSectionDataSet.cc
r1007 r1192 26 26 // 27 27 28 // $Id: G4DNACrossSectionDataSet.cc,v 1. 7 2007/11/09 18:06:26 piaExp $29 // GEANT4 tag $Name: geant4-09-02$28 // $Id: G4DNACrossSectionDataSet.cc,v 1.11 2009/11/12 10:05:30 sincerti Exp $ 29 // GEANT4 tag $Name: emlowen-V09-02-64 $ 30 30 // 31 31 // Author: Riccardo Capra <capra@ge.infn.it> … … 35 35 // History: 36 36 // ----------- 37 // 30 Jun 2005 RC Created 38 // 14 Oct 2007 MGP Removed inheritance from concrete class G4ShellEMDataSet 37 // 30 Jun 2005 RC Created 38 // 14 Oct 2007 MGP Removed inheritance from concrete class G4ShellEMDataSet 39 // 40 // 15 Jul 2009 N.A.Karakatsanis 41 // 42 // - LoadNonLogData method was created to load only the non-logarithmic data from G4EMLOW 43 // dataset. It is essentially performing the data loading operations as in the past. 44 // 45 // - LoadData method was revised in order to calculate the logarithmic values of the data 46 // It retrieves the data values from the G4EMLOW data files but, then, calculates the 47 // respective log values and loads them to seperate data structures. 48 // 49 // - SetLogEnergiesData method was cretaed to set logarithmic values to G4 data vectors. 50 // The EM data sets, initialized this way, contain both non-log and log values. 51 // These initialized data sets can enhance the computing performance of data interpolation 52 // operations 53 // 54 // 55 // ------------------------------------------------------------------- 39 56 40 57 … … 66 83 } 67 84 68 69 85 G4bool G4DNACrossSectionDataSet::LoadData(const G4String & argFileName) 70 86 { … … 84 100 85 101 std::vector<G4DataVector *> columns; 102 std::vector<G4DataVector *> log_columns; 103 86 104 std::stringstream *stream(new std::stringstream); 87 105 char c; … … 110 128 111 129 while (i>=columns.size()) 112 columns.push_back(new G4DataVector); 130 { 131 columns.push_back(new G4DataVector); 132 log_columns.push_back(new G4DataVector); 133 } 113 134 114 135 columns[i]->push_back(value); 136 137 // N. A. Karakatsanis 138 // A condition is applied to check if negative or zero values are present in the dataset. 139 // If yes, then a near-zero value is applied to allow the computation of the logarithmic value 140 // If a value is zero, this simplification is acceptable 141 // If a value is negative, then it is not acceptable and the data of the particular column of 142 // logarithmic values should not be used by interpolation methods. 143 // 144 // Therefore, G4LogLogInterpolation and G4LinLogLogInterpolation should not be used if negative values are present. 145 // Instead, G4LinInterpolation is safe in every case 146 // SemiLogInterpolation is safe only if the energy columns are non-negative 147 // G4LinLogInterpolation is safe only if the cross section data columns are non-negative 148 149 if (value <=0.) value = 1e-300; 150 log_columns[i]->push_back(std::log10(value)); 115 151 116 152 i++; … … 187 223 188 224 G4DataVector::size_type j(0); 225 226 G4DataVector *argEnergies=new G4DataVector; 227 G4DataVector *argData=new G4DataVector; 228 G4DataVector *argLogEnergies=new G4DataVector; 229 G4DataVector *argLogData=new G4DataVector; 230 231 while(j<maxJ) 232 { 233 argEnergies->push_back(columns[0]->operator[] (j)*GetUnitEnergies()); 234 argData->push_back(columns[i]->operator[] (j)*GetUnitData()); 235 argLogEnergies->push_back(log_columns[0]->operator[] (j) + std::log10(GetUnitEnergies())); 236 argLogData->push_back(log_columns[i]->operator[] (j) + std::log10(GetUnitData())); 237 j++; 238 } 239 240 AddComponent(new G4EMDataSet(i-1, argEnergies, argData, argLogEnergies, argLogData, GetAlgorithm()->Clone(), GetUnitEnergies(), GetUnitData())); 241 242 i++; 243 } 244 245 i=maxI; 246 while (i>0) 247 { 248 i--; 249 delete columns[i]; 250 delete log_columns[i]; 251 } 252 253 return true; 254 } 255 256 257 G4bool G4DNACrossSectionDataSet::LoadNonLogData(const G4String & argFileName) 258 { 259 CleanUpComponents(); 260 261 G4String fullFileName(FullFileName(argFileName)); 262 std::ifstream in(fullFileName, std::ifstream::binary|std::ifstream::in); 263 264 if (!in.is_open()) 265 { 266 G4String message("G4DNACrossSectionDataSet::LoadData - data file \""); 267 message+=fullFileName; 268 message+="\" not found"; 269 G4Exception(message); 270 return false; 271 } 272 273 std::vector<G4DataVector *> columns; 274 275 std::stringstream *stream(new std::stringstream); 276 char c; 277 G4bool comment(false); 278 G4bool space(true); 279 G4bool first(true); 280 281 try 282 { 283 while (!in.eof()) 284 { 285 in.get(c); 286 287 switch (c) 288 { 289 case '\r': 290 case '\n': 291 if (!first) 292 { 293 unsigned long i(0); 294 G4double value; 295 296 while (!stream->eof()) 297 { 298 (*stream) >> value; 299 300 while (i>=columns.size()) 301 { 302 columns.push_back(new G4DataVector); 303 } 304 305 columns[i]->push_back(value); 306 307 i++; 308 } 309 310 delete stream; 311 stream=new std::stringstream; 312 } 313 314 first=true; 315 comment=false; 316 space=true; 317 break; 318 319 case '#': 320 comment=true; 321 break; 322 323 case '\t': 324 c=' '; 325 case ' ': 326 if (space) 327 break; 328 default: 329 if (comment) 330 break; 331 332 if (c==' ') 333 space=true; 334 else 335 { 336 if (space && (!first)) 337 (*stream) << ' '; 338 339 first=false; 340 (*stream) << c; 341 space=false; 342 } 343 } 344 } 345 } 346 catch(const std::ios::failure &e) 347 { 348 // some implementations of STL could throw a "failture" exception 349 // when read wants read characters after end of file 350 } 351 352 delete stream; 353 354 std::vector<G4DataVector *>::size_type maxI(columns.size()); 355 356 if (maxI<2) 357 { 358 G4String message("G4DNACrossSectionDataSet::LoadData - data file \""); 359 message+=fullFileName; 360 message+="\" should have at least two columns"; 361 G4Exception(message); 362 return false; 363 } 364 365 std::vector<G4DataVector*>::size_type i(1); 366 while (i<maxI) 367 { 368 G4DataVector::size_type maxJ(columns[i]->size()); 369 370 if (maxJ!=columns[0]->size()) 371 { 372 G4String message("G4DNACrossSectionDataSet::LoadData - data file \""); 373 message+=fullFileName; 374 message+="\" has lines with a different number of columns"; 375 G4Exception(message); 376 return false; 377 } 378 379 G4DataVector::size_type j(0); 380 189 381 G4DataVector *argEnergies=new G4DataVector; 190 382 G4DataVector *argData=new G4DataVector; … … 196 388 j++; 197 389 } 198 390 199 391 AddComponent(new G4EMDataSet(i-1, argEnergies, argData, GetAlgorithm()->Clone(), GetUnitEnergies(), GetUnitData())); 200 392 … … 211 403 return true; 212 404 } 213 214 405 215 406 … … 288 479 std::ostringstream fullFileName; 289 480 290 fullFileName << path << '/'<< argFileName << ".dat";481 fullFileName << path << "/" << argFileName << ".dat"; 291 482 292 483 return G4String(fullFileName.str().c_str()); … … 349 540 350 541 542 void G4DNACrossSectionDataSet::SetLogEnergiesData(G4DataVector* argEnergies, 543 G4DataVector* argData, 544 G4DataVector* argLogEnergies, 545 G4DataVector* argLogData, 546 G4int argComponentId) 547 { 548 G4VEMDataSet * component(components[argComponentId]); 549 550 if (component) 551 { 552 component->SetLogEnergiesData(argEnergies, argData, argLogEnergies, argLogData, 0); 553 return; 554 } 555 556 std::ostringstream message; 557 message << "G4DNACrossSectionDataSet::SetLogEnergiesData - component " << argComponentId << " not found"; 558 559 G4Exception(message.str().c_str()); 560 } 561 562 351 563 void G4DNACrossSectionDataSet::CleanUpComponents() 352 564 { -
trunk/source/processes/electromagnetic/lowenergy/src/G4DNADingfelderChargeDecreaseModel.cc
r1058 r1192 24 24 // ******************************************************************** 25 25 // 26 // $Id: G4DNADingfelderChargeDecreaseModel.cc,v 1. 3 2009/02/16 11:00:11sincerti Exp $27 // GEANT4 tag $Name: geant4-09-03-beta-cand-01$26 // $Id: G4DNADingfelderChargeDecreaseModel.cc,v 1.6 2009/08/13 11:32:47 sincerti Exp $ 27 // GEANT4 tag $Name: emlowen-V09-02-64 $ 28 28 // 29 29 … … 49 49 // 4 = entering in methods 50 50 51 G4cout << "Dingfelder charge decrease model is constructed " << G4endl; 52 51 if( verboseLevel>0 ) 52 { 53 G4cout << "Dingfelder charge decrease model is constructed " << G4endl; 54 } 53 55 } 54 56 … … 185 187 // 186 188 187 G4cout << "Dingfelder charge decrease model is initialized " << G4endl 188 << "Energy range: " 189 << LowEnergyLimit() / keV << " keV - " 190 << HighEnergyLimit() / MeV << " MeV for " 191 << particle->GetParticleName() 192 << G4endl; 193 189 if( verboseLevel>0 ) 190 { 191 G4cout << "Dingfelder charge decrease model is initialized " << G4endl 192 << "Energy range: " 193 << LowEnergyLimit() / keV << " keV - " 194 << HighEnergyLimit() / MeV << " MeV for " 195 << particle->GetParticleName() 196 << G4endl; 197 } 198 194 199 if(!isInitialised) 195 200 { … … 222 227 const G4Material* material = couple->GetMaterial(); 223 228 224 size_t j = material->GetNumberOfElements(); 225 while (j>0) 229 if (material->GetName() == "G4_WATER") 226 230 { 227 j--; 228 const G4Element* element(material->GetElement(j)); 229 if (element->GetZ() == 8.) 230 { 231 G4double density = material->GetAtomicNumDensityVector()[j]; 232 if (density > 0.) 233 { 234 flagMaterialIsWater = true; 235 densityWater = density; 236 237 if (verboseLevel > 3) 238 G4cout << "Water material is found with density(cm^-3)=" << density/(cm*cm*cm) << G4endl; 239 } 240 } 231 G4double density = material->GetAtomicNumDensityVector()[1]; 232 flagMaterialIsWater = true; 233 densityWater = density; 234 235 if (verboseLevel > 3) 236 G4cout << "****** Water material is found with density(cm^-3)=" << density/(cm*cm*cm) << G4endl; 241 237 } 242 238 243 239 } 244 } // if(numOfCouples>0) 240 241 } // if(numOfCouples>0) 245 242 246 243 } // if (theCoupleTable) -
trunk/source/processes/electromagnetic/lowenergy/src/G4DNADingfelderChargeIncreaseModel.cc
r1058 r1192 24 24 // ******************************************************************** 25 25 // 26 // $Id: G4DNADingfelderChargeIncreaseModel.cc,v 1. 3 2009/02/16 11:00:11sincerti Exp $27 // GEANT4 tag $Name: geant4-09-03-beta-cand-01$26 // $Id: G4DNADingfelderChargeIncreaseModel.cc,v 1.6 2009/08/13 11:32:47 sincerti Exp $ 27 // GEANT4 tag $Name: emlowen-V09-02-64 $ 28 28 // 29 29 … … 49 49 // 4 = entering in methods 50 50 51 G4cout << "Dingfelder charge increase model is constructed " << G4endl; 51 if( verboseLevel>0 ) 52 { 53 G4cout << "Dingfelder charge increase model is constructed " << G4endl; 54 } 52 55 53 56 } … … 175 178 // 176 179 177 G4cout << "Dingfelder charge increase model is initialized " << G4endl 178 << "Energy range: " 179 << LowEnergyLimit() / keV << " keV - " 180 << HighEnergyLimit() / MeV << " MeV for " 181 << particle->GetParticleName() 182 << G4endl; 180 if( verboseLevel>0 ) 181 { 182 G4cout << "Dingfelder charge increase model is initialized " << G4endl 183 << "Energy range: " 184 << LowEnergyLimit() / keV << " keV - " 185 << HighEnergyLimit() / MeV << " MeV for " 186 << particle->GetParticleName() 187 << G4endl; 188 } 183 189 184 190 if(!isInitialised) … … 212 218 const G4Material* material = couple->GetMaterial(); 213 219 214 size_t j = material->GetNumberOfElements(); 215 while (j>0) 220 if (material->GetName() == "G4_WATER") 216 221 { 217 j--; 218 const G4Element* element(material->GetElement(j)); 219 if (element->GetZ() == 8.) 220 { 221 G4double density = material->GetAtomicNumDensityVector()[j]; 222 if (density > 0.) 223 { 224 flagMaterialIsWater = true; 225 densityWater = density; 226 227 if (verboseLevel > 3) 228 G4cout << "Water material is found with density(cm^-3)=" << density/(cm*cm*cm) << G4endl; 229 } 230 } 222 G4double density = material->GetAtomicNumDensityVector()[1]; 223 flagMaterialIsWater = true; 224 densityWater = density; 225 226 if (verboseLevel > 3) 227 G4cout << "****** Water material is found with density(cm^-3)=" << density/(cm*cm*cm) << G4endl; 231 228 } 232 229 233 230 } 234 } // if(numOfCouples>0) 231 232 } // if(numOfCouples>0) 235 233 236 234 } // if (theCoupleTable) … … 409 407 if (particleDefinition == instance->GetIon("alpha+")) return instance->GetIon("alpha++"); 410 408 411 if (particleDefinition == instance->GetIon(" alpha+")) return instance->GetIon("helium");409 if (particleDefinition == instance->GetIon("helium")) 412 410 { 413 411 if (finalStateIndex==0) return instance->GetIon("alpha+"); -
trunk/source/processes/electromagnetic/lowenergy/src/G4DNAElastic.cc
r1058 r1192 25 25 // 26 26 // $Id: G4DNAElastic.cc,v 1.3 2009/03/04 13:28:49 sincerti Exp $ 27 // GEANT4 tag $Name: geant4-09-03-beta-cand-01$27 // GEANT4 tag $Name: emlowen-V09-02-64 $ 28 28 29 29 #include "G4DNAElastic.hh" -
trunk/source/processes/electromagnetic/lowenergy/src/G4DNAEmfietzoglouExcitationModel.cc
r1058 r1192 24 24 // ******************************************************************** 25 25 // 26 // $Id: G4DNAEmfietzoglouExcitationModel.cc,v 1. 5 2009/02/16 12:46:58sincerti Exp $27 // GEANT4 tag $Name: geant4-09-03-beta-cand-01$26 // $Id: G4DNAEmfietzoglouExcitationModel.cc,v 1.8 2009/08/13 11:32:47 sincerti Exp $ 27 // GEANT4 tag $Name: emlowen-V09-02-64 $ 28 28 // 29 29 … … 56 56 if (verboseLevel > 3) 57 57 58 G4cout << "Emfietzoglou Excitation model is constructed " << G4endl 59 << "Energy range: " 60 << lowEnergyLimit / eV << " eV - " 61 << highEnergyLimit / MeV << " MeV" 62 << G4endl; 63 58 if( verboseLevel>0 ) 59 { 60 G4cout << "Emfietzoglou Excitation model is constructed " << G4endl 61 << "Energy range: " 62 << lowEnergyLimit / eV << " eV - " 63 << highEnergyLimit / MeV << " MeV" 64 << G4endl; 65 } 64 66 } 65 67 … … 99 101 100 102 // 101 102 G4cout << "Emfietzoglou Excitation model is initialized " << G4endl 103 << "Energy range: " 104 << LowEnergyLimit() / eV << " eV - " 105 << HighEnergyLimit() / MeV << " MeV" 106 << G4endl; 103 if( verboseLevel>0 ) 104 { 105 G4cout << "Emfietzoglou Excitation model is initialized " << G4endl 106 << "Energy range: " 107 << LowEnergyLimit() / eV << " eV - " 108 << HighEnergyLimit() / MeV << " MeV" 109 << G4endl; 110 } 107 111 108 112 if(!isInitialised) … … 136 140 const G4Material* material = couple->GetMaterial(); 137 141 138 size_t j = material->GetNumberOfElements(); 139 while (j>0) 142 if (material->GetName() == "G4_WATER") 140 143 { 141 j--; 142 const G4Element* element(material->GetElement(j)); 143 if (element->GetZ() == 8.) 144 { 145 G4double density = material->GetAtomicNumDensityVector()[j]; 146 if (density > 0.) 147 { 148 flagMaterialIsWater = true; 149 densityWater = density; 150 151 if (verboseLevel > 3) 152 G4cout << "Water material is found with density(cm^-3)=" << density/(cm*cm*cm) << G4endl; 153 } 154 } 144 G4double density = material->GetAtomicNumDensityVector()[1]; 145 flagMaterialIsWater = true; 146 densityWater = density; 147 148 if (verboseLevel > 3) 149 G4cout << "****** Water material is found with density(cm^-3)=" << density/(cm*cm*cm) << G4endl; 155 150 } 156 151 157 152 } 158 } // if(numOfCouples>0) 153 154 } // if(numOfCouples>0) 159 155 160 156 } // if (theCoupleTable) -
trunk/source/processes/electromagnetic/lowenergy/src/G4DNAExcitation.cc
r1058 r1192 25 25 // 26 26 // $Id: G4DNAExcitation.cc,v 1.3 2009/03/04 13:28:49 sincerti Exp $ 27 // GEANT4 tag $Name: geant4-09-03-beta-cand-01$27 // GEANT4 tag $Name: emlowen-V09-02-64 $ 28 28 29 29 #include "G4DNAExcitation.hh" -
trunk/source/processes/electromagnetic/lowenergy/src/G4DNAGenericIonsManager.cc
r1007 r1192 24 24 // ******************************************************************** 25 25 // 26 // $Id: G4DNAGenericIonsManager.cc,v 1. 5 2008/07/16 19:01:07 sincertiExp $27 // GEANT4 tag $Name: geant4-09-02$26 // $Id: G4DNAGenericIonsManager.cc,v 1.6 2009/06/10 13:32:36 mantero Exp $ 27 // GEANT4 tag $Name: emlowen-V09-02-64 $ 28 28 29 29 #include "G4DNAGenericIonsManager.hh" … … 57 57 G4DNAGenericIonsManager :: G4DNAGenericIonsManager() 58 58 { 59 // name mass width charge 60 // 2*spin parity C-conjugation 61 // 2*Isospin 2*Isospin3 G-parity 62 // type lepton number baryon number PDG encoding 63 // stable lifetime decay table 64 59 // name mass width charge 60 // 2*spin parity C-conjugation 61 // 2*Isospin 2*Isospin3 G-parity 62 // type lepton number baryon number PDG encoding 63 // stable lifetime decay table 64 // shortlived subType anti_encoding 65 // excitation 66 65 67 G4Ions *helium; 66 68 G4Ions *hydrogen; … … 68 70 G4Ions *positronium1s; 69 71 G4Ions *positronium2s; 70 71 helium= new G4Ions("helium", 3.727417*GeV, 0.0*MeV, +0.0*eplus, 72 0, +1, 0, 73 0, 0, 0, 74 "nucleus", +2, +4, 0, 75 true, -1.0, 0, false, 76 "", 0, 0.0); 72 73 74 helium= new G4Ions( 75 "helium", 3.727417*GeV, 0.0*MeV, +0.0*eplus, 76 0, +1, 0, 77 0, 0, 0, 78 "nucleus", +2, +4, 0, 79 true, -1.0, 0, 80 false, "", 0, 81 0.0); 77 82 78 83 alphaPlus= new G4Ions("alpha+", 3.727417*GeV, 0.0*MeV, +1.0*eplus, … … 104 109 "", 0, 0.0); 105 110 106 map["helium"]=helium; 111 112 /* 113 // molechules construction 114 115 G4Ions* oxonium; // H3O -- it will become H3O+ 116 G4Ions* hydroxyl; // OH -- it will produce OH- too 117 G4Ions* molHydrogen; // H2 118 //G4Ions* hydroxide; // OH- 119 G4Ions* hydroPeroxide; // H2O2 120 G4Ions* water; // H2O -- it will become also H2O+ 121 122 123 G4double mass = 19.02*g/Avogadro - 11*electron_mass_c2; 124 125 oxonium = new G4Ions("H3O", mass, 0, +11.0*eplus, 126 0, 0, 0, 127 0, 0, 0, 128 "molecule", 0, 0, 0, 129 true, -1.0, 0, 130 false, "", 0, 131 0.0); 132 133 mass = 17.00734*g/Avogadro - 9*electron_mass_c2; 134 135 hydroxyl = new G4Ions("OH", mass, 0, +9.0*eplus, 136 0, 0, 0, 137 0, 0, 0, 138 "molecule", 0, 0, 0, 139 true, -1.0, 0, 140 false, "", 0, 141 0.0); 142 143 mass = 2.01588*g/Avogadro - 2*electron_mass_c2; 144 145 molHydrogen = new G4Ions("H2", mass, 0, +2.0*eplus, 146 0, 0, 0, 147 0, 0, 0, 148 "molecule", 0, 0, 0, 149 true, -1.0, 0, 150 false, "", 0, 151 0.0); 152 153 mass = 34.01468*g/Avogadro - 18*electron_mass_c2; 154 155 hydroPeroxide = new G4Ions("H2O2", mass, 0, +18.0*eplus, 156 0, 0, 0, 157 0, 0, 0, 158 "molecule", 0, 0, 0, 159 true, -1.0, 0, 160 false, "", 0, 161 0.0); 162 163 mass = 18.015*g/Avogadro - 10*electron_mass_c2; 164 165 water = new G4Ions("H2O", mass, 0, +10.0*eplus, 166 0, 0, 0, 167 0, 0, 0, 168 "molecule", 0, 0, 0, 169 true, -1.0, 0, 170 false, "", 0, 171 0.0); 172 173 map["H3O" ] =oxonium; 174 map["OH" ] =hydroxyl; 175 map["H2" ] =molHydrogen; 176 map["H2O2"] =hydroPeroxide; 177 map["H2O" ] =water; 178 */ 179 180 181 map["helium" ]=helium; 107 182 map["hydrogen"]=hydrogen; 108 map["alpha+" ]=alphaPlus;109 map["alpha++" ]=G4Alpha::Alpha();110 map["Ps-1s" ]=positronium1s;111 map["Ps-2s" ]=positronium2s;183 map["alpha+" ]=alphaPlus; 184 map["alpha++" ]=G4Alpha::Alpha(); 185 map["Ps-1s" ]=positronium1s; 186 map["Ps-2s" ]=positronium2s; 112 187 113 188 } -
trunk/source/processes/electromagnetic/lowenergy/src/G4DNAIonisation.cc
r1058 r1192 24 24 // ******************************************************************** 25 25 // 26 // $Id: G4DNAIonisation.cc,v 1. 3 2009/03/04 13:28:49sincerti Exp $27 // GEANT4 tag $Name: geant4-09-03-beta-cand-01$26 // $Id: G4DNAIonisation.cc,v 1.4 2009/11/02 17:00:11 sincerti Exp $ 27 // GEANT4 tag $Name: emlowen-V09-02-64 $ 28 28 29 29 #include "G4DNAIonisation.hh" … … 77 77 { 78 78 if(!Model()) SetModel(new G4DNABornIonisationModel); 79 Model()->SetLowEnergyLimit(1 2.61*eV);80 Model()->SetHighEnergyLimit( 30*keV);79 Model()->SetLowEnergyLimit(11.*eV); 80 Model()->SetHighEnergyLimit(1.*MeV); 81 81 82 82 AddEmModel(1, Model()); -
trunk/source/processes/electromagnetic/lowenergy/src/G4DNAMillerGreenExcitationModel.cc
r1058 r1192 24 24 // ******************************************************************** 25 25 // 26 // $Id: G4DNAMillerGreenExcitationModel.cc,v 1. 3 2009/02/16 11:00:11sincerti Exp $27 // GEANT4 tag $Name: geant4-09-03-beta-cand-01$26 // $Id: G4DNAMillerGreenExcitationModel.cc,v 1.6 2009/08/13 11:32:47 sincerti Exp $ 27 // GEANT4 tag $Name: emlowen-V09-02-64 $ 28 28 // 29 29 … … 49 49 // 4 = entering in methods 50 50 51 G4cout << "Miller & Green excitation model is constructed " << G4endl; 52 51 if( verboseLevel>0 ) 52 { 53 G4cout << "Miller & Green excitation model is constructed " << G4endl; 54 } 53 55 } 54 56 … … 186 188 187 189 // 188 189 G4cout << "Miller & Green excitation model is initialized " << G4endl 190 << "Energy range: " 191 << LowEnergyLimit() / eV << " eV - " 192 << HighEnergyLimit() / keV << " keV for " 193 << particle->GetParticleName() 194 << G4endl; 195 190 if( verboseLevel>0 ) 191 { 192 G4cout << "Miller & Green excitation model is initialized " << G4endl 193 << "Energy range: " 194 << LowEnergyLimit() / eV << " eV - " 195 << HighEnergyLimit() / keV << " keV for " 196 << particle->GetParticleName() 197 << G4endl; 198 } 199 196 200 if(!isInitialised) 197 201 { … … 224 228 const G4Material* material = couple->GetMaterial(); 225 229 226 size_t j = material->GetNumberOfElements(); 227 while (j>0) 230 if (material->GetName() == "G4_WATER") 228 231 { 229 j--; 230 const G4Element* element(material->GetElement(j)); 231 if (element->GetZ() == 8.) 232 { 233 G4double density = material->GetAtomicNumDensityVector()[j]; 234 if (density > 0.) 235 { 236 flagMaterialIsWater = true; 237 densityWater = density; 238 239 if (verboseLevel > 3) 240 G4cout << "Water material is found with density(cm^-3)=" << density/(cm*cm*cm) << G4endl; 241 } 242 } 232 G4double density = material->GetAtomicNumDensityVector()[1]; 233 flagMaterialIsWater = true; 234 densityWater = density; 235 236 if (verboseLevel > 3) 237 G4cout << "****** Water material is found with density(cm^-3)=" << density/(cm*cm*cm) << G4endl; 243 238 } 244 239 245 240 } 246 } // if(numOfCouples>0) 241 242 } // if(numOfCouples>0) 247 243 248 244 } // if (theCoupleTable) -
trunk/source/processes/electromagnetic/lowenergy/src/G4DNARuddIonisationModel.cc
r1058 r1192 1 // 1 2 // ******************************************************************** 2 3 // * License and Disclaimer * … … 23 24 // ******************************************************************** 24 25 // 25 // $Id: G4DNARuddIonisationModel.cc,v 1. 4 2009/02/16 11:00:11sincerti Exp $26 // GEANT4 tag $Name: geant4-09-03-beta-cand-01$26 // $Id: G4DNARuddIonisationModel.cc,v 1.10 2009/08/13 11:32:47 sincerti Exp $ 27 // GEANT4 tag $Name: emlowen-V09-02-64 $ 27 28 // 28 29 29 30 #include "G4DNARuddIonisationModel.hh" 31 //#include "G4DynamicMolecule.hh" 30 32 31 33 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo.... … … 54 56 // 4 = entering in methods 55 57 56 G4cout << "Rudd ionisation model is constructed " << G4endl; 58 if( verboseLevel>0 ) 59 { 60 G4cout << "Rudd ionisation model is constructed " << G4endl; 61 } 57 62 } 58 63 … … 242 247 } 243 248 244 G4cout << "Rudd ionisation model is initialized " << G4endl 245 << "Energy range: " 246 << LowEnergyLimit() / eV << " eV - " 247 << HighEnergyLimit() / keV << " keV for " 248 << particle->GetParticleName() 249 << G4endl; 249 if( verboseLevel>0 ) 250 { 251 G4cout << "Rudd ionisation model is initialized " << G4endl 252 << "Energy range: " 253 << LowEnergyLimit() / eV << " eV - " 254 << HighEnergyLimit() / keV << " keV for " 255 << particle->GetParticleName() 256 << G4endl; 257 } 250 258 251 259 // … … 281 289 const G4Material* material = couple->GetMaterial(); 282 290 283 size_t j = material->GetNumberOfElements(); 284 while (j>0) 291 if (material->GetName() == "G4_WATER") 285 292 { 286 j--; 287 const G4Element* element(material->GetElement(j)); 288 if (element->GetZ() == 8.) 289 { 290 G4double density = material->GetAtomicNumDensityVector()[j]; 291 if (density > 0.) 292 { 293 flagMaterialIsWater = true; 294 densityWater = density; 295 296 if (verboseLevel > 3) 297 G4cout << "Water material is found with density(cm^-3)=" << density/(cm*cm*cm) << G4endl; 298 } 299 } 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; 300 299 } 301 300 302 301 } 303 } // if(numOfCouples>0) 302 303 } // if(numOfCouples>0) 304 304 305 305 } // if (theCoupleTable) … … 562 562 fvect->push_back(dp); 563 563 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 secondaries 582 583 fvect->push_back(dynamicWater); 584 fvect->push_back(dynamicWater2); 585 fvect->push_back(dynamicWater3); 586 */ 564 587 } 565 588 -
trunk/source/processes/electromagnetic/lowenergy/src/G4DNAScreenedRutherfordElasticModel.cc
r1058 r1192 24 24 // ******************************************************************** 25 25 // 26 // $Id: G4DNAScreenedRutherfordElasticModel.cc,v 1. 5 2009/04/29 13:43:00sincerti Exp $27 // GEANT4 tag $Name: geant4-09-03-beta-cand-01$26 // $Id: G4DNAScreenedRutherfordElasticModel.cc,v 1.9 2009/08/13 11:32:47 sincerti Exp $ 27 // GEANT4 tag $Name: emlowen-V09-02-64 $ 28 28 // 29 29 … … 57 57 // 4 = entering in methods 58 58 59 G4cout << "Screened Rutherford Elastic model is constructed " << G4endl 60 << "Energy range: " 61 << lowEnergyLimit / eV << " eV - " 62 << highEnergyLimit / MeV << " MeV" 63 << G4endl; 64 59 if( verboseLevel>0 ) 60 { 61 G4cout << "Screened Rutherford Elastic model is constructed " << G4endl 62 << "Energy range: " 63 << lowEnergyLimit / eV << " eV - " 64 << highEnergyLimit / MeV << " MeV" 65 << G4endl; 66 } 67 65 68 } 66 69 … … 128 131 // 129 132 130 G4cout << "Screened Rutherford elastic model is initialized " << G4endl 131 << "Energy range: " 132 << LowEnergyLimit() / eV << " eV - " 133 << HighEnergyLimit() / MeV << " MeV" 134 << G4endl; 135 133 if( verboseLevel>0 ) 134 { 135 G4cout << "Screened Rutherford elastic model is initialized " << G4endl 136 << "Energy range: " 137 << LowEnergyLimit() / eV << " eV - " 138 << HighEnergyLimit() / MeV << " MeV" 139 << G4endl; 140 } 141 136 142 if(!isInitialised) 137 143 { … … 164 170 const G4Material* material = couple->GetMaterial(); 165 171 166 size_t j = material->GetNumberOfElements(); 167 while (j>0) 172 if (material->GetName() == "G4_WATER") 168 173 { 169 j--; 170 const G4Element* element(material->GetElement(j)); 171 if (element->GetZ() == 8.) 172 { 173 G4double density = material->GetAtomicNumDensityVector()[j]; 174 if (density > 0.) 175 { 176 flagMaterialIsWater = true; 177 densityWater = density; 178 179 if (verboseLevel > 3) 180 G4cout << "Water material is found with density(cm^-3)=" << density/(cm*cm*cm) << G4endl; 181 } 182 } 174 G4double density = material->GetAtomicNumDensityVector()[1]; 175 flagMaterialIsWater = true; 176 densityWater = density; 177 178 if (verboseLevel > 3) 179 G4cout << "****** Water material is found with density(cm^-3)=" << density/(cm*cm*cm) << G4endl; 183 180 } 184 181 185 182 } 186 } // if(numOfCouples>0) 183 184 } // if(numOfCouples>0) 187 185 188 186 } // if (theCoupleTable) … … 493 491 { 494 492 cosTheta = 2. * G4UniformRand() - 1.; 495 //G4cout << "SR cos=" << cosTheta << G4endl;496 493 fCosTheta = (1 + 2.*n - cosTheta); 497 494 if (fCosTheta !=0.) fCosTheta = oneOverMax / (fCosTheta*fCosTheta); -
trunk/source/processes/electromagnetic/lowenergy/src/G4DopplerProfile.cc
r1007 r1192 25 25 // 26 26 // 27 // $Id: G4DopplerProfile.cc,v 1. 2 2008/03/17 13:40:53 piaExp $28 // GEANT4 tag $Name: geant4-09-02$27 // $Id: G4DopplerProfile.cc,v 1.3 2009/06/10 13:32:36 mantero Exp $ 28 // GEANT4 tag $Name: emlowen-V09-02-64 $ 29 29 // 30 30 // Author: Maria Grazia Pia (Maria.Grazia.Pia@cern.ch) -
trunk/source/processes/electromagnetic/lowenergy/src/G4DummyFinalState.cc
r1007 r1192 26 26 // 27 27 // $Id: G4DummyFinalState.cc,v 1.2 2007/10/15 08:36:35 pia Exp $ 28 // GEANT4 tag $Name: geant4-09-02$28 // GEANT4 tag $Name: emlowen-V09-02-64 $ 29 29 // 30 30 // Contact Author: Maria Grazia Pia (Maria.Grazia.Pia@cern.ch) -
trunk/source/processes/electromagnetic/lowenergy/src/G4EMDataSet.cc
r1007 r1192 25 25 // 26 26 // 27 // $Id: G4EMDataSet.cc,v 1. 18 2008/03/17 13:40:53 piaExp $28 // GEANT4 tag $Name: geant4-09-02$27 // $Id: G4EMDataSet.cc,v 1.20 2009/09/25 07:41:34 sincerti Exp $ 28 // GEANT4 tag $Name: emlowen-V09-02-64 $ 29 29 // 30 30 // Author: Maria Grazia Pia (Maria.Grazia.Pia@cern.ch) … … 33 33 // ----------- 34 34 // 31 Jul 2001 MGP Created 35 // 36 // 15 Jul 2009 Nicolas A. Karakatsanis 37 // 38 // - New Constructor was added when logarithmic data are loaded as well 39 // to enhance CPU performance 40 // 41 // - Destructor was modified accordingly 42 // 43 // - LoadNonLogData method was created to load only the non-logarithmic data from G4EMLOW 44 // dataset. It is essentially performing the data loading operations as in the past. 45 // 46 // - LoadData method was revised in order to calculate the logarithmic values of the data 47 // It retrieves the data values from the G4EMLOW data files but, then, calculates the 48 // respective log values and loads them to seperate data structures. 49 // 50 // - SetLogEnergiesData method was cretaed to set logarithmic values to G4 data vectors. 51 // The EM data sets, initialized this way, contain both non-log and log values. 52 // These initialized data sets can enhance the computing performance of data interpolation 53 // operations 54 // 35 55 // 36 56 // ------------------------------------------------------------------- … … 53 73 energies(0), 54 74 data(0), 75 log_energies(0), 76 log_data(0), 55 77 algorithm(algo), 56 78 unitEnergies(xUnit), … … 73 95 energies(dataX), 74 96 data(dataY), 97 log_energies(0), 98 log_data(0), 75 99 algorithm(algo), 76 100 unitEnergies(xUnit), … … 91 115 if (randomSet) BuildPdf(); 92 116 } 117 118 G4EMDataSet::G4EMDataSet(G4int argZ, 119 G4DataVector* dataX, 120 G4DataVector* dataY, 121 G4DataVector* dataLogX, 122 G4DataVector* dataLogY, 123 G4VDataSetAlgorithm* algo, 124 G4double xUnit, 125 G4double yUnit, 126 G4bool random): 127 z(argZ), 128 energies(dataX), 129 data(dataY), 130 log_energies(dataLogX), 131 log_data(dataLogY), 132 algorithm(algo), 133 unitEnergies(xUnit), 134 unitData(yUnit), 135 pdf(0), 136 randomSet(random) 137 { 138 if (algorithm == 0) G4Exception("G4EMDataSet::G4EMDataSet - interpolation == 0"); 139 140 if ((energies == 0) ^ (data == 0)) 141 G4Exception("G4EMDataSet::G4EMDataSet - different size for energies and data (zero case)"); 142 143 if (energies == 0) return; 144 145 if (energies->size() != data->size()) 146 G4Exception("G4EMDataSet::G4EMDataSet - different size for energies and data"); 147 148 if ((log_energies == 0) ^ (log_data == 0)) 149 G4Exception("G4EMDataSet::G4EMDataSet - different size for log energies and log data (zero case)"); 150 151 if (log_energies == 0) return; 152 153 if (log_energies->size() != log_data->size()) 154 G4Exception("G4EMDataSet::G4EMDataSet - different size for log energies and log data"); 155 156 if (randomSet) BuildPdf(); 157 } 158 93 159 94 160 G4EMDataSet::~G4EMDataSet() … … 98 164 if (data) delete data; 99 165 if (pdf) delete pdf; 100 } 166 if (log_energies) delete log_energies; 167 if (log_data) delete log_data; 168 } 169 101 170 102 171 G4double G4EMDataSet::FindValue(G4double energy, G4int /* componentId */) const … … 108 177 size_t i = energies->size()-1; 109 178 if (energy >= (*energies)[i]) return (*data)[i]; 179 180 //Nicolas A. Karakatsanis: Check if the logarithmic data have been loaded to decide 181 // which Interpolation-Calculation method will be applied 182 if (log_energies != 0) 183 { 184 return algorithm->Calculate(energy, FindLowerBound(energy), *energies, *data, *log_energies, *log_data); 185 } 110 186 111 187 return algorithm->Calculate(energy, FindLowerBound(energy), *energies, *data); … … 147 223 148 224 if (energies == 0) return; 149 225 226 //G4cout << "Size of energies: " << energies->size() << G4endl << "Size of data: " << data->size() << G4endl; 150 227 if (energies->size() != data->size()) 151 228 G4Exception("G4EMDataSet::SetEnergiesData - different size for energies and data"); 152 229 } 153 230 231 void G4EMDataSet::SetLogEnergiesData(G4DataVector* dataX, 232 G4DataVector* dataY, 233 G4DataVector* data_logX, 234 G4DataVector* data_logY, 235 G4int /* componentId */) 236 { 237 //Load of the actual energy and data values 238 if (energies) delete energies; 239 energies = dataX; 240 if (data) delete data; 241 data = dataY; 242 243 //Check if data loaded properly from data files 244 if ((energies == 0) ^ (data==0)) 245 G4Exception("G4EMDataSet::SetLogEnergiesData - different size for energies and data (zero case)"); 246 247 if (energies == 0) return; 248 249 //G4cout << "Size of energies: " << energies->size() << G4endl << "Size of data: " << data->size() << G4endl << G4endl; 250 if (energies->size() != data->size()) 251 G4Exception("G4EMDataSet::SetLogEnergiesData - different size for energies and data"); 252 253 //Load of the logarithmic energy and data values 254 if (log_energies) delete log_energies; 255 log_energies = data_logX; 256 if (log_data) delete log_data; 257 log_data = data_logY; 258 259 //Check if logarithmic data loaded properly from data files 260 if ((log_energies == 0) ^ (log_data==0)) 261 G4Exception("G4EMDataSet::SetLogEnergiesData - different size for log energies and log data (zero case)"); 262 263 if (log_energies == 0) G4cout << "G4EMDataSet::SetLogEnergiesData - log_energies == 0" << G4endl; 264 if (log_energies == 0) return; 265 266 //G4cout << "Size of log energies: " << log_energies->size() << G4endl << "Size of log data: " << log_data->size() << G4endl << G4endl; 267 if (log_energies->size() != log_data->size()) 268 G4Exception("G4EMDataSet::SetLogEnergiesData - different size for log energies and log data"); 269 } 270 271 272 154 273 G4bool G4EMDataSet::LoadData(const G4String& fileName) 155 274 { 156 // The file is organized into twocolumns:157 // 1st column is theenergy158 // 2nd column is the correspondingvalue159 160 161 275 // The file is organized into four columns: 276 // 1st column contains the values of energy 277 // 2nd column contains the corresponding data value 278 // The file terminates with the pattern: -1 -1 279 // -2 -2 280 162 281 G4String fullFileName(FullFileName(fileName)); 163 282 std::ifstream in(fullFileName); … … 173 292 G4DataVector* argEnergies=new G4DataVector; 174 293 G4DataVector* argData=new G4DataVector; 294 G4DataVector* argLogEnergies=new G4DataVector; 295 G4DataVector* argLogData=new G4DataVector; 175 296 176 297 G4double a; 177 bool energyColumn(true); 298 G4int k = 0; 299 G4int nColumns = 2; 178 300 179 301 do 180 302 { 181 303 in >> a; 182 183 if (a!=-1 && a!=-2) 304 305 if (a==0.) a=1e-300; 306 307 if (a != -1 && a != -2) 184 308 { 185 if (energyColumn) 186 argEnergies->push_back(a*unitEnergies); 187 else 188 argData->push_back(a*unitData); 189 energyColumn=(!energyColumn); 309 if (k%nColumns == 0) 310 { 311 argEnergies->push_back(a*unitEnergies); 312 argLogEnergies->push_back(std::log10(a)+std::log10(unitEnergies)); 313 } 314 else if (k%nColumns == 1) 315 { 316 argData->push_back(a*unitData); 317 argLogData->push_back(std::log10(a)+std::log10(unitData)); 318 } 319 k++; 190 320 } 191 321 } 192 322 while (a != -2); 323 324 325 SetLogEnergiesData(argEnergies, argData, argLogEnergies, argLogData, 0); 326 327 if (randomSet) BuildPdf(); 328 329 return true; 330 } 331 332 333 G4bool G4EMDataSet::LoadNonLogData(const G4String& fileName) 334 { 335 // The file is organized into four columns: 336 // 1st column contains the values of energy 337 // 2nd column contains the corresponding data value 338 // The file terminates with the pattern: -1 -1 339 // -2 -2 340 341 G4String fullFileName(FullFileName(fileName)); 342 std::ifstream in(fullFileName); 343 if (!in.is_open()) 344 { 345 G4String message("G4EMDataSet::LoadData - data file \""); 346 message += fullFileName; 347 message += "\" not found"; 348 G4Exception(message); 349 } 350 351 G4DataVector* argEnergies=new G4DataVector; 352 G4DataVector* argData=new G4DataVector; 353 354 G4double a; 355 G4int k = 0; 356 G4int nColumns = 2; 357 358 do 359 { 360 in >> a; 361 362 if (a != -1 && a != -2) 363 { 364 if (k%nColumns == 0) 365 { 366 argEnergies->push_back(a*unitEnergies); 367 } 368 else if (k%nColumns == 1) 369 { 370 argData->push_back(a*unitData); 371 } 372 k++; 373 } 374 } 375 while (a != -2); 193 376 194 377 SetEnergiesData(argEnergies, argData, 0); 378 195 379 if (randomSet) BuildPdf(); 196 380 197 381 return true; 198 382 } 383 384 199 385 200 386 G4bool G4EMDataSet::SaveData(const G4String& name) const … … 267 453 } 268 454 455 456 269 457 size_t G4EMDataSet::FindLowerBound(G4double x) const 270 458 { … … 312 500 return G4String(fullFileName.str().c_str()); 313 501 } 502 314 503 315 504 -
trunk/source/processes/electromagnetic/lowenergy/src/G4FinalStateChargeDecrease.cc
r1055 r1192 24 24 // ******************************************************************** 25 25 // 26 // $Id: G4FinalStateChargeDecrease.cc,v 1. 5 2009/05/02 15:07:47 sincertiExp $27 // GEANT4 tag $Name: geant4-09-03-beta-cand-01$26 // $Id: G4FinalStateChargeDecrease.cc,v 1.7 2009/06/11 15:47:08 mantero Exp $ 27 // GEANT4 tag $Name: emlowen-V09-02-64 $ 28 28 29 29 #include "G4FinalStateChargeDecrease.hh" -
trunk/source/processes/electromagnetic/lowenergy/src/G4FinalStateChargeIncrease.cc
r1055 r1192 24 24 // ******************************************************************** 25 25 // 26 // $Id: G4FinalStateChargeIncrease.cc,v 1. 5 2009/05/02 15:07:47 sincertiExp $27 // GEANT4 tag $Name: geant4-09-03-beta-cand-01$26 // $Id: G4FinalStateChargeIncrease.cc,v 1.7 2009/06/11 15:47:08 mantero Exp $ 27 // GEANT4 tag $Name: emlowen-V09-02-64 $ 28 28 29 29 #include "G4FinalStateChargeIncrease.hh" -
trunk/source/processes/electromagnetic/lowenergy/src/G4FinalStateChargeTransferProton.cc
r1007 r1192 25 25 // 26 26 // 27 // $Id: G4FinalStateChargeTransferProton.cc,v 1. 1 2008/03/25 15:48:21 piaExp $28 // GEANT4 tag $Name: geant4-09-02$27 // $Id: G4FinalStateChargeTransferProton.cc,v 1.2 2009/06/10 13:32:36 mantero Exp $ 28 // GEANT4 tag $Name: emlowen-V09-02-64 $ 29 29 // 30 30 // Contact Author: Maria Grazia Pia (Maria.Grazia.Pia@cern.ch) -
trunk/source/processes/electromagnetic/lowenergy/src/G4FinalStateElasticBrennerZaider.cc
r1055 r1192 24 24 // ******************************************************************** 25 25 // 26 // $Id: G4FinalStateElasticBrennerZaider.cc,v 1. 9 2009/05/02 15:07:47 sincertiExp $27 // GEANT4 tag $Name: geant4-09-03-beta-cand-01$26 // $Id: G4FinalStateElasticBrennerZaider.cc,v 1.11 2009/06/11 15:47:08 mantero Exp $ 27 // GEANT4 tag $Name: emlowen-V09-02-64 $ 28 28 29 29 #include "G4FinalStateElasticBrennerZaider.hh" -
trunk/source/processes/electromagnetic/lowenergy/src/G4FinalStateElasticChampion.cc
r1055 r1192 24 24 // ******************************************************************** 25 25 // 26 // $Id: G4FinalStateElasticChampion.cc,v 1. 8 2009/05/02 15:07:47 sincertiExp $27 // GEANT4 tag $Name: geant4-09-03-beta-cand-01$26 // $Id: G4FinalStateElasticChampion.cc,v 1.10 2009/06/11 15:47:08 mantero Exp $ 27 // GEANT4 tag $Name: emlowen-V09-02-64 $ 28 28 // ------------------------------------------------------------------- 29 29 -
trunk/source/processes/electromagnetic/lowenergy/src/G4FinalStateElasticScreenedRutherford.cc
r1055 r1192 24 24 // ******************************************************************** 25 25 // 26 // $Id: G4FinalStateElasticScreenedRutherford.cc,v 1. 5 2009/05/02 15:07:47 sincertiExp $27 // GEANT4 tag $Name: geant4-09-03-beta-cand-01$26 // $Id: G4FinalStateElasticScreenedRutherford.cc,v 1.7 2009/06/11 15:47:08 mantero Exp $ 27 // GEANT4 tag $Name: emlowen-V09-02-64 $ 28 28 29 29 #include "G4FinalStateElasticScreenedRutherford.hh" -
trunk/source/processes/electromagnetic/lowenergy/src/G4FinalStateExcitationBorn.cc
r1055 r1192 24 24 // ******************************************************************** 25 25 // 26 // $Id: G4FinalStateExcitationBorn.cc,v 1. 4 2009/05/02 15:07:47 sincertiExp $27 // GEANT4 tag $Name: geant4-09-03-beta-cand-01$26 // $Id: G4FinalStateExcitationBorn.cc,v 1.6 2009/06/11 15:47:08 mantero Exp $ 27 // GEANT4 tag $Name: emlowen-V09-02-64 $ 28 28 29 29 #include "G4FinalStateExcitationBorn.hh" -
trunk/source/processes/electromagnetic/lowenergy/src/G4FinalStateExcitationEmfietzoglou.cc
r1055 r1192 24 24 // ******************************************************************** 25 25 // 26 // $Id: G4FinalStateExcitationEmfietzoglou.cc,v 1. 6 2009/05/02 15:07:47 sincertiExp $27 // GEANT4 tag $Name: geant4-09-03-beta-cand-01$26 // $Id: G4FinalStateExcitationEmfietzoglou.cc,v 1.8 2009/06/11 15:47:08 mantero Exp $ 27 // GEANT4 tag $Name: emlowen-V09-02-64 $ 28 28 29 29 #include "G4FinalStateExcitationEmfietzoglou.hh" -
trunk/source/processes/electromagnetic/lowenergy/src/G4FinalStateExcitationMillerGreen.cc
r1055 r1192 24 24 // ******************************************************************** 25 25 // 26 // $Id: G4FinalStateExcitationMillerGreen.cc,v 1. 4 2009/05/02 15:07:47 sincertiExp $27 // GEANT4 tag $Name: geant4-09-03-beta-cand-01$26 // $Id: G4FinalStateExcitationMillerGreen.cc,v 1.6 2009/06/11 15:47:08 mantero Exp $ 27 // GEANT4 tag $Name: emlowen-V09-02-64 $ 28 28 29 29 #include "G4FinalStateExcitationMillerGreen.hh" -
trunk/source/processes/electromagnetic/lowenergy/src/G4FinalStateIonisationBorn.cc
r1055 r1192 24 24 // ******************************************************************** 25 25 // 26 // $Id: G4FinalStateIonisationBorn.cc,v 1.1 7 2009/05/02 15:07:47 sincertiExp $27 // GEANT4 tag $Name: geant4-09-03-beta-cand-01$26 // $Id: G4FinalStateIonisationBorn.cc,v 1.19 2009/06/11 15:47:08 mantero Exp $ 27 // GEANT4 tag $Name: emlowen-V09-02-64 $ 28 28 29 29 #include "G4FinalStateIonisationBorn.hh" -
trunk/source/processes/electromagnetic/lowenergy/src/G4FinalStateIonisationRudd.cc
r1055 r1192 24 24 // ******************************************************************** 25 25 // 26 // $Id: G4FinalStateIonisationRudd.cc,v 1. 9 2009/05/02 15:07:47 sincertiExp $27 // GEANT4 tag $Name: geant4-09-03-beta-cand-01$26 // $Id: G4FinalStateIonisationRudd.cc,v 1.11 2009/06/11 15:47:08 mantero Exp $ 27 // GEANT4 tag $Name: emlowen-V09-02-64 $ 28 28 29 29 #include "G4FinalStateIonisationRudd.hh" -
trunk/source/processes/electromagnetic/lowenergy/src/G4FinalStateKill.cc
r1007 r1192 26 26 // 27 27 // $Id: G4FinalStateKill.cc,v 1.1 2007/11/09 20:26:12 pia Exp $ 28 // GEANT4 tag $Name: geant4-09-02$28 // GEANT4 tag $Name: emlowen-V09-02-64 $ 29 29 // 30 30 // Contact Author: Maria Grazia Pia (Maria.Grazia.Pia@cern.ch) -
trunk/source/processes/electromagnetic/lowenergy/src/G4FinalStateProduct.cc
r1055 r1192 25 25 // 26 26 // 27 // $Id: G4FinalStateProduct.cc,v 1. 6 2009/01/20 07:50:28 sincertiExp $28 // GEANT4 tag $Name: geant4-09-03-beta-cand-01$27 // $Id: G4FinalStateProduct.cc,v 1.7 2009/06/10 13:32:36 mantero Exp $ 28 // GEANT4 tag $Name: emlowen-V09-02-64 $ 29 29 // 30 30 // Contact Author: Maria Grazia Pia (Maria.Grazia.Pia@cern.ch) -
trunk/source/processes/electromagnetic/lowenergy/src/G4FinalStatePsCreationChampion.cc
r1007 r1192 24 24 // ******************************************************************** 25 25 // 26 // $Id: G4FinalStatePsCreationChampion.cc,v 1. 1 2008/07/16 19:01:07 sincertiExp $27 // GEANT4 tag $Name: geant4-09-02$26 // $Id: G4FinalStatePsCreationChampion.cc,v 1.2 2009/06/10 13:32:36 mantero Exp $ 27 // GEANT4 tag $Name: emlowen-V09-02-64 $ 28 28 // ------------------------------------------------------------------- 29 29 -
trunk/source/processes/electromagnetic/lowenergy/src/G4FluoTransition.cc
r1007 r1192 26 26 // 27 27 // $Id: G4FluoTransition.cc,v 1.2 ???? 28 // GEANT4 tag $Name: geant4-09-02$28 // GEANT4 tag $Name: emlowen-V09-02-64 $ 29 29 // 30 30 // Author: Elena Guardincerri (Elena.Guardincerri@ge.infn.it) -
trunk/source/processes/electromagnetic/lowenergy/src/G4IonDEDXHandler.cc
r1058 r1192 35 35 // First implementation: 11. 03. 2009 36 36 // 37 // Modifications: 38 // 37 // Modifications: 12. 11 .2009 - Function BuildDEDXTable: Using adapted build 38 // methods of stopping power classes according 39 // to interface change in G4VIonDEDXTable. 40 // Function UpdateCacheValue: Using adapted 41 // ScalingFactorEnergy function according to 42 // interface change in G4VIonDEDXScaling- 43 // Algorithm (AL) 39 44 // 40 45 // Class description: … … 227 232 const G4String& materialName = material -> GetName(); 228 233 229 isApplicable = table -> IsApplicable(atomicNumberBase, chemFormula);234 isApplicable = table -> BuildPhysicsVector(atomicNumberBase, chemFormula); 230 235 231 236 if(isApplicable) { … … 235 240 } 236 241 237 isApplicable = table -> IsApplicable(atomicNumberBase, materialName);242 isApplicable = table -> BuildPhysicsVector(atomicNumberBase, materialName); 238 243 if(isApplicable) { 239 244 stoppingPowerTable[key] = … … 253 258 G4int atomicNumberMat = G4int((*elementVector)[i] -> GetZ()); 254 259 255 isApplicable = table -> IsApplicable(atomicNumberBase, atomicNumberMat);260 isApplicable = table -> BuildPhysicsVector(atomicNumberBase, atomicNumberMat); 256 261 257 262 if(isApplicable) { … … 274 279 size_t nmbdEdxBins = dEdxTable[0] -> GetVectorLength(); 275 280 G4double lowerEdge = dEdxTable[0] -> GetLowEdgeEnergy(0); 276 G4double upperEdge = dEdxTable[0] -> GetLowEdgeEnergy(nmbdEdxBins );281 G4double upperEdge = dEdxTable[0] -> GetLowEdgeEnergy(nmbdEdxBins-1); 277 282 278 283 G4LPhysicsFreeVector* dEdxBragg = … … 339 344 G4double nmbNucleons = G4double(particle -> GetAtomicMass()); 340 345 value.energyScaling = 341 algorithm -> ScalingFactorEnergy(particle) / nmbNucleons;346 algorithm -> ScalingFactorEnergy(particle, material) / nmbNucleons; 342 347 343 348 size_t nmbdEdxBins = value.dedxVector -> GetVectorLength(); -
trunk/source/processes/electromagnetic/lowenergy/src/G4IonDEDXScalingICRU73.cc
r1066 r1192 37 37 // First implementation: 10. 05. 2009 38 38 // 39 // Modifications: 40 // 39 // Modifications: 06. 08. 2009 - Minor bug fix (initialization of cache) AL 40 // 12. 11. 2009 - Moved all decision logic concerning ICRU 73 41 // scaling for heavy ions into this class. 42 // Adapting ScalingFactorEnergy class according 43 // to changes in base class (AL). 41 44 // 42 45 // Class description: … … 58 61 G4IonDEDXScalingICRU73::G4IonDEDXScalingICRU73( 59 62 G4int minAtomicNumberIon, 60 G4int maxAtomicNumberIon, 61 G4int atomicNumberReference, 62 G4int massNumberReference) : 63 G4int maxAtomicNumberIon) : 63 64 minAtomicNumber( minAtomicNumberIon ), 64 65 maxAtomicNumber( maxAtomicNumberIon ), 65 excludedIon( false ), 66 reference( 0 ), 67 atomicNumberRef( atomicNumberReference ), 68 massNumberRef( massNumberReference ) { 66 referenceFe( 0 ), 67 atomicNumberRefFe( 26 ), 68 massNumberRefFe( 56 ), 69 atomicNumberRefPow23Fe( 0 ), 70 chargeRefFe( 0 ), 71 massRefFe( 0 ), 72 referenceAr( 0 ), 73 atomicNumberRefAr( 18 ), 74 massNumberRefAr( 40 ), 75 atomicNumberRefPow23Ar( 0 ), 76 chargeRefAr( 0 ), 77 massRefAr( 0 ), 78 useFe( true ), 79 cacheParticle( 0 ), 80 cacheMassNumber( 0 ), 81 cacheAtomicNumber( 0 ), 82 cacheAtomicNumberPow23( 0 ), 83 cacheCharge( 0 ), 84 cacheMass( 0 ), 85 cacheMaterial( 0 ) { 69 86 70 87 } … … 78 95 // ########################################################################### 79 96 80 void G4IonDEDXScalingICRU73::CreateReferenceParticle() { 81 97 void G4IonDEDXScalingICRU73::CreateReferenceParticles() { 82 98 83 99 G4ParticleTable* particleTable = G4ParticleTable::GetParticleTable(); … … 85 101 G4double excitationEnergy = 0.0; 86 102 87 reference = 88 particleTable -> GetIon(atomicNumberRef, massNumberRef, excitationEnergy); 103 referenceFe = particleTable -> GetIon(atomicNumberRefFe, massNumberRefFe, 104 excitationEnergy); 105 referenceAr = particleTable -> GetIon(atomicNumberRefAr, massNumberRefAr, 106 excitationEnergy); 89 107 90 massRef = reference -> GetPDGMass(); 91 chargeRef = reference -> GetPDGCharge(); 92 93 atomicNumberRefPow23 = std::pow(G4double(atomicNumberRef), 2./3.); 108 massRefFe = referenceFe -> GetPDGMass(); 109 massRefAr = referenceAr -> GetPDGMass(); 110 111 chargeRefFe = referenceFe -> GetPDGCharge(); 112 chargeRefAr = referenceAr -> GetPDGCharge(); 113 114 atomicNumberRefPow23Fe = std::pow(G4double(atomicNumberRefFe), 2./3.); 115 atomicNumberRefPow23Ar = std::pow(G4double(atomicNumberRefAr), 2./3.); 94 116 } 95 117 … … 99 121 100 122 G4double G4IonDEDXScalingICRU73::ScalingFactorEnergy ( 101 const G4ParticleDefinition* particle) { // Projectile (ion) 123 const G4ParticleDefinition* particle, // Projectile (ion) 124 const G4Material* material) { // Target material 102 125 103 126 G4double factor = 1.0; 104 127 105 UpdateCache(particle); 106 107 if(! excludedIon && 108 cacheAtomicNumber >= minAtomicNumber && 109 cacheAtomicNumber <= maxAtomicNumber) { 110 111 if(reference == 0) CreateReferenceParticle(); 112 113 factor = cacheMassNumber * (massRef / cacheMass) / massNumberRef; 128 UpdateCacheParticle(particle); 129 UpdateCacheMaterial(material); 130 131 if(cacheAtomicNumber >= minAtomicNumber && 132 cacheAtomicNumber <= maxAtomicNumber && 133 cacheAtomicNumber != atomicNumberRefFe && 134 cacheAtomicNumber != atomicNumberRefAr) { 135 136 if(referenceFe == 0 || referenceAr == 0) CreateReferenceParticles(); 137 138 if( useFe ) 139 factor = cacheMassNumber * (massRefFe / cacheMass) / massNumberRefFe; 140 else 141 factor = cacheMassNumber * (massRefAr / cacheMass) / massNumberRefAr; 114 142 } 115 143 … … 121 149 G4double G4IonDEDXScalingICRU73::ScalingFactorDEDX( 122 150 const G4ParticleDefinition* particle, // Projectile (ion) 123 const G4Material* ,// Target material151 const G4Material* material, // Target material 124 152 G4double kineticEnergy) { // Kinetic energy 125 153 126 154 G4double factor = 1.0; 127 155 128 UpdateCache(particle); 129 130 if(! excludedIon && 131 cacheAtomicNumber >= minAtomicNumber && 132 cacheAtomicNumber <= maxAtomicNumber) { 156 UpdateCacheParticle(particle); 157 UpdateCacheMaterial(material); 158 159 if(cacheAtomicNumber >= minAtomicNumber && 160 cacheAtomicNumber <= maxAtomicNumber && 161 cacheAtomicNumber != atomicNumberRefFe && 162 cacheAtomicNumber != atomicNumberRefAr) { 133 163 134 if(reference == 0) CreateReferenceParticle(); 135 136 G4double equilibriumCharge = EquilibriumCharge(cacheMass, 164 if(referenceFe == 0 || referenceAr == 0) CreateReferenceParticles(); 165 166 if( useFe ) { 167 168 G4double equilibriumCharge = EquilibriumCharge(cacheMass, 137 169 cacheCharge, 138 170 cacheAtomicNumberPow23, 139 171 kineticEnergy); 140 172 141 G4double scaledKineticEnergy = kineticEnergy * (massRef/ cacheMass);173 G4double scaledKineticEnergy = kineticEnergy * (massRefFe / cacheMass); 142 174 143 G4double equilibriumChargeRef = EquilibriumCharge(massRef,144 chargeRef ,145 atomicNumberRefPow23 ,175 G4double equilibriumChargeRefFe = EquilibriumCharge(massRefFe, 176 chargeRefFe, 177 atomicNumberRefPow23Fe, 146 178 scaledKineticEnergy); 147 179 148 factor = equilibriumCharge * equilibriumCharge/ 149 ( equilibriumChargeRef * equilibriumChargeRef ); 150 } 180 factor = equilibriumCharge * equilibriumCharge/ 181 ( equilibriumChargeRefFe * equilibriumChargeRefFe ); 182 183 } 184 else { 185 186 G4double equilibriumCharge = EquilibriumCharge(cacheMass, 187 cacheCharge, 188 cacheAtomicNumberPow23, 189 kineticEnergy); 190 191 G4double scaledKineticEnergy = kineticEnergy * (massRefAr / cacheMass); 192 193 G4double equilibriumChargeRefAr = EquilibriumCharge(massRefAr, 194 chargeRefAr, 195 atomicNumberRefPow23Ar, 196 scaledKineticEnergy); 197 198 factor = equilibriumCharge * equilibriumCharge/ 199 ( equilibriumChargeRefAr * equilibriumChargeRefAr ); 200 201 } 202 } 151 203 152 204 return factor; … … 157 209 G4int G4IonDEDXScalingICRU73::AtomicNumberBaseIon( 158 210 G4int atomicNumberIon, // Atomic number of ion 159 const G4Material*) { // Target material 211 const G4Material* material) { // Target material 212 213 UpdateCacheMaterial(material); 160 214 161 215 G4int atomicNumber = atomicNumberIon; 162 216 163 217 if(atomicNumberIon >= minAtomicNumber && 164 atomicNumberIon <= maxAtomicNumber) { 165 166 G4bool ionIsExcluded = false; 167 size_t nmb = excludedAtomicNumbers.size(); 168 169 for(size_t i = 0; i < nmb; i++) { 170 171 if(atomicNumberIon == excludedAtomicNumbers[i]) 172 ionIsExcluded = true; 173 } 174 175 if(! ionIsExcluded) { 176 if(reference == 0) CreateReferenceParticle(); 177 178 atomicNumber = atomicNumberRef; 179 } 218 atomicNumberIon <= maxAtomicNumber && 219 atomicNumberIon != atomicNumberRefFe && 220 atomicNumberIon != atomicNumberRefAr) { 221 222 if(referenceFe == 0 || referenceAr == 0) CreateReferenceParticles(); 223 224 if( useFe ) atomicNumber = atomicNumberRefFe; 225 else atomicNumber = atomicNumberRefAr; 180 226 } 181 227 -
trunk/source/processes/electromagnetic/lowenergy/src/G4IonParametrisedLossModel.cc
r1055 r1192 38 38 // 39 39 // Modifications: 03. 02. 2009 - Bug fix iterators (AL) 40 // 11. 03. 2009 - Introduced new table handler 40 // 11. 03. 2009 - Introduced new table handler(G4IonDEDXHandler) 41 41 // and modified method to add/remove tables 42 // (tables are now built in init ialisationphase),42 // (tables are now built in init. phase), 43 43 // Minor bug fix in ComputeDEDXPerVolume (AL) 44 44 // 11. 05. 2009 - Introduced scaling algorithm for heavier ions: 45 45 // G4IonDEDXScalingICRU73 (AL) 46 // 12. 11. 2009 - Moved from original ICRU 73 classes to new 47 // class (G4IonStoppingData), which is capable 48 // of reading stopping power data files stored 49 // in G4LEDATA (requires G4EMLOW6.8 or higher). 50 // Simultanesouly, the upper energy limit of 51 // ICRU 73 is increased to 1 GeV/nucleon. 52 // - Removed nuclear stopping from Corrections- 53 // AlongStep since dedicated process was created. 54 // - Added function for switching off scaling 55 // of heavy ions from ICRU 73 data 56 // - Minor fix in ComputeLossForStep function 57 // - Minor fix in ComputeDEDXPerVolume (AL) 58 // 46 59 // 47 60 // Class description: … … 58 71 59 72 #include "G4IonParametrisedLossModel.hh" 60 #include "G4MaterialStoppingICRU73.hh" 61 #include "G4SimpleMaterialStoppingICRU73.hh" 62 #include "G4IronStoppingICRU73.hh" 73 #include "G4LPhysicsFreeVector.hh" 74 #include "G4IonStoppingData.hh" 63 75 #include "G4VIonDEDXTable.hh" 64 76 #include "G4VIonDEDXScalingAlgorithm.hh" … … 104 116 105 117 // By default ICRU 73 stopping power tables are loaded: 106 107 // Ions with Z above between 19 and 21: Ar-40 data is used as basis 108 // for stopping power scaling 109 G4int ionZMin = 19; 110 G4int ionZMax = 21; 111 G4int refIonZ = 18; 112 G4int refIonA = 40; 113 114 AddDEDXTable("ICRU73-elemmat", 115 new G4SimpleMaterialStoppingICRU73, 116 new G4IonDEDXScalingICRU73(ionZMin, ionZMax, refIonZ, refIonA)); 117 118 // Ions with Z above 21: Fe-56 data is used as basis for stopping power 119 // scaling 120 ionZMin = 22; 121 ionZMax = 102; 122 refIonZ = 26; 123 refIonA = 56; 124 125 AddDEDXTable("ICRU73-ironions", 126 new G4IronStoppingICRU73, 127 new G4IonDEDXScalingICRU73(ionZMin, ionZMax, refIonZ, refIonA)); 128 129 // Compound materials: Ar-40 data is used as basis for stopping power 130 // scaling (except for iron ions) 131 ionZMin = 19; 132 ionZMax = 102; 133 refIonZ = 18; 134 refIonA = 40; 135 136 G4IonDEDXScalingICRU73* scaling = 137 new G4IonDEDXScalingICRU73(ionZMin, ionZMax, refIonZ, refIonA); 138 139 G4int ironIonAtomicNumber = 26; 140 scaling -> AddException(ironIonAtomicNumber); 141 142 AddDEDXTable("ICRU73-compmat", 143 new G4MaterialStoppingICRU73, 144 scaling); 118 AddDEDXTable("ICRU73", 119 new G4IonStoppingData("ion_stopping_data/icru73"), 120 new G4IonDEDXScalingICRU73()); 145 121 146 122 // The boundaries for the range tables are set … … 538 514 material, genericIon, 539 515 scaledKineticEnergy, cutEnergy); 540 dEdx *= factor;541 516 542 517 dEdx *= chargeSquare; … … 546 521 material, kineticEnergy); 547 522 } 523 524 dEdx *= factor; 548 525 } 549 526 … … 862 839 // in the along step DoIt function. 863 840 // 864 // Contributon due to nuclear stopping are applied in any case (given the865 // nuclear stopping flag is set).866 841 // 867 842 // (Implementation partly adapted from G4BraggIonModel/G4BetheBlochModel) … … 991 966 corrections -> IonHighOrderCorrections(particle, couple, energy); 992 967 } 993 994 // Nuclear stopping995 G4double scaledKineticEnergy = kineticEnergy * dedxCacheGenIonMassRatio;996 G4double charge = particle->GetPDGCharge()/eplus;997 G4double chargeSquare = charge * charge;998 999 if(nuclearStopping && scaledKineticEnergy < chargeSquare * 100.0 * MeV) {1000 1001 G4double nloss =1002 length * corrections -> NuclearDEDX(particle, material, energy, false);1003 1004 if(eloss + nloss > kineticEnergy) {1005 1006 nloss *= (kineticEnergy / (eloss + nloss));1007 eloss = kineticEnergy;1008 } else {1009 eloss += nloss;1010 }1011 1012 particleChangeLoss -> ProposeNonIonizingEnergyDeposit(nloss);1013 }1014 968 } 1015 969 … … 1196 1150 G4bool b; 1197 1151 1152 G4double lowerEnEdge = energyRange -> GetLowEdgeEnergy( 0 ); 1153 G4double lowerRangeEdge = rangeEnergy -> GetLowEdgeEnergy( 0 ); 1154 1198 1155 // Computing range for pre-step kinetic energy: 1199 1156 G4double range = energyRange -> GetValue(kineticEnergy, b); 1157 1158 // Energy below vector boundary: 1159 if(kineticEnergy < lowerEnEdge) { 1160 1161 range = energyRange -> GetValue(lowerEnEdge, b); 1162 range *= std::sqrt(kineticEnergy / lowerEnEdge); 1163 } 1200 1164 1201 1165 #ifdef PRINT_DEBUG … … 1205 1169 #endif 1206 1170 1171 // Remaining range: 1172 G4double remRange = range - stepLength; 1173 1207 1174 // If range is smaller than step length, the loss is set to kinetic 1208 1175 // energy 1209 if(range <= stepLength) loss = kineticEnergy; 1176 if(remRange < 0.0) loss = kineticEnergy; 1177 else if(remRange < lowerRangeEdge) { 1178 1179 G4double ratio = remRange / lowerRangeEdge; 1180 loss = kineticEnergy - ratio * ratio * lowerEnEdge; 1181 } 1210 1182 else { 1211 1183 1212 1184 G4double energy = rangeEnergy -> GetValue(range - stepLength, b); 1213 1214 loss = kineticEnergy - energy; 1215 1216 if(loss < 0.0) loss = 0.0; 1217 } 1218 } 1185 loss = kineticEnergy - energy; 1186 } 1187 } 1188 1189 if(loss < 0.0) loss = 0.0; 1219 1190 1220 1191 return loss; … … 1278 1249 delete (*iter); 1279 1250 1251 // Remove from table list 1280 1252 lossTableList.erase(iter); 1253 1254 // Range vs energy and energy vs range vectors are cleared 1255 RangeEnergyTable::iterator iterRange = r.begin(); 1256 RangeEnergyTable::iterator iterRange_end = r.end(); 1257 1258 for(;iterRange != iterRange_end; iterRange++) 1259 delete iterRange -> second; 1260 r.clear(); 1261 1262 EnergyRangeTable::iterator iterEnergy = E.begin(); 1263 EnergyRangeTable::iterator iterEnergy_end = E.end(); 1264 1265 for(;iterEnergy != iterEnergy_end; iterEnergy++) 1266 delete iterEnergy -> second; 1267 E.clear(); 1268 1281 1269 return true; 1282 1270 } … … 1288 1276 // ######################################################################### 1289 1277 1278 void G4IonParametrisedLossModel::DeactivateICRU73Scaling() { 1279 1280 RemoveDEDXTable("ICRU73"); 1281 AddDEDXTable("ICRU73", new G4IonStoppingData("ion_stopping_data/icru73")); 1282 } 1283 1284 // ######################################################################### -
trunk/source/processes/electromagnetic/lowenergy/src/G4LinInterpolation.cc
r1007 r1192 25 25 // 26 26 // 27 // $Id: G4LinInterpolation.cc,v 1. 3 2006/06/29 19:40:03 gunterExp $28 // GEANT4 tag $Name: geant4-09-02$27 // $Id: G4LinInterpolation.cc,v 1.5 2009/09/25 07:41:34 sincerti Exp $ 28 // GEANT4 tag $Name: emlowen-V09-02-64 $ 29 29 // 30 30 // Author: Maria Grazia Pia (Maria.Grazia.Pia@cern.ch) … … 33 33 // ----------- 34 34 // 31 Jul 2001 MGP Created 35 // 14 JUn 2009 NAK New Calculation method implemented to which logarithmic values 36 // from the G4EMLOW dataset are loaded directly to enhance performance 35 37 // 36 38 // ------------------------------------------------------------------- … … 56 58 const G4DataVector& data) const 57 59 { 60 //G4cout << "G4LinInterpolation is performed (2 arguments)" << G4endl; 58 61 G4int nBins = data.size() - 1; 59 62 G4double value = 0.; … … 76 79 return value; 77 80 } 81 82 83 //Nicolas A. Karakatsanis: New Calculation method implemented to which logarithmic values 84 // from the G4EMLOW dataset are loaded directly to enhance performance 85 86 G4double G4LinInterpolation::Calculate(G4double x, G4int bin, 87 const G4DataVector& points, 88 const G4DataVector& data, 89 const G4DataVector& log_points, 90 const G4DataVector& log_data) const 91 { 92 //Linear Interpolation is performed on loagarithmic data set 93 //Equivalent to log-log interpolation on non-loagarithmic data set 94 //G4cout << "G4LinInterpolation is performed - (4 arguments)" << G4endl; 95 G4int nBins = data.size() - 1; 96 G4double value = 0.; 97 G4double log_x = std::log10(x); 98 if (x < points[0]) 99 { 100 value = 0.; 101 } 102 else if (bin < nBins) 103 { 104 G4double log_e1 = log_points[bin]; 105 G4double log_e2 = log_points[bin+1]; 106 G4double log_d1 = log_data[bin]; 107 G4double log_d2 = log_data[bin+1]; 108 109 // Values e1, e2, d1 and d2 are the log values of the corresponding 110 // original energy and data values. Simple linear interpolation performed 111 // on loagarithmic data should be equivalent to log-log interpolation 112 value = log_d1 + (log_d2 - log_d1)*(log_x - log_e1)/(log_e2 - log_e1); 113 114 // Delogarithmize to obtain interpolated value 115 value = std::pow(10.,value); 116 } 117 else 118 { 119 value = data[nBins]; 120 } 121 return value; 122 } -
trunk/source/processes/electromagnetic/lowenergy/src/G4LinLogInterpolation.cc
r819 r1192 52 52 const G4DataVector& data) const 53 53 { 54 //G4cout << "G4LinLogInterpolation is performed on dataset (2 arguments) " << G4endl; 54 55 G4int nBins = data.size() - 1; 55 56 G4double value = 0.; … … 72 73 return value; 73 74 } 75 76 G4double G4LinLogInterpolation::Calculate(G4double x, G4int bin, 77 const G4DataVector& points, 78 const G4DataVector& data, 79 const G4DataVector& /*log_points*/, 80 const G4DataVector& log_data) const 81 { 82 //G4cout << "G4LinLogInterpolation is performed on dataset (4 arguments) " << G4endl; 83 G4int nBins = data.size() - 1; 84 G4double value = 0.; 85 //G4double log_x = std::log10(x); 86 if (x < points[0]) 87 { 88 value = 0.; 89 } 90 else if (bin < nBins) 91 { 92 G4double e1 = points[bin]; 93 G4double e2 = points[bin+1]; 94 G4double d1 = data[bin]; 95 G4double d2 = data[bin+1]; 96 //G4double log_e1 = log_points[bin]; 97 //G4double log_e2 = log_points[bin+1]; 98 G4double log_d1 = log_data[bin]; 99 G4double log_d2 = log_data[bin+1]; 100 if (d1 > 0.0 && d2 > 0.0) 101 { 102 // Values e1, e2, d1 and d2 are the log values of the corresponding 103 // original energy and data values. Simple linear interpolation performed 104 // on loagarithmic data should be equivalent to log-log interpolation 105 //value = log_d1 + (log_d2 - log_d1)*(log_x - log_e1)/(log_e2 - log_e1); 106 value = std::exp(log_d1 + (log_d2 - log_d1)*(x - e1)/(e2 - e1)); 107 } 108 else 109 { 110 if (d1 == 0.0) log_d1 = -300; 111 if (d2 == 0.0) log_d2 = -300; 112 value = std::exp(log_d1 + (log_d2 - log_d1)*(x - e1)/(e2 - e1)); 113 } 114 } 115 else 116 { 117 value = data[nBins]; 118 } 119 return value; 120 } 121 -
trunk/source/processes/electromagnetic/lowenergy/src/G4LinLogLogInterpolation.cc
r819 r1192 53 53 const G4DataVector& data) const 54 54 { 55 //G4cout << "G4LinLogLogInterpolation is performed (2 arguments) " << G4endl; 55 56 G4int nBins = data.size() - 1; 56 57 G4double value = 0.; … … 79 80 return value; 80 81 } 82 83 G4double G4LinLogLogInterpolation::Calculate(G4double x, G4int bin, 84 const G4DataVector& points, 85 const G4DataVector& data, 86 const G4DataVector& log_points, 87 const G4DataVector& log_data) const 88 { 89 //G4cout << "G4LinLogLogInterpolation is performed(4 arguments) " << G4endl; 90 G4int nBins = data.size() - 1; 91 G4double value = 0.; 92 G4double log_x = std::log10(x); 93 if (x < points[0]) 94 { 95 value = 0.; 96 } 97 else if (bin < nBins) 98 { 99 G4double e1 = points[bin]; 100 G4double e2 = points[bin+1]; 101 G4double d1 = data[bin]; 102 G4double d2 = data[bin+1]; 103 G4double log_e1 = log_points[bin]; 104 G4double log_e2 = log_points[bin+1]; 105 G4double log_d1 = log_data[bin]; 106 G4double log_d2 = log_data[bin+1]; 107 //G4cout << "x = " << x << " , log_x = " << log_x << " , bin = " << bin << G4endl; 108 //G4cout << "e1 = " << e1 << " , d1 = " << d1 << G4endl; 109 //G4cout << "e2 = " << e2 << " , d2 = " << d2 << G4endl; 110 //G4cout << "log_e1 = " << log_e1 << " , log_d1 = " << log_d1 << G4endl; 111 //G4cout << "log_e2 = " << log_e2 << " , log_d2 = " << log_d2 <<G4endl; 112 if (d1 > 0.0 && d2 > 0.0) 113 { 114 // Values e1, e2, d1 and d2 are the log values of the corresponding 115 // original energy and data values. Simple linear interpolation performed 116 // on loagarithmic data should be equivalent to log-log interpolation 117 value = log_d1 + (log_d2 - log_d1)*(log_x - log_e1)/(log_e2 - log_e1); 118 119 //G4cout << "Case of normal log-log interpolation" << G4endl; 120 //G4cout << "Temp log interpolated value: log_value = " << value << G4endl; 121 122 // Delogarithmize to obtain interpolated value 123 value = std::pow(10.,value); 124 125 //G4cout << "Final Interpolated value: " << value << G4endl << G4endl; 126 } 127 else 128 { 129 // Case of semi log-log interpolation 130 //G4cout << "G4LinLogLogInterpolation - Case of SemiLogInterpolation" << G4endl; 131 if (e1 == 0.0) e1 = 1e-300; 132 if (e2 == 0.0) e2 = 1e-300; 133 value = d1 + (d2 - d1)*(log_x - log_e1)/(log_e2 - log_e1); 134 //G4cout << "LinLogInterpolation: Final Interpolated value: " << value << G4endl << G4endl; 135 } 136 } 137 else 138 { 139 value = data[nBins]; 140 } 141 return value; 142 } -
trunk/source/processes/electromagnetic/lowenergy/src/G4LivermoreBremsstrahlungModel.cc
r1058 r1192 24 24 // ******************************************************************** 25 25 // 26 // $Id: G4LivermoreBremsstrahlungModel.cc,v 1. 4 2009/05/19 14:57:01 pandolaExp $27 // GEANT4 tag $Name: geant4-09-03-beta-cand-01$26 // $Id: G4LivermoreBremsstrahlungModel.cc,v 1.6 2009/06/11 15:47:08 mantero Exp $ 27 // GEANT4 tag $Name: emlowen-V09-02-64 $ 28 28 // 29 29 // Author: Luciano Pandola -
trunk/source/processes/electromagnetic/lowenergy/src/G4LivermoreComptonModel.cc
r1055 r1192 24 24 // ******************************************************************** 25 25 // 26 // $Id: G4LivermoreComptonModel.cc,v 1. 6 2009/04/18 18:29:34 vnivanchExp $27 // GEANT4 tag $Name: geant4-09-03-beta-cand-01$26 // $Id: G4LivermoreComptonModel.cc,v 1.7 2009/06/10 13:32:36 mantero Exp $ 27 // GEANT4 tag $Name: emlowen-V09-02-64 $ 28 28 // 29 29 // -
trunk/source/processes/electromagnetic/lowenergy/src/G4LivermoreGammaConversionModel.cc
r1055 r1192 24 24 // ******************************************************************** 25 25 // 26 // $Id: G4LivermoreGammaConversionModel.cc,v 1. 6 2009/05/02 09:14:43 sincertiExp $27 // GEANT4 tag $Name: geant4-09-03-beta-cand-01$26 // $Id: G4LivermoreGammaConversionModel.cc,v 1.8 2009/06/11 15:47:08 mantero Exp $ 27 // GEANT4 tag $Name: emlowen-V09-02-64 $ 28 28 // 29 29 // -
trunk/source/processes/electromagnetic/lowenergy/src/G4LivermoreIonisationModel.cc
r1058 r1192 24 24 // ******************************************************************** 25 25 // 26 // $Id: G4LivermoreIonisationModel.cc,v 1. 4 2009/05/19 14:57:01pandola Exp $27 // GEANT4 tag $Name: geant4-09-03-beta-cand-01$26 // $Id: G4LivermoreIonisationModel.cc,v 1.7 2009/10/23 09:30:08 pandola Exp $ 27 // GEANT4 tag $Name: emlowen-V09-02-64 $ 28 28 // 29 29 // Author: Luciano Pandola … … 41 41 // 19 May 2009 L Pandola Explicitely set to zero pointers deleted in 42 42 // Initialise(), since they might be checked later on 43 // 23 Oct 2009 L Pandola 44 // - atomic deexcitation managed via G4VEmModel::DeexcitationFlag() is 45 // set as "true" (default would be false) 43 46 // 44 47 … … 55 58 #include "G4Electron.hh" 56 59 #include "G4CrossSectionHandler.hh" 57 #include "G4AtomicDeexcitation.hh"58 60 #include "G4ProcessManager.hh" 59 61 #include "G4VEMDataSet.hh" … … 84 86 verboseLevel = 0; 85 87 // 86 fUseAtomicDeexcitation = true; 88 //By default: use deexcitation, not auger 89 SetDeexcitationFlag(true); 87 90 ActivateAuger(false); 91 88 92 // 89 93 // Notice: the fluorescence along step is generated only if it is … … 661 665 void G4LivermoreIonisationModel::ActivateAuger(G4bool val) 662 666 { 667 if (!DeexcitationFlag() && val) 668 { 669 G4cout << "WARNING - G4LivermoreIonisationModel" << G4endl; 670 G4cout << "The use of the Atomic Deexcitation Manager is set to false " << G4endl; 671 G4cout << "Therefore, Auger electrons will be not generated anyway" << G4endl; 672 } 663 673 deexcitationManager.ActivateAugerElectronProduction(val); 664 } 665 674 if (verboseLevel > 1) 675 G4cout << "Auger production set to " << val << G4endl; 676 } 677 -
trunk/source/processes/electromagnetic/lowenergy/src/G4LivermorePhotoElectricModel.cc
r1055 r1192 24 24 // ******************************************************************** 25 25 // 26 // $Id: G4LivermorePhotoElectricModel.cc,v 1. 7 2009/04/18 18:29:34 vnivanchExp $27 // GEANT4 tag $Name: geant4-09-03-beta-cand-01$26 // $Id: G4LivermorePhotoElectricModel.cc,v 1.9 2009/10/23 09:31:03 pandola Exp $ 27 // GEANT4 tag $Name: emlowen-V09-02-64 $ 28 28 // 29 29 // … … 40 40 // - added protection against numerical problem in energy sampling 41 41 // - use G4ElementSelector 42 // 23 Oct 2009 L Pandola 43 // - atomic deexcitation managed via G4VEmModel::DeexcitationFlag() is 44 // set as "true" (default would be false) 45 // 42 46 43 47 #include "G4LivermorePhotoElectricModel.hh" … … 59 63 SetHighEnergyLimit(highEnergyLimit); 60 64 65 //Set atomic deexcitation by default 66 SetDeexcitationFlag(true); 61 67 ActivateAuger(false); 62 68 -
trunk/source/processes/electromagnetic/lowenergy/src/G4LivermorePolarizedComptonModel.cc
r1055 r1192 25 25 // 26 26 // $Id: G4LivermorePolarizedComptonModel.cc,v 1.6 2009/05/03 08:29:55 sincerti Exp $ 27 // GEANT4 tag $Name: geant4-09-03-beta-cand-01$27 // GEANT4 tag $Name: emlowen-V09-02-64 $ 28 28 // 29 29 // History: -
trunk/source/processes/electromagnetic/lowenergy/src/G4LivermorePolarizedRayleighModel.cc
r1055 r1192 25 25 // 26 26 // $Id: G4LivermorePolarizedRayleighModel.cc,v 1.5 2009/05/02 15:20:53 sincerti Exp $ 27 // GEANT4 tag $Name: geant4-09-03-beta-cand-01$27 // GEANT4 tag $Name: emlowen-V09-02-64 $ 28 28 // 29 29 // History: -
trunk/source/processes/electromagnetic/lowenergy/src/G4LivermoreRayleighModel.cc
r1055 r1192 24 24 // ******************************************************************** 25 25 // 26 // $Id: G4LivermoreRayleighModel.cc,v 1. 6 2009/04/18 18:29:34 vnivanchExp $27 // GEANT4 tag $Name: geant4-09-03-beta-cand-01$26 // $Id: G4LivermoreRayleighModel.cc,v 1.8 2009/09/23 16:54:06 flongo Exp $ 27 // GEANT4 tag $Name: emlowen-V09-02-64 $ 28 28 // 29 29 // Author: Sebastien Inserti … … 195 195 } while (fcostheta < G4UniformRand()); 196 196 197 if (photonEnergy0 > 5) 198 { 199 cosTheta = 1.; 200 } 201 197 202 G4double sinThetaHalf = std::sqrt((1. - cosTheta) / 2.); 198 203 x = sinThetaHalf / (wlPhoton/cm); -
trunk/source/processes/electromagnetic/lowenergy/src/G4LogLogInterpolation.cc
r1007 r1192 25 25 // 26 26 // 27 // $Id: G4LogLogInterpolation.cc,v 1.1 4 2008/12/12 08:50:59sincerti Exp $28 // GEANT4 tag $Name: geant4-09-02$27 // $Id: G4LogLogInterpolation.cc,v 1.16 2009/09/25 07:41:34 sincerti Exp $ 28 // GEANT4 tag $Name: emlowen-V09-02-64 $ 29 29 // 30 30 // Author: Maria Grazia Pia (Maria.Grazia.Pia@cern.ch) … … 36 36 // 27 Jun 2008 SI Add check to avoid FPE errors 37 37 // 08 Dec 2008 NAK Log-Log interpolation math formula streamlined, self-test function 38 // 14 Jun 2008 NAK New implementation for log-log interpolation after directly loading 39 // logarithmic values from G4EMLOW dataset 38 40 // ------------------------------------------------------------------- 39 41 … … 58 60 const G4DataVector& data) const 59 61 { 62 //G4cout << "G4LogLogInterpolation is performed (2 arguments) " << G4endl; 60 63 G4int nBins = data.size() - 1; 61 64 //G4double oldresult = 0.; … … 105 108 return value; 106 109 } 110 111 112 // Nicolas A. Karakatsanis: New implementation of log-log interpolation after directly loading 113 // logarithmic values from G4EMLOW dataset 114 115 G4double G4LogLogInterpolation::Calculate(G4double x, G4int bin, 116 const G4DataVector& points, 117 const G4DataVector& data, 118 const G4DataVector& log_points, 119 const G4DataVector& log_data) const 120 { 121 //G4cout << "G4LogLogInterpolation is performed (4 arguments) " << G4endl; 122 G4int nBins = data.size() - 1; 123 G4double value = 0.; 124 G4double log_x = std::log10(x); 125 if (x < points[0]) 126 { 127 value = 0.; 128 } 129 else if (bin < nBins) 130 { 131 G4double log_e1 = log_points[bin]; 132 G4double log_e2 = log_points[bin+1]; 133 G4double log_d1 = log_data[bin]; 134 G4double log_d2 = log_data[bin+1]; 135 136 //G4cout << "x = " << x << " , logx = " << log_x << " , bin = " << bin << G4endl; 137 //G4cout << "e1 = " << points[bin] << " d1 = " << data[bin] << G4endl; 138 //G4cout << "e2 = " << points[bin+1] << " d2 = " << data[bin+1] << G4endl; 139 //G4cout << "loge1 = " << log_e1 << " logd1 = " << log_d1 << G4endl; 140 //G4cout << "loge2 = " << log_e2 << " logd2 = " << log_d2 << G4endl; 141 142 // Values e1, e2, d1 and d2 are the log values of the corresponding 143 // original energy and data values. Simple linear interpolation performed 144 // on loagarithmic data should be equivalent to log-log interpolation 145 value = log_d1 + (log_d2 - log_d1)*(log_x - log_e1)/(log_e2 - log_e1); 146 147 // Delogarithmize to obtain interpolated value 148 value = std::pow(10.,value); 149 } 150 else 151 { 152 value = data[nBins]; 153 } 154 return value; 155 } -
trunk/source/processes/electromagnetic/lowenergy/src/G4LowEnergyBremsstrahlung.cc
r1055 r1192 24 24 // ******************************************************************** 25 25 // 26 // $Id: G4LowEnergyBremsstrahlung.cc,v 1.7 2 2009/05/02 09:59:16 sincertiExp $27 // GEANT4 tag $Name: geant4-09-03-beta-cand-01$26 // $Id: G4LowEnergyBremsstrahlung.cc,v 1.74 2009/06/11 15:47:08 mantero Exp $ 27 // GEANT4 tag $Name: emlowen-V09-02-64 $ 28 28 // 29 29 // -------------------------------------------------------------- -
trunk/source/processes/electromagnetic/lowenergy/src/G4LowEnergyCompton.cc
r1055 r1192 24 24 // ******************************************************************** 25 25 // 26 // $Id: G4LowEnergyCompton.cc,v 1. 48 2009/05/02 09:59:16 sincertiExp $27 // GEANT4 tag $Name: geant4-09-03-beta-cand-01$26 // $Id: G4LowEnergyCompton.cc,v 1.50 2009/06/11 15:47:08 mantero Exp $ 27 // GEANT4 tag $Name: emlowen-V09-02-64 $ 28 28 // 29 29 // Author: A. Forti -
trunk/source/processes/electromagnetic/lowenergy/src/G4LowEnergyGammaConversion.cc
r1055 r1192 26 26 // -------------------------------------------------------------------- 27 27 /// 28 // $Id: G4LowEnergyGammaConversion.cc,v 1.3 7 2009/05/02 09:59:16 sincertiExp $29 // GEANT4 tag $Name: geant4-09-03-beta-cand-01$28 // $Id: G4LowEnergyGammaConversion.cc,v 1.39 2009/06/11 15:47:08 mantero Exp $ 29 // GEANT4 tag $Name: emlowen-V09-02-64 $ 30 30 // 31 31 // -
trunk/source/processes/electromagnetic/lowenergy/src/G4LowEnergyIonisation.cc
r1055 r1192 24 24 // ******************************************************************** 25 25 // 26 // $Id: G4LowEnergyIonisation.cc,v 1.10 4 2009/05/02 09:59:16 sincertiExp $27 // GEANT4 tag $Name: geant4-09-03-beta-cand-01$26 // $Id: G4LowEnergyIonisation.cc,v 1.106 2009/06/11 15:47:08 mantero Exp $ 27 // GEANT4 tag $Name: emlowen-V09-02-64 $ 28 28 // 29 29 // -------------------------------------------------------------- -
trunk/source/processes/electromagnetic/lowenergy/src/G4LowEnergyPhotoElectric.cc
r1055 r1192 25 25 // 26 26 // 27 // $Id: G4LowEnergyPhotoElectric.cc,v 1.5 7 2009/05/02 09:59:16 sincertiExp $28 // GEANT4 tag $Name: geant4-09-03-beta-cand-01$27 // $Id: G4LowEnergyPhotoElectric.cc,v 1.59 2009/06/11 15:47:08 mantero Exp $ 28 // GEANT4 tag $Name: emlowen-V09-02-64 $ 29 29 // 30 30 // Author: A. Forti -
trunk/source/processes/electromagnetic/lowenergy/src/G4LowEnergyPolarizedCompton.cc
r1055 r1192 25 25 // 26 26 // 27 // $Id: G4LowEnergyPolarizedCompton.cc,v 1.2 6 2009/05/02 09:59:16 sincertiExp $28 // GEANT4 tag $Name: geant4-09-03-beta-cand-01$27 // $Id: G4LowEnergyPolarizedCompton.cc,v 1.28 2009/06/11 15:47:08 mantero Exp $ 28 // GEANT4 tag $Name: emlowen-V09-02-64 $ 29 29 // 30 30 // ------------------------------------------------------------ -
trunk/source/processes/electromagnetic/lowenergy/src/G4LowEnergyPolarizedRayleigh.cc
r1055 r1192 24 24 // ******************************************************************** 25 25 // 26 // $Id: G4LowEnergyPolarizedRayleigh.cc,v 1. 8 2009/05/02 09:59:16 sincertiExp $27 // GEANT4 tag $Name: geant4-09-03-beta-cand-01$26 // $Id: G4LowEnergyPolarizedRayleigh.cc,v 1.10 2009/06/11 15:47:08 mantero Exp $ 27 // GEANT4 tag $Name: emlowen-V09-02-64 $ 28 28 // 29 29 // -------------------------------------------------------------- -
trunk/source/processes/electromagnetic/lowenergy/src/G4LowEnergyRayleigh.cc
r1055 r1192 26 26 // -------------------------------------------------------------------- 27 27 // 28 // $Id: G4LowEnergyRayleigh.cc,v 1. 38 2009/05/02 09:59:16 sincertiExp $29 // GEANT4 tag $Name: geant4-09-03-beta-cand-01$28 // $Id: G4LowEnergyRayleigh.cc,v 1.40 2009/06/11 15:47:08 mantero Exp $ 29 // GEANT4 tag $Name: emlowen-V09-02-64 $ 30 30 // 31 31 // Author: A. Forti -
trunk/source/processes/electromagnetic/lowenergy/src/G4PaulKCrossSection.cc
r968 r1192 25 25 // 26 26 // 27 // History: 28 // ----------- 29 // 21 Apr 2008 H. Abdelohauwed - 1st implementation 30 // 29 Apr 2009 ALF Major Design Revision 31 // 11 Nov 2009 ALF update and code cleaning for the Dec Release 32 // 33 // ------------------------------------------------------------------- 34 35 // Class description: 36 // Low Energy Electromagnetic Physics, Cross section, p ionisation, K shell 37 // Further documentation available from http://www.ge.infn.it/geant4/lowE 38 39 // ------------------------------------------------------------------- 27 40 28 41 #include "globals.hh" … … 30 43 #include <fstream> 31 44 #include <iomanip> 32 #include "G4CompositeEMDataSet.hh"33 #include "G4ShellEMDataSet.hh"45 //#include "G4CompositeEMDataSet.hh" 46 //#include "G4ShellEMDataSet.hh" 34 47 #include "G4EMDataSet.hh" 35 #include "G4VEMDataSet.hh"36 #include "G4VDataSetAlgorithm.hh"48 //#include "G4VEMDataSet.hh" 49 //#include "G4VDataSetAlgorithm.hh" 37 50 #include "G4LogLogInterpolation.hh" 38 51 #include "G4PaulKCrossSection.hh" 52 #include "G4Proton.hh" 53 #include "G4Alpha.hh" 54 39 55 40 56 G4PaulKCrossSection::G4PaulKCrossSection() 41 { } 57 { 58 59 60 interpolation = new G4LogLogInterpolation(); 61 62 /* 63 G4String path = getenv("G4LEDATA"); 64 65 if (!path) 66 G4Exception("G4paulKCrossSection::G4paulKCrossSection: G4LEDATA environment variable not set"); 67 G4cout << path + "/kcsPaul/kcs-" << G4endl; 68 */ 69 70 71 for (G4int i=4; i<93; i++) { 72 protonDataSetMap[i] = new G4EMDataSet(i,interpolation); 73 protonDataSetMap[i]->LoadData("pixe/kpcsPaul/kcs-"); 74 } 75 for (G4int i=6; i<93; i++) { 76 alphaDataSetMap[i] = new G4EMDataSet(i,interpolation); 77 alphaDataSetMap[i]->LoadData("pixe/kacsPaul/kacs-"); 78 } 79 80 81 82 83 } 42 84 43 85 G4PaulKCrossSection::~G4PaulKCrossSection() 44 { }86 { 45 87 46 G4double G4PaulKCrossSection::CalculateKCrossSection(G4int zTarget,G4int zIncident, G4double energyIncident) 88 protonDataSetMap.clear(); 89 alphaDataSetMap.clear(); 90 91 } 92 93 G4double G4PaulKCrossSection::CalculateKCrossSection(G4int zTarget,G4double massIncident, G4double energyIncident) 47 94 { 48 95 49 G4String fileName; 96 G4Proton* aProtone = G4Proton::Proton(); 97 G4Alpha* aAlpha = G4Alpha::Alpha(); 98 99 G4double sigma = 0; 50 100 51 if (zIncident == 1) 52 { fileName = "kcsPaul/kcs-";} 101 if (massIncident == aProtone->GetPDGMass() ) 102 { 103 104 sigma = protonDataSetMap[zTarget]->FindValue(energyIncident/MeV) / barn; 105 106 } 53 107 else 54 108 { 55 if (zIncident == 2) 56 { fileName = "kacsPaul/kacs-";} 57 109 if (massIncident == aAlpha->GetPDGMass()) 110 { 111 112 sigma = alphaDataSetMap[zTarget]->FindValue(energyIncident/MeV) / barn; 113 114 } 115 else 116 { 117 G4cout << "we can treat only Proton or Alpha incident particles " << G4endl; 118 sigma = 0.; 119 } 58 120 } 59 60 121 61 G4VDataSetAlgorithm* interpolation = new G4LogLogInterpolation();62 63 G4VEMDataSet* dataSet;64 65 dataSet = new G4EMDataSet(zTarget,interpolation);66 122 67 dataSet->LoadData(fileName); 68 69 70 G4double sigma = dataSet->FindValue(energyIncident/MeV) / barn; 71 72 return sigma; 123 124 return sigma; 73 125 } 74 126 -
trunk/source/processes/electromagnetic/lowenergy/src/G4PenelopeAnnihilationModel.cc
r1055 r1192 24 24 // ******************************************************************** 25 25 // 26 // $Id: G4PenelopeAnnihilationModel.cc,v 1. 3 2009/04/17 10:29:20 vnivanchExp $27 // GEANT4 tag $Name: geant4-09-03-beta-cand-01$26 // $Id: G4PenelopeAnnihilationModel.cc,v 1.4 2009/06/10 13:32:36 mantero Exp $ 27 // GEANT4 tag $Name: emlowen-V09-02-64 $ 28 28 // 29 29 // Author: Luciano Pandola -
trunk/source/processes/electromagnetic/lowenergy/src/G4PenelopeBremsstrahlung.cc
r1055 r1192 24 24 // ******************************************************************** 25 25 // 26 // $Id: G4PenelopeBremsstrahlung.cc,v 1. 19 2009/05/02 09:59:16 sincertiExp $27 // GEANT4 tag $Name: geant4-09-03-beta-cand-01$26 // $Id: G4PenelopeBremsstrahlung.cc,v 1.21 2009/06/11 15:47:08 mantero Exp $ 27 // GEANT4 tag $Name: emlowen-V09-02-64 $ 28 28 // 29 29 // -------------------------------------------------------------- -
trunk/source/processes/electromagnetic/lowenergy/src/G4PenelopeBremsstrahlungAngular.cc
r1007 r1192 24 24 // ******************************************************************** 25 25 // 26 // $Id: G4PenelopeBremsstrahlungAngular.cc,v 1. 7 2006/06/29 19:40:37 gunterExp $27 // GEANT4 tag $Name: geant4-09-02$26 // $Id: G4PenelopeBremsstrahlungAngular.cc,v 1.8 2009/06/10 13:32:36 mantero Exp $ 27 // GEANT4 tag $Name: emlowen-V09-02-64 $ 28 28 // 29 29 // -------------------------------------------------------------- -
trunk/source/processes/electromagnetic/lowenergy/src/G4PenelopeBremsstrahlungContinuous.cc
r1055 r1192 24 24 // ******************************************************************** 25 25 // 26 // $Id: G4PenelopeBremsstrahlungContinuous.cc,v 1.1 1 2008/12/15 09:23:06 pandolaExp $27 // GEANT4 tag $Name: geant4-09-03-beta-cand-01$26 // $Id: G4PenelopeBremsstrahlungContinuous.cc,v 1.12 2009/06/10 13:32:36 mantero Exp $ 27 // GEANT4 tag $Name: emlowen-V09-02-64 $ 28 28 // 29 29 // -------------------------------------------------------------- -
trunk/source/processes/electromagnetic/lowenergy/src/G4PenelopeBremsstrahlungModel.cc
r1058 r1192 24 24 // ******************************************************************** 25 25 // 26 // $Id: G4PenelopeBremsstrahlungModel.cc,v 1. 5 2009/05/14 10:56:09 pandolaExp $27 // GEANT4 tag $Name: geant4-09-03-beta-cand-01$26 // $Id: G4PenelopeBremsstrahlungModel.cc,v 1.7 2009/06/11 15:47:08 mantero Exp $ 27 // GEANT4 tag $Name: emlowen-V09-02-64 $ 28 28 // 29 29 // Author: Luciano Pandola -
trunk/source/processes/electromagnetic/lowenergy/src/G4PenelopeCompton.cc
r1055 r1192 24 24 // ******************************************************************** 25 25 // 26 // $Id: G4PenelopeCompton.cc,v 1.3 4 2009/05/02 09:59:16 sincertiExp $27 // GEANT4 tag $Name: geant4-09-03-beta-cand-01$26 // $Id: G4PenelopeCompton.cc,v 1.36 2009/06/11 15:47:08 mantero Exp $ 27 // GEANT4 tag $Name: emlowen-V09-02-64 $ 28 28 // 29 29 // Author: Luciano Pandola -
trunk/source/processes/electromagnetic/lowenergy/src/G4PenelopeComptonModel.cc
r1055 r1192 24 24 // ******************************************************************** 25 25 // 26 // $Id: G4PenelopeComptonModel.cc,v 1. 4 2009/04/18 18:29:34 vnivanchExp $27 // GEANT4 tag $Name: geant4-09-03-beta-cand-01$26 // $Id: G4PenelopeComptonModel.cc,v 1.8 2009/10/23 09:29:24 pandola Exp $ 27 // GEANT4 tag $Name: emlowen-V09-02-64 $ 28 28 // 29 29 // Author: Luciano Pandola … … 44 44 // - do not apply low-energy limit (default is 0) 45 45 // - do not apply production threshold on level of the model 46 // 21 Oct 2009 L Pandola Remove un-necessary fUseAtomicDeexcitation flag - now managed by 47 // G4VEmModel::DeexcitationFlag() 48 // Add ActivateAuger() method 46 49 // 47 50 … … 58 61 #include "G4PenelopeIntegrator.hh" 59 62 #include "G4AtomicTransitionManager.hh" 60 #include "G4AtomicDeexcitation.hh"61 63 #include "G4AtomicShell.hh" 62 64 #include "G4Gamma.hh" … … 79 81 ZForIntegration = 1; 80 82 81 fUseAtomicDeexcitation = true; 83 //by default, the model will use atomic deexcitation 84 SetDeexcitationFlag(true); 85 ActivateAuger(false); 86 82 87 verboseLevel= 0; 83 88 // Verbosity scale: … … 523 528 { 524 529 G4DynamicParticle* aPhoton; 525 G4AtomicDeexcitation deexcitationManager;526 530 deexcitationManager.SetCutForSecondaryPhotons(cutg); 527 531 deexcitationManager.SetCutForAugerElectrons(cute); 528 deexcitationManager.ActivateAugerElectronProduction(false);529 532 530 533 photonVector = deexcitationManager.GenerateParticles(Z,shellId); … … 749 752 } 750 753 754 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo.... 755 756 void G4PenelopeComptonModel::ActivateAuger(G4bool augerbool) 757 { 758 if (!DeexcitationFlag() && augerbool) 759 { 760 G4cout << "WARNING - G4PenelopeComptonModel" << G4endl; 761 G4cout << "The use of the Atomic Deexcitation Manager is set to false " << G4endl; 762 G4cout << "Therefore, Auger electrons will be not generated anyway" << G4endl; 763 } 764 deexcitationManager.ActivateAugerElectronProduction(augerbool); 765 if (verboseLevel > 1) 766 G4cout << "Auger production set to " << augerbool << G4endl; 767 } 768 769 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo.... -
trunk/source/processes/electromagnetic/lowenergy/src/G4PenelopeGammaConversionModel.cc
r1055 r1192 24 24 // ******************************************************************** 25 25 // 26 // $Id: G4PenelopeGammaConversionModel.cc,v 1. 4 2009/05/19 14:57:01 pandolaExp $27 // GEANT4 tag $Name: geant4-09-03-beta-cand-01$26 // $Id: G4PenelopeGammaConversionModel.cc,v 1.6 2009/06/11 15:47:08 mantero Exp $ 27 // GEANT4 tag $Name: emlowen-V09-02-64 $ 28 28 // 29 29 // Author: Luciano Pandola -
trunk/source/processes/electromagnetic/lowenergy/src/G4PenelopeIonisation.cc
r1055 r1192 24 24 // ******************************************************************** 25 25 // 26 // $Id: G4PenelopeIonisation.cc,v 1.2 0 2009/05/02 09:59:16 sincertiExp $27 // GEANT4 tag $Name: geant4-09-03-beta-cand-01$26 // $Id: G4PenelopeIonisation.cc,v 1.22 2009/06/11 15:47:08 mantero Exp $ 27 // GEANT4 tag $Name: emlowen-V09-02-64 $ 28 28 // 29 29 // -------------------------------------------------------------- -
trunk/source/processes/electromagnetic/lowenergy/src/G4PenelopeIonisationModel.cc
r1055 r1192 24 24 // ******************************************************************** 25 25 // 26 // $Id: G4PenelopeIonisationModel.cc,v 1. 5 2009/05/19 14:57:01pandola Exp $27 // GEANT4 tag $Name: geant4-09-03-beta-cand-01$26 // $Id: G4PenelopeIonisationModel.cc,v 1.10 2009/10/23 09:29:24 pandola Exp $ 27 // GEANT4 tag $Name: emlowen-V09-02-64 $ 28 28 // 29 29 // Author: Luciano Pandola … … 39 39 // 19 May 2009 L Pandola Explicitely set to zero pointers deleted in 40 40 // Initialise(), since they might be checked later on 41 // 21 Oct 2009 L Pandola Remove un-necessary fUseAtomicDeexcitation flag - now managed by 42 // G4VEmModel::DeexcitationFlag() 43 // Add ActivateAuger() method 41 44 // 42 45 … … 77 80 SetHighEnergyLimit(fIntrinsicHighEnergyLimit); 78 81 // 79 80 fUseAtomicDeexcitation = true;82 // Atomic deexcitation model activated by default 83 SetDeexcitationFlag(true); 81 84 verboseLevel= 0; 82 85 … … 1721 1724 1722 1725 1726 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo.... 1727 1728 void G4PenelopeIonisationModel::ActivateAuger(G4bool augerbool) 1729 { 1730 if (!DeexcitationFlag() && augerbool) 1731 { 1732 G4cout << "WARNING - G4PenelopeIonisationModel" << G4endl; 1733 G4cout << "The use of the Atomic Deexcitation Manager is set to false " << G4endl; 1734 G4cout << "Therefore, Auger electrons will be not generated anyway" << G4endl; 1735 } 1736 deexcitationManager.ActivateAugerElectronProduction(augerbool); 1737 if (verboseLevel > 1) 1738 G4cout << "Auger production set to " << augerbool << G4endl; 1739 } 1740 1741 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo.... -
trunk/source/processes/electromagnetic/lowenergy/src/G4PenelopePhotoElectric.cc
r1055 r1192 25 25 // 26 26 // 27 // $Id: G4PenelopePhotoElectric.cc,v 1.1 4 2009/05/02 09:59:17 sincertiExp $28 // GEANT4 tag $Name: geant4-09-03-beta-cand-01$27 // $Id: G4PenelopePhotoElectric.cc,v 1.16 2009/06/11 15:47:08 mantero Exp $ 28 // GEANT4 tag $Name: emlowen-V09-02-64 $ 29 29 // 30 30 // Author: L. Pandola -
trunk/source/processes/electromagnetic/lowenergy/src/G4PenelopePhotoElectricModel.cc
r1055 r1192 24 24 // ******************************************************************** 25 25 // 26 // $Id: G4PenelopePhotoElectricModel.cc,v 1. 6 2009/05/19 14:57:01pandola Exp $27 // GEANT4 tag $Name: geant4-09-03-beta-cand-01$26 // $Id: G4PenelopePhotoElectricModel.cc,v 1.10 2009/10/23 09:29:24 pandola Exp $ 27 // GEANT4 tag $Name: emlowen-V09-02-64 $ 28 28 // 29 29 // Author: Luciano Pandola … … 44 44 // 19 May 2009 L Pandola Explicitely set to zero pointers deleted in 45 45 // Initialise(), since they might be checked later on 46 // 21 Oct 2009 L Pandola Remove un-necessary fUseAtomicDeexcitation flag - now managed by 47 // G4VEmModel::DeexcitationFlag() 46 48 // 47 49 … … 73 75 SetHighEnergyLimit(fIntrinsicHighEnergyLimit); 74 76 // 75 fUseAtomicDeexcitation = true; 77 //by default the model will inkove the atomic deexcitation 78 SetDeexcitationFlag(true); 79 76 80 verboseLevel= 0; 77 81 // Verbosity scale: … … 366 370 void G4PenelopePhotoElectricModel::ActivateAuger(G4bool augerbool) 367 371 { 368 if (! fUseAtomicDeexcitation)372 if (!DeexcitationFlag() && augerbool) 369 373 { 370 374 G4cout << "WARNING - G4PenelopePhotoElectricModel" << G4endl; -
trunk/source/processes/electromagnetic/lowenergy/src/G4PenelopeRayleigh.cc
r1055 r1192 26 26 // -------------------------------------------------------------------- 27 27 // 28 // $Id: G4PenelopeRayleigh.cc,v 1.1 7 2009/05/02 09:59:17 sincertiExp $29 // GEANT4 tag $Name: geant4-09-03-beta-cand-01$28 // $Id: G4PenelopeRayleigh.cc,v 1.19 2009/06/11 15:47:08 mantero Exp $ 29 // GEANT4 tag $Name: emlowen-V09-02-64 $ 30 30 // 31 31 // Author: L. Pandola (luciano.pandola@cern.ch) -
trunk/source/processes/electromagnetic/lowenergy/src/G4PenelopeRayleighModel.cc
r1055 r1192 24 24 // ******************************************************************** 25 25 // 26 // $Id: G4PenelopeRayleighModel.cc,v 1. 4 2009/05/19 14:57:01 pandolaExp $27 // GEANT4 tag $Name: geant4-09-03-beta-cand-01$26 // $Id: G4PenelopeRayleighModel.cc,v 1.6 2009/06/11 15:47:08 mantero Exp $ 27 // GEANT4 tag $Name: emlowen-V09-02-64 $ 28 28 // 29 29 // Author: Luciano Pandola -
trunk/source/processes/electromagnetic/lowenergy/src/G4RangeTest.cc
r1007 r1192 25 25 // 26 26 // 27 // $Id: G4RangeTest.cc,v 1. 8 2006/06/29 19:41:03 gunterExp $28 // GEANT4 tag $Name: geant4-09-02$27 // $Id: G4RangeTest.cc,v 1.9 2009/06/10 13:32:36 mantero Exp $ 28 // GEANT4 tag $Name: emlowen-V09-02-64 $ 29 29 // 30 30 // Author: Maria Grazia Pia (Maria.Grazia.Pia@cern.ch) -
trunk/source/processes/electromagnetic/lowenergy/src/G4RayleighScattering.cc
r1058 r1192 25 25 // 26 26 // $Id: G4RayleighScattering.cc,v 1.2 2009/03/18 13:45:51 pandola Exp $ 27 // GEANT4 tag $Name: geant4-09-03-beta-cand-01$27 // GEANT4 tag $Name: emlowen-V09-02-64 $ 28 28 // 29 29 // -
trunk/source/processes/electromagnetic/lowenergy/src/G4SemiLogInterpolation.cc
r1007 r1192 25 25 // 26 26 // 27 // $Id: G4SemiLogInterpolation.cc,v 1. 6 2006/06/29 19:41:18 gunterExp $28 // GEANT4 tag $Name: geant4-09-02$27 // $Id: G4SemiLogInterpolation.cc,v 1.8 2009/09/25 07:41:34 sincerti Exp $ 28 // GEANT4 tag $Name: emlowen-V09-02-64 $ 29 29 // 30 30 // Author: Maria Grazia Pia (Maria.Grazia.Pia@cern.ch) … … 57 57 const G4DataVector& data) const 58 58 { 59 //G4cout << "G4SemiLogInterpolation is performed(2 arguments) " << G4endl; 59 60 G4int nBins = data.size() - 1; 60 61 G4double value = 0.; … … 77 78 return value; 78 79 } 80 81 G4double G4SemiLogInterpolation::Calculate(G4double x, G4int bin, 82 const G4DataVector& points, 83 const G4DataVector& data, 84 const G4DataVector& log_points, 85 const G4DataVector& /*log_data*/) const 86 { 87 //A combination of logarithmic interpolation on energy set and 88 //linear Interpolation on data set 89 //G4cout << "G4SemiLogInterpolation is performed (4 arguments)" << G4endl; 90 G4int nBins = data.size() - 1; 91 G4double value = 0.; 92 G4double log_x = std::log10(x); 93 if (x < points[0]) 94 { 95 value = 0.; 96 } 97 else if (bin < nBins) 98 { 99 G4double e1 = points[bin]; 100 G4double e2 = points[bin+1]; 101 G4double d1 = data[bin]; 102 G4double d2 = data[bin+1]; 103 G4double log_e1 = log_points[bin]; 104 G4double log_e2 = log_points[bin+1]; 105 //G4double log_d1 = log_data[bin]; 106 //G4double log_d2 = log_data[bin+1]; 107 //G4cout << "x = " << x << " , log_x = " << log_x << " , bin = " << bin << G4endl; 108 //G4cout << "e1 = " << e1 << " , d1 = " << d1 << G4endl; 109 //G4cout << "e2 = " << e2 << " , d2 = " << d2 << G4endl; 110 // Values log_e1 and log_e2 are the log values of the corresponding 111 // original energy actual values. Original d1 and d2 values are used. 112 // Simple linear interpolation performed on loagarithmic data 113 // should be equivalent to semi log-log interpolation 114 if (e1 == 0.0) log_e1 = -300; 115 if (e2 == 0.0) log_e2 = -300; 116 value = d1 + (d2 - d1)*(log_x - log_e1)/(log_e2 - log_e1); 117 //G4cout << "G4SemiLogInterpolation - Final Interpolated Value: " << value << G4endl << G4endl; 118 } 119 else 120 { 121 value = data[nBins]; 122 } 123 return value; 124 } 125 -
trunk/source/processes/electromagnetic/lowenergy/src/G4ShellData.cc
r1007 r1192 25 25 // 26 26 // 27 // $Id: G4ShellData.cc,v 1.1 0 2008/03/17 13:40:53 piaExp $28 // GEANT4 tag $Name: geant4-09-02$27 // $Id: G4ShellData.cc,v 1.11 2009/06/10 13:32:36 mantero Exp $ 28 // GEANT4 tag $Name: emlowen-V09-02-64 $ 29 29 // 30 30 // Author: Maria Grazia Pia (Maria.Grazia.Pia@cern.ch) -
trunk/source/processes/electromagnetic/lowenergy/src/G4ShellEMDataSet.cc
r1007 r1192 25 25 // 26 26 // 27 // $Id: G4ShellEMDataSet.cc,v 1.1 6 2008/03/10 15:07:41 piaExp $28 // GEANT4 tag $Name: geant4-09-02$27 // $Id: G4ShellEMDataSet.cc,v 1.18 2009/09/25 07:41:34 sincerti Exp $ 28 // GEANT4 tag $Name: emlowen-V09-02-64 $ 29 29 // 30 30 // Author: Maria Grazia Pia (Maria.Grazia.Pia@cern.ch) … … 32 32 // History: 33 33 // ----------- 34 // 1 Aug 2001 MGP Created 35 // 09.10.01 V.Ivanchenko Add case z=0 36 // 9 Mar 2008 MGP Cleaned up unreadable code modified by former developer 37 // (Further clean-up needed) 34 // 1 Aug 2001 MGP Created 35 // 36 // 09.10.01 V.Ivanchenko Add case z=0 37 // 38 // 9 Mar 2008 MGP Cleaned up unreadable code modified by former developer 39 // (Further clean-up needed) 40 // 41 // 15 Jul 2009 Nicolas A. Karakatsanis 42 // 43 // - LoadNonLogData method was created to load only the non-logarithmic data from G4EMLOW 44 // dataset. It is essentially performing the data loading operations as in the past. 45 // 46 // - LoadData method was revised in order to calculate the logarithmic values of the data 47 // It retrieves the data values from the G4EMLOW data files but, then, calculates the 48 // respective log values and loads them to seperate data structures. 49 // 50 // - SetLogEnergiesData method was cretaed to set logarithmic values to G4 data vectors. 51 // The EM data sets, initialized this way, contain both non-log and log values. 52 // These initialized data sets can enhance the computing performance of data interpolation 53 // operations 54 // 38 55 // 39 56 // ------------------------------------------------------------------- … … 121 138 122 139 140 void G4ShellEMDataSet::SetLogEnergiesData(G4DataVector* energies, 141 G4DataVector* data, 142 G4DataVector* log_energies, 143 G4DataVector* log_data, 144 G4int componentId) 145 { 146 G4VEMDataSet* component = components[componentId]; 147 148 if (component) 149 { 150 component->SetLogEnergiesData(energies, data, log_energies, log_data, 0); 151 return; 152 } 153 154 std::ostringstream message; 155 message << "G4ShellEMDataSet::SetLogEnergiesData - component " << componentId << " not found"; 156 157 G4Exception(message.str().c_str()); 158 } 159 160 161 123 162 G4bool G4ShellEMDataSet::LoadData(const G4String& file) 124 163 { … … 136 175 } 137 176 138 G4DataVector* energies = 0; 139 G4DataVector* data = 0; 177 G4DataVector* orig_shell_energies = 0; 178 G4DataVector* orig_shell_data = 0; 179 G4DataVector* log_shell_energies = 0; 180 G4DataVector* log_shell_data = 0; 140 181 141 182 G4double a = 0.; 142 183 G4int shellIndex = 0; 143 bool energyColumn = true; 184 G4int k = 0; 185 G4int nColumns = 2; 144 186 145 187 do 146 188 { 147 189 in >> a; 148 190 191 if (a==0.) a=1e-300; 192 193 // The file is organized into four columns: 194 // 1st column contains the values of energy 195 // 2nd column contains the corresponding data value 196 // The file terminates with the pattern: -1 -1 197 // -2 -2 198 // 149 199 if (a == -1) 150 200 { 151 if ( energyColumn && energies!=0)201 if ((k%nColumns == 0) && (orig_shell_energies != 0) ) 152 202 { 153 AddComponent(new G4EMDataSet(shellIndex, energies, data, algorithm->Clone(), unitEnergies, unitData)); 154 energies = 0; 155 data = 0; 203 AddComponent(new G4EMDataSet(shellIndex, orig_shell_energies, orig_shell_data, log_shell_energies, log_shell_data, algorithm->Clone(), unitEnergies, unitData)); 204 orig_shell_energies = 0; 205 orig_shell_data = 0; 206 log_shell_energies = 0; 207 log_shell_data = 0; 156 208 } 157 158 energyColumn = (!energyColumn);159 209 } 160 210 else if (a != -2) 161 211 { 162 if ( energies == 0)212 if (orig_shell_energies == 0) 163 213 { 164 energies = new G4DataVector; 165 data = new G4DataVector; 214 orig_shell_energies = new G4DataVector; 215 orig_shell_data = new G4DataVector; 216 log_shell_energies = new G4DataVector; 217 log_shell_data = new G4DataVector; 166 218 } 167 168 if (energyColumn) 169 energies->push_back(a * unitEnergies); 170 else 171 data->push_back(a * unitData); 172 173 energyColumn = (!energyColumn); 219 if (k%nColumns == 0) 220 { 221 orig_shell_energies->push_back(a*unitEnergies); 222 log_shell_energies->push_back(std::log10(a) + std::log10(unitEnergies)); 223 } 224 else if (k%nColumns == 1) 225 { 226 orig_shell_data->push_back(a*unitData); 227 log_shell_data->push_back(std::log10(a) + std::log10(unitData)); 228 } 229 k++; 174 230 } 175 } 176 while (a != -2); 231 else k = 1; 232 } 233 while (a != -2); // End of file 177 234 178 235 return true; 179 236 } 237 238 239 G4bool G4ShellEMDataSet::LoadNonLogData(const G4String& file) 240 { 241 CleanUpComponents(); 242 243 G4String fullFileName = FullFileName(file); 244 std::ifstream in(fullFileName); 245 246 if (!in.is_open()) 247 { 248 G4String message("G4ShellEMDataSet::LoadData - data file \""); 249 message += fullFileName; 250 message += "\" not found"; 251 G4Exception(message); 252 } 253 254 G4DataVector* orig_shell_energies = 0; 255 G4DataVector* orig_shell_data = 0; 256 257 G4double a = 0.; 258 G4int shellIndex = 0; 259 G4int k = 0; 260 G4int nColumns = 2; 261 262 do 263 { 264 in >> a; 265 266 // The file is organized into four columns: 267 // 1st column contains the values of energy 268 // 2nd column contains the corresponding data value 269 // The file terminates with the pattern: -1 -1 270 // -2 -2 271 // 272 if (a == -1) 273 { 274 if ((k%nColumns == 0) && (orig_shell_energies != 0) ) 275 { 276 AddComponent(new G4EMDataSet(shellIndex, orig_shell_energies, orig_shell_data, algorithm->Clone(), unitEnergies, unitData)); 277 orig_shell_energies = 0; 278 orig_shell_data = 0; 279 } 280 } 281 else if (a != -2) 282 { 283 if (orig_shell_energies == 0) 284 { 285 orig_shell_energies = new G4DataVector; 286 orig_shell_data = new G4DataVector; 287 } 288 if (k%nColumns == 0) 289 { 290 orig_shell_energies->push_back(a*unitEnergies); 291 } 292 else if (k%nColumns == 1) 293 { 294 orig_shell_data->push_back(a*unitData); 295 } 296 k++; 297 } 298 else k = 1; 299 } 300 while (a != -2); // End of file 301 302 return true; 303 } 304 180 305 181 306 -
trunk/source/processes/electromagnetic/lowenergy/src/G4VCrossSectionHandler.cc
r1007 r1192 25 25 // 26 26 // 27 // $Id: G4VCrossSectionHandler.cc,v 1.1 7 2006/06/29 19:41:42 gunterExp $28 // GEANT4 tag $Name: geant4-09-02$27 // $Id: G4VCrossSectionHandler.cc,v 1.19 2009/09/25 07:41:34 sincerti Exp $ 28 // GEANT4 tag $Name: emlowen-V09-02-64 $ 29 29 // 30 30 // Author: Maria Grazia Pia (Maria.Grazia.Pia@cern.ch) … … 37 37 // 19 Jul 2002 VI Create composite data set for material 38 38 // 21 Jan 2003 VI Cut per region 39 // 40 // 15 Jul 2009 Nicolas A. Karakatsanis 41 // 42 // - LoadNonLogData method was created to load only the non-logarithmic data from G4EMLOW 43 // dataset. It is essentially performing the data loading operations as in the past. 44 // 45 // - LoadData method was revised in order to calculate the logarithmic values of the data 46 // It retrieves the data values from the G4EMLOW data files but, then, calculates the 47 // respective log values and loads them to seperate data structures. 48 // The EM data sets, initialized this way, contain both non-log and log values. 49 // These initialized data sets can enhance the computing performance of data interpolation 50 // operations 51 // 52 // - BuildMeanFreePathForMaterials method was also revised in order to calculate the 53 // logarithmic values of the loaded data. 54 // It generates the data values and, then, calculates the respective log values which 55 // later load to seperate data structures. 56 // The EM data sets, initialized this way, contain both non-log and log values. 57 // These initialized data sets can enhance the computing performance of data interpolation 58 // operations 59 // 60 // - LoadShellData method was revised in order to eliminate the presence of a potential 61 // memory leak originally identified by Riccardo Capra. 62 // Riccardo Capra Original Comment 63 // Riccardo Capra <capra@ge.infn.it>: PLEASE CHECK THE FOLLOWING PIECE OF CODE 64 // "energies" AND "data" G4DataVector ARE ALLOCATED, FILLED IN AND NEVER USED OR 65 // DELETED. WHATSMORE LOADING FILE OPERATIONS WERE DONE BY G4ShellEMDataSet 66 // EVEN BEFORE THE CHANGES I DID ON THIS FILE. SO THE FOLLOWING CODE IN MY 67 // OPINION SHOULD BE USELESS AND SHOULD PRODUCE A MEMORY LEAK. 68 // 39 69 // 40 70 // ------------------------------------------------------------------- … … 175 205 std::ifstream file(ost.str().c_str()); 176 206 std::filebuf* lsdp = file.rdbuf(); 177 207 178 208 if (! (lsdp->is_open()) ) 179 209 { … … 182 212 } 183 213 G4double a = 0; 184 G4int k = 1; 185 G4DataVector* energies = new G4DataVector; 186 G4DataVector* data = new G4DataVector; 214 G4int k = 0; 215 G4int nColumns = 2; 216 217 G4DataVector* orig_reg_energies = new G4DataVector; 218 G4DataVector* orig_reg_data = new G4DataVector; 219 G4DataVector* log_reg_energies = new G4DataVector; 220 G4DataVector* log_reg_data = new G4DataVector; 221 187 222 do 188 223 { 189 224 file >> a; 190 G4int nColumns = 2; 191 // The file is organized into two columns: 192 // 1st column is the energy 193 // 2nd column is the corresponding value 225 226 if (a==0.) a=1e-300; 227 228 // The file is organized into four columns: 229 // 1st column contains the values of energy 230 // 2nd column contains the corresponding data value 194 231 // The file terminates with the pattern: -1 -1 195 232 // -2 -2 196 if (a == -1 || a == -2) 233 // 234 if (a != -1 && a != -2) 197 235 { 236 if (k%nColumns == 0) 237 { 238 orig_reg_energies->push_back(a*unit1); 239 log_reg_energies->push_back(std::log10(a)+std::log10(unit1)); 240 } 241 else if (k%nColumns == 1) 242 { 243 orig_reg_data->push_back(a*unit2); 244 log_reg_data->push_back(std::log10(a)+std::log10(unit2)); 245 } 246 k++; 198 247 } 199 else 200 { 201 if (k%nColumns != 0) 202 { 203 G4double e = a * unit1; 204 energies->push_back(e); 205 k++; 206 } 207 else if (k%nColumns == 0) 208 { 209 G4double value = a * unit2; 210 data->push_back(value); 211 k = 1; 212 } 213 } 214 } while (a != -2); // end of file 248 } 249 while (a != -2); // End of File 215 250 216 251 file.close(); 217 252 G4VDataSetAlgorithm* algo = interpolation->Clone(); 218 G4VEMDataSet* dataSet = new G4EMDataSet(Z,energies,data,algo); 253 254 G4VEMDataSet* dataSet = new G4EMDataSet(Z,orig_reg_energies,orig_reg_data,log_reg_energies,log_reg_data,algo); 255 219 256 dataMap[Z] = dataSet; 220 } 221 } 222 223 void G4VCrossSectionHandler::LoadShellData(const G4String& fileName) 257 258 } 259 } 260 261 262 void G4VCrossSectionHandler::LoadNonLogData(const G4String& fileName) 224 263 { 225 264 size_t nZ = activeZ.size(); … … 227 266 { 228 267 G4int Z = (G4int) activeZ[i]; 229 230 // Riccardo Capra <capra@ge.infn.it>: PLEASE CHECK THE FOLLOWING PIECE OF CODE231 // "energies" AND "data" G4DataVector ARE ALLOCATED, FILLED IN AND NEVER USED OR232 // DELETED. WHATSMORE LOADING FILE OPERATIONS WERE DONE BY G4ShellEMDataSet233 // EVEN BEFORE THE CHANGES I DID ON THIS FILE. SO THE FOLLOWING CODE IN MY234 // OPINION SHOULD BE USELESS AND SHOULD PRODUCE A MEMORY LEAK.235 268 236 269 // Build the complete string identifying the file with the data set … … 244 277 245 278 std::ostringstream ost; 246 247 279 ost << path << '/' << fileName << Z << ".dat"; 248 249 280 std::ifstream file(ost.str().c_str()); 250 281 std::filebuf* lsdp = file.rdbuf(); 251 282 252 283 if (! (lsdp->is_open()) ) 253 284 { … … 256 287 } 257 288 G4double a = 0; 258 G4int k = 1; 259 G4DataVector* energies = new G4DataVector; 260 G4DataVector* data = new G4DataVector; 289 G4int k = 0; 290 G4int nColumns = 2; 291 292 G4DataVector* orig_reg_energies = new G4DataVector; 293 G4DataVector* orig_reg_data = new G4DataVector; 294 261 295 do 262 296 { 263 297 file >> a; 264 G4int nColumns = 2; 265 // The file is organized into twocolumns:266 // 1st column is theenergy267 // 2nd column is the correspondingvalue298 299 // The file is organized into four columns: 300 // 1st column contains the values of energy 301 // 2nd column contains the corresponding data value 268 302 // The file terminates with the pattern: -1 -1 269 303 // -2 -2 270 if (a == -1 || a == -2) 304 // 305 if (a != -1 && a != -2) 271 306 { 307 if (k%nColumns == 0) 308 { 309 orig_reg_energies->push_back(a*unit1); 310 } 311 else if (k%nColumns == 1) 312 { 313 orig_reg_data->push_back(a*unit2); 314 } 315 k++; 272 316 } 273 else 274 { 275 if (k%nColumns != 0) 276 { 277 G4double e = a * unit1; 278 energies->push_back(e); 279 k++; 280 } 281 else if (k%nColumns == 0) 282 { 283 G4double value = a * unit2; 284 data->push_back(value); 285 k = 1; 286 } 287 } 288 } while (a != -2); // end of file 317 } 318 while (a != -2); // End of File 289 319 290 320 file.close(); 291 292 // Riccardo Capra <capra@ge.infn.it>: END OF CODE THAT IN MY OPINION SHOULD BE 293 // REMOVED. 321 G4VDataSetAlgorithm* algo = interpolation->Clone(); 322 323 G4VEMDataSet* dataSet = new G4EMDataSet(Z,orig_reg_energies,orig_reg_data,algo); 324 325 dataMap[Z] = dataSet; 326 327 } 328 } 329 330 void G4VCrossSectionHandler::LoadShellData(const G4String& fileName) 331 { 332 size_t nZ = activeZ.size(); 333 for (size_t i=0; i<nZ; i++) 334 { 335 G4int Z = (G4int) activeZ[i]; 294 336 295 337 G4VDataSetAlgorithm* algo = interpolation->Clone(); 296 338 G4VEMDataSet* dataSet = new G4ShellEMDataSet(Z, algo); 339 297 340 dataSet->LoadData(fileName); 341 298 342 dataMap[Z] = dataSet; 299 343 } 300 344 } 345 346 347 301 348 302 349 void G4VCrossSectionHandler::Clear() … … 453 500 G4DataVector* energies; 454 501 G4DataVector* data; 502 G4DataVector* log_energies; 503 G4DataVector* log_data; 504 455 505 456 506 const G4ProductionCutsTable* theCoupleTable= … … 463 513 energies = new G4DataVector; 464 514 data = new G4DataVector; 515 log_energies = new G4DataVector; 516 log_data = new G4DataVector; 465 517 for (G4int bin=0; bin<nBins; bin++) 466 518 { 467 519 G4double energy = energyVector[bin]; 468 520 energies->push_back(energy); 521 log_energies->push_back(std::log10(energy)); 469 522 G4VEMDataSet* matCrossSet = (*crossSections)[m]; 470 523 G4double materialCrossSection = 0.0; … … 477 530 { 478 531 data->push_back(1./materialCrossSection); 532 log_data->push_back(std::log10(1./materialCrossSection)); 479 533 } 480 534 else 481 535 { 482 536 data->push_back(DBL_MAX); 537 log_data->push_back(std::log10(DBL_MAX)); 483 538 } 484 539 } 485 540 G4VDataSetAlgorithm* algo = CreateInterpolation(); 486 G4VEMDataSet* dataSet = new G4EMDataSet(m,energies,data,algo,1.,1.); 541 542 //G4VEMDataSet* dataSet = new G4EMDataSet(m,energies,data,algo,1.,1.); 543 544 G4VEMDataSet* dataSet = new G4EMDataSet(m,energies,data,log_energies,log_data,algo,1.,1.); 545 487 546 materialSet->AddComponent(dataSet); 488 547 } … … 490 549 return materialSet; 491 550 } 551 492 552 493 553 G4int G4VCrossSectionHandler::SelectRandomAtom(const G4MaterialCutsCouple* couple, -
trunk/source/processes/electromagnetic/lowenergy/src/G4VLowEnergyDiscretePhotonProcess.cc
r1007 r1192 24 24 // ******************************************************************** 25 25 // 26 // $Id: G4VLowEnergyDiscretePhotonProcess.cc,v 1. 5 2006/06/29 19:41:44 gunterExp $27 // GEANT4 tag $Name: geant4-09-02$26 // $Id: G4VLowEnergyDiscretePhotonProcess.cc,v 1.6 2009/06/10 13:32:36 mantero Exp $ 27 // GEANT4 tag $Name: emlowen-V09-02-64 $ 28 28 // 29 29 // -------------------------------------------------------------- -
trunk/source/processes/electromagnetic/lowenergy/src/G4VeLowEnergyLoss.cc
r1007 r1192 25 25 // 26 26 // 27 // $Id: G4VeLowEnergyLoss.cc,v 1.2 5 2006/06/29 19:41:50 gunterExp $28 // GEANT4 tag $Name: geant4-09-02$27 // $Id: G4VeLowEnergyLoss.cc,v 1.27 2009/07/23 09:15:37 vnivanch Exp $ 28 // GEANT4 tag $Name: emlowen-V09-02-64 $ 29 29 // 30 30 // … … 172 172 G4double del = 1.0/(G4double)n ; 173 173 174 for (G4int j=1; j< TotBin; j++) {174 for (G4int j=1; j<=TotBin; j++) { 175 175 176 176 G4double energy2 = rangeVector->GetLowEdgeEnergy(j); … … 201 201 Value = 0.; 202 202 203 for (G4int i=0; i< =nbin; i++)203 for (G4int i=0; i<nbin; i++) 204 204 { 205 205 taui = taulow + dtau*i ; … … 210 210 else 211 211 { 212 if(i<nbin )212 if(i<nbin-1) 213 213 ci=1.; 214 214 else … … 233 233 Value = 0.; 234 234 235 for (G4int i=0; i< =nbin; i++)235 for (G4int i=0; i<nbin; i++) 236 236 { 237 237 ui = ltaulow+dltau*i; … … 243 243 else 244 244 { 245 if(i<nbin )245 if(i<nbin-1) 246 246 ci=1.; 247 247 else … … 369 369 } while (tau<=taulim) ; 370 370 i += 1 ; 371 for (G4int j=i; j< TotBin; j++)371 for (G4int j=i; j<=TotBin; j++) 372 372 { 373 373 LowEdgeEnergy = timeVector->GetLowEdgeEnergy(j); … … 430 430 } while (tau<=taulim) ; 431 431 i += 1 ; 432 for (G4int j=i; j< TotBin; j++)432 for (G4int j=i; j<=TotBin; j++) 433 433 { 434 434 LowEdgeEnergy = timeVector->GetLowEdgeEnergy(j); … … 455 455 Value = 0.; 456 456 457 for (G4int i=0; i< =nbin; i++)457 for (G4int i=0; i<nbin; i++) 458 458 { 459 459 ui = ltaulow+dltau*i; … … 465 465 else 466 466 { 467 if(i<nbin )467 if(i<nbin-1) 468 468 ci=1.; 469 469 else … … 488 488 Value = 0.; 489 489 490 for (G4int i=0; i< =nbin; i++)490 for (G4int i=0; i<nbin; i++) 491 491 { 492 492 ui = ltaulow+dltau*i; … … 498 498 else 499 499 { 500 if(i<nbin )500 if(i<nbin-1) 501 501 ci=1.; 502 502 else … … 541 541 G4double rhigh = pv->GetValue(ehigh, b); 542 542 543 rhigh *= std::exp(std::log(rhigh/rlow)/((G4double)(nbins-1)));544 545 G4PhysicsLogVector* v = new G4PhysicsLogVector(rlow, rhigh, nbins );543 //rhigh *= std::exp(std::log(rhigh/rlow)/((G4double)(nbins-1))); 544 545 G4PhysicsLogVector* v = new G4PhysicsLogVector(rlow, rhigh, nbins-1); 546 546 547 547 v->PutValue(0,elow); … … 597 597 598 598 //loop for range values 599 for( G4int i=0; i< TotBin; i++)599 for( G4int i=0; i<=TotBin; i++) 600 600 { 601 601 LowEdgeRange = aVector->GetLowEdgeEnergy(i) ; //i.e. GetLowEdgeValue(i) … … 613 613 if(binnumber == 0) 614 614 KineticEnergy = lowestKineticEnergy ; 615 else if(binnumber == TotBin -1)615 else if(binnumber == TotBin) 616 616 KineticEnergy = highestKineticEnergy ; 617 617 else … … 668 668 G4PhysicsVector* rangeVector= (*theRangeTable)[J]; 669 669 670 for ( G4int i=0; i< TotBin; i++)670 for ( G4int i=0; i<=TotBin; i++) 671 671 { 672 672 Ri = rangeVector->GetValue(Ti,isOut) ; … … 678 678 Rim = rangeVector->GetValue(Tim,isOut); 679 679 } 680 if ( i== (TotBin-1))680 if ( i==TotBin) 681 681 Rip = Ri ; 682 682 else … … 730 730 G4PhysicsVector* rangeVector= (*theRangeTable)[J]; 731 731 732 for ( G4int i=0; i< TotBin; i++)732 for ( G4int i=0; i<=TotBin; i++) 733 733 { 734 734 Ri = rangeVector->GetValue(Ti,isOut) ; … … 740 740 Rim = rangeVector->GetValue(Tim,isOut); 741 741 } 742 if ( i== (TotBin-1))742 if ( i==TotBin) 743 743 Rip = Ri ; 744 744 else … … 791 791 G4PhysicsVector* rangeVector= (*theRangeTable)[J]; 792 792 793 for ( G4int i=0; i< TotBin; i++)793 for ( G4int i=0; i<=TotBin; i++) 794 794 { 795 795 Ri = rangeVector->GetValue(Ti,isOut) ; … … 801 801 Rim = rangeVector->GetValue(Tim,isOut); 802 802 } 803 if ( i== (TotBin-1))803 if ( i==TotBin) 804 804 Rip = Ri ; 805 805 else -
trunk/source/processes/electromagnetic/lowenergy/src/G4WaterExcitationStructure.cc
r1007 r1192 26 26 // 27 27 // $Id: G4WaterExcitationStructure.cc,v 1.1 2007/10/15 08:57:54 pia Exp $ 28 // GEANT4 tag $Name: geant4-09-02$28 // GEANT4 tag $Name: emlowen-V09-02-64 $ 29 29 // 30 30 // Contact Author: Maria Grazia Pia (Maria.Grazia.Pia@cern.ch) -
trunk/source/processes/electromagnetic/lowenergy/src/G4WaterIonisationStructure.cc
r1007 r1192 26 26 // 27 27 // $Id: G4WaterIonisationStructure.cc,v 1.1 2007/11/08 20:39:35 pia Exp $ 28 // GEANT4 tag $Name: geant4-09-02$28 // GEANT4 tag $Name: emlowen-V09-02-64 $ 29 29 // 30 30 // Contact Author: Maria Grazia Pia (Maria.Grazia.Pia@cern.ch) -
trunk/source/processes/electromagnetic/lowenergy/src/G4eBremsstrahlungSpectrum.cc
r1007 r1192 24 24 // ******************************************************************** 25 25 // 26 // $Id: G4eBremsstrahlungSpectrum.cc,v 1.1 5 2006/06/29 19:41:58 gunterExp $27 // GEANT4 tag $Name: geant4-09-02$26 // $Id: G4eBremsstrahlungSpectrum.cc,v 1.16 2009/06/10 13:32:36 mantero Exp $ 27 // GEANT4 tag $Name: emlowen-V09-02-64 $ 28 28 // 29 29 // ------------------------------------------------------------------- -
trunk/source/processes/electromagnetic/lowenergy/src/G4eCrossSectionExcitationEmfietzoglou.cc
r1007 r1192 26 26 // 27 27 // $Id: G4eCrossSectionExcitationEmfietzoglou.cc,v 1.1 2007/05/04 10:16:06 pia Exp $ 28 // GEANT4 tag $Name: geant4-09-02$28 // GEANT4 tag $Name: emlowen-V09-02-64 $ 29 29 // 30 30 31 31 // $Id: G4eCrossSectionExcitationEmfietzoglou.cc,v 1.1 2007/05/04 10:16:06 pia Exp $ 32 // GEANT4 tag $Name: geant4-09-02$32 // GEANT4 tag $Name: emlowen-V09-02-64 $ 33 33 // 34 34 // Contact Author: Maria Grazia Pia (Maria.Grazia.Pia@cern.ch) -
trunk/source/processes/electromagnetic/lowenergy/src/G4eCrossSectionScreenedRutherford.cc
r1007 r1192 26 26 // 27 27 // $Id: G4eCrossSectionScreenedRutherford.cc,v 1.3 2007/10/12 12:27:19 pia Exp $ 28 // GEANT4 tag $Name: geant4-09-02$28 // GEANT4 tag $Name: emlowen-V09-02-64 $ 29 29 // 30 30 // Contact Author: Maria Grazia Pia (Maria.Grazia.Pia@cern.ch) -
trunk/source/processes/electromagnetic/lowenergy/src/G4eIonisationCrossSectionHandler.cc
r1055 r1192 24 24 // ******************************************************************** 25 25 // 26 // $Id: G4eIonisationCrossSectionHandler.cc,v 1.1 2 2009/01/29 08:13:34 pandolaExp $27 // GEANT4 tag $Name: geant4-09-03-beta-cand-01$26 // $Id: G4eIonisationCrossSectionHandler.cc,v 1.15 2009/09/27 10:47:42 sincerti Exp $ 27 // GEANT4 tag $Name: emlowen-V09-02-64 $ 28 28 // 29 29 // ------------------------------------------------------------------- … … 44 44 // 28 Jan 2009 L.Pandola Added public method to make a easier migration of 45 45 // G4LowEnergyIonisation to G4LivermoreIonisationModel 46 // 15 Jul 2009 Nicolas A. Karakatsanis 47 // 48 // - BuildCrossSectionForMaterials method was revised in order to calculate the 49 // logarithmic values of the loaded data. 50 // It retrieves the data values from the G4EMLOW data files but, then, calculates the 51 // respective log values and loads them to seperate data structures. 52 // The EM data sets, initialized this way, contain both non-log and log values. 53 // These initialized data sets can enhance the computing performance of data interpolation 54 // operations 55 // 56 // 46 57 // 47 58 // ------------------------------------------------------------------- … … 86 97 G4DataVector* energies; 87 98 G4DataVector* cs; 99 100 G4DataVector* log_energies; 101 G4DataVector* log_cs; 102 88 103 G4int nOfBins = energyVector.size(); 89 104 … … 116 131 G4int Z = (G4int) (*elementVector)[i]->GetZ(); 117 132 G4int nShells = NumberOfComponents(Z); 133 118 134 energies = new G4DataVector; 119 135 cs = new G4DataVector; 136 137 log_energies = new G4DataVector; 138 log_cs = new G4DataVector; 139 120 140 G4double density = nAtomsPerVolume[i]; 121 141 … … 124 144 G4double e = energyVector[bin]; 125 145 energies->push_back(e); 146 log_energies->push_back(std::log10(e)); 126 147 G4double value = 0.0; 148 G4double log_value = -300; 127 149 128 150 if(e > tcut) { … … 146 168 147 169 } 170 if (value == 0.) value = 1e-300; 171 log_value = std::log10(value); 148 172 } 149 173 cs->push_back(value); 174 log_cs->push_back(log_value); 150 175 } 151 176 G4VDataSetAlgorithm* algo = interp->Clone(); 152 G4VEMDataSet* elSet = new G4EMDataSet(i,energies,cs,algo,1.,1.); 177 178 //G4VEMDataSet* elSet = new G4EMDataSet(i,energies,cs,algo,1.,1.); 179 180 G4VEMDataSet* elSet = new G4EMDataSet(i,energies,cs,log_energies,log_cs,algo,1.,1.); 181 153 182 setForMat->AddComponent(elSet); 154 183 } -
trunk/source/processes/electromagnetic/lowenergy/src/G4eIonisationParameters.cc
r1055 r1192 25 25 // 26 26 // 27 // $Id: G4eIonisationParameters.cc,v 1.2 4 2009/03/23 09:13:44 pandolaExp $28 // GEANT4 tag $Name: geant4-09-03-beta-cand-01$27 // $Id: G4eIonisationParameters.cc,v 1.25 2009/06/10 13:32:36 mantero Exp $ 28 // GEANT4 tag $Name: emlowen-V09-02-64 $ 29 29 // 30 30 // Author: Maria Grazia Pia (Maria.Grazia.Pia@cern.ch) -
trunk/source/processes/electromagnetic/lowenergy/src/G4eIonisationSpectrum.cc
r1055 r1192 24 24 // ******************************************************************** 25 25 // 26 // $Id: G4eIonisationSpectrum.cc,v 1.2 6 2009/03/23 09:13:44 pandolaExp $27 // GEANT4 tag $Name: geant4-09-03-beta-cand-01$26 // $Id: G4eIonisationSpectrum.cc,v 1.27 2009/06/10 13:32:36 mantero Exp $ 27 // GEANT4 tag $Name: emlowen-V09-02-64 $ 28 28 // 29 29 // ------------------------------------------------------------------- -
trunk/source/processes/electromagnetic/lowenergy/src/G4eLowEnergyLoss.cc
r1007 r1192 25 25 // 26 26 // 27 // $Id: G4eLowEnergyLoss.cc,v 1.3 5 2006/06/29 19:42:06 gunterExp $28 // GEANT4 tag $Name: geant4-09-02$27 // $Id: G4eLowEnergyLoss.cc,v 1.37 2009/07/23 09:15:37 vnivanch Exp $ 28 // GEANT4 tag $Name: emlowen-V09-02-64 $ 29 29 // 30 30 // ----------------------------------------------------------- … … 273 273 274 274 // loop for the kinetic energy 275 for (G4int i=0; i< NbinEloss; i++)275 for (G4int i=0; i<=NbinEloss; i++) 276 276 { 277 277 LowEdgeEnergy = aVector->GetLowEdgeEnergy(i) ; -
trunk/source/processes/electromagnetic/lowenergy/src/G4hLowEnergyIonisation.cc
r961 r1192 100 100 // parametrised proton model: min(user value, model limit) 101 101 // 26 Jan 2005 S. Chauvie added PrintInfoDefinition() for antiproton 102 103 102 // 30 Sep 2009 ALF Removed dependencies to old shell Ionisation XS models 103 // 11 Nov 2009 ALF Code cleaning for the Dec release 104 // 104 105 // ----------------------------------------------------------------------- 105 106 … … 121 122 #include "G4ShellVacancy.hh" 122 123 #include "G4VhShellCrossSection.hh" 123 #include "G4hShellCrossSection.hh"124 #include "G4hShellCrossSectionExp.hh"125 #include "G4hShellCrossSectionDoubleExp.hh"126 124 #include "G4VEMDataSet.hh" 127 125 #include "G4EMDataSet.hh" … … 132 130 #include "G4ProcessManager.hh" 133 131 #include "G4ProductionCutsTable.hh" 134 132 #include "G4teoCrossSection.hh" 133 #include "G4empCrossSection.hh" 135 134 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo.... 136 135 … … 153 152 shellVacancy(0), 154 153 shellCS(0), 155 theFluo(false), 156 expFlag(false) 154 theFluo(false) 157 155 { 158 156 InitializeMe(); … … 175 173 verboseLevel = 0; 176 174 177 //**************************************************************************** 178 // By default the method of cross section's calculation is swiched on an 179 // 2nd implementation empirical model (G4hShellCrossSectionDoubleExp), 180 // if you want to use Gryzinski's model (G4hShellCrossSection()) or the 181 // 1st empiric one (G4hShellCrossSectionExp), you must change the 182 // selection below and switching expFlag to FALSE 183 //**************************************************************************** 184 185 //shellCS = new G4hShellCrossSection(); 186 //shellCS = new G4hShellCrossSectionExp(); 187 shellCS = new G4hShellCrossSectionDoubleExp(); 188 expFlag=true; 175 shellCS = new G4teoCrossSection("analytical"); 176 189 177 } 190 178 … … 1280 1268 // G4cout << "Fluorescence is switched :" << theFluo << G4endl; 1281 1269 1270 // Fluorescence data start from element 6 1282 1271 if(theFluo && Z > 5) { 1283 1272 1284 1273 1285 1274 1286 // Atom total cross section for the Empiric Model 1287 if (expFlag) { 1275 // Atom total cross section 1288 1276 shellCS->SetTotalCS(totalCrossSectionMap[Z]); 1289 } 1277 1290 1278 G4int shell = shellCS->SelectRandomShell(Z, KineticEnergy,ParticleMass,DeltaKineticEnergy); 1291 1279 1292 if (expFlag && shell==1) { 1293 aParticleChange.ProposeLocalEnergyDeposit (KineticEnergy); 1294 aParticleChange.ProposeEnergy(0); 1295 } 1296 1297 1298 const G4AtomicShell* atomicShell = 1299 (G4AtomicTransitionManager::Instance())->Shell(Z, shell); 1300 G4double bindingEnergy = atomicShell->BindingEnergy(); 1301 1302 if(verboseLevel > 1) { 1303 G4cout << "PostStep Z= " << Z << " shell= " << shell 1304 << " bindingE(keV)= " << bindingEnergy/keV 1305 << " finalE(keV)= " << finalKineticEnergy/keV 1306 << G4endl; 1307 } 1308 1309 // Fluorescence data start from element 6 1310 1311 if (finalKineticEnergy >= bindingEnergy 1312 && (bindingEnergy >= minGammaEnergy 1313 || bindingEnergy >= minElectronEnergy) ) { 1314 1315 G4int shellId = atomicShell->ShellId(); 1316 secondaryVector = deexcitationManager.GenerateParticles(Z, shellId); 1317 1318 if (secondaryVector != 0) { 1319 1320 nSecondaries = secondaryVector->size(); 1321 for (size_t i = 0; i<nSecondaries; i++) { 1322 1323 aSecondary = (*secondaryVector)[i]; 1324 if (aSecondary) { 1325 1326 G4double e = aSecondary->GetKineticEnergy(); 1327 type = aSecondary->GetDefinition(); 1328 if (e < finalKineticEnergy && 1329 ((type == G4Gamma::Gamma() && e > minGammaEnergy ) || 1330 (type == G4Electron::Electron() && e > minElectronEnergy ))) { 1331 1332 finalKineticEnergy -= e; 1333 totalNumber++; 1334 1335 } else { 1336 1337 delete aSecondary; 1338 (*secondaryVector)[i] = 0; 1280 if (shell!=-1) { 1281 1282 const G4AtomicShell* atomicShell = 1283 (G4AtomicTransitionManager::Instance())->Shell(Z, shell); 1284 G4double bindingEnergy = atomicShell->BindingEnergy(); 1285 1286 if(verboseLevel > 1) { 1287 G4cout << "PostStep Z= " << Z << " shell= " << shell 1288 << " bindingE(keV)= " << bindingEnergy/keV 1289 << " finalE(keV)= " << finalKineticEnergy/keV 1290 << G4endl; 1291 } 1292 1293 1294 1295 if (finalKineticEnergy >= bindingEnergy 1296 && (bindingEnergy >= minGammaEnergy 1297 || bindingEnergy >= minElectronEnergy) ) { 1298 1299 G4int shellId = atomicShell->ShellId(); 1300 secondaryVector = deexcitationManager.GenerateParticles(Z, shellId); 1301 1302 if (secondaryVector != 0) { 1303 1304 nSecondaries = secondaryVector->size(); 1305 for (size_t i = 0; i<nSecondaries; i++) { 1306 1307 aSecondary = (*secondaryVector)[i]; 1308 if (aSecondary) { 1309 1310 G4double e = aSecondary->GetKineticEnergy(); 1311 type = aSecondary->GetDefinition(); 1312 if (e < finalKineticEnergy && 1313 ((type == G4Gamma::Gamma() && e > minGammaEnergy ) || 1314 (type == G4Electron::Electron() && e > minElectronEnergy ))) { 1315 1316 finalKineticEnergy -= e; 1317 totalNumber++; 1318 1319 } else { 1320 1321 delete aSecondary; 1322 (*secondaryVector)[i] = 0; 1323 } 1339 1324 } 1340 1325 } … … 1343 1328 } 1344 1329 } 1345 1330 1346 1331 // Save delta-electrons 1347 1332 … … 1401 1386 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo.... 1402 1387 1403 std::vector<G4DynamicParticle*>* 1404 G4hLowEnergyIonisation::DeexciteAtom(const G4MaterialCutsCouple* couple, 1388 1389 1390 void G4hLowEnergyIonisation::SelectShellIonisationCS(G4String val) { 1391 1392 if (shellCS) delete shellCS; 1393 1394 if (val == "empirical") { 1395 shellCS = new G4empCrossSection(); 1396 } 1397 else { 1398 shellCS = new G4teoCrossSection(val); 1399 } 1400 } 1401 1402 1403 1404 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo.... 1405 1406 1407 std::vector<G4DynamicParticle*>* G4hLowEnergyIonisation::DeexciteAtom(const G4MaterialCutsCouple* couple, 1405 1408 G4double incidentEnergy, 1406 1409 G4double hMass, -
trunk/source/processes/electromagnetic/lowenergy/src/G4hLowEnergyLoss.cc
r1055 r1192 25 25 // 26 26 // 27 // $Id: G4hLowEnergyLoss.cc,v 1. 28 2009/02/20 10:49:54 sincertiExp $28 // GEANT4 tag $Name: geant4-09-03-beta-cand-01$27 // $Id: G4hLowEnergyLoss.cc,v 1.30 2009/07/23 09:15:37 vnivanch Exp $ 28 // GEANT4 tag $Name: emlowen-V09-02-64 $ 29 29 // 30 30 // ----------------------------------------------------------- … … 240 240 { 241 241 // calculate data members TotBin,LOGRTable,RTable first 242 242 //G4cout << "BuildDEDXTable for " << aParticleType.GetParticleName() << G4endl; 243 243 const G4ProductionCutsTable* theCoupleTable= 244 244 G4ProductionCutsTable::GetProductionCutsTable(); … … 302 302 303 303 // loop for the kinetic energy 304 for (G4int i=0; i< TotBin; i++)304 for (G4int i=0; i<=TotBin; i++) 305 305 { 306 306 LowEdgeEnergy = aVector->GetLowEdgeEnergy(i) ; … … 344 344 } 345 345 // make the energy loss and the range table available 346 //G4cout << "BuildDEDXTable done " << G4endl; 346 347 347 348 G4EnergyLossTables::Register(&aParticleType, … … 368 369 // Build range table from the energy loss table 369 370 { 371 //G4cout << "BuildRangeTable for " << aParticleType.GetParticleName() << G4endl; 370 372 Mass = aParticleType.GetPDGMass(); 371 373 … … 409 411 const G4ParticleDefinition& aParticleType) 410 412 { 413 //G4cout << "BuildTimeTable for " << aParticleType.GetParticleName() << G4endl; 411 414 412 415 const G4ProductionCutsTable* theCoupleTable= … … 443 446 theProperTimeTable = theProperTimepbarTable ; 444 447 } 445 448 //G4cout << "numOfCouples= " << numOfCouples << G4endl; 446 449 for (size_t J=0; J<numOfCouples; J++) 447 450 { … … 453 456 454 457 BuildLabTimeVector(J, aVector); 458 //G4cout << "LabTime OK " << J << G4endl; 455 459 theLabTimeTable->insert(aVector); 456 460 … … 459 463 460 464 BuildProperTimeVector(J, bVector); 465 //G4cout << "PropTime OK " << J << G4endl; 461 466 theProperTimeTable->insert(bVector); 462 467 } … … 478 483 G4double del = 1.0/(G4double)n ; 479 484 480 for (G4int j=1; j< TotBin; j++) {485 for (G4int j=1; j<=TotBin; j++) { 481 486 482 487 G4double energy2 = rangeVector->GetLowEdgeEnergy(j); … … 543 548 544 549 i += 1 ; 545 for (G4int j=i; j<TotBin; j++) 550 //G4cout << "do is OK i= " << i << G4endl; 551 for (G4int j=i; j<=TotBin; j++) 546 552 { 547 553 LowEdgeEnergy = timeVector->GetLowEdgeEnergy(j); 548 554 tau = LowEdgeEnergy/ParticleMass ; 555 //G4cout << "j= " << j << " tauold= " << tauold << " tau= " << tau << G4endl; 549 556 ltaulow = std::log(tauold); 550 557 ltauhigh = std::log(tau); … … 554 561 tauold = tau ; 555 562 } 563 // G4cout << "LabTime OK for " << materialIndex << G4endl; 556 564 } 557 565 … … 561 569 G4PhysicsLogVector* timeVector) 562 570 // create proper time vector for a material 563 { 571 { 564 572 G4int nbin=100; 565 573 G4bool isOut; … … 602 610 603 611 i += 1 ; 604 for (G4int j=i; j< TotBin; j++)612 for (G4int j=i; j<=TotBin; j++) 605 613 { 606 614 LowEdgeEnergy = timeVector->GetLowEdgeEnergy(j); … … 626 634 Value = 0.; 627 635 628 for (G4int i=0; i< =nbin; i++)636 for (G4int i=0; i<nbin; i++) 629 637 { 630 638 taui = taulow + dtau*i ; … … 635 643 else 636 644 { 637 if(i<nbin )645 if(i<nbin-1) 638 646 ci=1.; 639 647 else … … 658 666 Value = 0.; 659 667 660 for (G4int i=0; i< =nbin; i++)668 for (G4int i=0; i<nbin; i++) 661 669 { 662 670 ui = ltaulow+dltau*i; … … 668 676 else 669 677 { 670 if(i<nbin )678 if(i<nbin-1) 671 679 ci=1.; 672 680 else … … 691 699 Value = 0.; 692 700 693 for (G4int i=0; i< =nbin; i++)701 for (G4int i=0; i<nbin; i++) 694 702 { 695 703 ui = ltaulow+dltau*i; … … 701 709 else 702 710 { 703 if(i<nbin )711 if(i<nbin-1) 704 712 ci=1.; 705 713 else … … 724 732 Value = 0.; 725 733 726 for (G4int i=0; i< =nbin; i++)734 for (G4int i=0; i<nbin; i++) 727 735 { 728 736 ui = ltaulow+dltau*i; … … 734 742 else 735 743 { 736 if(i<nbin )744 if(i<nbin-1) 737 745 ci=1.; 738 746 else … … 752 760 // create table for coefficients "A" 753 761 { 762 //G4cout << "BuildRangeCoeffATable for " << G4endl; 754 763 755 764 G4int numOfCouples = G4ProductionCutsTable::GetProductionCutsTable()->GetTableSize(); … … 789 798 G4PhysicsVector* rangeVector= (*theRangeTable)[J]; 790 799 791 for ( G4int i=0; i< TotBin; i++)800 for ( G4int i=0; i<=TotBin; i++) 792 801 { 793 802 Ri = rangeVector->GetValue(Ti,isOut) ; … … 809 818 Rim = rangeVector->GetValue(Tim,isOut); 810 819 } 811 if ( i== (TotBin-1))820 if ( i==TotBin) 812 821 Rip = Ri ; 813 822 else … … 833 842 // create table for coefficients "B" 834 843 { 844 //G4cout << "BuildRangeCoeffBTable for " << G4endl; 835 845 836 846 G4int numOfCouples = G4ProductionCutsTable::GetProductionCutsTable()->GetTableSize(); … … 871 881 G4PhysicsVector* rangeVector= (*theRangeTable)[J]; 872 882 873 for ( G4int i=0; i< TotBin; i++)883 for ( G4int i=0; i<=TotBin; i++) 874 884 { 875 885 Ri = rangeVector->GetValue(Ti,isOut) ; … … 881 891 Rim = rangeVector->GetValue(Tim,isOut); 882 892 } 883 if ( i== (TotBin-1))893 if ( i==TotBin) 884 894 Rip = Ri ; 885 895 else … … 904 914 // create table for coefficients "C" 905 915 { 916 //G4cout << "BuildRangeCoeffCTable for " << G4endl; 906 917 907 918 G4int numOfCouples = G4ProductionCutsTable::GetProductionCutsTable()->GetTableSize(); … … 942 953 G4PhysicsVector* rangeVector= (*theRangeTable)[J]; 943 954 944 for ( G4int i=0; i< TotBin; i++)955 for ( G4int i=0; i<=TotBin; i++) 945 956 { 946 957 Ri = rangeVector->GetValue(Ti,isOut) ; … … 952 963 Rim = rangeVector->GetValue(Tim,isOut); 953 964 } 954 if ( i== (TotBin-1))965 if ( i==TotBin) 955 966 Rip = Ri ; 956 967 else … … 974 985 // Build inverse table of the range table 975 986 { 987 //G4cout << "BuildInverseRangeTable for " << aParticleType.GetParticleName() << G4endl; 976 988 G4bool b; 977 989 … … 1018 1030 G4double rlow = pv->GetValue(elow, b); 1019 1031 G4double rhigh = pv->GetValue(ehigh, b); 1020 1021 rhigh *= std::exp(std::log(rhigh/rlow)/((G4double)(nbins-1)));1022 1023 G4PhysicsLogVector* v = new G4PhysicsLogVector(rlow, rhigh, nbins );1032 //G4cout << "elow= " << elow << " ehigh= " << ehigh << " rlow= " << rlow << " rhigh= " << rhigh << G4endl; 1033 // rhigh *= std::exp(std::log(rhigh/rlow)/((G4double)(nbins-1))); 1034 1035 G4PhysicsLogVector* v = new G4PhysicsLogVector(rlow, rhigh, nbins-1); 1024 1036 1025 1037 v->PutValue(0,elow); … … 1070 1082 1071 1083 //loop for range values 1072 for( G4int i=0; i< TotBin; i++)1084 for( G4int i=0; i<=TotBin; i++) 1073 1085 { 1074 1086 LowEdgeRange = aVector->GetLowEdgeEnergy(i) ; //i.e. GetLowEdgeValue(i) … … 1087 1099 if(binnumber == 0) 1088 1100 KineticEnergy = LowestKineticEnergy ; 1089 else if(binnumber == TotBin -1)1101 else if(binnumber == TotBin) 1090 1102 KineticEnergy = HighestKineticEnergy ; 1091 1103 else -
trunk/source/processes/electromagnetic/lowenergy/src/G4hShellCrossSectionDoubleExp.cc
r1007 r1192 41 41 // Empiric Model for shell cross sections in proton ionisation 42 42 // ------------------------------------------------------------------- 43 // $Id: G4hShellCrossSectionDoubleExp.cc,v 1. 9 2008/06/26 18:19:10 sincertiExp $44 // GEANT4 tag $Name: geant4-09-02$43 // $Id: G4hShellCrossSectionDoubleExp.cc,v 1.10 2009/06/10 13:32:36 mantero Exp $ 44 // GEANT4 tag $Name: emlowen-V09-02-64 $ 45 45 46 46 #include "globals.hh" -
trunk/source/processes/electromagnetic/lowenergy/src/G4hShellCrossSectionDoubleExpData.cc
r1007 r1192 33 33 // 34 34 // ------------------------------------------------------------------- 35 // $Id: G4hShellCrossSectionDoubleExpData.cc,v 1. 4 2006/06/29 19:42:38 gunterExp $36 // GEANT4 tag $Name: geant4-09-02$35 // $Id: G4hShellCrossSectionDoubleExpData.cc,v 1.5 2009/06/10 13:32:36 mantero Exp $ 36 // GEANT4 tag $Name: emlowen-V09-02-64 $ 37 37 38 38 #include "G4hShellCrossSectionDoubleExpData.hh" -
trunk/source/processes/electromagnetic/lowenergy/src/G4hShellCrossSectionExp.cc
r1007 r1192 41 41 // Empiric Model for shell cross sections in proton ionisation 42 42 // ------------------------------------------------------------------- 43 // $Id: G4hShellCrossSectionExp.cc,v 1. 6 2008/05/02 19:23:38 piaExp $44 // GEANT4 tag $Name: geant4-09-02$43 // $Id: G4hShellCrossSectionExp.cc,v 1.7 2009/06/10 13:32:36 mantero Exp $ 44 // GEANT4 tag $Name: emlowen-V09-02-64 $ 45 45 46 46 #include "globals.hh" -
trunk/source/processes/electromagnetic/lowenergy/src/G4hShellCrossSectionExpData.cc
r1007 r1192 33 33 // 34 34 // ------------------------------------------------------------------- 35 // $Id: G4hShellCrossSectionExpData.cc,v 1. 3 2006/06/29 19:42:42 gunterExp $36 // GEANT4 tag $Name: geant4-09-02$35 // $Id: G4hShellCrossSectionExpData.cc,v 1.4 2009/06/10 13:32:36 mantero Exp $ 36 // GEANT4 tag $Name: emlowen-V09-02-64 $ 37 37 38 38 #include "G4hShellCrossSectionExpData.hh"
Note: See TracChangeset
for help on using the changeset viewer.