G4PenelopeRayleighModel.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 //
00028 // Author: Luciano Pandola
00029 //
00030 // History:
00031 // -----------
00032 // 03 Dec 2009   L. Pandola   1st implementation. 
00033 // 25 May 2011   L. Pandola   Renamed (make v2008 as default Penelope)
00034 //
00035 // -------------------------------------------------------------------
00036 //
00037 // Class description:
00038 // Low Energy Electromagnetic Physics, Rayleigh Scattering
00039 // with the model from Penelope, version 2008
00040 // -------------------------------------------------------------------
00041 
00042 #ifndef G4PENELOPERAYLEIGHMODEL_HH
00043 #define G4PENELOPERAYLEIGHMODEL_HH 1
00044 
00045 #include "globals.hh"
00046 #include "G4VEmModel.hh"
00047 #include "G4DataVector.hh"
00048 #include "G4ParticleChangeForGamma.hh"
00049 
00050 class G4ParticleDefinition;
00051 class G4DynamicParticle;
00052 class G4MaterialCutsCouple;
00053 class G4Material;
00054 class G4PhysicsFreeVector;
00055 class G4PenelopeSamplingData;
00056 
00057 class G4PenelopeRayleighModel : public G4VEmModel 
00058 {
00059 
00060 public:  
00061   G4PenelopeRayleighModel(const G4ParticleDefinition* p=0,
00062                           const G4String& processName ="PenRayleigh");
00063   
00064   virtual ~G4PenelopeRayleighModel();
00065   
00066   virtual void Initialise(const G4ParticleDefinition*, const G4DataVector&);
00067   
00068   virtual G4double ComputeCrossSectionPerAtom(const G4ParticleDefinition*,
00069                                               G4double kinEnergy,
00070                                               G4double Z,
00071                                               G4double A=0,
00072                                               G4double cut=0,
00073                                               G4double emax=DBL_MAX);
00074 
00075   virtual void SampleSecondaries(std::vector<G4DynamicParticle*>*,
00076                                  const G4MaterialCutsCouple*,
00077                                  const G4DynamicParticle*,
00078                                  G4double tmin,
00079                                  G4double maxEnergy);
00080     
00081   void SetVerbosityLevel(G4int lev){verboseLevel = lev;};
00082   G4int GetVerbosityLevel(){return verboseLevel;};
00083   
00084   //Testing purposes
00085   void DumpFormFactorTable(const G4Material*);
00086 
00087 protected:
00088   G4ParticleChangeForGamma* fParticleChange;
00089   
00090 private:
00091   G4PenelopeRayleighModel& operator=(const G4PenelopeRayleighModel &right);
00092   G4PenelopeRayleighModel(const G4PenelopeRayleighModel&);
00093     
00094   //Intrinsic energy limits of the model: cannot be extended by 
00095   //the parent process
00096   G4double fIntrinsicLowEnergyLimit;
00097   G4double fIntrinsicHighEnergyLimit;
00098   
00099   G4int verboseLevel;
00100   G4bool isInitialised;
00101 
00102   //Internal tables and manager methods
00103   std::map<G4int,G4PhysicsFreeVector*> *logAtomicCrossSection;
00104   std::map<G4int,G4PhysicsFreeVector*> *atomicFormFactor;
00105 
00106 
00107   G4DataVector logQSquareGrid; //log(Q^2) grid for interpolation
00108   std::map<const G4Material*,G4PhysicsFreeVector*> *logFormFactorTable; //log(Q^2) vs. log(F^2)
00109  
00110   G4DataVector logEnergyGridPMax; //energy grid for PMac (and originally for the x-section)
00111   std::map<const G4Material*,G4PhysicsFreeVector*> *pMaxTable; //E vs. Pmax
00112 
00113   std::map<const G4Material*,G4PenelopeSamplingData*> *samplingTable;
00114 
00115   //Helper methods
00116   void ReadDataFile(G4int); 
00117   void ClearTables();
00118   void BuildFormFactorTable(const G4Material*);
00119   void GetPMaxTable(const G4Material*);
00120 
00121   G4double GetFSquared(const G4Material*,const G4double);
00122   void InitializeSamplingAlgorithm(const G4Material*);
00123 
00124 };
00125 
00126 #endif
00127 

Generated on Mon May 27 17:49:18 2013 for Geant4 by  doxygen 1.4.7