Go to the documentation of this file.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 class BSpdfsFcn : public ROOT::Minuit2::FCNBase {
00024
00025 public:
00026
00027 void SetData(std::vector < BSTrkParameters > a_BSvector){
00028
00029 fBSvector = a_BSvector;
00030
00031 };
00032
00033 void SetPDFs(std::string usepdfs) {
00034 fusepdfs = usepdfs;
00035 }
00036
00037 virtual double operator() (const std::vector<double>&) const;
00038 virtual double Up() const {return 1.;}
00039
00040 private:
00041
00042 double PDFGauss_d(double z, double d, double sigmad,
00043 double phi, const std::vector<double>& parms) const;
00044 double PDFGauss_d_resolution(double z, double d,
00045 double phi, double pt, const std::vector<double>& parms) const;
00046
00047 double PDFGauss_z(double z, double sigmaz, const std::vector<double>& parms) const;
00048
00049 std::string fusepdfs;
00050 std::vector < BSTrkParameters > fBSvector;
00051
00052 static const int fPar_X0 = 0;
00053 static const int fPar_Y0 = 1;
00054 static const int fPar_Z0 = 2;
00055 static const int fPar_SigmaZ = 3;
00056 static const int fPar_dxdz = 4;
00057 static const int fPar_dydz = 5;
00058 static const int fPar_SigmaBeam = 6;
00059 static const int fPar_c0 = 7;
00060 static const int fPar_c1 = 8;
00061
00062
00063
00064
00065
00066
00067
00068
00069
00070
00071
00072 };
00073
00074 #endif