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

Generated on Wed Mar 5 17:25:22 2008 for BDSIM by  doxygen 1.5.3