BOSS 7.0.8
BESIII Offline Software System
Loading...
Searching...
No Matches
VertexFitRefine.h
Go to the documentation of this file.
1/* <===<===<===<===<===<===<===<===<===~===>===>===>===>===>===>===>===>===>
2 * File Name: VertexFitRefine.h
3 * Author: Hao-Kai SUN
4 * Created: 2021-09-07 Tue 23:47:01 CST
5 * <<=====================================>>
6 * Last Updated: 2021-10-28 Thu 12:12:24 CST
7 * By: Hao-Kai SUN <[email protected]>
8 * Update #: 81
9 * ============================== CODES ==============================>>> */
10#ifndef VERTEXFIT_VERTEXFITREFINE_H
11#define VERTEXFIT_VERTEXFITREFINE_H
12
14#include "VertexFit/VertexFit.h"
15
16namespace VTXPDGM {
17extern const double& electron;
18extern const double& muon;
19extern const double& pion;
20extern const double& kaon;
21extern const double& proton;
22
23extern const double empikp[5];
24extern const double empikp2[5];
25} // namespace VTXPDGM
26
28{
29 friend class VertexFit;
30
31 public:
32 static VertexFitRefine* instance();
34
35 // initialization, cleanup.
36 void init();
37
38 void AddTrack(const int index, RecMdcKalTrack* p,
39 const RecMdcKalTrack::PidType pid);
40
41 // add methods
42 void AddVertex(int number, VertexParameter vpar, std::vector<int> lis);
43 void AddVertex(int number, VertexParameter vpar, int n1, int n2);
44 void AddVertex(int number, VertexParameter vpar, int n1, int n2, int n3);
45 void AddVertex(int number, VertexParameter vpar, int n1, int n2, int n3,
46 int n4);
47 void AddVertex(int number, VertexParameter vpar, int n1, int n2, int n3,
48 int n4, int n5);
49 void AddVertex(int number, VertexParameter vpar, int n1, int n2, int n3,
50 int n4, int n5, int n6);
51 void AddVertex(int number, VertexParameter vpar, int n1, int n2, int n3,
52 int n4, int n5, int n6, int n7);
53 void AddVertex(int number, VertexParameter vpar, int n1, int n2, int n3,
54 int n4, int n5, int n6, int n7, int n8);
55 void AddVertex(int number, VertexParameter vpar, int n1, int n2, int n3,
56 int n4, int n5, int n6, int n7, int n8, int n9);
57 void AddVertex(int number, VertexParameter vpar, int n1, int n2, int n3,
58 int n4, int n5, int n6, int n7, int n8, int n9, int n10);
59 void AddVertex(int number, VertexParameter vpar, int n1, int n2, int n3,
60 int n4, int n5, int n6, int n7, int n8, int n9, int n10,
61 int n11);
62 void AddVertex(int number, VertexParameter vpar, int n1, int n2, int n3,
63 int n4, int n5, int n6, int n7, int n8, int n9, int n10,
64 int n11, int n12);
65 void AddBeamFit(int number, VertexParameter vpar, int n);
66
67 // set iteration number and chisq cut
68 void setIterNumber(const int niter = 10);
69 void setChisqCut(const double chicut = 1000, const double chiter = 1.0e-3);
70 void setMagCorrFactor(const double factor = 1.000);
71
72 bool Fit();
73 bool Fit(int n);
74
75 // get
76 double chisq() const;
77 double chisq(int n) const;
78
79 // updated WTrack parameter in vertex fit
80 HepLorentzVector pfit(int n) const;
81 HepPoint3D xfit(int n) const;
82 HepVector w(int n) const;
83 HepSymMatrix Ew(int n) const;
84 WTrackParameter wtrk(int n) const;
85
86 // updated Vertex Parameter in vertex fit
87 HepPoint3D vx(int n) const;
88 HepVector Vx(int n) const;
89 HepSymMatrix Evx(int n) const;
90 double errorVx(int n, int i) const;
91 VertexParameter vpar(int n) const;
92
93 // virtual particle from Vertex Fit
95
96 // debug
97 int getPath() const;
98
99 private:
100 // Singleton
102 static VertexFitRefine* m_instance;
103
104 VertexFit* vtxfit;
105 VertexExtrapolate* vtxext;
106
107 // static const double beampipe; // = 3.111;
108 static const double obeampipe; // = 3.370 + 0.0130 * 3;
109 // 6.3000 + 0.0130*3 cm inner mdc chamber wall
110 // static const double innerwall; // = 6.290 - 0.0130 * 3;
111 // static const double oinnerwall; // = 6.425 + 0.0130 * 3;
112
113 std::vector<int> m_trkIdxOrigin;
114 std::vector<RecMdcKalTrack*> m_tracksOrigin;
115 std::vector<RecMdcKalTrack::PidType> m_trkPidOrigin;
116 std::vector<WTrackParameter> m_wtrkInfit;
117 std::vector<HepLorentzVector> m_p4Infit;
118 std::vector<HepPoint3D> m_x3Infit;
119
120 // int m_vtxidx;
121 std::vector<VertexParameter> m_vtxsOrigin;
122
123 // debug
124 int thePath;
125};
126
127// forward declarations, inline definitions
129
130#endif /* VERTEXFIT_VERTEXFITREFINE_H */
131/* ===================================================================<<< */
132/* ==================== VertexFitRefine.h ends here ===================== */
const Int_t n
double w
int n2
Definition: SD0Tag.cxx:55
int n1
Definition: SD0Tag.cxx:54
WTrackParameter wVirtualTrack(int n) const
HepSymMatrix Ew(int n) const
HepVector Vx(int n) const
HepLorentzVector pfit(int n) const
double chisq() const
void AddTrack(const int index, RecMdcKalTrack *p, const RecMdcKalTrack::PidType pid)
HepSymMatrix Evx(int n) const
void setChisqCut(const double chicut=1000, const double chiter=1.0e-3)
WTrackParameter wtrk(int n) const
void setMagCorrFactor(const double factor=1.000)
static VertexFitRefine * instance()
void AddBeamFit(int number, VertexParameter vpar, int n)
void setIterNumber(const int niter=10)
HepPoint3D xfit(int n) const
void AddVertex(int number, VertexParameter vpar, std::vector< int > lis)
double errorVx(int n, int i) const
VertexParameter vpar(int n) const
int getPath() const
HepPoint3D vx(int n) const
const double & electron
const double & muon
const double & kaon
const double empikp[5]
const double & pion
const double empikp2[5]
const double & proton