/* * ProfilerPlaneDataFitter.hh * * Created on: Oct 18, 2015 * Author: hovanes */ #ifndef PROFILERPLANEDATAFITTER_HH_ #define PROFILERPLANEDATAFITTER_HH_ #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include "MutexedClass.hh" #include "ProfilerPVs.hh" #include "ProfilerPlaneSlice.hh" #include "ProfilerPlaneSliceFitter.hh" #include // Use virtual inheritance since ProfilerPlaneV inherits from ProfilerPlaneDataFitter // and ProfilerDetComponent, which both inherit from ProfilerPlaneDataFitter. class ProfilerPlaneDataFitter: virtual public ProfilerPlaneData { protected: double ppdfSumAmpl; double ppdfSumMean; double ppdfSumWidth; double ppdfSumSignal; double ppdfSumBkg; double ppdfSumAmplErr; double ppdfSumMeanErr; double ppdfSumWidthErr; double ppdfSumSignalErr; double ppdfSumBkgErr; std::vector ppdfAmpl; std::vector ppdfMean; std::vector ppdfWidth; std::vector ppdfSignal; std::vector ppdfBkg; public: ProfilerPlaneDataFitter(); ProfilerPlaneDataFitter( const ProfilerPlaneDataFitter& f ); virtual ~ProfilerPlaneDataFitter(); ProfilerPlaneDataFitter& operator =( const ProfilerPlaneDataFitter& f ); virtual bool fitWithCauchy(); virtual void createSlices(); virtual void getAmplitude( double* amplArrayPtr ); virtual void getBkg( double* bkgArrayPtr ); virtual void getMean( double* meanArrayPtr ); virtual void getSignal( double* sigArrayPtr ); virtual void getWidth( double* widthArrayPtr ); inline virtual double getSumAmpl() const { return ppdfSumAmpl; } inline virtual double setSumAmpl( const double amp ) { return (this->ppdfSumAmpl = amp); } inline virtual double getSumBkg() const { return ppdfSumBkg; } inline virtual double setSumBkg( const double bkg ) { return (this->ppdfSumBkg = bkg); } inline virtual double getSumMean() const { return ppdfSumMean; } inline virtual double setSumMean( const double mean ) { return (this->ppdfSumMean = mean); } inline virtual double getSumWidth() const { return ppdfSumWidth; } inline virtual double setSumWidth( const double width ) { return (this->ppdfSumWidth = width); } inline virtual double getSumSignal() const { return ppdfSumSignal; } inline virtual double setSumSignal( const double sig ) { return (this->ppdfSumWidth = sig); } inline virtual double getSumAmplErr() const { return ppdfSumAmplErr; } inline virtual double setSumAmplErr( const double err ) { return (this->ppdfSumAmplErr = err); } inline virtual double getSumBkgErr() const { return ppdfSumBkgErr; } inline virtual double setSumBkgErr( const double err ) { return (this->ppdfSumBkgErr = err); } inline virtual double getSumMeanErr() const { return ppdfSumMeanErr; } inline virtual double setSumMeanErr( const double err ) { return (this->ppdfSumMeanErr = err ); } inline virtual double getSumWidthErr() const { return ppdfSumWidthErr; } inline virtual double setSumWidthErr( const double err ) { return (this->ppdfSumWidthErr = err); } inline virtual double getSumSignalErr() const { return ppdfSumSignalErr; } inline virtual double setSumSignalErr( const double err ) { return (this->ppdfSumWidthErr = err); } inline const virtual std::vector& getAmpl() const { return ppdfAmpl; } inline const virtual std::vector& getBkg() const { return ppdfBkg; } inline const virtual std::vector& getMean() const { return ppdfMean; } inline const virtual std::vector& getSignal() const { return ppdfSignal; } inline const virtual std::vector& getWidth() const { return ppdfWidth; } }; #endif /* PROFILERPLANEDATAFITTER_HH_ */