Geant4  10.03
G4PenelopeRayleighModel.hh
Go to the documentation of this file.
1 //
2 // ********************************************************************
3 // * License and Disclaimer *
4 // * *
5 // * The Geant4 software is copyright of the Copyright Holders of *
6 // * the Geant4 Collaboration. It is provided under the terms and *
7 // * conditions of the Geant4 Software License, included in the file *
8 // * LICENSE and available at http://cern.ch/geant4/license . These *
9 // * include a list of copyright holders. *
10 // * *
11 // * Neither the authors of this software system, nor their employing *
12 // * institutes,nor the agencies providing financial support for this *
13 // * work make any representation or warranty, express or implied, *
14 // * regarding this software system or assume any liability for its *
15 // * use. Please see the license in the file LICENSE and URL above *
16 // * for the full disclaimer and the limitation of liability. *
17 // * *
18 // * This code implementation is the result of the scientific and *
19 // * technical work of the GEANT4 collaboration. *
20 // * By using, copying, modifying or distributing the software (or *
21 // * any work based on the software) you agree to acknowledge its *
22 // * use in resulting scientific publications, and indicate your *
23 // * acceptance of all terms of the Geant4 Software license. *
24 // ********************************************************************
25 //
26 // $Id: G4PenelopeRayleighModel.hh 75573 2013-11-04 11:48:15Z gcosmo $
27 //
28 // Author: Luciano Pandola
29 //
30 // History:
31 // -----------
32 // 03 Dec 2009 L. Pandola 1st implementation.
33 // 25 May 2011 L. Pandola Renamed (make v2008 as default Penelope)
34 // 27 Sep 2013 L. Pandola Migration to MT paradigm
35 //
36 // -------------------------------------------------------------------
37 //
38 // Class description:
39 // Low Energy Electromagnetic Physics, Rayleigh Scattering
40 // with the model from Penelope, version 2008
41 // -------------------------------------------------------------------
42 
43 #ifndef G4PENELOPERAYLEIGHMODEL_HH
44 #define G4PENELOPERAYLEIGHMODEL_HH 1
45 
46 #include "globals.hh"
47 #include "G4VEmModel.hh"
48 #include "G4DataVector.hh"
50 
52 class G4DynamicParticle;
54 class G4Material;
57 
59 {
60 
61 public:
63  const G4String& processName ="PenRayleigh");
64 
65  virtual ~G4PenelopeRayleighModel();
66 
67  virtual void Initialise(const G4ParticleDefinition*, const G4DataVector&);
68  virtual void InitialiseLocal(const G4ParticleDefinition*,
69  G4VEmModel *masterModel);
70 
72  G4double kinEnergy,
73  G4double Z,
74  G4double A=0,
75  G4double cut=0,
77 
78  virtual void SampleSecondaries(std::vector<G4DynamicParticle*>*,
79  const G4MaterialCutsCouple*,
80  const G4DynamicParticle*,
81  G4double tmin,
82  G4double maxEnergy);
83 
86 
87  //Testing purposes
88  void DumpFormFactorTable(const G4Material*);
89 
90 protected:
93 
94 private:
97 
98  void SetParticle(const G4ParticleDefinition*);
99 
100  //Intrinsic energy limits of the model: cannot be extended by
101  //the parent process
104 
107 
108  //Internal tables and manager methods
109  std::map<G4int,G4PhysicsFreeVector*> *logAtomicCrossSection;
110  std::map<G4int,G4PhysicsFreeVector*> *atomicFormFactor;
111 
112 
113  G4DataVector logQSquareGrid; //log(Q^2) grid for interpolation
114  std::map<const G4Material*,G4PhysicsFreeVector*> *logFormFactorTable; //log(Q^2) vs. log(F^2)
115 
116  G4DataVector logEnergyGridPMax; //energy grid for PMac (and originally for the x-section)
117  std::map<const G4Material*,G4PhysicsFreeVector*> *pMaxTable; //E vs. Pmax
118 
119  std::map<const G4Material*,G4PenelopeSamplingData*> *samplingTable;
120 
121  //Helper methods
122  void ReadDataFile(G4int);
123  void ClearTables();
124  void BuildFormFactorTable(const G4Material*);
125  void GetPMaxTable(const G4Material*);
126 
127  G4double GetFSquared(const G4Material*,const G4double);
129 
130  //Used only for G4EmCalculator and Unit Tests
132 
133 };
134 
135 #endif
136 
virtual void Initialise(const G4ParticleDefinition *, const G4DataVector &)
std::map< const G4Material *, G4PhysicsFreeVector * > * logFormFactorTable
virtual void InitialiseLocal(const G4ParticleDefinition *, G4VEmModel *masterModel)
void BuildFormFactorTable(const G4Material *)
G4PenelopeRayleighModel & operator=(const G4PenelopeRayleighModel &right)
int G4int
Definition: G4Types.hh:78
G4double GetFSquared(const G4Material *, const G4double)
double A(double temperature)
void GetPMaxTable(const G4Material *)
void InitializeSamplingAlgorithm(const G4Material *)
bool G4bool
Definition: G4Types.hh:79
std::map< G4int, G4PhysicsFreeVector * > * atomicFormFactor
void DumpFormFactorTable(const G4Material *)
static const G4double emax
std::map< G4int, G4PhysicsFreeVector * > * logAtomicCrossSection
G4ParticleChangeForGamma * fParticleChange
virtual void SampleSecondaries(std::vector< G4DynamicParticle * > *, const G4MaterialCutsCouple *, const G4DynamicParticle *, G4double tmin, G4double maxEnergy)
std::map< const G4Material *, G4PhysicsFreeVector * > * pMaxTable
double G4double
Definition: G4Types.hh:76
G4PenelopeRayleighModel(const G4ParticleDefinition *p=0, const G4String &processName="PenRayleigh")
#define DBL_MAX
Definition: templates.hh:83
virtual G4double ComputeCrossSectionPerAtom(const G4ParticleDefinition *, G4double kinEnergy, G4double Z, G4double A=0, G4double cut=0, G4double emax=DBL_MAX)
std::map< const G4Material *, G4PenelopeSamplingData * > * samplingTable
const G4ParticleDefinition * fParticle
void SetParticle(const G4ParticleDefinition *)