test
CMS 3D CMS Logo

 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Pages
FcnBeamSpotFitPV.h
Go to the documentation of this file.
1 #ifndef FcnBeamSpotFitPV_h_
2 #define FcnBeamSpotFitPV_h_
3 
18 #include "Minuit2/FCNBase.h"
19 
20 #include <vector>
21 
22 class FcnBeamSpotFitPV : public ROOT::Minuit2::FCNBase {
23 public:
24  // constructor from vertex data
25  FcnBeamSpotFitPV(const std::vector<BeamSpotFitPVData>& data);
27  // additional vertex selection using limits in x, y, z
28  void setLimits (float xmin, float xmax,
29  float ymin, float ymax,
30  float zmin, float zmax);
31  // deltaFcn for definition of the uncertainty
32  double Up() const {return errorDef_;}
33  // -2lnL value based on vector of parameters
34  double operator() (const std::vector<double>&) const;
35  // vertex count used for the fit (after selection)
36  unsigned int nrOfVerticesUsed () const;
37 private:
38  const std::vector<BeamSpotFitPVData>& data_; //< vertex data
39  double errorDef_; //< error definition for Minuit
40 
41  float lowerLimits_[3]; //< lower limits for x,y,z
42  float upperLimits_[3]; //< upper limits for x,y,z
43 };
44 #endif
FcnBeamSpotFitPV(const std::vector< BeamSpotFitPVData > &data)
double operator()(const std::vector< double > &) const
void setLimits(float xmin, float xmax, float ymin, float ymax, float zmin, float zmax)
unsigned int nrOfVerticesUsed() const
double Up() const
const std::vector< BeamSpotFitPVData > & data_