00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018
00019
00020
00021
00022
00023
00024
00025
00026
00027
00028
00029
00030
00031
00032
00033
00034
00035
00036
00037 #ifndef G4MuElecElasticModel_h
00038 #define G4MuElecElasticModel_h 1
00039
00040 #include <map>
00041 #include <CLHEP/Units/SystemOfUnits.h>
00042
00043 #include "G4MuElecCrossSectionDataSet.hh"
00044 #include "G4VEmModel.hh"
00045 #include "G4Electron.hh"
00046 #include "G4ParticleChangeForGamma.hh"
00047 #include "G4LogLogInterpolation.hh"
00048 #include "G4ProductionCutsTable.hh"
00049 #include "G4NistManager.hh"
00050
00051 class G4MuElecElasticModel : public G4VEmModel
00052 {
00053
00054 public:
00055
00056 G4MuElecElasticModel(const G4ParticleDefinition* p = 0,
00057 const G4String& nam = "MuElecElasticModel");
00058
00059 virtual ~G4MuElecElasticModel();
00060
00061 virtual void Initialise(const G4ParticleDefinition*, const G4DataVector&);
00062
00063 virtual G4double CrossSectionPerVolume(const G4Material* material,
00064 const G4ParticleDefinition* p,
00065 G4double ekin,
00066 G4double emin,
00067 G4double emax);
00068
00069 virtual void SampleSecondaries(std::vector<G4DynamicParticle*>*,
00070 const G4MaterialCutsCouple*,
00071 const G4DynamicParticle*,
00072 G4double tmin,
00073 G4double maxEnergy);
00074
00075 inline void SetKillBelowThreshold (G4double threshold);
00076 G4double GetKillBelowThreshold () { return killBelowEnergy; }
00077
00078 protected:
00079
00080 G4ParticleChangeForGamma* fParticleChangeForGamma;
00081
00082 private:
00083
00084 G4Material* nistSi;
00085 G4double killBelowEnergy;
00086 G4double lowEnergyLimit;
00087 G4double lowEnergyLimitOfModel;
00088 G4double highEnergyLimit;
00089 G4bool isInitialised;
00090 G4int verboseLevel;
00091
00092
00093
00094 typedef std::map<G4String,G4String,std::less<G4String> > MapFile;
00095 MapFile tableFile;
00096
00097 typedef std::map<G4String,G4MuElecCrossSectionDataSet*,std::less<G4String> > MapData;
00098 MapData tableData;
00099
00100
00101
00102 G4double Theta(G4ParticleDefinition * aParticleDefinition, G4double k, G4double integrDiff);
00103
00104 G4double LogLogInterpolate(G4double e1, G4double e2, G4double e, G4double xs1, G4double xs2);
00105
00106 G4double LinLogInterpolate(G4double e1, G4double e2, G4double e, G4double xs1, G4double xs2);
00107
00108 G4double QuadInterpolator(G4double e11,
00109 G4double e12,
00110 G4double e21,
00111 G4double e22,
00112 G4double x11,
00113 G4double x12,
00114 G4double x21,
00115 G4double x22,
00116 G4double t1,
00117 G4double t2,
00118 G4double t,
00119 G4double e);
00120
00121 typedef std::map<double, std::map<double, double> > TriDimensionMap;
00122
00123 TriDimensionMap eDiffCrossSectionData;
00124 std::vector<double> eTdummyVec;
00125
00126 typedef std::map<double, std::vector<double> > VecMap;
00127 VecMap eVecm;
00128
00129 G4double RandomizeCosTheta(G4double k);
00130
00131
00132
00133 G4MuElecElasticModel & operator=(const G4MuElecElasticModel &right);
00134 G4MuElecElasticModel(const G4MuElecElasticModel&);
00135
00136 };
00137
00138 inline void G4MuElecElasticModel::SetKillBelowThreshold (G4double threshold)
00139 {
00140 killBelowEnergy = threshold;
00141
00142 if (threshold < 5*CLHEP::eV)
00143 {
00144 G4Exception ("*** WARNING : the G4MuElecElasticModel class is not validated below 5 eV !","",JustWarning,"") ;
00145 threshold = 0.025*CLHEP::eV;
00146 }
00147
00148 }
00149
00150
00151
00152
00153 #endif