/* * ThreeWireGraphAnalyzer.hh * * Created on: May 11, 2022 * Author: Hovanes Egiyan */ #ifndef THREEWIREGRAPHANALYZER_HH_ #define THREEWIREGRAPHANALYZER_HH_ #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include "TGraphErrors.h" #include "TF1.h" #include #include #include "GraphAnalyzer.hh" class ThreeWireGraphAnalyzer: public GraphAnalyzer { protected: TF1* twgaFitFun; // Map to give the lower and upper range for analysis // The first string key indicates the label (X or Y) // The second string key indicates the low or high edge static std::map > twgaFitRange; TGraphErrors* twgaSubGraph; virtual void CreateSubGraph(); virtual void CreateFitFun( std::string funName, double xMin, double xMax ); virtual void FindInitialParValues(); public: ThreeWireGraphAnalyzer(TGraphErrors* graph, std::string sName, std::string label ); ThreeWireGraphAnalyzer( const ThreeWireGraphAnalyzer& analyzer ); virtual ~ThreeWireGraphAnalyzer(); virtual TFitResultPtr FitGraph() ; virtual double GetFitSigma() { return this->twgaFitFun->GetParameter(2) ;} static double ThreeWireScanFitFun( double* x, double* params ); static std::map > InitRanges(); virtual void Draw( Option_t* opt) ; inline virtual TF1* GetFitFunction() { return twgaFitFun; } inline static std::map > GetFitRange() {return twgaFitRange;} // ClassDef(ThreeWireGraphAnalyzer,0) }; #endif /* THREEWIREGRAPHANALYZER_HH_ */