G4UrbanMscModel96.hh

Go to the documentation of this file.
00001 //
00002 // ********************************************************************
00003 // * License and Disclaimer                                           *
00004 // *                                                                  *
00005 // * The  Geant4 software  is  copyright of the Copyright Holders  of *
00006 // * the Geant4 Collaboration.  It is provided  under  the terms  and *
00007 // * conditions of the Geant4 Software License,  included in the file *
00008 // * LICENSE and available at  http://cern.ch/geant4/license .  These *
00009 // * include a list of copyright holders.                             *
00010 // *                                                                  *
00011 // * Neither the authors of this software system, nor their employing *
00012 // * institutes,nor the agencies providing financial support for this *
00013 // * work  make  any representation or  warranty, express or implied, *
00014 // * regarding  this  software system or assume any liability for its *
00015 // * use.  Please see the license in the file  LICENSE  and URL above *
00016 // * for the full disclaimer and the limitation of liability.         *
00017 // *                                                                  *
00018 // * This  code  implementation is the result of  the  scientific and *
00019 // * technical work of the GEANT4 collaboration.                      *
00020 // * By using,  copying,  modifying or  distributing the software (or *
00021 // * any work based  on the software)  you  agree  to acknowledge its *
00022 // * use  in  resulting  scientific  publications,  and indicate your *
00023 // * acceptance of all terms of the Geant4 Software license.          *
00024 // ********************************************************************
00025 //
00026 // $Id:   $
00027 // GEANT4 tag $Name:  $
00028 //
00029 // -------------------------------------------------------------------
00030 //
00031 //
00032 // GEANT4 Class header file
00033 //
00034 //
00035 // File name:     G4UrbanMscModel96
00036 //
00037 // Author:        Laszlo Urban
00038 //
00039 // Creation date: 26.09.2012
00040 //
00041 // Created from G4UrbanMscModel95
00042 //
00043 // New parametrization for theta0
00044 // Correction for very small step length
00045 //
00046 // Class Description:
00047 //
00048 // Implementation of the model of multiple scattering based on
00049 // H.W.Lewis Phys Rev 78 (1950) 526 and L.Urban model
00050 
00051 // -------------------------------------------------------------------
00052 //
00053 
00054 #ifndef G4UrbanMscModel96_h
00055 #define G4UrbanMscModel96_h 1
00056 
00057 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
00058 
00059 #include <CLHEP/Units/SystemOfUnits.h>
00060 
00061 #include "G4VMscModel.hh"
00062 #include "G4MscStepLimitType.hh"
00063 
00064 class G4ParticleChangeForMSC;
00065 class G4SafetyHelper;
00066 class G4LossTableManager;
00067 
00068 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
00069 
00070 class G4UrbanMscModel96 : public G4VMscModel
00071 {
00072 
00073 public:
00074 
00075   G4UrbanMscModel96(const G4String& nam = "UrbanMsc96");
00076 
00077   virtual ~G4UrbanMscModel96();
00078 
00079   void Initialise(const G4ParticleDefinition*, const G4DataVector&);
00080 
00081   void StartTracking(G4Track*);
00082 
00083   G4double ComputeCrossSectionPerAtom(const G4ParticleDefinition* particle,
00084                                       G4double KineticEnergy,
00085                                       G4double AtomicNumber,
00086                                       G4double AtomicWeight=0., 
00087                                       G4double cut =0.,
00088                                       G4double emax=DBL_MAX);
00089 
00090   G4ThreeVector& SampleScattering(const G4ThreeVector&, G4double safety);
00091 
00092   G4double ComputeTruePathLengthLimit(const G4Track& track,
00093                                       G4double& currentMinimalStep);
00094 
00095   G4double ComputeGeomPathLength(G4double truePathLength);
00096 
00097   G4double ComputeTrueStepLength(G4double geomStepLength);
00098 
00099   G4double ComputeTheta0(G4double truePathLength,
00100                          G4double KineticEnergy);
00101 
00102 private:
00103 
00104   G4double SimpleScattering(G4double xmeanth, G4double x2meanth);
00105 
00106   G4double SampleCosineTheta(G4double trueStepLength, G4double KineticEnergy);
00107 
00108   G4double SampleDisplacement();
00109 
00110   G4double LatCorrelation();
00111 
00112   inline void SetParticle(const G4ParticleDefinition*);
00113 
00114   inline void UpdateCache();
00115 
00116   //  hide assignment operator
00117   G4UrbanMscModel96 & operator=(const  G4UrbanMscModel96 &right);
00118   G4UrbanMscModel96(const  G4UrbanMscModel96&);
00119 
00120   const G4ParticleDefinition* particle;
00121   G4ParticleChangeForMSC*     fParticleChange;
00122 
00123   const G4MaterialCutsCouple* couple;
00124   G4LossTableManager*         theManager;
00125 
00126   G4double mass;
00127   G4double charge,ChargeSquare;
00128   G4double masslimite,lambdalimit,fr;
00129 
00130   G4double taubig;
00131   G4double tausmall;
00132   G4double taulim;
00133   G4double currentTau;
00134   G4double tlimit;
00135   G4double tlimitmin;
00136   G4double tlimitminfix;
00137   G4double tgeom;
00138 
00139   G4double geombig;
00140   G4double geommin;
00141   G4double geomlimit;
00142   G4double skindepth;
00143   G4double smallstep;
00144 
00145   G4double presafety;
00146 
00147   G4double lambda0;
00148   G4double lambdaeff;
00149   G4double tPathLength;
00150   G4double zPathLength;
00151   G4double par1,par2,par3;
00152 
00153   G4double stepmin;
00154 
00155   G4double currentKinEnergy;
00156   G4double currentRange; 
00157   G4double rangeinit;
00158   G4double currentRadLength;
00159 
00160   G4double theta0max,rellossmax;
00161   G4double third;
00162 
00163   G4int    currentMaterialIndex;
00164 
00165   G4double y;
00166   G4double Zold;
00167   G4double Zeff,Z2,Z23,lnZ;
00168   G4double coeffth1,coeffth2;
00169   G4double coeffc1,coeffc2,coeffc3,coeffc4;
00170 
00171   G4bool   firstStep;
00172   G4bool   inside;
00173   G4bool   insideskin;
00174 };
00175 
00176 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
00177 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
00178 
00179 inline
00180 void G4UrbanMscModel96::SetParticle(const G4ParticleDefinition* p)
00181 {
00182   if (p != particle) {
00183     particle = p;
00184     mass = p->GetPDGMass();
00185     charge = p->GetPDGCharge()/CLHEP::eplus;
00186     ChargeSquare = charge*charge;
00187   }
00188 }
00189 
00190 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
00191 
00192 inline
00193 void G4UrbanMscModel96::UpdateCache()                                   
00194 {
00195     lnZ = std::log(Zeff);
00196     // correction in theta0 formula
00197     G4double facz = 0.74845+0.13354*exp(log(Zeff)/6.);
00198     coeffth1 = facz*(1. - 8.7780e-2/Zeff);
00199     coeffth2 = facz*(4.0780e-2 + 1.7315e-4*Zeff);
00200 
00201     // tail parameters
00202     G4double Z13 = std::exp(lnZ/3.);
00203     coeffc1  = 2.3785    - Z13*(4.1981e-1 - Z13*6.3100e-2);
00204     coeffc2  = 4.7526e-1 + Z13*(1.7694    - Z13*3.3885e-1);
00205     coeffc3  = 2.3683e-1 - Z13*(1.8111    - Z13*3.2774e-1);
00206     coeffc4  = 1.7888e-2 + Z13*(1.9659e-2 - Z13*2.6664e-3);
00207 
00208     Z2   = Zeff*Zeff;
00209     Z23  = Z13*Z13;               
00210                                               
00211     Zold = Zeff;
00212 }
00213 
00214 #endif
00215 

Generated on Mon May 27 17:50:08 2013 for Geant4 by  doxygen 1.4.7