CMS 3D CMS Logo

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 using namespace ROOT::Minuit2;
00024 
00025 
00026 class BSpdfsFcn : public FCNBase {
00027         
00028   public:
00029         // cache the current data
00030         void SetData(std::vector < BSTrkParameters > a_BSvector){
00031                 
00032                 fBSvector = a_BSvector;
00033                 
00034         };
00035         // define pdfs to use
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;  // position of luminosity peak in z
00058         static const int fPar_SigmaZ  = 3;  // sigma in z of the beam
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         //static const int fPar_Z0      = 0;  // index of position of luminosity peak in z
00066         //static const int fPar_SigmaZ  = 1;  // index of sigma in z of the beam
00067         //static const int fPar_X0      = 2;  // 
00068         //static const int fPar_Y0      = 3;  //
00069         //static const int fPar_dxdz    = 4;  // 
00070         //static const int fPar_dydz    = 5;  //
00071         //static const int fPar_SigmaBeam = 6;  // 
00072         //static const int fPar_c0      = 7;  //
00073         //static const int fPar_c1      = 8;  //
00074         
00075 };
00076 
00077 #endif

Generated on Tue Jun 9 17:46:01 2009 for CMSSW by  doxygen 1.5.4