00001 #ifndef BeamSpotProducer_BSpdfsFcn_h
00002 #define BeamSpotProducer_BSpdfsFcn_h
00003
00016 #include "Minuit2/FCNBase.h"
00017
00018 #include "RecoVertex/BeamSpotProducer/interface/BSTrkParameters.h"
00019
00020 #include <iostream>
00021 #include <string>
00022
00023 using namespace ROOT::Minuit2;
00024
00025
00026 class BSpdfsFcn : public FCNBase {
00027
00028 public:
00029
00030 void SetData(std::vector < BSTrkParameters > a_BSvector){
00031
00032 fBSvector = a_BSvector;
00033
00034 };
00035
00036 void SetPDFs(std::string usepdfs) {
00037 fusepdfs = usepdfs;
00038 }
00039
00040 virtual double operator() (const std::vector<double>&) const;
00041 virtual double Up() const {return 1.;}
00042
00043 private:
00044
00045 double PDFGauss_d(double z, double d, double sigmad,
00046 double phi, const std::vector<double>& parms) const;
00047 double PDFGauss_d_resolution(double z, double d,
00048 double phi, double pt, const std::vector<double>& parms) const;
00049
00050 double PDFGauss_z(double z, double sigmaz, const std::vector<double>& parms) const;
00051
00052 std::string fusepdfs;
00053 std::vector < BSTrkParameters > fBSvector;
00054
00055 static const int fPar_X0 = 0;
00056 static const int fPar_Y0 = 1;
00057 static const int fPar_Z0 = 2;
00058 static const int fPar_SigmaZ = 3;
00059 static const int fPar_dxdz = 4;
00060 static const int fPar_dydz = 5;
00061 static const int fPar_SigmaBeam = 6;
00062 static const int fPar_c0 = 7;
00063 static const int fPar_c1 = 8;
00064
00065
00066
00067
00068
00069
00070
00071
00072
00073
00074
00075 };
00076
00077 #endif