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