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 00012 #include "G4Track.hh" 00013 #include "G4Step.hh" 00014 #include "CLHEP/Units/PhysicalConstants.h" 00015 00016 class BDSComptonEngine 00017 { 00018 public: 00019 00020 BDSComptonEngine(); 00021 00022 BDSComptonEngine(G4LorentzVector InGam_FourVec, 00023 G4LorentzVector InEl_FourVec ); 00024 00025 ~BDSComptonEngine(); 00026 00027 void PerformCompton(); 00028 void PerformHighEnergyCompton(); 00029 void PerformHighEnergyCompton2(); 00030 G4double ComptonDifferentialCrossSection(G4double costh=0, G4double gamma2=0); 00031 G4double PeakAmplitudeOfComptonDifferentialCrossSection(G4double gamma2=0); 00032 void SetIncomingPhoton4Vec(G4LorentzVector inGam); 00033 void SetIncomingElectron4Vec(G4LorentzVector inEl); 00034 00035 G4LorentzVector GetScatteredElectron(); 00036 G4LorentzVector GetScatteredGamma(); 00037 00038 protected: 00039 00040 private: 00041 00042 private: 00043 G4LorentzVector itsScatteredEl; 00044 G4LorentzVector itsScatteredGam; 00045 G4LorentzVector itsIncomingEl; 00046 G4LorentzVector itsIncomingGam; 00047 00048 static const G4int ntryMax = 10000000; 00049 00050 }; 00051 00052 inline G4LorentzVector BDSComptonEngine::GetScatteredElectron() 00053 {return itsScatteredEl;} 00054 00055 inline G4LorentzVector BDSComptonEngine::GetScatteredGamma() 00056 {return itsScatteredGam;} 00057 00058 00059 inline void BDSComptonEngine::SetIncomingPhoton4Vec(G4LorentzVector inGam) 00060 {itsIncomingGam=inGam; 00061 if(itsIncomingEl.e()<CLHEP::electron_mass_c2) 00062 {G4Exception("BDSComptonEngine: Invalid Electron Energy", "-1", FatalException, "");} 00063 00064 } 00065 inline void BDSComptonEngine::SetIncomingElectron4Vec(G4LorentzVector inEl) 00066 {itsIncomingEl=inEl;} 00067 #endif