00001 #ifndef RAD_TVacuumPol 00002 #define RAD_TVacuumPol 00003 00004 #include <string> 00005 #include <complex> 00006 #include "TRadSpline.h" 00007 00008 class TVacuumPol{ 00009 protected: 00010 TRadSpline *fsvtr; 00011 TRadSpline *fsvsr; 00012 TRadSpline *fsvsi; 00013 bool fNoVP; 00014 bool fReadSuccessfullyVP; 00015 void ReadVacuumPolData(std::string); 00016 public: 00017 TVacuumPol(); 00018 ~TVacuumPol(); 00019 void Init(std::string, std::string); 00020 void SetZeroVP(){fNoVP = true;} 00021 void SetDefaultVP(){fNoVP = !fReadSuccessfullyVP;} 00022 bool GetVacuumPolarization(){return fNoVP;} 00023 inline std::complex <double> Evals(const double &s){ 00024 if(fNoVP) return std::complex<double>(1,0); 00025 return std::complex<double>(fsvsr->Eval(s),fsvsi->Eval(s)); 00026 } 00027 inline std::complex <double> Evalt(const double &t){ 00028 if(fNoVP) return std::complex<double>(1,0); 00029 return std::complex<double>(fsvtr->Eval(fabs(t)),0.); 00030 } 00031 }; 00032 00033 extern TVacuumPol *gVPol; 00034 00035 #endif // #ifndef RAD_TVacuumPol