Changeset 1340 for trunk/source/processes/electromagnetic/standard
- Timestamp:
- Nov 5, 2010, 3:45:55 PM (14 years ago)
- Location:
- trunk/source/processes/electromagnetic/standard
- Files:
-
- 33 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/source/processes/electromagnetic/standard/History
r1315 r1340 1 $Id: History,v 1.5 04 2010/06/04 09:25:12vnivanch Exp $1 $Id: History,v 1.514 2010/11/04 17:31:43 vnivanch Exp $ 2 2 ------------------------------------------------------------------- 3 3 … … 17 17 * Reverse chronological order (last date on top), please * 18 18 ---------------------------------------------------------- 19 20 04 November 2010: V.Ivant (emstand-V09-03-25) 21 - Fixed warnings of the Coverity tool (pedantic initialisation); 22 23 26 October 2010: V.Ivant (emstand-V09-03-24) 24 - Fixed problem reported by the Coverity tool (mainly pedantic 25 initialisation); 26 - G4BetheHeitlerModel, G4PairProductionRelModel - removed unused 27 internal table of cross section 28 - G4WaterStopping - fixed bug in index of data for Fe ion 29 30 14 October 2010: V.Ivant (emstand-V09-03-23) 31 - G4ModifiedTsai - added (moved from lowenergy) 32 - G4PairProductionRelModel, G4eBremsstrahlungRelModel - return back 33 the version of 9.4beta (disable tag 21); use general interface 34 to sample polar angular distribution (G4ModifiedTsai - default) 35 36 28 September 2010: V.Ivant (emstand-V09-03-22) 37 - G4ionIonisation, G4alphaIonisation - removed obsolete nuclear stopping 38 flag and Get/Set methods (nuclear stopping is simulated by the 39 dedicated G4NuclearStopping process) 40 41 12 September 2010: V.Ivant (emstand-V09-03-21) 42 - G4BetheBlochModel - fixed shell corrections 43 - G4PairProductionRelModel, G4eBremsstrahlungRelModel - fixed 44 SetCurrentElement method, fix is important for unit tests 45 46 12 August 2010: V.Ivant (emstand-V09-03-20) 47 - G4UniversalFluctuation - L.Urban revision of width correction 48 providing better results for thin targets and a good tail 49 50 14 June 2010: V.Ivant (emstand-V09-03-19) 51 - G4UniversalFluctuation93 new class keeping version of the release 9.3 52 for the G4UniversalFluctuation 53 - G4UniversalFluctuation - improved comments 54 55 11 June 2010: V.Ivant (emstand-V09-03-18) 56 - G4UniversalFluctuation - L.Urban fixed anomaly at the tail of 57 distribution for thin targets 19 58 20 59 4 June 2010: V.Ivant (emstand-V09-03-17) -
trunk/source/processes/electromagnetic/standard/include/G4BetheHeitlerModel.hh
r1337 r1340 24 24 // ******************************************************************** 25 25 // 26 // $Id: G4BetheHeitlerModel.hh,v 1. 6 2007/05/22 17:34:36vnivanch Exp $27 // GEANT4 tag $Name: geant4-09-04-beta-01$26 // $Id: G4BetheHeitlerModel.hh,v 1.9 2010/10/26 10:35:22 vnivanch Exp $ 27 // GEANT4 tag $Name: emstand-V09-03-24 $ 28 28 // 29 29 // ------------------------------------------------------------------- … … 63 63 64 64 G4BetheHeitlerModel(const G4ParticleDefinition* p = 0, 65 const G4String& nam = "Bethe -Heitler");65 const G4String& nam = "BetheHeitler"); 66 66 67 67 virtual ~G4BetheHeitlerModel(); … … 97 97 G4ParticleDefinition* thePositron; 98 98 G4ParticleChangeForGamma* fParticleChange; 99 G4PhysicsTable* theCrossSectionTable;100 101 G4double lowGammaEnergy;102 G4double highGammaEnergy;103 104 G4int nbins;105 size_t indexZ[120];106 107 99 }; 108 100 -
trunk/source/processes/electromagnetic/standard/include/G4CoulombScattering.hh
r1337 r1340 24 24 // ******************************************************************** 25 25 // 26 // $Id: G4CoulombScattering.hh,v 1.1 4 2010/02/17 18:59:22vnivanch Exp $27 // GEANT4 tag $Name: geant4-09-04-beta-01$26 // $Id: G4CoulombScattering.hh,v 1.15 2010/10/25 19:13:23 vnivanch Exp $ 27 // GEANT4 tag $Name: emstand-V09-03-24 $ 28 28 // 29 29 // ------------------------------------------------------------------- … … 93 93 G4double thEnergyElec; 94 94 G4bool isInitialised; 95 G4bool buildElmTableFlag;96 95 const G4ParticleDefinition* aParticle; 97 96 -
trunk/source/processes/electromagnetic/standard/include/G4PAIySection.hh
r1337 r1340 25 25 // 26 26 // 27 // $Id: G4PAIySection.hh,v 1. 1 2007/10/01 17:45:14vnivanch Exp $28 // GEANT4 tag $Name: geant4-09-04-beta-01$27 // $Id: G4PAIySection.hh,v 1.2 2010/11/04 17:30:31 vnivanch Exp $ 28 // GEANT4 tag $Name: emstand-V09-03-25 $ 29 29 // 30 30 // … … 110 110 // Inline access functions 111 111 112 G4int GetNumberOfGammas() const { return fNumberOfGammas ; }113 114 G4int GetSplineSize() const { return fSplineNumber ; }115 116 G4int GetIntervalNumber() const { return fIntervalNumber ; }117 118 G4double GetEnergyInterval(G4int i){ return fEnergyInterval[i] ; }119 120 G4double GetDifPAIySection(G4int i){ return fDifPAIySection[i] ; }121 G4double GetPAIdNdxCrenkov(G4int i){ return fdNdxCerenkov[i] ; }122 G4double GetPAIdNdxPlasmon(G4int i){ return fdNdxPlasmon[i] ; }123 124 G4double GetMeanEnergyLoss() const {return fIntegralPAIySection[0] ; }125 G4double GetMeanCerenkovLoss() const {return fIntegralCerenkov[0] ; }126 G4double GetMeanPlasmonLoss() const {return fIntegralPlasmon[0] ; }127 128 G4double GetNormalizationCof() const { return fNormalizationCof ; }112 inline G4int GetNumberOfGammas() const { return fNumberOfGammas ; } 113 114 inline G4int GetSplineSize() const { return fSplineNumber ; } 115 116 inline G4int GetIntervalNumber() const { return fIntervalNumber ; } 117 118 inline G4double GetEnergyInterval(G4int i){ return fEnergyInterval[i] ; } 119 120 inline G4double GetDifPAIySection(G4int i){ return fDifPAIySection[i] ; } 121 inline G4double GetPAIdNdxCrenkov(G4int i){ return fdNdxCerenkov[i] ; } 122 inline G4double GetPAIdNdxPlasmon(G4int i){ return fdNdxPlasmon[i] ; } 123 124 inline G4double GetMeanEnergyLoss() const {return fIntegralPAIySection[0] ; } 125 inline G4double GetMeanCerenkovLoss() const {return fIntegralCerenkov[0] ; } 126 inline G4double GetMeanPlasmonLoss() const {return fIntegralPlasmon[0] ; } 127 128 inline G4double GetNormalizationCof() const { return fNormalizationCof ; } 129 129 130 130 inline G4double GetPAItable(G4int i,G4int j) const ; 131 131 132 inline G4double 132 inline G4double GetLorentzFactor(G4int i) const ; 133 133 134 134 inline G4double GetSplineEnergy(G4int i) const ; … … 185 185 G4double fPAItable[500][112] ; // Output array 186 186 187 } ;187 }; 188 188 189 189 //////////////// Inline methods ////////////////////////////////// -
trunk/source/processes/electromagnetic/standard/include/G4PairProductionRelModel.hh
r1337 r1340 24 24 // ******************************************************************** 25 25 // 26 // $Id: G4PairProductionRelModel.hh,v 1. 3 2009/06/04 13:45:53 gunterExp $27 // GEANT4 tag $Name: geant4-09-04-beta-01$26 // $Id: G4PairProductionRelModel.hh,v 1.9 2010/10/26 10:35:22 vnivanch Exp $ 27 // GEANT4 tag $Name: emstand-V09-03-24 $ 28 28 // 29 29 // ------------------------------------------------------------------- … … 64 64 65 65 G4PairProductionRelModel(const G4ParticleDefinition* p = 0, 66 const G4String& nam = "Bethe-Heitler");66 const G4String& nam = "BetheHeitlerLPM"); 67 67 68 68 virtual ~G4PairProductionRelModel(); … … 88 88 89 89 // * fast inline functions * 90 inline void SetCurrentElement( const G4double);90 inline void SetCurrentElement(G4double /*Z*/); 91 91 92 92 // set / get methods … … 110 110 G4double ScreenFunction2(G4double ScreenVariable); 111 111 112 113 114 115 112 G4double ComputeXSectionPerAtom(G4double totalEnergy, G4double Z); 116 113 … … 128 125 G4ParticleDefinition* thePositron; 129 126 G4ParticleChangeForGamma* fParticleChange; 130 G4PhysicsTable* theCrossSectionTable;131 132 G4double lowGammaEnergy;133 G4double highGammaEnergy;134 135 G4int nbins;136 size_t indexZ[120];137 127 138 128 G4double fLPMconstant; … … 196 186 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo...... 197 187 198 inline void G4PairProductionRelModel::SetCurrentElement( constG4double Z)188 inline void G4PairProductionRelModel::SetCurrentElement(G4double Z) 199 189 { 200 190 if(Z != currentZ) { … … 214 204 Finel = facFinel - 2.*lnZ/3. ; 215 205 } 216 217 206 fCoulomb=GetCurrentElement()->GetfCoulomb(); 218 207 } 219 208 } 209 220 210 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo.... 221 211 -
trunk/source/processes/electromagnetic/standard/include/G4UniversalFluctuation.hh
r1337 r1340 24 24 // ******************************************************************** 25 25 // 26 // $Id: G4UniversalFluctuation.hh,v 1.1 0 2009/03/19 14:15:17 vnivanchExp $27 // GEANT4 tag $Name: geant4-09-04-beta-01$26 // $Id: G4UniversalFluctuation.hh,v 1.12 2010/08/08 08:19:59 urban Exp $ 27 // GEANT4 tag $Name: emstand-V09-03-24 $ 28 28 // 29 29 // ------------------------------------------------------------------- … … 34 34 // File name: G4UniversalFluctuation 35 35 // 36 // Author: V ladimir Ivanchenko36 // Author: V.Ivanchenko make a class with the Laszlo Urban model 37 37 // 38 38 // Creation date: 03.01.2002 … … 110 110 G4double ipotLogFluct; 111 111 G4double e0; 112 G4double esmall; 112 113 113 114 G4double e1,e2; … … 116 117 G4double theBohrBeta2; 117 118 G4double minLoss; 118 G4double nmaxCont1; 119 G4double nmaxCont2; 119 G4double nmaxCont; 120 G4double rate,fw; 121 120 122 121 123 }; -
trunk/source/processes/electromagnetic/standard/include/G4alphaIonisation.hh
r1337 r1340 24 24 // ******************************************************************** 25 25 // 26 // $Id: G4alphaIonisation.hh,v 1. 1 2009/11/10 11:50:30vnivanch Exp $27 // GEANT4 tag $Name: geant4-09-04-beta-01$26 // $Id: G4alphaIonisation.hh,v 1.3 2010/10/26 10:06:12 vnivanch Exp $ 27 // GEANT4 tag $Name: emstand-V09-03-24 $ 28 28 // 29 29 // ------------------------------------------------------------------- … … 71 71 virtual void PrintInfo(); 72 72 73 void ActivateNuclearStopping(G4bool);74 75 73 protected: 76 74 … … 82 80 83 81 inline G4double BetheBlochEnergyThreshold(); 84 85 inline G4bool NuclearStoppingFlag();86 82 87 83 private: … … 98 94 99 95 G4bool isInitialised; 100 G4bool nuclearStopping;101 96 }; 102 97 103 98 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo.... 104 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo....105 106 inline void G4alphaIonisation::ActivateNuclearStopping(G4bool val)107 {108 nuclearStopping = val;109 }110 111 99 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo.... 112 100 … … 118 106 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo.... 119 107 120 inline G4bool G4alphaIonisation::NuclearStoppingFlag()121 {122 return nuclearStopping;123 }124 125 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo....126 127 108 #endif -
trunk/source/processes/electromagnetic/standard/include/G4eBremsstrahlungRelModel.hh
r1337 r1340 24 24 // ******************************************************************** 25 25 // 26 // $Id: G4eBremsstrahlungRelModel.hh,v 1.1 1 2009/02/20 12:06:37vnivanch Exp $27 // GEANT4 tag $Name: geant4-09-04-beta-01$26 // $Id: G4eBremsstrahlungRelModel.hh,v 1.14 2010/10/26 10:35:22 vnivanch Exp $ 27 // GEANT4 tag $Name: emstand-V09-03-24 $ 28 28 // 29 29 // ------------------------------------------------------------------- … … 65 65 66 66 G4eBremsstrahlungRelModel(const G4ParticleDefinition* p = 0, 67 const G4String& nam = "eBrem Rel");67 const G4String& nam = "eBremLPM"); 68 68 69 69 virtual ~G4eBremsstrahlungRelModel(); … … 159 159 160 160 private: 161 161 162 // consts 162 G4double highKinEnergy;163 163 G4double lowKinEnergy; 164 164 G4double fMigdalConstant; … … 195 195 } 196 196 197 fCoulomb =GetCurrentElement()->GetfCoulomb();198 fMax =Fel-fCoulomb + Finel/currentZ + (1.+1./currentZ)/12.;197 fCoulomb = GetCurrentElement()->GetfCoulomb(); 198 fMax = Fel-fCoulomb + Finel/currentZ + (1.+1./currentZ)/12.; 199 199 } 200 200 } -
trunk/source/processes/electromagnetic/standard/include/G4eMultipleScattering.hh
r1337 r1340 24 24 // ******************************************************************** 25 25 // 26 // $Id: G4eMultipleScattering.hh,v 1. 3 2009/11/01 13:04:12 vnivanch Exp $27 // GEANT4 tag $Name: geant4-09-04-beta-01$26 // $Id: G4eMultipleScattering.hh,v 1.4 2010/10/26 10:39:02 vnivanch Exp $ 27 // GEANT4 tag $Name: emstand-V09-03-24 $ 28 28 // 29 29 // ----------------------------------------------------------------------------- … … 64 64 public: // with description 65 65 66 G4eMultipleScattering(const G4String& processName ="msc");66 G4eMultipleScattering(const G4String& processName = "msc"); 67 67 68 68 virtual ~G4eMultipleScattering(); … … 75 75 76 76 // geom. step length distribution should be sampled or not 77 void Setsamplez(G4bool value) { samplez = value;};77 //void Setsamplez(G4bool value) { samplez = value;}; 78 78 79 79 // to reduce the energy/step dependence 80 void Setdtrl(G4double value) { dtrl = value;};80 //void Setdtrl(G4double value) { dtrl = value;}; 81 81 82 82 // 'soften' step limitation above lambdalimit 83 void SetLambdalimit(G4double value) { lambdalimit = value;};83 //void SetLambdalimit(G4double value) { lambdalimit = value;}; 84 84 85 85 protected: … … 90 90 private: // data members 91 91 92 G4double lambdalimit;93 G4double dtrl;92 // G4double lambdalimit; 93 //G4double dtrl; 94 94 95 G4bool samplez;95 //G4bool samplez; 96 96 G4bool isInitialized; 97 97 -
trunk/source/processes/electromagnetic/standard/include/G4ionIonisation.hh
r1337 r1340 24 24 // ******************************************************************** 25 25 // 26 // $Id: G4ionIonisation.hh,v 1.5 7 2009/02/20 12:06:37vnivanch Exp $27 // GEANT4 tag $Name: geant4-09-04-beta-01$26 // $Id: G4ionIonisation.hh,v 1.58 2010/09/28 15:50:00 vnivanch Exp $ 27 // GEANT4 tag $Name: emstand-V09-03-24 $ 28 28 // 29 29 // ------------------------------------------------------------------- … … 95 95 void ActivateStoppingData(G4bool); 96 96 97 void ActivateNuclearStopping(G4bool);98 99 97 protected: 100 98 … … 106 104 107 105 inline G4double BetheBlochEnergyThreshold(); 108 109 inline G4bool NuclearStoppingFlag();110 106 111 107 private: … … 123 119 G4bool isInitialised; 124 120 G4bool stopDataActive; 125 G4bool nuclearStopping;126 121 }; 127 122 … … 136 131 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo.... 137 132 138 inline void G4ionIonisation::ActivateNuclearStopping(G4bool val)139 {140 nuclearStopping = val;141 }142 143 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo....144 145 133 inline G4double G4ionIonisation::BetheBlochEnergyThreshold() 146 134 { … … 150 138 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo.... 151 139 152 inline G4bool G4ionIonisation::NuclearStoppingFlag()153 {154 return nuclearStopping;155 }156 157 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo....158 159 140 #endif -
trunk/source/processes/electromagnetic/standard/src/G4BetheBlochModel.cc
r1337 r1340 24 24 // ******************************************************************** 25 25 // 26 // $Id: G4BetheBlochModel.cc,v 1. 37 2010/05/27 10:25:59vnivanch Exp $27 // GEANT4 tag $Name: geant4-09-04-beta-01$26 // $Id: G4BetheBlochModel.cc,v 1.40 2010/11/04 17:30:31 vnivanch Exp $ 27 // GEANT4 tag $Name: emstand-V09-03-25 $ 28 28 // 29 29 // ------------------------------------------------------------------- … … 82 82 { 83 83 fParticleChange = 0; 84 theElectron = G4Electron::Electron(); 84 85 if(p) { 85 86 SetGenericIon(p); 86 87 SetParticle(p); 87 } 88 theElectron = G4Electron::Electron(); 88 } else { 89 SetParticle(theElectron); 90 } 89 91 corr = G4LossTableManager::Instance()->EmCorrections(); 90 92 nist = G4NistManager::Instance(); … … 117 119 // << G4endl; 118 120 119 corrFactor = chargeSquare;120 121 // always false before the run 121 122 SetDeexcitationFlag(false); … … 157 158 G4double q = particle->GetPDGCharge()/eplus; 158 159 chargeSquare = q*q; 160 corrFactor = chargeSquare; 159 161 ratio = electron_mass_c2/mass; 160 162 G4double magmom = … … 275 277 276 278 // shell correction 277 dedx -= 2.0*corr->ShellCorrection(p,material,kineticEnergy); 279 //dedx -= 2.0*corr->ShellCorrection(p,material,kineticEnergy); 280 dedx -= corr->ShellCorrection(p,material,kineticEnergy); 278 281 279 282 // now compute the total ionization loss 280 281 if (dedx < 0.0) dedx = 0.0 ;282 283 283 dedx *= twopi_mc2_rcl2*chargeSquare*eDensity/beta2; 284 284 … … 289 289 dedx += corr->HighOrderCorrections(p,material,kineticEnergy,cutEnergy); 290 290 } 291 292 if (dedx < 0.0) { dedx = 0.0; } 291 293 return dedx; 292 294 } -
trunk/source/processes/electromagnetic/standard/src/G4BetheHeitlerModel.cc
r1337 r1340 24 24 // ******************************************************************** 25 25 // 26 // $Id: G4BetheHeitlerModel.cc,v 1.1 3 2009/04/09 18:41:18vnivanch Exp $27 // GEANT4 tag $Name: geant4-09-04-beta-01$26 // $Id: G4BetheHeitlerModel.cc,v 1.15 2010/10/25 19:02:32 vnivanch Exp $ 27 // GEANT4 tag $Name: emstand-V09-03-24 $ 28 28 // 29 29 // ------------------------------------------------------------------- … … 43 43 // 16-11-05 replace shootBit() by G4UniformRand() mma 44 44 // 04-12-05 SetProposedKineticEnergy(0.) for the killed photon (mma) 45 // 20-02- 20SelectRandomElement is called for any initial gamma energy45 // 20-02-07 SelectRandomElement is called for any initial gamma energy 46 46 // in order to have selected element for polarized model (VI) 47 // 25-10-10 Removed unused table, added element selector (VI) 47 48 // 48 49 // Class Description: … … 58 59 #include "G4Gamma.hh" 59 60 #include "Randomize.hh" 60 #include "G4DataVector.hh"61 #include "G4PhysicsLogVector.hh"62 61 #include "G4ParticleChangeForGamma.hh" 63 #include "G4LossTableManager.hh"64 62 65 63 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo.... … … 69 67 G4BetheHeitlerModel::G4BetheHeitlerModel(const G4ParticleDefinition*, 70 68 const G4String& nam) 71 : G4VEmModel(nam), 72 theCrossSectionTable(0), 73 nbins(10) 69 : G4VEmModel(nam) 74 70 { 75 71 fParticleChange = 0; … … 82 78 83 79 G4BetheHeitlerModel::~G4BetheHeitlerModel() 84 { 85 if(theCrossSectionTable) { 86 theCrossSectionTable->clearAndDestroy(); 87 delete theCrossSectionTable; 88 } 89 } 90 91 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo.... 92 93 void G4BetheHeitlerModel::Initialise(const G4ParticleDefinition*, 94 const G4DataVector&) 95 { 96 if(!fParticleChange) fParticleChange = GetParticleChangeForGamma(); 97 98 if(theCrossSectionTable) { 99 theCrossSectionTable->clearAndDestroy(); 100 delete theCrossSectionTable; 101 } 102 103 const G4ElementTable* theElementTable = G4Element::GetElementTable(); 104 size_t nvect = G4Element::GetNumberOfElements(); 105 theCrossSectionTable = new G4PhysicsTable(nvect); 106 G4PhysicsLogVector* ptrVector; 107 G4double emin = LowEnergyLimit(); 108 G4double emax = HighEnergyLimit(); 109 G4int n = nbins*G4int(log10(emax/emin)); 110 G4bool spline = G4LossTableManager::Instance()->SplineFlag(); 111 G4double e, value; 112 113 for(size_t j=0; j<nvect ; j++) { 114 115 ptrVector = new G4PhysicsLogVector(emin, emax, n); 116 ptrVector->SetSpline(spline); 117 G4double Z = (*theElementTable)[j]->GetZ(); 118 G4int iz = G4int(Z); 119 indexZ[iz] = j; 120 121 for(G4int i=0; i<nbins; i++) { 122 e = ptrVector->GetLowEdgeEnergy( i ) ; 123 value = ComputeCrossSectionPerAtom(theGamma, e, Z); 124 ptrVector->PutValue( i, value ); 125 } 126 127 theCrossSectionTable->insert(ptrVector); 128 } 129 } 130 131 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo.... 132 133 G4double G4BetheHeitlerModel::ComputeCrossSectionPerAtom( 134 const G4ParticleDefinition*, 135 G4double GammaEnergy, G4double Z, 136 G4double, G4double, G4double) 80 {} 81 82 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo.... 83 84 void G4BetheHeitlerModel::Initialise(const G4ParticleDefinition* p, 85 const G4DataVector& cuts) 86 { 87 if(!fParticleChange) { fParticleChange = GetParticleChangeForGamma(); } 88 InitialiseElementSelectors(p, cuts); 89 } 90 91 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo.... 92 93 G4double 94 G4BetheHeitlerModel::ComputeCrossSectionPerAtom(const G4ParticleDefinition*, 95 G4double GammaEnergy, G4double Z, 96 G4double, G4double, G4double) 137 97 // Calculates the microscopic cross section in GEANT4 internal units. 138 98 // A parametrized formula from L. Urban is used to estimate … … 144 104 static const G4double GammaEnergyLimit = 1.5*MeV; 145 105 G4double CrossSection = 0.0 ; 146 if ( Z < 1. ) return CrossSection; 147 if ( GammaEnergy <= 2.0*electron_mass_c2 ) return CrossSection; 106 if ( Z < 0.9 || GammaEnergy <= 2.0*electron_mass_c2 ) { return CrossSection; } 148 107 149 108 static const G4double … … 160 119 161 120 G4double GammaEnergySave = GammaEnergy; 162 if (GammaEnergy < GammaEnergyLimit) GammaEnergy = GammaEnergyLimit ;121 if (GammaEnergy < GammaEnergyLimit) { GammaEnergy = GammaEnergyLimit; } 163 122 164 123 G4double X=log(GammaEnergy/electron_mass_c2), X2=X*X, X3=X2*X, X4=X3*X, X5=X4*X; … … 177 136 } 178 137 179 if (CrossSection < 0.) CrossSection = 0.;138 if (CrossSection < 0.) { CrossSection = 0.; } 180 139 return CrossSection; 181 140 } … … 208 167 G4double epsil ; 209 168 G4double epsil0 = electron_mass_c2/GammaEnergy ; 210 if(epsil0 > 1.0) return;169 if(epsil0 > 1.0) { return; } 211 170 212 171 // do it fast if GammaEnergy < 2. MeV … … 225 184 // Extract Coulomb factor for this Element 226 185 G4double FZ = 8.*(anElement->GetIonisation()->GetlogZ3()); 227 if (GammaEnergy > 50.*MeV) FZ += 8.*(anElement->GetfCoulomb());186 if (GammaEnergy > 50.*MeV) { FZ += 8.*(anElement->GetfCoulomb()); } 228 187 229 188 // limits of the screening variable … … 334 293 335 294 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo...... 336 337 -
trunk/source/processes/electromagnetic/standard/src/G4BohrFluctuations.cc
r1337 r1340 24 24 // ******************************************************************** 25 25 // 26 // $Id: G4BohrFluctuations.cc,v 1. 8 2009/09/29 11:33:22vnivanch Exp $27 // GEANT4 tag $Name: geant4-09-04-beta-01$26 // $Id: G4BohrFluctuations.cc,v 1.9 2010/10/25 18:23:36 vnivanch Exp $ 27 // GEANT4 tag $Name: emstand-V09-03-24 $ 28 28 // 29 29 // ------------------------------------------------------------------- … … 67 67 xmin(0.2), 68 68 minLoss(0.001*eV) 69 {} 69 { 70 particleMass = proton_mass_c2; 71 chargeSquare = 1.0; 72 kineticEnergy = 0.0; 73 beta2 = 0.0; 74 } 70 75 71 76 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo.... … … 92 97 G4double& meanLoss) 93 98 { 94 if(meanLoss <= minLoss) return meanLoss;99 if(meanLoss <= minLoss) { return meanLoss; } 95 100 G4double siga = Dispersion(material,dp,tmax,length); 96 101 G4double loss = meanLoss; … … 142 147 G4double& length) 143 148 { 144 if(!particle) InitialiseMe(dp->GetDefinition());149 if(!particle) { InitialiseMe(dp->GetDefinition()); } 145 150 146 151 G4double electronDensity = material->GetElectronDensity(); -
trunk/source/processes/electromagnetic/standard/src/G4BraggIonModel.cc
r1337 r1340 24 24 // ******************************************************************** 25 25 // 26 // $Id: G4BraggIonModel.cc,v 1. 27 2009/11/22 18:00:23vnivanch Exp $27 // GEANT4 tag $Name: geant4-09-04-beta-01$26 // $Id: G4BraggIonModel.cc,v 1.30 2010/11/04 17:30:31 vnivanch Exp $ 27 // GEANT4 tag $Name: emstand-V09-03-25 $ 28 28 // 29 29 // ------------------------------------------------------------------- … … 81 81 isInitialised(false) 82 82 { 83 if(p) SetParticle(p);84 83 SetHighEnergyLimit(2.0*MeV); 85 84 … … 90 89 theZieglerFactor = eV*cm2*1.0e-15; 91 90 theElectron = G4Electron::Electron(); 91 corrFactor = 1.0; 92 if(p) { SetParticle(p); } 93 else { SetParticle(theElectron); } 92 94 } 93 95 … … 110 112 const G4DataVector&) 111 113 { 112 if(p != particle) SetParticle(p);114 if(p != particle) { SetParticle(p); } 113 115 114 116 corrFactor = chargeSquare; … … 122 124 G4String pname = particle->GetParticleName(); 123 125 if(particle->GetParticleType() == "nucleus" && 124 pname != "deuteron" && pname != "triton") isIon = true;126 pname != "deuteron" && pname != "triton") { isIon = true; } 125 127 126 128 corr = G4LossTableManager::Instance()->EmCorrections(); -
trunk/source/processes/electromagnetic/standard/src/G4BraggModel.cc
r1337 r1340 24 24 // ******************************************************************** 25 25 // 26 // $Id: G4BraggModel.cc,v 1.2 6 2010/06/04 09:08:43vnivanch Exp $27 // GEANT4 tag $Name: geant4-09-04-beta-01$26 // $Id: G4BraggModel.cc,v 1.28 2010/11/04 17:30:31 vnivanch Exp $ 27 // GEANT4 tag $Name: emstand-V09-03-25 $ 28 28 // 29 29 // ------------------------------------------------------------------- … … 84 84 isInitialised(false) 85 85 { 86 if(p) SetParticle(p);87 86 SetHighEnergyLimit(2.0*MeV); 88 87 … … 90 89 theZieglerFactor = eV*cm2*1.0e-15; 91 90 theElectron = G4Electron::Electron(); 91 expStopPower125 = 0.0; 92 92 93 93 corr = G4LossTableManager::Instance()->EmCorrections(); 94 if(p) { SetParticle(p); } 95 else { SetParticle(theElectron); } 94 96 } 95 97 -
trunk/source/processes/electromagnetic/standard/src/G4IonFluctuations.cc
r1337 r1340 24 24 // ******************************************************************** 25 25 // 26 // $Id: G4IonFluctuations.cc,v 1.2 6 2009/03/31 13:24:40 toshitoExp $27 // GEANT4 tag $Name: geant4-09-04-beta-01$26 // $Id: G4IonFluctuations.cc,v 1.27 2010/10/25 19:13:23 vnivanch Exp $ 27 // GEANT4 tag $Name: emstand-V09-03-24 $ 28 28 // 29 29 // ------------------------------------------------------------------- … … 80 80 xmin(0.2), 81 81 minLoss(0.001*eV) 82 {} 82 { 83 kineticEnergy = 0.0; 84 beta2 = 0.0; 85 } 83 86 84 87 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo.... -
trunk/source/processes/electromagnetic/standard/src/G4PAIModel.cc
r1337 r1340 24 24 // ******************************************************************** 25 25 // 26 // $Id: G4PAIModel.cc,v 1.5 2 2010/06/03 07:28:39 grichineExp $27 // GEANT4 tag $Name: geant4-09-04-beta-01$26 // $Id: G4PAIModel.cc,v 1.54 2010/11/04 17:30:32 vnivanch Exp $ 27 // GEANT4 tag $Name: emstand-V09-03-25 $ 28 28 // 29 29 // ------------------------------------------------------------------- … … 81 81 fBg2lim(0.0169), 82 82 fTaulim(8.4146e-3) 83 { 84 if(p) SetParticle(p); 85 83 { 86 84 fElectron = G4Electron::Electron(); 87 85 fPositron = G4Positron::Positron(); … … 93 91 fLambdaVector = 0; 94 92 fdNdxCutVector = 0; 93 fParticleEnergyVector = 0; 94 fSandiaIntervalNumber = 0; 95 fMatIndex = 0; 96 fDeltaCutInKinEnergy = 0.0; 97 98 if(p) { SetParticle(p); } 99 else { SetParticle(fElectron); } 95 100 96 101 isInitialised = false; … … 132 137 void G4PAIModel::SetParticle(const G4ParticleDefinition* p) 133 138 { 134 if(fParticle == p) return;139 if(fParticle == p) { return; } 135 140 fParticle = p; 136 141 fMass = fParticle->GetPDGMass(); … … 141 146 fRatio = electron_mass_c2/fMass; 142 147 fQc = fMass/fRatio; 148 fLowestKineticEnergy = fMass*(fLowestGamma - 1.0); 149 fHighestKineticEnergy = fMass*(fHighestGamma - 1.0); 143 150 } 144 151 … … 148 155 const G4DataVector&) 149 156 { 150 G4cout<<"G4PAIModel::Initialise for "<<p->GetParticleName()<<G4endl;151 if(isInitialised) return;157 //G4cout<<"G4PAIModel::Initialise for "<<p->GetParticleName()<<G4endl; 158 if(isInitialised) { return; } 152 159 isInitialised = true; 153 160 154 161 SetParticle(p); 155 fLowestKineticEnergy = fMass*(fLowestGamma - 1.0);156 fHighestKineticEnergy = fMass*(fHighestGamma - 1.0);157 162 158 163 fParticleEnergyVector = new G4PhysicsLogVector(fLowestKineticEnergy, … … 213 218 void G4PAIModel::ComputeSandiaPhotoAbsCof() 214 219 { 215 G4int i, j , numberOfElements;216 staticconst G4MaterialTable* theMaterialTable = G4Material::GetMaterialTable();220 G4int i, j; 221 const G4MaterialTable* theMaterialTable = G4Material::GetMaterialTable(); 217 222 218 223 G4SandiaTable thisMaterialSandiaTable(fMatIndex) ; 219 numberOfElements = (*theMaterialTable)[fMatIndex]-> 220 GetNumberOfElements(); 224 G4int numberOfElements = 225 (*theMaterialTable)[fMatIndex]->GetNumberOfElements(); 226 221 227 G4int* thisMaterialZ = new G4int[numberOfElements] ; 222 228 … … 236 242 fSandiaPhotoAbsCof = new G4double*[fSandiaIntervalNumber] ; 237 243 238 for(i=0;i<fSandiaIntervalNumber;i++) fSandiaPhotoAbsCof[i] = new G4double[5] ; 244 for(i=0; i<fSandiaIntervalNumber; i++) 245 { 246 fSandiaPhotoAbsCof[i] = new G4double[5]; 247 } 239 248 240 249 for( i = 0 ; i < fSandiaIntervalNumber ; i++ ) 241 250 { 242 fSandiaPhotoAbsCof[i][0] = thisMaterialSandiaTable.GetPhotoAbsorpCof(i+1,0) 251 fSandiaPhotoAbsCof[i][0] = thisMaterialSandiaTable.GetPhotoAbsorpCof(i+1,0); 243 252 244 253 for( j = 1; j < 5 ; j++ ) 245 254 { 246 fSandiaPhotoAbsCof[i][j] = thisMaterialSandiaTable. 247 GetPhotoAbsorpCof(i+1,j)* 255 fSandiaPhotoAbsCof[i][j] = thisMaterialSandiaTable.GetPhotoAbsorpCof(i+1,j)* 248 256 (*theMaterialTable)[fMatIndex]->GetDensity() ; 249 257 } 250 258 } 251 // delete[] thisMaterialZ;259 delete[] thisMaterialZ; 252 260 } 253 261 … … 307 315 ionloss = fPAIySection.GetMeanEnergyLoss() ; // total <dE/dx> 308 316 309 if ( ionloss < DBL_MIN) ionloss = DBL_MIN;317 if ( ionloss < DBL_MIN) { ionloss = 0.0; } 310 318 fdEdxVector->PutValue(i,ionloss) ; 311 319 -
trunk/source/processes/electromagnetic/standard/src/G4PAIPhotonModel.cc
r1337 r1340 24 24 // ******************************************************************** 25 25 // 26 // $Id: G4PAIPhotonModel.cc,v 1.2 4 2010/06/03 07:28:39 grichineExp $27 // GEANT4 tag $Name: geant4-09-04-beta-01$26 // $Id: G4PAIPhotonModel.cc,v 1.25 2010/10/26 09:16:50 vnivanch Exp $ 27 // GEANT4 tag $Name: emstand-V09-03-24 $ 28 28 // 29 29 // ------------------------------------------------------------------- … … 83 83 fTaulim(8.4146e-3) 84 84 { 85 if(p) SetParticle(p);86 87 85 fVerbose = 0; 88 86 fElectron = G4Electron::Electron(); … … 90 88 91 89 fProtonEnergyVector = new G4PhysicsLogVector(fLowestKineticEnergy, 92 93 90 fHighestKineticEnergy, 91 fTotBin); 94 92 fPAItransferTable = 0; 95 93 fPAIphotonTable = 0; … … 104 102 fdNdxCutPhotonVector = 0; 105 103 fdNdxCutPlasmonVector = 0; 104 105 fSandiaIntervalNumber = 0; 106 fMatIndex = 0; 107 108 if(p) { SetParticle(p); } 109 else { SetParticle(fElectron); } 106 110 107 111 isInitialised = false; … … 161 165 const G4DataVector&) 162 166 { 163 G4cout<<"G4PAIPhotonModel::Initialise for "<<p->GetParticleName()<<G4endl;164 if(isInitialised) return;167 // G4cout<<"G4PAIPhotonModel::Initialise for "<<p->GetParticleName()<<G4endl; 168 if(isInitialised) { return; } 165 169 isInitialised = true; 166 170 … … 229 233 { 230 234 G4int i, j, numberOfElements ; 231 staticconst G4MaterialTable* theMaterialTable = G4Material::GetMaterialTable();235 const G4MaterialTable* theMaterialTable = G4Material::GetMaterialTable(); 232 236 233 237 G4SandiaTable thisMaterialSandiaTable(fMatIndex) ; … … 264 268 } 265 269 } 266 //delete[] thisMaterialZ ;270 delete[] thisMaterialZ ; 267 271 } 268 272 -
trunk/source/processes/electromagnetic/standard/src/G4PAIySection.cc
r1337 r1340 24 24 // ******************************************************************** 25 25 // 26 // 27 // $Id: G4PAIySection.cc,v 1.4 2009/07/26 15:51:01 vnivanch Exp $ 28 // GEANT4 tag $Name: geant4-09-04-beta-01 $ 26 // $Id: G4PAIySection.cc,v 1.6 2010/11/04 17:30:32 vnivanch Exp $ 27 // GEANT4 tag $Name: emstand-V09-03-25 $ 29 28 // 30 29 // … … 70 69 71 70 G4PAIySection::G4PAIySection() 72 {} 71 { 72 fSandia = 0; 73 fDensity = fElectronDensity = fNormalizationCof = 0.0; 74 fIntervalNumber = fSplineNumber = 0; 75 } 73 76 74 77 //////////////////////////////////////////////////////////////////////////// -
trunk/source/processes/electromagnetic/standard/src/G4PairProductionRelModel.cc
r1337 r1340 24 24 // ******************************************************************** 25 25 // 26 // $Id: G4PairProductionRelModel.cc,v 1. 3 2009/05/15 17:12:33vnivanch Exp $27 // GEANT4 tag $Name: geant4-09-04-beta-01$26 // $Id: G4PairProductionRelModel.cc,v 1.4 2010/10/26 09:06:04 vnivanch Exp $ 27 // GEANT4 tag $Name: emstand-V09-03-24 $ 28 28 // 29 29 // ------------------------------------------------------------------- … … 85 85 const G4String& nam) 86 86 : G4VEmModel(nam), 87 theCrossSectionTable(0),88 nbins(10),89 87 fLPMconstant(fine_structure_const*electron_mass_c2*electron_mass_c2/(4.*pi*hbarc)*0.5), 90 88 fLPMflag(true), … … 99 97 nist = G4NistManager::Instance(); 100 98 99 currentZ = z13 = z23 = lnZ = Fel = Finel = fCoulomb = phiLPM = gLPM = xiLPM = 0; 100 101 101 } 102 102 … … 104 104 105 105 G4PairProductionRelModel::~G4PairProductionRelModel() 106 { 107 if(theCrossSectionTable) { 108 theCrossSectionTable->clearAndDestroy(); 109 delete theCrossSectionTable; 110 } 111 } 112 113 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo.... 114 115 void G4PairProductionRelModel::Initialise(const G4ParticleDefinition*, 116 const G4DataVector&) 117 { 118 fParticleChange = GetParticleChangeForGamma(); 119 120 if(theCrossSectionTable) { 121 theCrossSectionTable->clearAndDestroy(); 122 delete theCrossSectionTable; 123 } 124 125 const G4ElementTable* theElementTable = G4Element::GetElementTable(); 126 size_t nvect = G4Element::GetNumberOfElements(); 127 theCrossSectionTable = new G4PhysicsTable(nvect); 128 G4PhysicsLogVector* ptrVector; 129 G4double emin = LowEnergyLimit(); 130 G4double emax = HighEnergyLimit(); 131 G4int n = nbins*G4int(log10(emax/emin)); 132 G4bool spline = G4LossTableManager::Instance()->SplineFlag(); 133 G4double e, value; 134 135 for(size_t j=0; j<nvect ; j++) { 136 137 ptrVector = new G4PhysicsLogVector(emin, emax, n); 138 ptrVector->SetSpline(spline); 139 G4double Z = (*theElementTable)[j]->GetZ(); 140 G4VEmModel::SetCurrentElement((*theElementTable)[j]); 141 G4int iz = G4int(Z); 142 indexZ[iz] = j; 143 144 for(G4int i=0; i<nbins; i++) { 145 e = ptrVector->GetLowEdgeEnergy( i ) ; 146 value = ComputeCrossSectionPerAtom(theGamma, e, Z); 147 ptrVector->PutValue( i, value ); 148 } 149 150 theCrossSectionTable->insert(ptrVector); 151 } 152 } 153 154 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo.... 155 /* 156 G4double G4PairProductionRelModel::ComputeRelXSectionPerAtom(G4double k, G4double Z) 157 { 158 159 G4double cross = 0.0; 160 161 162 163 164 } 165 */ 106 {} 107 108 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo.... 109 110 void G4PairProductionRelModel::Initialise(const G4ParticleDefinition* p, 111 const G4DataVector& cuts) 112 { 113 if(!fParticleChange) { fParticleChange = GetParticleChangeForGamma(); } 114 InitialiseElementSelectors(p, cuts); 115 } 166 116 167 117 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo.... … … 340 290 // static const G4double gammaEnergyLimit = 1.5*MeV; 341 291 G4double crossSection = 0.0 ; 342 if ( Z < 1.) return crossSection;292 if ( Z < 0.9 ) return crossSection; 343 293 if ( gammaEnergy <= 2.0*electron_mass_c2 ) return crossSection; 344 294 -
trunk/source/processes/electromagnetic/standard/src/G4UniversalFluctuation.cc
r1337 r1340 24 24 // ******************************************************************** 25 25 // 26 // $Id: G4UniversalFluctuation.cc,v 1.2 2 2009/03/20 18:11:23 urbanExp $27 // GEANT4 tag $Name: geant4-09-04-beta-01$26 // $Id: G4UniversalFluctuation.cc,v 1.28 2010/10/26 10:06:12 vnivanch Exp $ 27 // GEANT4 tag $Name: emstand-V09-03-24 $ 28 28 // 29 29 // ------------------------------------------------------------------- … … 34 34 // File name: G4UniversalFluctuation 35 35 // 36 // Author: Vladimir Ivanchenko36 // Author: Laszlo Urban 37 37 // 38 38 // Creation date: 03.01.2002 … … 57 57 // 03-04-07 correction to get better width of eloss distr.(L.Urban) 58 58 // 13-07-07 add protection for very small step or low-density material (VI) 59 // 19-03-09 new width correction (does not depend on previous steps) (L.Urban) 59 // 19-03-09 new width correction (does not depend on previous steps) (L.Urban) 60 60 // 20-03-09 modification in the width correction (L.Urban) 61 // 14-06-10 fixed tail distribution - do not use uniform function (L.Urban) 62 // 08-08-10 width correction algorithm has bee modified --> 63 // better results for thin targets (L.Urban) 61 64 // 62 65 … … 82 85 theBohrBeta2(50.0*keV/proton_mass_c2), 83 86 minLoss(10.*eV), 84 nmaxCont1(4.), 85 nmaxCont2(16.) 87 nmaxCont(16.), 88 rate(0.55), 89 fw(4.) 86 90 { 87 91 lastMaterial = 0; 92 93 particleMass = chargeSquare = ipotFluct = electronDensity = f1Fluct = f2Fluct 94 = e1Fluct = e2Fluct = e1LogFluct = e2LogFluct = ipotLogFluct = e0 = esmall 95 = e1 = e2 = 0; 88 96 } 89 97 … … 118 126 // shortcut for very very small loss (out of validity of the model) 119 127 // 120 if (meanLoss < minLoss) 121 return meanLoss; 122 123 if(!particle) InitialiseMe(dp->GetDefinition()); 128 if (meanLoss < minLoss) { return meanLoss; } 129 130 if(!particle) { InitialiseMe(dp->GetDefinition()); } 124 131 125 132 G4double tau = dp->GetKineticEnergy()/particleMass; … … 174 181 ipotLogFluct = material->GetIonisation()->GetLogMeanExcEnergy(); 175 182 e0 = material->GetIonisation()->GetEnergy0fluct(); 183 esmall = 0.5*sqrt(e0*ipotFluct); 176 184 lastMaterial = material; 177 178 // modification of some model parameters 179 // (this part should go to materials later) 180 G4double p = 1.40; 181 f2Fluct *= p; 182 f1Fluct = 1.-f2Fluct; 183 G4double q = 1.00; 184 e2Fluct *= q; 185 e2LogFluct = log(e2Fluct); 186 e1LogFluct = (ipotLogFluct-f2Fluct*e2LogFluct)/f1Fluct; 187 e1Fluct = exp(e1LogFluct); 185 188 186 } 189 187 … … 193 191 G4double a1 = 0. , a2 = 0., a3 = 0. ; 194 192 195 // cut and material dependent rate196 G4double rate = 1.0;197 193 if(tmax > ipotFluct) { 198 194 G4double w2 = log(2.*electron_mass_c2*beta2*gam2)-beta2; 199 195 200 if(w2 > ipotLogFluct && w2 > e2LogFluct) { 201 202 rate = 0.03+0.23*log(log(tmax/ipotFluct)); 196 if(w2 > ipotLogFluct && w2 > e2LogFluct && tmax> ipotFluct) { 203 197 G4double C = meanLoss*(1.-rate)/(w2-ipotLogFluct); 204 198 a1 = C*f1Fluct*(w2-e1LogFluct)/e1Fluct; 205 199 a2 = C*f2Fluct*(w2-e2LogFluct)/e2Fluct; 206 // correction in order to get better FWHM values 207 // ( scale parameters a1 and e1) 208 G4double width = 1.; 209 if(meanLoss > 10.*e1Fluct) 200 201 202 if(a1 < nmaxCont) 203 { 204 //small energy loss 205 G4double sa1 = sqrt(a1); 206 if(G4UniformRand() < exp(-sa1)) 210 207 { 211 width = 3.1623/sqrt(meanLoss/e1Fluct); 212 if(width < a2/a1) 213 width = a2/a1; 208 e1 = esmall; 209 a1 = meanLoss*(1.-rate)/e1; 210 a2 = 0.; 211 e2 = e2Fluct; 214 212 } 215 a1 *= width; 216 e1 = e1Fluct/width; 213 else 214 { 215 a1 = sa1 ; 216 e1 = sa1*e1Fluct; 217 e2 = e2Fluct; 218 } 219 } 220 else 221 { 222 //not small energy loss 223 //correction to get better fwhm value 224 a1 /= fw; 225 e1 = fw*e1Fluct; 217 226 e2 = e2Fluct; 218 227 } 219 } 228 } 229 } 220 230 221 231 G4double w1 = tmax/e0; … … 223 233 a3 = rate*meanLoss*(tmax-e0)/(e0*tmax*log(w1)); 224 234 225 //'nearly' Gaussian fluctuation if a1>nmaxCont 2&&a2>nmaxCont2&&a3>nmaxCont2235 //'nearly' Gaussian fluctuation if a1>nmaxCont&&a2>nmaxCont&&a3>nmaxCont 226 236 G4double emean = 0.; 227 237 G4double sig2e = 0., sige = 0.; … … 229 239 230 240 // excitation of type 1 231 if(a1 > nmaxCont 2)241 if(a1 > nmaxCont) 232 242 { 233 243 emean += a1*e1; … … 243 253 244 254 // excitation of type 2 245 if(a2 > nmaxCont 2)255 if(a2 > nmaxCont) 246 256 { 247 257 emean += a2*e2; … … 262 272 p3 = a3; 263 273 G4double alfa = 1.; 264 if(a3 > nmaxCont 2)274 if(a3 > nmaxCont) 265 275 { 266 alfa = w1*(nmaxCont 2+a3)/(w1*nmaxCont2+a3);276 alfa = w1*(nmaxCont+a3)/(w1*nmaxCont+a3); 267 277 G4double alfa1 = alfa*log(alfa)/(alfa-1.); 268 278 G4double namean = a3*w1*(alfa-1.)/((w1-1.)*alfa); -
trunk/source/processes/electromagnetic/standard/src/G4UrbanMscModel90.cc
r1337 r1340 24 24 // ******************************************************************** 25 25 // 26 // $Id: G4UrbanMscModel90.cc,v 1.1 3 2009/04/10 18:10:58vnivanch Exp $27 // GEANT4 tag $Name: geant4-09-04-beta-01$26 // $Id: G4UrbanMscModel90.cc,v 1.14 2010/10/26 10:06:12 vnivanch Exp $ 27 // GEANT4 tag $Name: emstand-V09-03-24 $ 28 28 // 29 29 // ------------------------------------------------------------------- … … 93 93 inside = false; 94 94 insideskin = false; 95 96 skindepth = skin*stepmin; 97 98 mass = proton_mass_c2; 99 charge = 1.0; 100 currentKinEnergy = currentRange = currentRadLength = masslimite = masslimitmu 101 = lambda0 = lambdaeff = tPathLength = zPathLength = par1 = par2 = par3 = 0; 102 103 currentMaterialIndex = 0; 95 104 } 96 105 … … 105 114 const G4DataVector&) 106 115 { 107 skindepth 116 skindepth = skin*stepmin; 108 117 if(isInitialized) return; 109 118 -
trunk/source/processes/electromagnetic/standard/src/G4UrbanMscModel92.cc
r1337 r1340 25 25 // 26 26 // 27 // $Id: G4UrbanMscModel92.cc,v 1. 1 2009/11/01 13:05:01vnivanch Exp $28 // GEANT4 tag $Name: geant4-09-04-beta-01$27 // $Id: G4UrbanMscModel92.cc,v 1.2 2010/10/26 10:06:12 vnivanch Exp $ 28 // GEANT4 tag $Name: emstand-V09-03-24 $ 29 29 // 30 30 // ------------------------------------------------------------------- … … 166 166 insideskin = false; 167 167 168 skindepth = skin*stepmin; 169 170 mass = proton_mass_c2; 171 charge = ChargeSquare = 1.0; 172 currentKinEnergy = currentRadLength = lambda0 = lambdaeff = tPathLength 173 = zPathLength = par1 = par2 = par3 = 0; 174 175 currentMaterialIndex = 0; 168 176 } 169 177 -
trunk/source/processes/electromagnetic/standard/src/G4UrbanMscModel93.cc
r1337 r1340 25 25 // 26 26 // 27 // $Id: G4UrbanMscModel93.cc,v 1. 5 2010/06/25 09:41:44 gunterExp $28 // GEANT4 tag $Name: geant4-09-04-beta-01$27 // $Id: G4UrbanMscModel93.cc,v 1.7 2010/11/04 17:30:32 vnivanch Exp $ 28 // GEANT4 tag $Name: emstand-V09-03-25 $ 29 29 // 30 30 // ------------------------------------------------------------------- … … 166 166 insideskin = false; 167 167 168 skindepth = skin*stepmin; 169 170 mass = proton_mass_c2; 171 charge = ChargeSquare = 1.0; 172 currentKinEnergy = currentRadLength = lambda0 = lambdaeff = tPathLength 173 = zPathLength = par1 = par2 = par3 = 0; 174 175 currentMaterialIndex = -1; 168 176 } 169 177 … … 179 187 { 180 188 skindepth = skin*stepmin; 181 if(isInitialized) return; 189 190 if(isInitialized) { return; } 182 191 // set values of some data members 183 192 SetParticle(p); … … 460 469 461 470 // stop here if small range particle 462 if(inside) return tPathLength;471 if(inside) { return tPathLength; } 463 472 464 if(tPathLength > currentRange) tPathLength = currentRange;473 if(tPathLength > currentRange) { tPathLength = currentRange; } 465 474 466 475 presafety = sp->GetSafety(); 467 476 468 // G4cout << "G4Urban2::StepLimit tPathLength= "469 // <<tPathLength<<" safety= " << presafety470 // << " range= " <<currentRange<< " lambda= "<<lambda0471 // << " Alg: " << steppingAlgorithm <<G4endl;477 // G4cout << "G4Urban2::StepLimit tPathLength= " 478 // <<tPathLength<<" safety= " << presafety 479 // << " range= " <<currentRange<< " lambda= "<<lambda0 480 // << " Alg: " << steppingAlgorithm <<G4endl; 472 481 473 482 // far from geometry boundary -
trunk/source/processes/electromagnetic/standard/src/G4WaterStopping.cc
r1337 r1340 24 24 // ******************************************************************** 25 25 // 26 // $Id: G4WaterStopping.cc,v 1.2 1 2010/04/26 17:44:34vnivanch Exp $27 // GEANT4 tag $Name: geant4-09-04-beta-01$26 // $Id: G4WaterStopping.cc,v 1.22 2010/10/26 10:06:12 vnivanch Exp $ 27 // GEANT4 tag $Name: emstand-V09-03-24 $ 28 28 29 29 //--------------------------------------------------------------------------- … … 68 68 { 69 69 G4double res = 0.0; 70 if((iz > 26) || (iz < 3) || (iz > 18 && iz < 26)) { return res; }71 70 G4int idx = iz - 3; 71 72 if(iz == 26) { idx = 16; } 73 else if (iz < 3 || iz > 18) { return res; } 74 72 75 G4double scaledEnergy = energy/A[idx]; 73 76 if(scaledEnergy < emin) { -
trunk/source/processes/electromagnetic/standard/src/G4WentzelOKandVIxSection.cc
r1337 r1340 24 24 // ******************************************************************** 25 25 // 26 // $Id: G4WentzelOKandVIxSection.cc,v 1.1 0 2010/06/01 13:34:21vnivanch Exp $27 // GEANT4 tag $Name: geant4-09-04-beta-01$26 // $Id: G4WentzelOKandVIxSection.cc,v 1.12 2010/11/04 17:30:32 vnivanch Exp $ 27 // GEANT4 tag $Name: emstand-V09-03-25 $ 28 28 // 29 29 // ------------------------------------------------------------------- … … 93 93 } 94 94 } 95 currentMaterial = 0; 96 elecXSRatio = factB = formfactA = screenZ = 0.0; 97 cosTetMaxElec = cosTetMaxNuc = invbeta2 = kinFactor = 1.0; 98 99 Initialise(theElectron, 1.0); 100 SetTargetMass(proton_mass_c2); 95 101 } 96 102 -
trunk/source/processes/electromagnetic/standard/src/G4WentzelVIModel.cc
r1337 r1340 24 24 // ******************************************************************** 25 25 // 26 // $Id: G4WentzelVIModel.cc,v 1.6 0 2010/06/01 11:13:31vnivanch Exp $27 // GEANT4 tag $Name: geant4-09-04-beta-01$26 // $Id: G4WentzelVIModel.cc,v 1.61 2010/10/26 10:06:12 vnivanch Exp $ 27 // GEANT4 tag $Name: emstand-V09-03-24 $ 28 28 // 29 29 // ------------------------------------------------------------------- … … 89 89 fG4pow = G4Pow::GetInstance(); 90 90 wokvi = new G4WentzelOKandVIxSection(); 91 92 preKinEnergy = tPathLength = zPathLength = lambdaeff = currentRange = xtsec = 0; 93 currentMaterialIndex = 0; 94 cosThetaMax = cosTetMaxNuc = 1.0; 91 95 } 92 96 -
trunk/source/processes/electromagnetic/standard/src/G4alphaIonisation.cc
r1337 r1340 24 24 // ******************************************************************** 25 25 // 26 // $Id: G4alphaIonisation.cc,v 1. 1 2009/11/10 11:50:30vnivanch Exp $27 // GEANT4 tag $Name: geant4-09-04-beta-01$26 // $Id: G4alphaIonisation.cc,v 1.3 2010/10/26 10:06:12 vnivanch Exp $ 27 // GEANT4 tag $Name: emstand-V09-03-24 $ 28 28 // 29 29 // ------------------------------------------------------------------- … … 64 64 : G4VEnergyLossProcess(name), 65 65 theParticle(0), 66 isInitialised(false), 67 nuclearStopping(true) 66 isInitialised(false) 68 67 { 69 68 // SetLinearLossLimit(0.15); … … 74 73 mass = 0.0; 75 74 ratio = 0.0; 75 eth = 8*MeV; 76 76 } 77 77 … … 85 85 G4bool G4alphaIonisation::IsApplicable(const G4ParticleDefinition& p) 86 86 { 87 return (p.GetPDGCharge() == 2*eplus); 87 return (!p.IsShortLived() && 88 std::fabs(p.GetPDGCharge() - 2*CLHEP::eplus) < 0.01); 88 89 } 89 90 … … 122 123 SetSecondaryParticle(G4Electron::Electron()); 123 124 124 if (!EmModel(1)) SetEmModel(new G4BraggIonModel(), 1);125 if (!EmModel(1)) { SetEmModel(new G4BraggIonModel(), 1); } 125 126 EmModel(1)->SetLowEnergyLimit(MinKinEnergy()); 126 127 … … 129 130 EmModel(1)->SetHighEnergyLimit(eth); 130 131 131 if (!FluctModel()) SetFluctModel(new G4UniversalFluctuation());132 if (!FluctModel()) { SetFluctModel(new G4UniversalFluctuation()); } 132 133 AddEmModel(1, EmModel(1), new G4IonFluctuations()); 133 134 134 if (!EmModel(2)) SetEmModel(new G4BetheBlochModel(),2);135 if (!EmModel(2)) { SetEmModel(new G4BetheBlochModel(),2); } 135 136 EmModel(2)->SetLowEnergyLimit(eth); 136 137 EmModel(2)->SetHighEnergyLimit(MaxKinEnergy()); … … 139 140 isInitialised = true; 140 141 } 141 // reinitialisation of corrections for the new run142 EmModel(1)->ActivateNuclearStopping(nuclearStopping);143 EmModel(2)->ActivateNuclearStopping(nuclearStopping);144 142 } 145 143 … … 147 145 148 146 void G4alphaIonisation::PrintInfo() 149 { 150 if (G4Alpha::Alpha() == theParticle) { 151 if(EmModel(1) && EmModel(2)) { 152 G4cout << " NuclearStopping= " << nuclearStopping 153 << G4endl; 154 } 155 } 156 } 147 {} 157 148 158 149 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo.... -
trunk/source/processes/electromagnetic/standard/src/G4eBremsstrahlungModel.cc
r1337 r1340 24 24 // ******************************************************************** 25 25 // 26 // $Id: G4eBremsstrahlungModel.cc,v 1.4 6 2010/04/28 18:39:40vnivanch Exp $27 // GEANT4 tag $Name: geant4-09-04-beta-01$26 // $Id: G4eBremsstrahlungModel.cc,v 1.48 2010/10/26 10:35:22 vnivanch Exp $ 27 // GEANT4 tag $Name: emstand-V09-03-24 $ 28 28 // 29 29 // ------------------------------------------------------------------- … … 55 55 // 15-02-07 correct LPMconstant by a factor 2, thanks to G. Depaola (mma) 56 56 // 09-09-08 MigdalConstant increased in (2pi)^2 times (A.Schaelicke) 57 // 13-10-10 Add angular distributon interface (VI) 57 58 // 58 59 // Class Description: … … 75 76 #include "G4DataVector.hh" 76 77 #include "G4ParticleChangeForLoss.hh" 78 #include "G4ModifiedTsai.hh" 77 79 78 80 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo.... … … 90 92 isInitialised(false) 91 93 { 92 if(p) SetParticle(p);94 if(p) { SetParticle(p); } 93 95 theGamma = G4Gamma::Gamma(); 94 96 minThreshold = 0.1*keV; 97 SetAngularDistribution(new G4ModifiedTsai()); 98 highKinEnergy = HighEnergyLimit(); 99 lowKinEnergy = LowEnergyLimit(); 95 100 } 96 101 … … 129 134 const G4DataVector& cuts) 130 135 { 131 if(p) SetParticle(p);136 if(p) { SetParticle(p); } 132 137 highKinEnergy = HighEnergyLimit(); 133 138 lowKinEnergy = LowEnergyLimit(); … … 172 177 G4double cutEnergy) 173 178 { 174 if(!particle) SetParticle(p);175 if(kineticEnergy < lowKinEnergy) return 0.0;179 if(!particle) { SetParticle(p); } 180 if(kineticEnergy < lowKinEnergy) { return 0.0; } 176 181 177 182 const G4double thigh = 100.*GeV; … … 272 277 dedx += loss; 273 278 } 274 if(dedx < 0.) dedx = 0.;279 if(dedx < 0.) { dedx = 0.; } 275 280 return dedx; 276 281 } … … 413 418 G4double maxEnergy) 414 419 { 415 if(!particle) SetParticle(p);420 if(!particle) { SetParticle(p); } 416 421 G4double cross = 0.0; 417 422 G4double tmax = min(maxEnergy, kineticEnergy); 418 423 G4double cut = max(cutEnergy, minThreshold); 419 if(cut >= tmax) return cross;424 if(cut >= tmax) { return cross; } 420 425 421 426 const G4ElementVector* theElementVector = material->GetElementVector(); … … 495 500 { 496 501 G4double cross = 0.0 ; 497 if ( kineticEnergy < 1*keV || kineticEnergy < cut) return cross;502 if ( kineticEnergy < 1*keV || kineticEnergy < cut) { return cross; } 498 503 499 504 static const G4double ksi=2.0, alfa=1.00; … … 664 669 G4double kineticEnergy = dp->GetKineticEnergy(); 665 670 G4double tmax = min(maxEnergy, kineticEnergy); 666 if(tmin >= tmax) return;671 if(tmin >= tmax) { return; } 667 672 668 673 // … … 709 714 G4double xmax = tmax/kineticEnergy; 710 715 G4double kappa = 0.0; 711 if(xmax >= 1.) xmax = 1.;712 else kappa = log(xmax)/log(xmin);716 if(xmax >= 1.) { xmax = 1.; } 717 else { kappa = log(xmax)/log(xmin); } 713 718 G4double epsilmin = tmin/totalEnergy; 714 719 G4double epsilmax = tmax/totalEnergy; … … 812 817 } while( greject < G4UniformRand()*grejmax ); 813 818 } 814 /*815 if(x > 0.999) {816 G4cout << "### G4eBremsstrahlungModel Warning: e= " << kineticEnergy817 << " tlow= " << tlow818 << " x= " << x819 << " greject= " << greject820 << " grejmax= " << grejmax821 << " migdal= " << migdal822 << G4endl;823 // if(x >= 1.0) G4Exception("X=1");824 }825 */826 819 gammaEnergy = x*kineticEnergy; 827 820 … … 837 830 838 831 // 839 // angles of the emitted gamma. ( Z - axis along the parent particle) 832 // angles of the emitted gamma. ( Z - axis along the parent particle) 833 // use general interface 840 834 // 841 // universal distribution suggested by L. Urban 842 // (Geant3 manual (1993) Phys211), 843 // derived from Tsai distribution (Rev Mod Phys 49,421(1977)) 844 845 G4double u; 846 const G4double a1 = 0.625 , a2 = 3.*a1 , d = 27. ; 847 848 if (9./(9.+d) > G4UniformRand()) u = - log(G4UniformRand()*G4UniformRand())/a1; 849 else u = - log(G4UniformRand()*G4UniformRand())/a2; 850 851 G4double theta = u*electron_mass_c2/totalEnergy; 835 G4double theta = GetAngularDistribution()->PolarAngle(totalEnergy, 836 totalEnergy-gammaEnergy, 837 (G4int)anElement->GetZ()); 852 838 853 839 G4double sint = sin(theta); -
trunk/source/processes/electromagnetic/standard/src/G4eBremsstrahlungRelModel.cc
r1337 r1340 24 24 // ******************************************************************** 25 25 // 26 // $Id: G4eBremsstrahlungRelModel.cc,v 1.1 5 2010/04/06 17:02:23vnivanch Exp $27 // GEANT4 tag $Name: geant4-09-04-beta-01$26 // $Id: G4eBremsstrahlungRelModel.cc,v 1.18 2010/11/04 17:30:32 vnivanch Exp $ 27 // GEANT4 tag $Name: emstand-V09-03-25 $ 28 28 // 29 29 // ------------------------------------------------------------------- … … 42 42 // 13.11.08 add SetLPMflag and SetLPMconstant methods 43 43 // 13.11.08 change default LPMconstant value 44 // 13.10.10 add angular distributon interface (VI) 44 45 // 45 46 // Main References: … … 65 66 #include "G4ParticleChangeForLoss.hh" 66 67 #include "G4LossTableManager.hh" 67 68 #include "G4ModifiedTsai.hh" 68 69 69 70 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo.... … … 90 91 use_completescreening(true),isInitialised(false) 91 92 { 92 if(p) SetParticle(p);93 93 theGamma = G4Gamma::Gamma(); 94 94 95 95 minThreshold = 0.1*keV; 96 SetLowEnergyLimit(GeV); 96 lowKinEnergy = GeV; 97 SetLowEnergyLimit(lowKinEnergy); 97 98 98 99 nist = G4NistManager::Instance(); 100 101 SetLPMFlag(true); 102 SetAngularDistribution(new G4ModifiedTsai()); 103 104 particleMass = kinEnergy = totalEnergy = currentZ = z13 = z23 = lnZ = Fel 105 = Finel = fCoulomb = fMax = densityFactor = densityCorr = lpmEnergy 106 = xiLPM = phiLPM = gLPM = klpm = kp = 0.0; 107 108 energyThresholdLPM = 1.e39; 109 99 110 InitialiseConstants(); 100 101 SetLPMFlag(true); 111 if(p) { SetParticle(p); } 102 112 } 103 113 … … 125 135 particle = p; 126 136 particleMass = p->GetPDGMass(); 127 if(p == G4Electron::Electron()) isElectron = true;128 else isElectron = false;137 if(p == G4Electron::Electron()) { isElectron = true; } 138 else { isElectron = false;} 129 139 } 130 140 … … 140 150 141 151 void G4eBremsstrahlungRelModel::SetupForMaterial(const G4ParticleDefinition*, 142 const G4Material* mat, G4double kineticEnergy) 152 const G4Material* mat, 153 G4double kineticEnergy) 143 154 { 144 155 densityFactor = mat->GetElectronDensity()*fMigdalConstant; … … 146 157 147 158 // Threshold for LPM effect (i.e. below which LPM hidden by density effect) 148 if (LPMFlag()) 159 if (LPMFlag()) { 149 160 energyThresholdLPM=sqrt(densityFactor)*lpmEnergy; 150 else161 } else { 151 162 energyThresholdLPM=1.e39; // i.e. do not use LPM effect 152 163 } 153 164 // calculate threshold for density effect 154 165 kinEnergy = kineticEnergy; … … 168 179 const G4DataVector& cuts) 169 180 { 170 if(p) SetParticle(p); 171 172 highKinEnergy = HighEnergyLimit(); 181 if(p) { SetParticle(p); } 182 173 183 lowKinEnergy = LowEnergyLimit(); 174 184 … … 177 187 InitialiseElementSelectors(p, cuts); 178 188 179 if(isInitialised) return;189 if(isInitialised) { return; } 180 190 fParticleChange = GetParticleChangeForLoss(); 181 191 isInitialised = true; … … 190 200 G4double cutEnergy) 191 201 { 192 if(!particle) SetParticle(p);193 if(kineticEnergy < lowKinEnergy) return 0.0;202 if(!particle) { SetParticle(p); } 203 if(kineticEnergy < lowKinEnergy) { return 0.0; } 194 204 G4double cut = std::min(cutEnergy, kineticEnergy); 195 if(cut == 0.0) return 0.0;205 if(cut == 0.0) { return 0.0; } 196 206 197 207 SetupForMaterial(particle, material,kineticEnergy); … … 261 271 G4double maxEnergy) 262 272 { 263 if(!particle) SetParticle(p);264 if(kineticEnergy < lowKinEnergy) return 0.0;273 if(!particle) { SetParticle(p); } 274 if(kineticEnergy < lowKinEnergy) { return 0.0; } 265 275 G4double cut = std::min(cutEnergy, kineticEnergy); 266 276 G4double tmax = std::min(maxEnergy, kineticEnergy); 267 277 268 if(cut >= tmax) return 0.0;278 if(cut >= tmax) { return 0.0; } 269 279 270 280 SetCurrentElement(Z); … … 273 283 274 284 // allow partial integration 275 if(tmax < kinEnergy) cross -= ComputeXSectionPerAtom(tmax);285 if(tmax < kinEnergy) { cross -= ComputeXSectionPerAtom(tmax); } 276 286 277 287 cross *= Z*Z*bremFactor; … … 390 400 // *** make sure suppression is smaller than 1 *** 391 401 // *** caused by Migdal approximation in xi *** 392 if (xiLPM*phiLPM>1. || s>0.57) xiLPM=1./phiLPM;402 if (xiLPM*phiLPM>1. || s>0.57) { xiLPM=1./phiLPM; } 393 403 } 394 404 … … 401 411 // * complete screening 402 412 { 403 if(gammaEnergy < 0.0) return 0.0;413 if(gammaEnergy < 0.0) { return 0.0; } 404 414 405 415 G4double y = gammaEnergy/totalEnergy; … … 429 439 { 430 440 431 if(gammaEnergy < 0.0) return 0.0;441 if(gammaEnergy < 0.0) { return 0.0; } 432 442 433 443 G4double y = gammaEnergy/totalEnergy; … … 465 475 { 466 476 G4double kineticEnergy = dp->GetKineticEnergy(); 467 if(kineticEnergy < lowKinEnergy) return;477 if(kineticEnergy < lowKinEnergy) { return; } 468 478 G4double cut = std::min(cutEnergy, kineticEnergy); 469 479 G4double emax = std::min(maxEnergy, kineticEnergy); 470 if(cut >= emax) return;480 if(cut >= emax) { return; } 471 481 472 482 SetupForMaterial(particle, couple->GetMaterial(),kineticEnergy); … … 483 493 // G4double fmax= fMax; 484 494 G4bool highe = true; 485 if(totalEnergy < energyThresholdLPM) highe = false;495 if(totalEnergy < energyThresholdLPM) { highe = false; } 486 496 487 497 G4double xmin = log(cut*cut + densityCorr); … … 507 517 508 518 // 509 // angles of the emitted gamma. ( Z - axis along the parent particle) 519 // angles of the emitted gamma. ( Z - axis along the parent particle) 520 // use general interface 510 521 // 511 // universal distribution suggested by L. Urban 512 // (Geant3 manual (1993) Phys211), 513 // derived from Tsai distribution (Rev Mod Phys 49,421(1977)) 514 515 G4double u; 516 const G4double a1 = 0.625 , a2 = 3.*a1 , d = 27. ; 517 518 if (9./(9.+d) > G4UniformRand()) u = - log(G4UniformRand()*G4UniformRand())/a1; 519 else u = - log(G4UniformRand()*G4UniformRand())/a2; 520 521 G4double theta = u*particleMass/totalEnergy; 522 G4double theta = GetAngularDistribution()->PolarAngle(totalEnergy, 523 totalEnergy-gammaEnergy, 524 (G4int)currentZ); 525 522 526 G4double sint = sin(theta); 523 527 G4double phi = twopi * G4UniformRand(); -
trunk/source/processes/electromagnetic/standard/src/G4eCoulombScatteringModel.cc
r1337 r1340 24 24 // ******************************************************************** 25 25 // 26 // $Id: G4eCoulombScatteringModel.cc,v 1. 89 2010/05/27 14:22:05vnivanch Exp $27 // GEANT4 tag $Name: geant4-09-04-beta-01$26 // $Id: G4eCoulombScatteringModel.cc,v 1.90 2010/10/26 10:35:22 vnivanch Exp $ 27 // GEANT4 tag $Name: emstand-V09-03-24 $ 28 28 // 29 29 // ------------------------------------------------------------------- … … 91 91 currentCouple = 0; 92 92 wokvi = new G4WentzelOKandVIxSection(); 93 94 currentMaterialIndex = 0; 95 96 cosTetMinNuc = 1.0; 97 cosTetMaxNuc = -1.0; 98 elecRatio = 0.0; 99 mass = proton_mass_c2; 93 100 } 94 101 -
trunk/source/processes/electromagnetic/standard/src/G4hIonisation.cc
r1337 r1340 24 24 // ******************************************************************** 25 25 // 26 // $Id: G4hIonisation.cc,v 1.8 5 2010/06/04 09:22:14 vnivanch Exp $27 // GEANT4 tag $Name: geant4-09-04-beta-01$26 // $Id: G4hIonisation.cc,v 1.86 2010/10/26 10:42:04 vnivanch Exp $ 27 // GEANT4 tag $Name: emstand-V09-03-24 $ 28 28 // 29 29 // ------------------------------------------------------------------- … … 116 116 mass = 0.0; 117 117 ratio = 0.0; 118 eth = 2*MeV; 118 119 } 119 120 -
trunk/source/processes/electromagnetic/standard/src/G4ionIonisation.cc
r1337 r1340 24 24 // ******************************************************************** 25 25 // 26 // $Id: G4ionIonisation.cc,v 1.7 0 2009/11/27 20:06:32vnivanch Exp $27 // GEANT4 tag $Name: geant4-09-04-beta-01$26 // $Id: G4ionIonisation.cc,v 1.72 2010/10/26 10:42:04 vnivanch Exp $ 27 // GEANT4 tag $Name: emstand-V09-03-24 $ 28 28 // 29 29 // ------------------------------------------------------------------- … … 66 66 #include "G4Electron.hh" 67 67 #include "G4Proton.hh" 68 //#include "G4Alpha.hh"69 68 #include "G4GenericIon.hh" 70 69 #include "G4BraggModel.hh" … … 83 82 G4ionIonisation::G4ionIonisation(const G4String& name) 84 83 : G4VEnergyLossProcess(name), 85 corr(0),86 84 theParticle(0), 87 85 isInitialised(false), 88 stopDataActive(true), 89 nuclearStopping(true) 86 stopDataActive(true) 90 87 { 91 88 SetLinearLossLimit(0.02); … … 95 92 // SetVerboseLevel(1); 96 93 corr = G4LossTableManager::Instance()->EmCorrections(); 94 eth = 2*MeV; 97 95 } 98 96 … … 136 134 const G4ParticleDefinition* theBaseParticle = 0; 137 135 138 if(part == ion) theBaseParticle = 0;139 else if(bpart == 0) theBaseParticle = ion;140 else theBaseParticle = bpart;136 if(part == ion) { theBaseParticle = 0; } 137 else if(bpart == 0) { theBaseParticle = ion; } 138 else { theBaseParticle = bpart; } 141 139 142 140 SetBaseParticle(theBaseParticle); 143 141 SetSecondaryParticle(G4Electron::Electron()); 144 142 145 if (!EmModel(1)) SetEmModel(new G4BraggIonModel(), 1);143 if (!EmModel(1)) { SetEmModel(new G4BraggIonModel(), 1); } 146 144 EmModel(1)->SetLowEnergyLimit(MinKinEnergy()); 147 145 … … 150 148 EmModel(1)->SetHighEnergyLimit(eth); 151 149 152 if (!FluctModel()) SetFluctModel(new G4IonFluctuations());150 if (!FluctModel()) { SetFluctModel(new G4IonFluctuations()); } 153 151 AddEmModel(1, EmModel(1), FluctModel()); 154 152 155 if (!EmModel(2)) SetEmModel(new G4BetheBlochModel(),2);153 if (!EmModel(2)) { SetEmModel(new G4BetheBlochModel(),2); } 156 154 EmModel(2)->SetLowEnergyLimit(eth); 157 155 EmModel(2)->SetHighEnergyLimit(MaxKinEnergy()); … … 166 164 } 167 165 // reinitialisation of corrections for the new run 168 EmModel(1)->ActivateNuclearStopping(nuclearStopping); 169 EmModel(2)->ActivateNuclearStopping(nuclearStopping); 170 if(part == ion) corr->InitialiseForNewRun(); 166 if(part == ion) { corr->InitialiseForNewRun(); } 171 167 } 172 168 … … 178 174 G4cout << " Stopping Power data for " 179 175 << corr->GetNumberOfStoppingVectors() 180 << " ion/material pairs , nuclearStopping: " << nuclearStopping176 << " ion/material pairs " 181 177 << G4endl; 182 178 }
Note: See TracChangeset
for help on using the changeset viewer.