CMS 3D CMS Logo

 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Groups 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 public:
24  // cache the current data
25  void SetData(const std::vector<BSTrkParameters>& a_BSvector) { fBSvector = a_BSvector; };
26  // define pdfs to use
27  void SetPDFs(std::string usepdfs) { fusepdfs = usepdfs; }
28 
29  double operator()(const std::vector<double>&) const override;
30  double Up() const override { return 1.; }
31 
32 private:
33  double PDFGauss_d(double z, double d, double sigmad, double phi, const std::vector<double>& parms) const;
34  double PDFGauss_d_resolution(double z, double d, double phi, double pt, const std::vector<double>& parms) const;
35 
36  double PDFGauss_z(double z, double sigmaz, const std::vector<double>& parms) const;
37 
39  std::vector<BSTrkParameters> fBSvector;
40 
41  static const int fPar_X0 = 0; //
42  static const int fPar_Y0 = 1; //
43  static const int fPar_Z0 = 2; // position of luminosity peak in z
44  static const int fPar_SigmaZ = 3; // sigma in z of the beam
45  static const int fPar_dxdz = 4; //
46  static const int fPar_dydz = 5; //
47  static const int fPar_SigmaBeam = 6; //
48  static const int fPar_c0 = 7; //
49  static const int fPar_c1 = 8; //
50 
51  //static const int fPar_Z0 = 0; // index of position of luminosity peak in z
52  //static const int fPar_SigmaZ = 1; // index of sigma in z of the beam
53  //static const int fPar_X0 = 2; //
54  //static const int fPar_Y0 = 3; //
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 
62 #endif
static const int fPar_dydz
Definition: BSpdfsFcn.h:46
static const int fPar_Y0
Definition: BSpdfsFcn.h:42
static const int fPar_X0
Definition: BSpdfsFcn.h:41
static const int fPar_dxdz
Definition: BSpdfsFcn.h:45
void SetPDFs(std::string usepdfs)
Definition: BSpdfsFcn.h:27
static const int fPar_c0
Definition: BSpdfsFcn.h:48
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:60
static const int fPar_SigmaZ
Definition: BSpdfsFcn.h:44
static const int fPar_SigmaBeam
Definition: BSpdfsFcn.h:47
tuple d
Definition: ztail.py:151
static const int fPar_c1
Definition: BSpdfsFcn.h:49
double PDFGauss_d_resolution(double z, double d, double phi, double pt, const std::vector< double > &parms) const
Definition: BSpdfsFcn.cc:38
std::string fusepdfs
Definition: BSpdfsFcn.h:38
static const int fPar_Z0
Definition: BSpdfsFcn.h:43
double Up() const override
Definition: BSpdfsFcn.h:30
double operator()(const std::vector< double > &) const override
Definition: BSpdfsFcn.cc:76
std::vector< BSTrkParameters > fBSvector
Definition: BSpdfsFcn.h:39
void SetData(const std::vector< BSTrkParameters > &a_BSvector)
Definition: BSpdfsFcn.h:25