• Main Page
  • Related Pages
  • Namespaces
  • Data Structures
  • Files
  • File List
  • Globals

spadicplugin/go4/TSpadicModel.h (r4864/r1179)

Go to the documentation of this file.
00001 #ifndef TSPADICMODEL_H
00002 #define TSPADICMODEL_H
00003 
00004 #include "TGo4FitModel.h"
00005 
00006 #include "TMath.h"
00007 
00008 class TSpadicModel : public TGo4FitModel {
00009    public:
00010       TSpadicModel(const char* iName):
00011          TGo4FitModel(iName, "Peak form", kTRUE) 
00012    {
00013      NewParameter("N","model template parameter",3.);
00014      NewParameter("Tau","model template parameter",10.);
00015      NewParameter("Shift","model template parameter",-20.);
00016    }
00017 
00018 
00019    protected:
00020       virtual Double_t UserFunction(Double_t* Coordinates, Double_t* Parameters) 
00021    {
00022      Double_t N = Parameters[0];
00023      Double_t Tau = Parameters[1];
00024      Double_t Shift = Parameters[2];
00025      Double_t x = Coordinates[0];
00026 
00027      if ((x-Shift) < 0) return 0;
00028      //return -1*TMath::Exp(-N*(x-Shift)/Tau)*TMath::Power((x-Shift)/Tau, N);
00029         return TMath::Exp(-N*(x-Shift)/Tau)*TMath::Power((x-Shift)/Tau, N);
00030 }
00031 
00032    ClassDef(TSpadicModel, 1);
00033 };
00034 
00035 #endif // TMODELTEMPLATE_H

Generated on Tue Dec 10 2013 04:52:23 for ROCsoft by  doxygen 1.7.1