CMS 3D CMS Logo

 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Pages
BSpdfsFcn.h
Go to the documentation of this file.
1 #ifndef BeamSpotProducer_BSpdfsFcn_h
2 #define BeamSpotProducer_BSpdfsFcn_h
3 
15 #include "Minuit2/FCNBase.h"
16 
18 
19 #include <iostream>
20 #include <string>
21 
22 class BSpdfsFcn : public ROOT::Minuit2::FCNBase {
23 
24  public:
25  // cache the current data
26  void SetData(const std::vector < BSTrkParameters > &a_BSvector){
27 
28  fBSvector = a_BSvector;
29 
30  };
31  // define pdfs to use
32  void SetPDFs(std::string usepdfs) {
33  fusepdfs = usepdfs;
34  }
35 
36  virtual double operator() (const std::vector<double>&) const;
37  virtual double Up() const {return 1.;}
38 
39  private:
40 
41  double PDFGauss_d(double z, double d, double sigmad,
42  double phi, const std::vector<double>& parms) const;
43  double PDFGauss_d_resolution(double z, double d,
44  double phi, double pt, const std::vector<double>& parms) const;
45 
46  double PDFGauss_z(double z, double sigmaz, const std::vector<double>& parms) const;
47 
49  std::vector < BSTrkParameters > fBSvector;
50 
51  static const int fPar_X0 = 0; //
52  static const int fPar_Y0 = 1; //
53  static const int fPar_Z0 = 2; // position of luminosity peak in z
54  static const int fPar_SigmaZ = 3; // sigma in z of the beam
55  static const int fPar_dxdz = 4; //
56  static const int fPar_dydz = 5; //
57  static const int fPar_SigmaBeam = 6; //
58  static const int fPar_c0 = 7; //
59  static const int fPar_c1 = 8; //
60 
61  //static const int fPar_Z0 = 0; // index of position of luminosity peak in z
62  //static const int fPar_SigmaZ = 1; // index of sigma in z of the beam
63  //static const int fPar_X0 = 2; //
64  //static const int fPar_Y0 = 3; //
65  //static const int fPar_dxdz = 4; //
66  //static const int fPar_dydz = 5; //
67  //static const int fPar_SigmaBeam = 6; //
68  //static const int fPar_c0 = 7; //
69  //static const int fPar_c1 = 8; //
70 
71 };
72 
73 #endif
std::vector< BSTrkParameters > fBSvector
Definition: BSpdfsFcn.h:49
static const int fPar_dydz
Definition: BSpdfsFcn.h:56
static const int fPar_Y0
Definition: BSpdfsFcn.h:52
static const int fPar_X0
Definition: BSpdfsFcn.h:51
static const int fPar_dxdz
Definition: BSpdfsFcn.h:55
void SetPDFs(std::string usepdfs)
Definition: BSpdfsFcn.h:32
static const int fPar_c0
Definition: BSpdfsFcn.h:58
double PDFGauss_d(double z, double d, double sigmad, double phi, const std::vector< double > &parms) const
Definition: BSpdfsFcn.cc:20
double PDFGauss_z(double z, double sigmaz, const std::vector< double > &parms) const
Definition: BSpdfsFcn.cc:66
static const int fPar_SigmaZ
Definition: BSpdfsFcn.h:54
static const int fPar_SigmaBeam
Definition: BSpdfsFcn.h:57
virtual double operator()(const std::vector< double > &) const
Definition: BSpdfsFcn.cc:87
virtual double Up() const
Definition: BSpdfsFcn.h:37
static const int fPar_c1
Definition: BSpdfsFcn.h:59
double PDFGauss_d_resolution(double z, double d, double phi, double pt, const std::vector< double > &parms) const
Definition: BSpdfsFcn.cc:42
std::string fusepdfs
Definition: BSpdfsFcn.h:48
static const int fPar_Z0
Definition: BSpdfsFcn.h:53
void SetData(const std::vector< BSTrkParameters > &a_BSvector)
Definition: BSpdfsFcn.h:26