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
00038
00039
00040
00041
00042
00043
00044
00045
00046
00047
00048
00049
00050
00051
00052 #ifndef G4eBremParametrizedModel_h
00053 #define G4eBremParametrizedModel_h 1
00054
00055 #include "G4VEmModel.hh"
00056 #include "G4NistManager.hh"
00057
00058 class G4ParticleChangeForLoss;
00059 class G4PhysicsVector;
00060
00061 class G4eBremParametrizedModel : public G4VEmModel
00062 {
00063
00064 public:
00065
00066 G4eBremParametrizedModel(const G4ParticleDefinition* p = 0,
00067 const G4String& nam = "eBremParam");
00068
00069 virtual ~G4eBremParametrizedModel();
00070
00071 virtual void Initialise(const G4ParticleDefinition*, const G4DataVector&);
00072
00073 virtual G4double MinEnergyCut(const G4ParticleDefinition*,
00074 const G4MaterialCutsCouple*);
00075
00076 virtual G4double ComputeDEDXPerVolume(const G4Material*,
00077 const G4ParticleDefinition*,
00078 G4double kineticEnergy,
00079 G4double cutEnergy);
00080
00081 virtual G4double ComputeCrossSectionPerAtom(const G4ParticleDefinition*,
00082 G4double tkin,
00083 G4double Z, G4double,
00084 G4double cutEnergy,
00085 G4double maxEnergy = DBL_MAX);
00086
00087 virtual void SampleSecondaries(std::vector<G4DynamicParticle*>*,
00088 const G4MaterialCutsCouple*,
00089 const G4DynamicParticle*,
00090 G4double cutEnergy,
00091 G4double maxEnergy);
00092
00093 virtual void SetupForMaterial(const G4ParticleDefinition*,
00094 const G4Material*,G4double);
00095
00096
00097 private:
00098
00099 void InitialiseConstants();
00100
00101 G4double ComputeBremLoss(G4double cutEnergy);
00102
00103 G4double ComputeXSectionPerAtom(G4double cutEnergy);
00104
00105 G4double ComputeDXSectionPerAtom(G4double gammaEnergy);
00106
00107 void SetParticle(const G4ParticleDefinition* p);
00108
00109
00110 inline void SetCurrentElement(const G4double);
00111
00112
00113 G4eBremParametrizedModel & operator=(const G4eBremParametrizedModel &right);
00114 G4eBremParametrizedModel(const G4eBremParametrizedModel&);
00115
00116 protected:
00117
00118 G4NistManager* nist;
00119 const G4ParticleDefinition* particle;
00120 G4ParticleDefinition* theGamma;
00121 G4ParticleChangeForLoss* fParticleChange;
00122
00123 static const G4double xgi[8], wgi[8];
00124
00125 G4double minThreshold;
00126
00127
00128 G4double particleMass;
00129 G4double kinEnergy;
00130 G4double totalEnergy;
00131 G4double currentZ;
00132 G4double z13, z23, lnZ;
00133 G4double densityFactor;
00134 G4double densityCorr;
00135 G4double Fel, Finel;
00136 G4double facFel, facFinel;
00137 G4double fMax,fCoulomb;
00138
00139 G4bool isElectron;
00140
00141 private:
00142
00143
00144 G4double lowKinEnergy;
00145 G4double fMigdalConstant;
00146 G4double bremFactor;
00147
00148 G4bool isInitialised;
00149 };
00150
00151
00152
00153 inline void G4eBremParametrizedModel::SetCurrentElement(const G4double Z)
00154 {
00155 std::cout<<"SetCurrentElement Z="<<Z<<std::endl;
00156 if(Z != currentZ) {
00157 currentZ = Z;
00158
00159 G4int iz = G4int(Z);
00160 z13 = nist->GetZ13(iz);
00161 z23 = z13*z13;
00162 lnZ = nist->GetLOGZ(iz);
00163
00164 Fel = facFel - lnZ/3. ;
00165 Finel = facFinel - 2.*lnZ/3. ;
00166
00167 fCoulomb = GetCurrentElement()->GetfCoulomb();
00168 fMax = Fel-fCoulomb + Finel/currentZ + (1.+1./currentZ)/12.;
00169
00170 }
00171 }
00172
00173
00174
00175
00176 #endif