00001 #ifndef FcnBeamSpotFitPV_h_ 00002 #define FcnBeamSpotFitPV_h_ 00003 00017 #include "RecoVertex/BeamSpotProducer/interface/BeamSpotFitPVData.h" 00018 #include "Minuit2/FCNBase.h" 00019 00020 #include <vector> 00021 00022 class FcnBeamSpotFitPV : public ROOT::Minuit2::FCNBase { 00023 public: 00024 // constructor from vertex data 00025 FcnBeamSpotFitPV(const std::vector<BeamSpotFitPVData>& data); 00026 ~FcnBeamSpotFitPV() {} 00027 // additional vertex selection using limits in x, y, z 00028 void setLimits (float xmin, float xmax, 00029 float ymin, float ymax, 00030 float zmin, float zmax); 00031 // deltaFcn for definition of the uncertainty 00032 double Up() const {return errorDef_;} 00033 // -2lnL value based on vector of parameters 00034 double operator() (const std::vector<double>&) const; 00035 // vertex count used for the fit (after selection) 00036 unsigned int nrOfVerticesUsed () const; 00037 private: 00038 const std::vector<BeamSpotFitPVData>& data_; //< vertex data 00039 double errorDef_; //< error definition for Minuit 00040 00041 float lowerLimits_[3]; //< lower limits for x,y,z 00042 float upperLimits_[3]; //< upper limits for x,y,z 00043 }; 00044 #endif