include/BDSPlanckEngine.hh

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 BDSPlanckEngine_h
00007 #define BDSPlanckEngine_h 1
00008 
00009 #include "G4ios.hh" 
00010 #include "globals.hh"
00011 #include "Randomize.hh" 
00012 #include "G4Version.hh"
00013 #if G4VERSION_NUMBER > 899
00014 #include "G4VeLowEnergyLoss.hh"
00015 #else
00016 #include "G4VeEnergyLoss.hh"
00017 #endif
00018 #include "G4Track.hh"
00019 #include "G4Step.hh"
00020 #include "G4Gamma.hh"
00021 #include "G4Electron.hh"
00022 #include "G4Positron.hh"
00023 #include "G4OrderedTable.hh" 
00024 #include "G4PhysicsTable.hh"
00025 #include "G4PhysicsLogVector.hh"
00026  
00027 class BDSPlanckEngine  
00028 { 
00029   public:
00030  
00031      BDSPlanckEngine(G4double aTemperature);
00032  
00033     ~BDSPlanckEngine();
00034 
00035      G4LorentzVector PerformPlanck();
00036      void SetTemperature(G4double aTemperature);
00037 
00038   protected:
00039 
00040   private:
00041 
00042   G4double PlanckSpectrum(G4double x);
00043 
00044 private:
00045     G4double itsTemperature, kT;
00046     G4LorentzVector itsFourMom;
00047 
00048     G4double a,b,c,x1,x2,TotalArea,area1, area2, area3;
00049 
00050    const static G4int ntryMax = 10000000;
00051 
00052 };
00053 
00054 
00055 inline void BDSPlanckEngine::SetTemperature(G4double aTemperature)
00056 {
00057  itsTemperature=aTemperature;
00058  kT=k_Boltzmann* itsTemperature;
00059 }
00060 
00061 inline G4double BDSPlanckEngine::PlanckSpectrum(G4double x)
00062 { return x*x/(exp(x)-1);}
00063 
00064 #endif

Generated on 27 Aug 2013 for BDSIM by  doxygen 1.4.7