File indexing completed on 2024-10-10 23:05:30
0001 #ifndef BeamSpotProducer_BSpdfsFcn_h
0002 #define BeamSpotProducer_BSpdfsFcn_h
0003
0004
0005
0006
0007
0008
0009
0010
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
0025 void SetData(const std::vector<BSTrkParameters>& a_BSvector) { fBSvector = a_BSvector; };
0026
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;
0044 static const int fPar_SigmaZ = 3;
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
0052
0053
0054
0055
0056
0057
0058
0059
0060 };
0061
0062 #endif