CMS 3D CMS Logo

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
DDAxes::y
CSCThrTurnOnFcn
Definition: CSCThrTurnOnFcn.h:15
mps_fire.i
i
Definition: mps_fire.py:428
dqmiodumpmetadata.n
n
Definition: dqmiodumpmetadata.py:28
DDAxes::x
CSCThrTurnOnFcn::setData
void setData(const std::vector< float > &x, const std::vector< float > &y)
Cache the current data, x and y.
Definition: CSCThrTurnOnFcn.h:25
CSCThrTurnOnFcn::ydata
std::vector< float > ydata
Definition: CSCThrTurnOnFcn.h:19
CSCThrTurnOnFcn::setNorm
void setNorm(float n)
Set the norm (if needed)
Definition: CSCThrTurnOnFcn.h:39
CSCThrTurnOnFcn::operator()
double operator()(const std::vector< double > &) const override
Provide the chi-squared function for the given data.
Definition: CSCThrTurnOnFcn.cc:8
CSCThrTurnOnFcn::Up
double Up() const override
@ What?
Definition: CSCThrTurnOnFcn.h:45
CSCThrTurnOnFcn::norm
float norm
Definition: CSCThrTurnOnFcn.h:21
CSCThrTurnOnFcn::xdata
std::vector< float > xdata
data
Definition: CSCThrTurnOnFcn.h:18
CSCThrTurnOnFcn::ery
std::vector< float > ery
Definition: CSCThrTurnOnFcn.h:20
CSCThrTurnOnFcn::setErrors
void setErrors(const std::vector< float > &er)
Set the errors.
Definition: CSCThrTurnOnFcn.h:33