File indexing completed on 2023-03-17 11:14:57
0001 #ifndef CSCCalibration_CSCThrTurnOnFcn_h
0002 #define CSCCalibration_CSCThrTurnOnFcn_h
0003
0004
0005
0006
0007
0008
0009
0010
0011
0012 #include "Minuit2/FCNBase.h"
0013 #include <vector>
0014
0015 class CSCThrTurnOnFcn : public ROOT::Minuit2::FCNBase {
0016 private:
0017
0018 std::vector<float> xdata;
0019 std::vector<float> ydata;
0020 std::vector<float> ery;
0021 float norm;
0022
0023 public:
0024
0025 void setData(const std::vector<float>& x, const std::vector<float>& y) {
0026 for (unsigned int i = 0; i < x.size(); i++) {
0027 xdata.push_back(x[i]);
0028 ydata.push_back(y[i]);
0029 }
0030 };
0031
0032
0033 void setErrors(const std::vector<float>& er) {
0034 for (unsigned int i = 0; i < er.size(); i++)
0035 ery.push_back(er[i]);
0036 };
0037
0038
0039 void setNorm(float n) { norm = n; };
0040
0041
0042 double operator()(const std::vector<double>&) const override;
0043
0044
0045 double Up() const override { return 1.; }
0046 };
0047
0048 #endif