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 G4PAIModel_h
00053 #define G4PAIModel_h 1
00054
00055 #include <vector>
00056 #include "G4VEmModel.hh"
00057 #include "globals.hh"
00058 #include "G4VEmFluctuationModel.hh"
00059 #include "G4PAIySection.hh"
00060
00061 class G4PhysicsLogVector;
00062 class G4PhysicsTable;
00063 class G4Region;
00064 class G4MaterialCutsCouple;
00065 class G4ParticleChangeForLoss;
00066
00067 class G4PAIModel : public G4VEmModel, public G4VEmFluctuationModel
00068 {
00069
00070 public:
00071
00072 G4PAIModel(const G4ParticleDefinition* p = 0, const G4String& nam = "PAI");
00073
00074 virtual ~G4PAIModel();
00075
00076 virtual void Initialise(const G4ParticleDefinition*, const G4DataVector&);
00077
00078 virtual void InitialiseMe(const G4ParticleDefinition*);
00079
00080 virtual G4double ComputeDEDXPerVolume(const G4Material*,
00081 const G4ParticleDefinition*,
00082 G4double kineticEnergy,
00083 G4double cutEnergy);
00084
00085 virtual G4double CrossSectionPerVolume(const G4Material*,
00086 const G4ParticleDefinition*,
00087 G4double kineticEnergy,
00088 G4double cutEnergy,
00089 G4double maxEnergy);
00090
00091 virtual void SampleSecondaries(std::vector<G4DynamicParticle*>*,
00092 const G4MaterialCutsCouple*,
00093 const G4DynamicParticle*,
00094 G4double tmin,
00095 G4double maxEnergy);
00096
00097 virtual G4double SampleFluctuations(const G4Material*,
00098 const G4DynamicParticle*,
00099 G4double&,
00100 G4double&,
00101 G4double&);
00102
00103 virtual G4double Dispersion( const G4Material*,
00104 const G4DynamicParticle*,
00105 G4double&,
00106 G4double&);
00107
00108 void DefineForRegion(const G4Region* r) ;
00109 void ComputeSandiaPhotoAbsCof();
00110 void BuildPAIonisationTable();
00111 void BuildLambdaVector();
00112
00113 G4double GetdNdxCut( G4int iPlace, G4double transferCut);
00114 G4double GetdEdxCut( G4int iPlace, G4double transferCut);
00115 G4double GetPostStepTransfer( G4double scaledTkin );
00116 G4double GetEnergyTransfer( G4int iPlace,
00117 G4double position,
00118 G4int iTransfer );
00119
00120 void SetVerboseLevel(G4int verbose){fVerbose=verbose;};
00121
00122 protected:
00123
00124 G4double MaxSecondaryEnergy(const G4ParticleDefinition*,
00125 G4double kinEnergy);
00126
00127 private:
00128
00129 void SetParticle(const G4ParticleDefinition* p);
00130
00131
00132 G4PAIModel & operator=(const G4PAIModel &right);
00133 G4PAIModel(const G4PAIModel&);
00134
00135
00136 G4int fVerbose;
00137 G4double fLowestGamma;
00138 G4double fHighestGamma;
00139 G4double fLowestKineticEnergy;
00140 G4double fHighestKineticEnergy;
00141 G4int fTotBin;
00142 G4int fMeanNumber;
00143 G4PhysicsLogVector* fParticleEnergyVector ;
00144 G4PAIySection fPAIySection;
00145
00146
00147
00148 G4PhysicsTable* fPAItransferTable;
00149 std::vector<G4PhysicsTable*> fPAIxscBank;
00150
00151 G4PhysicsTable* fPAIdEdxTable;
00152 std::vector<G4PhysicsTable*> fPAIdEdxBank;
00153
00154 std::vector<const G4MaterialCutsCouple*> fMaterialCutsCoupleVector;
00155 std::vector<const G4Region*> fPAIRegionVector;
00156
00157 const G4MaterialCutsCouple* fCutCouple;
00158 const G4Material* fMaterial;
00159 G4double fDeltaCutInKinEnergy;
00160
00161 size_t fMatIndex ;
00162 G4double** fSandiaPhotoAbsCof ;
00163 G4int fSandiaIntervalNumber ;
00164
00165 G4PhysicsLogVector* fdEdxVector ;
00166 std::vector<G4PhysicsLogVector*> fdEdxTable ;
00167
00168 G4PhysicsLogVector* fLambdaVector ;
00169 std::vector<G4PhysicsLogVector*> fLambdaTable ;
00170
00171 G4PhysicsLogVector* fdNdxCutVector ;
00172 std::vector<G4PhysicsLogVector*> fdNdxCutTable ;
00173
00174 const G4ParticleDefinition* fParticle;
00175 const G4ParticleDefinition* fElectron;
00176 const G4ParticleDefinition* fPositron;
00177 G4ParticleChangeForLoss* fParticleChange;
00178
00179 G4double fMass;
00180 G4double fSpin;
00181 G4double fChargeSquare;
00182 G4double fRatio;
00183 G4double fHighKinEnergy;
00184 G4double fLowKinEnergy;
00185 G4double fTwoln10;
00186 G4double fBg2lim;
00187 G4double fTaulim;
00188 G4double fQc;
00189
00190 G4bool isInitialised;
00191 };
00192
00193 #endif
00194
00195
00196
00197
00198
00199
00200