CMS 3D CMS Logo

/data/refman/pasoursint/CMSSW_6_1_2_SLHC4_patch1/src/RecoVertex/BeamSpotProducer/interface/BSpdfsFcn.h

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         // cache the current data
00027         void SetData(std::vector < BSTrkParameters > a_BSvector){
00028                 
00029                 fBSvector = a_BSvector;
00030                 
00031         };
00032         // define pdfs to use
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;  // position of luminosity peak in z
00055         static const int fPar_SigmaZ  = 3;  // sigma in z of the beam
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         //static const int fPar_Z0      = 0;  // index of position of luminosity peak in z
00063         //static const int fPar_SigmaZ  = 1;  // index of sigma in z of the beam
00064         //static const int fPar_X0      = 2;  // 
00065         //static const int fPar_Y0      = 3;  //
00066         //static const int fPar_dxdz    = 4;  // 
00067         //static const int fPar_dydz    = 5;  //
00068         //static const int fPar_SigmaBeam = 6;  // 
00069         //static const int fPar_c0      = 7;  //
00070         //static const int fPar_c1      = 8;  //
00071         
00072 };
00073 
00074 #endif