CMS 3D CMS Logo

 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Groups 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 public:
28  // Default Constructor, mainly for Root
30 
31  // Destructor: Does nothing
32  ~PulseFitWithFunction() override;
33 
34  // Initialize
35  virtual void init(int, int, int, int, double, double);
36 
37  // Compute amplitude of a channel
38 
39  virtual double doFit(double *);
40 
41  double fFunc_max; // amplitude maximum as input of fit
42  double fTim_max; // time of amplitude maximum as input of fit
43  double fAmp_fitted_max; // amplitude maximum fitted
44  double fTim_fitted_max; // time of amplitude maximum fitted
45  double fValue_tim_max; // value of time of arrival of maximum from pol3 fit
46  int fNumber_samp_max; // number of the sample which is maximum
47  double fSigma_ped; // sigma of pedestal to be used in fit
48 
49  double getAmpl_parab() { return amp_parab; }
50  double getTime_parab() { return tim_parab; }
51 
52  double getAmpl() { return fAmp_fitted_max; }
53  double getTime() { return fTim_fitted_max; }
54 
55  double getMax_parab() { return amp_max; }
56  int getSampMax_parab() { return imax; }
57 
58 private:
60  int imax;
61 
62  int fNsamples; // maximum number of samples into framelegth
63 
64  double fAlpha_laser;
65  double fBeta_laser;
66  double fAlpha_beam;
67  double fBeta_beam;
68  double fAlpha;
69  double fBeta;
70  int fNb_iter; // maximum number of iterations
71  int fNum_samp_bef_max; // number of samples before maximum sample
72  int fNum_samp_after_max; // number of samples after maximum sample
73 
74  double Fit_electronic(int, double *, double);
75  void Fit_parab(double *, int, int, double *);
76  double Electronic_shape(double);
77 
78  ClassDefOverride(PulseFitWithFunction, 0)
79 };
80 
81 #endif
82 
83 //-----------------------------------------------------------------------
84 //----------------------------------------------------------------------
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 *)