// // ******************************************************************** // * DISCLAIMER * // * * // * The following disclaimer summarizes all the specific disclaimers * // * of contributors to this software. The specific disclaimers,which * // * govern, are listed with their locations in: * // * http://cern.ch/geant4/license * // * * // * Neither the authors of this software system, nor their employing * // * institutes,nor the agencies providing financial support for this * // * work make any representation or warranty, express or implied, * // * regarding this software system or assume any liability for its * // * use. * // * * // * This code implementation is the intellectual property of the * // * GEANT4 collaboration. * // * By copying, distributing or modifying the Program (or any work * // * based on the Program) you indicate your acceptance of this * // * statement, and all its terms. * // ******************************************************************** // // // $Id: G4MultipleScattering.icc,v 1.3.2.2 2001/06/28 20:19:51 gunter Exp $ // GEANT4 tag $Name: $ // // $Id: // ------------------------------------------------------------- // GEANT 4 class inlined methods file // // History: based on object model of // 2nd December 1995, G.Cosmo // ------- G4MultipleScattering physics process ------ // by Laszlo Urban, October 1997 // ************************************************************** // 25/11/97: mods for KinEnergy > HighestLimit // 22/10/98: cleanup , L.Urban // 15/10/99: bugfix, some accuracy problems fixed , L.Urban // 18/05/01 V.Ivanchenko Clean up againist Linux ANSI compilation //--------------------------------------------------------------- inline G4double G4MultipleScattering::GetContinuousStepLimit( const G4Track& track, G4double, G4double currentMinimumStep, G4double&) { G4double zPathLength,tPathLength ; const G4DynamicParticle* aParticle ; G4Material* aMaterial ; G4double KineticEnergy,tau ; G4bool isOut ; // this process is not a candidate for selection!!!!!!!!! SetGPILSelection(NotCandidateForSelection) ; if(track.GetCurrentStepNumber() == 1) stepFlag = 0 ; tPathLength = currentMinimumStep ; aMaterial = track.GetMaterial() ; materialIndex = aMaterial->GetIndex() ; aParticle = track.GetDynamicParticle() ; KineticEnergy = aParticle->GetKineticEnergy() ; if((lastMaterial != aMaterial) || (lastKineticEnergy != KineticEnergy)) { lastKineticEnergy = KineticEnergy ; materialIndex = aMaterial->GetIndex() ; if((lastMaterial != aMaterial)||(KineticEnergy >= Tlimit)||(stepFlag != 1)) fTransportMeanFreePath = (*theTransportMeanFreePathTable) (materialIndex)->GetValue(KineticEnergy,isOut); lastMaterial = aMaterial; if(KineticEnergy < Tlimit) { stepFlag = 1 ; range = G4EnergyLossTables::GetRange(aParticle->GetDefinition(), KineticEnergy,aMaterial) ; alpha1 = range/fTransportMeanFreePath+1 ; } } // do the true -> geom transformation if( fTransportMeanFreePath > biglambda ) { zPathLength = tPathLength ; } else if(stepFlag == 0) { tau = tPathLength/fTransportMeanFreePath ; if(tau < perMillion) zPathLength = tPathLength ; else zPathLength = fTransportMeanFreePath*(1.-exp(-tau)) ; } else { tau = tPathLength/range ; if(tautrue path transformation is performed { static const G4double tfacmx = 10. ; G4double tau,geomPathLength, truePathLength ; fParticleChange.Initialize(track); geomPathLength = track.GetStepLength() ; if(geomPathLength == zLast) { truePathLength = tLast ; } else if( fTransportMeanFreePath > biglambda ) { truePathLength = geomPathLength ; } else if(stepFlag == 0) { tau = geomPathLength/fTransportMeanFreePath ; if(tauGetIndex())-> GetValue(KineticEnergy,isOut); return lambda; }