CMS 3D CMS Logo

 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Groups Pages
PulseFitWithShape.h
Go to the documentation of this file.
1 //-----------------------------------------------------------------------
2 //----------------------------------------------------------------------
3 // File PulseFitWithShape.h
4 
5 #ifndef PulseFitWithShape_H
6 #define PulseFitWithShape_H
7 #include "TObject.h"
8 #include <vector>
9 
10 class PulseFitWithShape : public TObject {
11 public:
12  // Default Constructor, mainly for Root
14 
15  // Destructor: Does nothing
16  ~PulseFitWithShape() override;
17 
18  // Initialize
19  virtual void init(int, int, int, int, int, const std::vector<double> &, double);
20 
21  // Compute amplitude of a channel
22 
23  virtual double doFit(double *, double *cova = nullptr);
24 
25  double fAmp_fitted_max; // amplitude maximum fitted
26  double fTim_fitted_max; // time of amplitude maximum fitted
27 
28  double getAmpl() { return fAmp_fitted_max; }
29  double getTime() { return fTim_fitted_max; }
30 
31 private:
32  int fNsamples; // maximum number of samples into framelegth
33  int fNsamplesShape; // maximum number of samples into framelegth
34  double fNoise;
35 
36  std::vector<double> pshape;
37  std::vector<double> dshape;
38 
39  int fNb_iter; // maximum number of iterations
40  int fNum_samp_bef_max; // number of samples before maximum sample
41  int fNum_samp_after_max; // number of samples after maximum sample
42 
43  ClassDefOverride(PulseFitWithShape, 0)
44 };
45 
46 #endif
47 
48 //-----------------------------------------------------------------------
49 //----------------------------------------------------------------------
virtual double doFit(double *, double *cova=nullptr)
virtual void init(int, int, int, int, int, const std::vector< double > &, double)
std::vector< double > dshape
std::vector< double > pshape
~PulseFitWithShape() override