Back to home page

Project CMSSW displayed by LXR

 
 

    


File indexing completed on 2024-10-10 23:05:30

0001 #ifndef BeamSpotProducer_BSpdfsFcn_h
0002 #define BeamSpotProducer_BSpdfsFcn_h
0003 
0004 /**_________________________________________________________________
0005    class:   BSpdfsFcn.h
0006    package: RecoVertex/BeamSpotProducer
0007    
0008 
0009 
0010  author: Francisco Yumiceva, Fermilab (yumiceva@fnal.gov)
0011 
0012 
0013 ________________________________________________________________**/
0014 
0015 #include "Minuit2/FCNBase.h"
0016 
0017 #include "RecoVertex/BeamSpotProducer/interface/BSTrkParameters.h"
0018 
0019 #include <iostream>
0020 #include <string>
0021 
0022 class BSpdfsFcn : public ROOT::Minuit2::FCNBase {
0023 public:
0024   // cache the current data
0025   void SetData(const std::vector<BSTrkParameters>& a_BSvector) { fBSvector = a_BSvector; };
0026   // define pdfs to use
0027   void SetPDFs(std::string usepdfs) { fusepdfs = usepdfs; }
0028 
0029   double operator()(const std::vector<double>&) const override;
0030   double Up() const override { return 1.; }
0031 
0032 private:
0033   double PDFGauss_d(double z, double d, double sigmad, double phi, const std::vector<double>& parms) const;
0034   double PDFGauss_d_resolution(double z, double d, double phi, double pt, const std::vector<double>& parms) const;
0035 
0036   double PDFGauss_z(double z, double sigmaz, const std::vector<double>& parms) const;
0037 
0038   std::string fusepdfs;
0039   std::vector<BSTrkParameters> fBSvector;
0040 
0041   static const int fPar_X0 = 0;         //
0042   static const int fPar_Y0 = 1;         //
0043   static const int fPar_Z0 = 2;         // position of luminosity peak in z
0044   static const int fPar_SigmaZ = 3;     // sigma in z of the beam
0045   static const int fPar_dxdz = 4;       //
0046   static const int fPar_dydz = 5;       //
0047   static const int fPar_SigmaBeam = 6;  //
0048   static const int fPar_c0 = 7;         //
0049   static const int fPar_c1 = 8;         //
0050 
0051   //static const int fPar_Z0      = 0;  // index of position of luminosity peak in z
0052   //static const int fPar_SigmaZ  = 1;  // index of sigma in z of the beam
0053   //static const int fPar_X0      = 2;  //
0054   //static const int fPar_Y0      = 3;  //
0055   //static const int fPar_dxdz    = 4;  //
0056   //static const int fPar_dydz    = 5;  //
0057   //static const int fPar_SigmaBeam = 6;  //
0058   //static const int fPar_c0      = 7;  //
0059   //static const int fPar_c1      = 8;  //
0060 };
0061 
0062 #endif