CMS 3D CMS Logo

CSCThrTurnOnFcn.h
Go to the documentation of this file.
1 #ifndef CSCCalibration_CSCThrTurnOnFcn_h
2 #define CSCCalibration_CSCThrTurnOnFcn_h
3 
4 
13 #include "Minuit2/FCNBase.h"
14 #include <vector>
15 
16 
17 
18 class CSCThrTurnOnFcn : public ROOT::Minuit2::FCNBase {
19 
20 private:
22  std::vector<float> xdata;
23  std::vector<float> ydata;
24  std::vector<float> ery;
25  float norm;
26 
27 public:
29  void setData(const std::vector<float> & x, const std::vector<float> & y) {
30  for(unsigned int i=0;i<x.size();i++) {
31  xdata.push_back(x[i]); ydata.push_back(y[i]);
32  }
33 };
34 
36  void setErrors(const std::vector<float> & er) {
37  for(unsigned int i=0;i<er.size();i++) ery.push_back(er[i]);
38  };
39 
41  void setNorm(float n) {norm=n;};
42 
44  virtual double operator() (const std::vector<double>&) const;
45 
47  virtual double Up() const {return 1.;}
48 
49 };
50 
51 #endif
int i
Definition: DBlmapReader.cc:9
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.
virtual double operator()(const std::vector< double > &) const
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.
virtual double Up() const
@ What?