00001 /* BDSIM code. Version 1.0 00002 Author: Grahame A. Blair, Royal Holloway, Univ. of London. 00003 Last modified 24.7.2002 00004 Copyright (c) 2002 by G.A.Blair. ALL RIGHTS RESERVED. 00005 */ 00006 #ifndef BDSComptonEngine_h 00007 #define BDSComptonEngine_h 1 00008 00009 #include "G4ios.hh" 00010 #include "globals.hh" 00011 #include "Randomize.hh" 00012 #include "G4Version.hh" 00013 00014 #if G4VERSION_NUMBER > 899 00015 #include "G4VEnergyLossProcess.hh" 00016 #else 00017 #include "G4VeEnergyLoss.hh" 00018 #endif 00019 00020 #include "G4Track.hh" 00021 #include "G4Step.hh" 00022 #include "G4Gamma.hh" 00023 #include "G4Electron.hh" 00024 #include "G4Positron.hh" 00025 #include "G4OrderedTable.hh" 00026 #include "G4PhysicsTable.hh" 00027 #include "G4PhysicsLogVector.hh" 00028 00029 class BDSComptonEngine 00030 { 00031 public: 00032 00033 BDSComptonEngine(); 00034 00035 BDSComptonEngine(G4LorentzVector InGam_FourVec, 00036 G4LorentzVector InEl_FourVec ); 00037 00038 ~BDSComptonEngine(); 00039 00040 void PerformCompton(); 00041 void PerformHighEnergyCompton(); 00042 void PerformHighEnergyCompton2(); 00043 G4double ComptonDifferentialCrossSection(G4double costh=0, G4double gamma2=0); 00044 G4double PeakAmplitudeOfComptonDifferentialCrossSection(G4double gamma2=0); 00045 void SetIncomingPhoton4Vec(G4LorentzVector inGam); 00046 void SetIncomingElectron4Vec(G4LorentzVector inEl); 00047 00048 G4LorentzVector GetScatteredElectron(); 00049 G4LorentzVector GetScatteredGamma(); 00050 00051 protected: 00052 00053 private: 00054 00055 private: 00056 G4LorentzVector itsScatteredEl; 00057 G4LorentzVector itsScatteredGam; 00058 G4LorentzVector itsIncomingEl; 00059 G4LorentzVector itsIncomingGam; 00060 00061 static const G4int ntryMax = 10000000; 00062 00063 }; 00064 00065 inline G4LorentzVector BDSComptonEngine::GetScatteredElectron() 00066 {return itsScatteredEl;} 00067 00068 inline G4LorentzVector BDSComptonEngine::GetScatteredGamma() 00069 {return itsScatteredGam;} 00070 00071 00072 inline void BDSComptonEngine::SetIncomingPhoton4Vec(G4LorentzVector inGam) 00073 {itsIncomingGam=inGam; 00074 if(itsIncomingEl.e()<electron_mass_c2) 00075 {G4Exception("BDSComptonEngine: Invalid Electron Energy", "-1", FatalException, "");} 00076 00077 } 00078 inline void BDSComptonEngine::SetIncomingElectron4Vec(G4LorentzVector inEl) 00079 {itsIncomingEl=inEl;} 00080 #endif