/scratch0/jsnuveri/BDSIM/BDSIMgit/bdsim/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 "G4LorentzVector.hh"
00012 
00013 #include "CLHEP/Units/PhysicalConstants.h"
00014 
00015 class BDSPlanckEngine  
00016 { 
00017   public:
00018  
00019      BDSPlanckEngine(G4double aTemperature);
00020  
00021     ~BDSPlanckEngine();
00022 
00023      G4LorentzVector PerformPlanck();
00024      void SetTemperature(G4double aTemperature);
00025 
00026   protected:
00027 
00028   private:
00029 
00030   G4double PlanckSpectrum(G4double x);
00031 
00032 private:
00033     G4double itsTemperature, kT;
00034     G4LorentzVector itsFourMom;
00035 
00036     G4double a,b,c,x1,x2,TotalArea,area1, area2, area3;
00037 
00038    const static G4int ntryMax = 10000000;
00039 
00040 };
00041 
00042 
00043 inline void BDSPlanckEngine::SetTemperature(G4double aTemperature)
00044 {
00045  itsTemperature=aTemperature;
00046  kT=CLHEP::k_Boltzmann* itsTemperature;
00047 }
00048 
00049 inline G4double BDSPlanckEngine::PlanckSpectrum(G4double x)
00050 { return x*x/(exp(x)-1);}
00051 
00052 #endif

Generated on 28 Jun 2015 for BDSIM by  doxygen 1.4.7