Index: fact/tools/rootmacros/PulseTemplates/pulse.h
===================================================================
--- fact/tools/rootmacros/PulseTemplates/pulse.h	(revision 14474)
+++ fact/tools/rootmacros/PulseTemplates/pulse.h	(revision 14475)
@@ -15,4 +15,5 @@
 #include <TString.h>
 #include <TSystem.h>
+#include <TFitResult.h>
 //
 
@@ -45,6 +46,9 @@
     */
     Pulse( );
-    Pulse(TH1* histo );
-    Pulse(TH1* histo, TString options );
+    Pulse(TString name);
+    Pulse(TString name, TH1* histo );
+    Pulse(TString name, TH1* histo, int type);
+    Pulse(TString name, TH1* histo, TString options );
+    Pulse(TString name, TH1* histo, TString options, int type);
 
     //    /** Copy constructor.
@@ -69,10 +73,15 @@
 // OPERATIONS
 //    double shapeFunc( double* x, double* par);
-    void    Fit(TString fitName, TString fitOptions );
-    void    Fit(TString fitName, TString fitOptions, int fitMin, int fitMax);
-    void    Fit2(TString fitName, TString fitOptions );
-    void    Fit2(TString fitName, TString fitOptions, int fitMin, int fitMax);
+    void    Fit(TString fitName, TString fitOptions, int type );
+    void    Fit(TString fitName, TString fitOptions, int type, int fitMin, int fitMax);
+
+private:
+    void    FitSectionWise(TString fitName, TString fitOptions, int fitMin, int fitMax);
+    void    FitContious(TString fitName, TString fitOptions, int fitMin, int fitMax);
+    void    CalculateParameters();
+    void    InitMembers();
 
 // ACCESS
+public:
     double  GetBsl();
     double  GetHeight();
@@ -86,17 +95,26 @@
 
 // INQUIRY
-private:
+    TString mName;
     TH1*    mHisto;
+    TF1*    mModel;
     TString mOptions;
     double  mBsl;
     double  mHeight;
-    double  mStart;
-    double  mRising;
-    double  mTauRising;
-    double  mTauFalling;
+    double  mT0;
+    double  mT1;
+    double  mTau1;
+    double  mTau2;
     double  mIntegral;
     double  mAmplitude;
     int     mPhE;
+    int     mType;
+    int     mFitMin;
+    int     mFitMax;
+    double  mFitProb;
+    double  mFitNCalls;
+    double  mFitNdf;
+    double  mChi2;
 
+    TFitResultPtr mFitResultPtr;
 };
 
