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