Main Page | Modules | Namespace List | Class Hierarchy | Alphabetical List | Class List | Directories | File List | Namespace Members | Class Members | File Members | Related Pages

Ionization.cxx

Go to the documentation of this file.
00001 
00015 #include <cassert>
00016 
00017 #include "Ionization.h"
00018 #include "BetheBlochModel.h"
00019 
00020 ClassImpT(Ionization, T)
00021 
00022 Ionization<BetheBlochModel> betablockinstance;
00023 
00024 //_________________________________________________________________________________________
00025 template <class T> Ionization<T>::Ionization() :
00026 EnergyLossProcess()
00027 {
00028   fModel = new T();
00029 }
00030 //_________________________________________________________________________________________
00031 template <class T> Ionization<T>::Ionization(const Material & material) :
00032 EnergyLossProcess()
00033 {
00034   fModel = new T(material);
00035  
00036   Process::Process_t proc = fModel->ModeledProcess();
00037 
00038   assert( proc == Process::eIonization || proc == Process::eAll);
00039 }
00040 //_________________________________________________________________________________________
00041 template <class T> Ionization<T>::~Ionization()
00042 {
00043   if(fModel) delete fModel;
00044 }
00045 //_________________________________________________________________________________________
00046 template <class T> double Ionization<T>::dE_dx(double E) const
00047 {
00048   if(E > Threshold() ) {
00049 
00050      ValidityRange_t vldrange = fModel->ValidityRange();
00051 
00052      if(E >= vldrange.Emin && E <= vldrange.Emax)  return fModel->dE_dx(E);
00053   }
00054 
00055   return 0;
00056 }
00057 //_________________________________________________________________________________________
00058 

Generated on Mon Feb 15 11:06:48 2010 for loon by  doxygen 1.3.9.1