//////////////////////////////////////////////////////////////////// /// \class RAT::ReconCalibrator /// /// \brief Calibrations for reconstruction /// /// \author Logan Lebanowski /// /// REVISION HISTORY:\n /// 2018 Jul 25 : Logan L.: New File /// 2020 Sep 09 : Logan L.: Add version 2 /// /// \details This class contains functions used to apply /// calibrations to reconstructed energies /// /// RAT releases 6.5.X should use verion 1: /// CalibrateEnergyRSP(isData,energy,rho,z,0,1) /// RAT releases 6.17.4-6.18.7 should use version 2: /// CalibrateEnergyRSP(isData,energy,rho,z,UdotR,2) /// /// Positions are to be provided in PSUP coordinates /// (without accounting of the AV offset in z). /// //////////////////////////////////////////////////////////////////// #ifndef __RAT_util_ReconCalibrator__ #define __RAT_util_ReconCalibrator__ #include using std::vector; namespace RAT { namespace DU { class ReconCalibrator { public: static inline ReconCalibrator* Get() { static ReconCalibrator calib; calib.Init(); return &calib; } ReconCalibrator(); void BeginOfRun() {Init();} void Init(); // Calibrate Energy double CalibrateEnergyRSP( bool isData, double energy, double rho, double z, double UdotR=0, int version=1 ) const; private: bool fInitDone; double fZoffsetAV; double fRadiusAVOuterSqr; vector fCoefficientsData1; vector fCoefficientsSim1; vector fCoefficientsData2; vector fCoefficientsSim2; vector fCoefficientsExtData2; vector fCoefficientsExtSim2; }; } } #endif