|
||||
File indexing completed on 2025-01-31 09:22:04
0001 // 0002 // ******************************************************************** 0003 // * License and Disclaimer * 0004 // * * 0005 // * The Geant4 software is copyright of the Copyright Holders of * 0006 // * the Geant4 Collaboration. It is provided under the terms and * 0007 // * conditions of the Geant4 Software License, included in the file * 0008 // * LICENSE and available at http://cern.ch/geant4/license . These * 0009 // * include a list of copyright holders. * 0010 // * * 0011 // * Neither the authors of this software system, nor their employing * 0012 // * institutes,nor the agencies providing financial support for this * 0013 // * work make any representation or warranty, express or implied, * 0014 // * regarding this software system or assume any liability for its * 0015 // * use. Please see the license in the file LICENSE and URL above * 0016 // * for the full disclaimer and the limitation of liability. * 0017 // * * 0018 // * This code implementation is the result of the scientific and * 0019 // * technical work of the GEANT4 collaboration. * 0020 // * By using, copying, modifying or distributing the software (or * 0021 // * any work based on the software) you agree to acknowledge its * 0022 // * use in resulting scientific publications, and indicate your * 0023 // * acceptance of all terms of the Geant4 Software license. * 0024 // ******************************************************************** 0025 // 0026 // 0027 // 0028 // --------------------------------------------------------------- 0029 // GEANT 4 class inlined methods file 0030 // 0031 // History: based on object model of 0032 // 2nd December 1995, G.Cosmo 0033 // ------------ G4eLowEnergyLoss physics process ------------ 0034 // by Laszlo Urban, 20 March 1997 0035 // *************************************************************** 0036 // It is the first implementation of the NEW UNIFIED ENERGY LOSS PROCESS. 0037 // It calculates the energy loss of e+/e-. 0038 // ------------------------------------------------------------- 0039 // 0040 // 08-09-98 cleanup 0041 // 28-03-02 V.Ivanchenko add fluorescence flag 0042 // 21-01-03 V.Ivanchenko cut per region 0043 // 18-04-03 V.Ivanchenko finalRange redefinition 0044 // 0045 // --------------------------------------------------------------- 0046 0047 inline G4double G4eLowEnergyLoss::GetConstraints( 0048 const G4DynamicParticle* aParticle, 0049 const G4MaterialCutsCouple* couple) 0050 { 0051 G4double StepLimit; 0052 // returns the Step limit 0053 // dRoverRange is the max. allowed relative range loss in one Step 0054 // it calculates dEdx and the range as well.... 0055 0056 const G4ParticleDefinition* ParticleType=aParticle->GetDefinition(); 0057 0058 Charge = aParticle->GetDefinition()->GetPDGCharge(); 0059 if(Charge != lastCharge) lastCharge = Charge ; 0060 0061 G4double KineticEnergy = aParticle->GetKineticEnergy(); 0062 0063 fdEdx = G4EnergyLossTables::GetDEDX(ParticleType,KineticEnergy,couple); 0064 fRangeNow = 0065 G4EnergyLossTables::GetRange(ParticleType,KineticEnergy,couple); 0066 0067 G4double r = std::min(finalRange, couple->GetProductionCuts() 0068 ->GetProductionCut(idxG4ElectronCut)); 0069 0070 if (fRangeNow > r) { 0071 StepLimit = dRoverRange*fRangeNow + r*(1.0 - dRoverRange)*(2.0 - r/fRangeNow); 0072 //randomise this value 0073 if (rndmStepFlag) StepLimit = finalRange + (StepLimit-finalRange)*G4UniformRand(); 0074 if (StepLimit > fRangeNow) StepLimit = fRangeNow; 0075 } 0076 else StepLimit = fRangeNow; 0077 0078 return StepLimit; 0079 } 0080 0081 // 0082 0083 inline G4double G4eLowEnergyLoss::GetContinuousStepLimit( 0084 const G4Track& track, 0085 G4double, 0086 G4double currentMinimumStep, 0087 G4double&) 0088 { 0089 0090 G4double Step = 0091 GetConstraints(track.GetDynamicParticle(),track.GetMaterialCutsCouple()); 0092 0093 if ((Step>0.0)&&(Step<currentMinimumStep)) currentMinimumStep = Step; 0094 0095 return Step ; 0096 } 0097 0098 // 0099 inline G4bool G4eLowEnergyLoss::IsApplicable(const G4ParticleDefinition& 0100 particle) 0101 { 0102 return( (&particle == G4Electron::Electron()) 0103 ||(&particle == G4Positron::Positron()) ); 0104 } 0105 0106 inline void G4eLowEnergyLoss::ActivateFluorescence(G4bool val) 0107 { 0108 theFluo = val; 0109 } 0110 0111 inline G4bool G4eLowEnergyLoss::Fluorescence() const 0112 { 0113 return theFluo; 0114 } 0115 0116 // 0117
[ Source navigation ] | [ Diff markup ] | [ Identifier search ] | [ general search ] |
This page was automatically generated by the 2.3.7 LXR engine. The LXR team |