CMS 3D CMS Logo

 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Groups Pages
CSCThrTurnOnFcn.h
Go to the documentation of this file.
1 #ifndef CSCCalibration_CSCThrTurnOnFcn_h
2 #define CSCCalibration_CSCThrTurnOnFcn_h
3 
12 #include "Minuit2/FCNBase.h"
13 #include <vector>
14 
15 class CSCThrTurnOnFcn : public ROOT::Minuit2::FCNBase {
16 private:
18  std::vector<float> xdata;
19  std::vector<float> ydata;
20  std::vector<float> ery;
21  float norm;
22 
23 public:
25  void setData(const std::vector<float>& x, const std::vector<float>& y) {
26  for (unsigned int i = 0; i < x.size(); i++) {
27  xdata.push_back(x[i]);
28  ydata.push_back(y[i]);
29  }
30  };
31 
33  void setErrors(const std::vector<float>& er) {
34  for (unsigned int i = 0; i < er.size(); i++)
35  ery.push_back(er[i]);
36  };
37 
39  void setNorm(float n) { norm = n; };
40 
42  double operator()(const std::vector<double>&) const override;
43 
45  double Up() const override { return 1.; }
46 };
47 
48 #endif
double Up() const override
@ What?
void setNorm(float n)
Set the norm (if needed)
std::vector< float > ydata
void setData(const std::vector< float > &x, const std::vector< float > &y)
Cache the current data, x and y.
double operator()(const std::vector< double > &) const override
Provide the chi-squared function for the given data.
std::vector< float > ery
std::vector< float > xdata
data
void setErrors(const std::vector< float > &er)
Set the errors.