BOSS 8.0.0
BESIII Offline Software System
Loading...
Searching...
No Matches
Analysis/VertexFit/include/VertexFit/FastVertexFit.h
Go to the documentation of this file.
1#ifndef VertexFit_FastVertexFit_H
2#define VertexFit_FastVertexFit_H
3
4#include "CLHEP/Matrix/Matrix.h"
5#include "CLHEP/Matrix/SymMatrix.h"
6#include "CLHEP/Vector/ThreeVector.h"
7using CLHEP::Hep3Vector;
8using CLHEP::HepMatrix;
9using CLHEP::HepSymMatrix;
10using CLHEP::HepVector;
11#include "CLHEP/Geometry/Point3D.h"
12#ifndef ENABLE_BACKWARDS_COMPATIBILITY
13typedef HepGeom::Point3D<double> HepPoint3D;
14#endif
15#include "VertexFit/VertexParameter.h"
16#include <vector>
17
18class FastVertexFit {
19
20public:
21 // constructor & deconstructor
22 static FastVertexFit* instance();
24
25 // initialization, must be called before fit
26 void init();
27
28 // void initVertex(); //FIXME need?
29
30 // add track information
31 void addTrack( const int number, const HepVector helix, const HepSymMatrix err );
32
33 // fit function
34 bool Fit();
35
36 // Output
37 double chisq() const { return m_chisq; }
38 VertexParameter vtx() const { return m_vtx_infit; }
39 HepVector Vx() const { return m_Vx; }
40 HepSymMatrix Evx() const { return m_Evx; }
41 HepVector Pull() const;
42
43private:
44 void updateMatrices( const HepVector helix, const HepSymMatrix err );
45 // std::vector<HepVector> m_helix;
46 // std::vector<HepSymMatrix> m_err;
47 std::vector<HepMatrix> m_D;
48 std::vector<HepSymMatrix> m_W;
49 std::vector<HepSymMatrix> m_DTWD;
50 std::vector<HepVector> m_xp;
51
52private:
53 double m_chisq; // chisq in fitting
54 VertexParameter m_vtx_infit; // updated vertex parameters
55 HepVector m_Vx; // updated vertex position
56 HepSymMatrix m_Evx; // coviance matrix of updated vertex
57
58private:
59 FastVertexFit(); // constructor
60 static FastVertexFit* m_pointer; // pointer
61};
62
63#endif
HepGeom::Point3D< double > HepPoint3D
NTuple::Item< double > m_xp
static FastVertexFit * instance()
HepVector Pull() const
void addTrack(const int number, const HepVector helix, const HepSymMatrix err)