Back to home page

Project CMSSW displayed by LXR

 
 

    


File indexing completed on 2024-04-06 11:57:47

0001 //-----------------------------------------------------------------------
0002 //----------------------------------------------------------------------
0003 // File PulseFitWithShape.h
0004 
0005 #ifndef PulseFitWithShape_H
0006 #define PulseFitWithShape_H
0007 #include "TObject.h"
0008 #include <vector>
0009 
0010 class PulseFitWithShape : public TObject {
0011 public:
0012   // Default Constructor, mainly for Root
0013   PulseFitWithShape();
0014 
0015   // Destructor: Does nothing
0016   ~PulseFitWithShape() override;
0017 
0018   // Initialize
0019   virtual void init(int, int, int, int, int, const std::vector<double> &, double);
0020 
0021   // Compute amplitude of a channel
0022 
0023   virtual double doFit(double *, double *cova = nullptr);
0024 
0025   double fAmp_fitted_max;  // amplitude maximum fitted
0026   double fTim_fitted_max;  // time of amplitude maximum fitted
0027 
0028   double getAmpl() { return fAmp_fitted_max; }
0029   double getTime() { return fTim_fitted_max; }
0030 
0031 private:
0032   int fNsamples;       // maximum number of samples into framelegth
0033   int fNsamplesShape;  // maximum number of samples into framelegth
0034   double fNoise;
0035 
0036   std::vector<double> pshape;
0037   std::vector<double> dshape;
0038 
0039   int fNb_iter;             // maximum number of iterations
0040   int fNum_samp_bef_max;    // number of samples before maximum sample
0041   int fNum_samp_after_max;  // number of samples after  maximum sample
0042 
0043   ClassDefOverride(PulseFitWithShape, 0)  //!< The processed part of the class is persistant
0044 };
0045 
0046 #endif
0047 
0048 //-----------------------------------------------------------------------
0049 //----------------------------------------------------------------------