G4VeLowEnergyLoss.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 //
00027 // $Id$
00028 //
00029 // 3.4.2000 Veronique Lefebure:
00030 //          Move utils/include/G4VEnergyLoss.hh to 
00031 //               lowenergy/include/G4VeLowEnergyLoss.hh
00032 // 
00033 // ------------------------------------------------------------
00034 //      GEANT 4 class header file 
00035 //
00036 // 
00037 // Class Description 
00038 //
00039 //  General service class for the energy loss classes
00040 //  
00041 //  It contains code needed to compute the range tables,
00042 //  time tables, the inverse range tables and some auxiliary
00043 //  tables.
00044 //  The energy loss fluctuation code is here,too.
00045 //
00046 //  All the EnergyLoss classes are inherited from G4VeLowEnergyLoss
00047 //  class.
00048 //
00049 //  -----------------------------------------------------------
00050 //  created  on 28 January 2000  by L. Urban
00051 //  -----------------------------------------------------------
00052 //
00053 //  Modifications:
00054 // 20/09/00 V.Ivanchenko update fluctuations
00055 // 23/11/01 V.Ivanchenko Move static member-functions from header to source
00056 // 22/01/03 V.Ivanchenko Cut per range
00057 //
00058 // Class description:
00059 // Abstract class for Low Energy Electromagnetic electron energy loss
00060 // Further documentation available from http://www.ge.infn.it/geant4/lowE
00061 
00062 //  -----------------------------------------------------------
00063 
00064 #ifndef G4VeLowEnergyLoss_h
00065 #define G4VeLowEnergyLoss_h 1
00066 
00067 #include "globals.hh"
00068 #include "G4ios.hh"
00069 #include "Randomize.hh"
00070 #include "G4Poisson.hh"
00071 #include "G4Electron.hh"
00072 #include "G4VContinuousDiscreteProcess.hh"
00073 #include "G4PhysicsLogVector.hh"
00074 #include "G4PhysicsLinearVector.hh"
00075 #include "G4MaterialCutsCouple.hh"
00076 
00077 class G4VeLowEnergyLoss : public G4VContinuousDiscreteProcess
00078 {
00079   public:
00080 
00081       G4VeLowEnergyLoss(const G4String& ,
00082                                    G4ProcessType   aType = fNotDefined );
00083       G4VeLowEnergyLoss(G4VeLowEnergyLoss &);
00084 
00085       virtual ~G4VeLowEnergyLoss();
00086 
00087       virtual G4double GetContinuousStepLimit(const G4Track& track,
00088                                     G4double previousStepSize,
00089                                     G4double currentMinimumStep,
00090                                     G4double& currentSafety) = 0 ;
00091 
00092       virtual G4VParticleChange* AlongStepDoIt(const G4Track& track,
00093                                      const G4Step& Step) = 0 ;
00094 
00095       virtual G4double GetMeanFreePath(const G4Track& track,
00096                                      G4double previousStepSize,
00097                                      G4ForceCondition* condition) = 0;
00098 
00099       virtual G4VParticleChange* PostStepDoIt(const G4Track& track,
00100                                             const G4Step& Step) = 0;
00101 
00102 
00103 
00104   protected:// with description
00105 
00106     // code for the energy loss fluctuation
00107 
00108     G4double GetLossWithFluct(const G4DynamicParticle* aParticle,
00109                               const G4MaterialCutsCouple* couple,
00110                               G4double  MeanLoss,
00111                               G4double  step);
00112 
00113 
00114    private:
00115 
00116   // hide default constructor and assignment operator as private
00117       G4VeLowEnergyLoss();
00118       G4VeLowEnergyLoss & operator=(const G4VeLowEnergyLoss &right);
00119 
00120   protected:
00121 
00122     // data members to speed up the fluctuation calculation
00123     const G4Material* lastMaterial;
00124     G4int imat;
00125     G4double f1Fluct,f2Fluct,e1Fluct,e2Fluct,rateFluct,ipotFluct;
00126     G4double e1LogFluct,e2LogFluct,ipotLogFluct;
00127 
00128     const G4int nmaxCont1,nmaxCont2 ;
00129 
00130   // static part of the class
00131 
00132   public:  // With description
00133 
00134     static void SetRndmStep     (G4bool   value);
00135     // use / do not use randomisation in energy loss steplimit
00136     // ( default = no randomisation)
00137 
00138     static void SetEnlossFluc   (G4bool   value);
00139     // compute energy loss with/without fluctuation
00140     // ( default : with fluctuation)
00141 
00142     static void SetStepFunction (G4double c1, G4double c2);
00143     // sets values for data members used to compute the step limit:
00144     //   dRoverRange : max. relative range change in one step,
00145     //   finalRange  : if range <= finalRange --> last step for the particle.
00146 
00147 
00148   protected: // With description
00149 
00150     // Build range table starting from the DEDXtable
00151     static G4PhysicsTable*
00152      BuildRangeTable(G4PhysicsTable* theDEDXTable,
00153                      G4PhysicsTable* theRangeTable,
00154                      G4double Tmin,G4double Tmax,G4int nbin);
00155 
00156     // Build time tables starting from the DEDXtable
00157     static G4PhysicsTable*
00158      BuildLabTimeTable(G4PhysicsTable* theDEDXTable,
00159                        G4PhysicsTable* theLabTimeTable,
00160                        G4double Tmin,G4double Tmax,G4int nbin);
00161 
00162     static G4PhysicsTable*
00163      BuildProperTimeTable(G4PhysicsTable* theDEDXTable,
00164                        G4PhysicsTable* ProperTimeTable,
00165                        G4double Tmin,G4double Tmax,G4int nbin);
00166 
00167     // Build tables of coefficients needed for inverting the range table 
00168     static G4PhysicsTable*
00169      BuildRangeCoeffATable(G4PhysicsTable* theRangeTable,
00170                            G4PhysicsTable* theCoeffATable,
00171                            G4double Tmin,G4double Tmax,G4int nbin);
00172     static G4PhysicsTable*
00173      BuildRangeCoeffBTable(G4PhysicsTable* theRangeTable,
00174                            G4PhysicsTable* theCoeffBTable,
00175                            G4double Tmin,G4double Tmax,G4int nbin);
00176     static G4PhysicsTable*
00177      BuildRangeCoeffCTable(G4PhysicsTable* theRangeTable,
00178                            G4PhysicsTable* theCoeffCTable,
00179                            G4double Tmin,G4double Tmax,G4int nbin);
00180 
00181     // Invert range table
00182     static G4PhysicsTable*
00183      BuildInverseRangeTable(G4PhysicsTable* theRangeTable,
00184                             G4PhysicsTable* theRangeCoeffATable,
00185                             G4PhysicsTable* theRangeCoeffBTable,
00186                             G4PhysicsTable* theRangeCoeffCTable,
00187                             G4PhysicsTable* theInverseRangeTable,
00188                             G4double Tmin,G4double Tmax,G4int nbin);
00189 
00190   private:
00191 
00192     static void BuildRangeVector(G4PhysicsTable* theDEDXTable,
00193                         G4double Tmin,G4double Tmax,G4int nbin,
00194                         G4int materialIndex,G4PhysicsLogVector* rangeVector);
00195 
00196     static void BuildRangeVectorNew(const G4PhysicsTable*,G4int,
00197                                           G4int,G4PhysicsLogVector*);
00198 
00199     static G4double RangeIntLin(G4PhysicsVector* physicsVector
00200                                                         ,G4int nbin);
00201 
00202     static G4double RangeIntLog(G4PhysicsVector* physicsVector
00203                                                         ,G4int nbin);
00204 
00205     static void BuildLabTimeVector(G4PhysicsTable* theDEDXTable,
00206                         G4double Tmin,G4double Tmax,G4int nbin,
00207                         G4int materialIndex,G4PhysicsLogVector* rangeVector);
00208 
00209     static void BuildProperTimeVector(G4PhysicsTable* theDEDXTable,
00210                         G4double Tmin,G4double Tmax,G4int nbin,
00211                         G4int materialIndex,G4PhysicsLogVector* rangeVector);
00212 
00213     static G4double LabTimeIntLog(G4PhysicsVector* physicsVector
00214                                                         ,G4int nbin);
00215 
00216     static G4double ProperTimeIntLog(G4PhysicsVector* physicsVector,
00217                                                          G4int nbin);
00218 
00219     static void InvertRangeVector(G4PhysicsTable* theRangeTable,
00220                                   G4PhysicsTable* theRangeCoeffATable,
00221                                   G4PhysicsTable* theRangeCoeffBTable,
00222                                   G4PhysicsTable* theRangeCoeffCTable,
00223                                   G4double Tmin,G4double Tmax,G4int nbin,
00224                        G4int materialIndex,G4PhysicsLogVector* rangeVector);
00225 
00226 
00227   // data members
00228   protected:
00229 
00230    // variables for the integration routines
00231    static G4double ParticleMass,taulow,tauhigh,ltaulow,ltauhigh;
00232 
00233 
00234    static G4double dRoverRange;     // dRoverRange is the maximum allowed
00235                                      // deltarange/range in one Step
00236    static G4double finalRange;      // final step before stopping
00237    static G4double c1lim,c2lim,c3lim ; // coeffs for computing steplimit
00238 
00239    static G4bool   rndmStepFlag;    // control the randomization of the step
00240    static G4bool   EnlossFlucFlag;  // control the energy loss fluctuation
00241 
00242 
00243 };
00244 
00245 #endif
00246 
00247 
00248 

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