CMS 3D CMS Logo

/data/refman/pasoursint/CMSSW_6_1_1/src/CalibCalorimetry/EcalLaserAnalyzer/interface/PulseFitWithFunction.h

Go to the documentation of this file.
00001 //-----------------------------------------------------------------------
00002 //----------------------------------------------------------------------
00003 // File PulseFitWithFunction.h
00004 // ===========================================================
00005 // ==                                                       ==
00006 // ==     Class for a LIGHT weights method                  ==
00007 // ==                                                       ==
00008 // ==  Date:   July 16th 2003                               ==
00009 // ==  Author: Patrick Jarry                                ==
00010 // ==            ==
00011 // ==                                                       ==
00012 // ===========================================================
00013 /* This routine is used to fit the signal line
00014       shape of CMS barrel calorimeter
00015   The method used is the one described in note LPC 84-30 (Billoir 1984) :
00016     "Methode d'ajustement dans un probleme a parametrisation hierarchisee"
00017   In this class we calculate the amplitude maximum and the time of arrival
00018   of this maximum (done with function fit_electronic)
00019  */
00020 
00021 #ifndef PulseFitWithFunction_H
00022 #define PulseFitWithFunction_H
00023 
00024 #include <CalibCalorimetry/EcalLaserAnalyzer/interface/PulseFit.h>
00025 
00026 class PulseFitWithFunction: public TObject 
00027 {
00028  public:
00029   // Default Constructor, mainly for Root
00030   PulseFitWithFunction() ;
00031 
00032   // Destructor: Does nothing
00033   virtual ~PulseFitWithFunction() ;
00034 
00035   // Initialize 
00036   virtual void init(int,int,int,int,double,double) ;
00037 
00038   // Compute amplitude of a channel
00039 
00040   virtual double doFit(double *) ;
00041   
00042   double fFunc_max ; // amplitude maximum as input of fit
00043   double fTim_max ; // time of amplitude maximum as input of fit
00044   double fAmp_fitted_max ; // amplitude maximum fitted
00045   double fTim_fitted_max ; // time of amplitude maximum fitted 
00046   double fValue_tim_max ; // value of time of arrival of maximum from pol3 fit
00047   int    fNumber_samp_max ; // number of the sample which is maximum 
00048   double fSigma_ped ; // sigma of pedestal to be used in fit
00049 
00050   double getAmpl_parab() { return amp_parab; }
00051   double getTime_parab() { return tim_parab; }
00052 
00053   double getAmpl() { return fAmp_fitted_max; }
00054   double getTime() { return fTim_fitted_max; }
00055 
00056   double getMax_parab() { return amp_max; }
00057   int getSampMax_parab() { return imax; }
00058 
00059  private:       
00060 
00061   double amp_max , amp_parab , tim_parab;
00062   int imax;
00063   
00064   int fNsamples ; // maximum number of samples into framelegth
00065 
00066   double  fAlpha_laser ;
00067   double  fBeta_laser ;
00068   double  fAlpha_beam ;
00069   double  fBeta_beam ;
00070   double  fAlpha ;
00071   double  fBeta ;
00072   int     fNb_iter ; // maximum number of iterations
00073   int     fNum_samp_bef_max  ; // number of samples before maximum sample
00074   int     fNum_samp_after_max  ; // number of samples after  maximum sample
00075  
00076   double Fit_electronic(int, double *,double ) ;
00077   void Fit_parab(double *,int,int,double * ) ;
00078   double Electronic_shape(double) ;
00079   
00080   
00081 
00082   //  ClassDef(PulseFitWithFunction,1)     //!< The processed part of the class is persistant
00083 } ;
00084 
00085 #endif
00086 
00087 
00088 
00089 //-----------------------------------------------------------------------
00090 //----------------------------------------------------------------------