CMS 3D CMS Logo

 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Pages
PulseFitWithFunction.h
Go to the documentation of this file.
1 //-----------------------------------------------------------------------
2 //----------------------------------------------------------------------
3 // File PulseFitWithFunction.h
4 // ===========================================================
5 // == ==
6 // == Class for a LIGHT weights method ==
7 // == ==
8 // == Date: July 16th 2003 ==
9 // == Author: Patrick Jarry ==
10 // == ==
11 // == ==
12 // ===========================================================
13 /* This routine is used to fit the signal line
14  shape of CMS barrel calorimeter
15  The method used is the one described in note LPC 84-30 (Billoir 1984) :
16  "Methode d'ajustement dans un probleme a parametrisation hierarchisee"
17  In this class we calculate the amplitude maximum and the time of arrival
18  of this maximum (done with function fit_electronic)
19  */
20 
21 #ifndef PulseFitWithFunction_H
22 #define PulseFitWithFunction_H
23 
25 
26 class PulseFitWithFunction: public TObject
27 {
28  public:
29  // Default Constructor, mainly for Root
31 
32  // Destructor: Does nothing
33  virtual ~PulseFitWithFunction() ;
34 
35  // Initialize
36  virtual void init(int,int,int,int,double,double) ;
37 
38  // Compute amplitude of a channel
39 
40  virtual double doFit(double *) ;
41 
42  double fFunc_max ; // amplitude maximum as input of fit
43  double fTim_max ; // time of amplitude maximum as input of fit
44  double fAmp_fitted_max ; // amplitude maximum fitted
45  double fTim_fitted_max ; // time of amplitude maximum fitted
46  double fValue_tim_max ; // value of time of arrival of maximum from pol3 fit
47  int fNumber_samp_max ; // number of the sample which is maximum
48  double fSigma_ped ; // sigma of pedestal to be used in fit
49 
50  double getAmpl_parab() { return amp_parab; }
51  double getTime_parab() { return tim_parab; }
52 
53  double getAmpl() { return fAmp_fitted_max; }
54  double getTime() { return fTim_fitted_max; }
55 
56  double getMax_parab() { return amp_max; }
57  int getSampMax_parab() { return imax; }
58 
59  private:
60 
62  int imax;
63 
64  int fNsamples ; // maximum number of samples into framelegth
65 
66  double fAlpha_laser ;
67  double fBeta_laser ;
68  double fAlpha_beam ;
69  double fBeta_beam ;
70  double fAlpha ;
71  double fBeta ;
72  int fNb_iter ; // maximum number of iterations
73  int fNum_samp_bef_max ; // number of samples before maximum sample
74  int fNum_samp_after_max ; // number of samples after maximum sample
75 
76  double Fit_electronic(int, double *,double ) ;
77  void Fit_parab(double *,int,int,double * ) ;
78  double Electronic_shape(double) ;
79 
80 
81 
82  // ClassDef(PulseFitWithFunction,1) //!< The processed part of the class is persistant
83 } ;
84 
85 #endif
86 
87 
88 
89 //-----------------------------------------------------------------------
90 //----------------------------------------------------------------------
void Fit_parab(double *, int, int, double *)
virtual void init(int, int, int, int, double, double)
double Fit_electronic(int, double *, double)
virtual double doFit(double *)