/* * ScanCorrection.hh * * Created on: Apr 12, 2016 * Author: Hovanes Egiyan */ #ifndef SCANCORRECTION_HH_ #define SCANCORRECTION_HH_ #include #include #include #include #include #include #include #include #include #include "ScanDetector.hh" // class ScanDetector; class ScanCorrection: public TF1 { protected: // Map of predefined correction functions. The first index is the name of the // detector the corrections is for. The key of the pair is the name of the detector // that is on the x-axis of the corrections, the value of the pair is the string // representing the functional form of the correction to be passed to TF1. static std::map > scCorrectionMap; // Detector pointer who's values are supposed to be used // as the horizontal axis for the corrections. ScanDetector* scDetector; public: ScanCorrection( ScanDetector* det, const TF1* func ); virtual ~ScanCorrection(); virtual double getCorrection( int iPoint ); ScanDetector* getDetector() const { return scDetector; } ScanDetector* setDetector( const ScanDetector* scDetector ) { return (this->scDetector = const_cast( scDetector )); } static int initCorrectionMap(); static std::map >& getCorrectionMap() { return scCorrectionMap; } ClassDef(ScanCorrection,0) }; #endif /* SCANCORRECTION_HH_ */