BOSS 7.0.9
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: 2022-01-06 Thu 13:32:42 CST
7 * By: Hao-Kai SUN
8 * Update #: 85
9 * ============================== CODES ==============================>>> */
10#ifndef VERTEXFITREFINE_VERTEXFITREFINE_H
11#define VERTEXFITREFINE_VERTEXFITREFINE_H
12
13#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 // for virtual track, Lambda
41 void AddTrack(const int number, const WTrackParameter wtrk);
42
43 // add methods
44 void AddVertex(int number, VertexParameter vpar, std::vector<int> lis);
45 void AddVertex(int number, VertexParameter vpar, int n1, int n2);
46 void AddVertex(int number, VertexParameter vpar, int n1, int n2, int n3);
47 void AddVertex(int number, VertexParameter vpar, int n1, int n2, int n3,
48 int n4);
49 void AddVertex(int number, VertexParameter vpar, int n1, int n2, int n3,
50 int n4, int n5);
51 void AddVertex(int number, VertexParameter vpar, int n1, int n2, int n3,
52 int n4, int n5, int n6);
53 void AddVertex(int number, VertexParameter vpar, int n1, int n2, int n3,
54 int n4, int n5, int n6, int n7);
55 void AddVertex(int number, VertexParameter vpar, int n1, int n2, int n3,
56 int n4, int n5, int n6, int n7, int n8);
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);
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 void AddVertex(int number, VertexParameter vpar, int n1, int n2, int n3,
62 int n4, int n5, int n6, int n7, int n8, int n9, int n10,
63 int n11);
64 void AddVertex(int number, VertexParameter vpar, int n1, int n2, int n3,
65 int n4, int n5, int n6, int n7, int n8, int n9, int n10,
66 int n11, int n12);
67 void AddBeamFit(int number, VertexParameter vpar, int n);
68
69 // set iteration number and chisq cut
70 void setIterNumber(const int niter = 10);
71 void setChisqCut(const double chicut = 1000, const double chiter = 1.0e-3);
72 void setMagCorrFactor(const double factor = 1.000);
73
74 bool Fit();
75 bool Fit(int n);
76
77 // get
78 double chisq() const;
79 double chisq(int n) const;
80
81 // updated WTrack parameter in vertex fit
82 HepLorentzVector pfit(int n) const;
83 HepPoint3D xfit(int n) const;
84 HepVector w(int n) const;
85 HepSymMatrix Ew(int n) const;
86 WTrackParameter wtrk(int n) const;
87
88 // updated Vertex Parameter in vertex fit
89 HepPoint3D vx(int n) const;
90 HepVector Vx(int n) const;
91 HepSymMatrix Evx(int n) const;
92 double errorVx(int n, int i) const;
93 VertexParameter vpar(int n) const;
94
95 // virtual particle from Vertex Fit
97
98 // debug
99 int getPath() const;
100
101 private:
102 // Singleton
104 static VertexFitRefine* m_instance;
105
106 VertexFit* vtxfit;
107 VertexExtrapolate* vtxext;
108
109 // static const double beampipe; // = 3.111;
110 static const double obeampipe; // = 3.370 + 0.0130 * 3;
111 // 6.3000 + 0.0130*3 cm inner mdc chamber wall
112 // static const double innerwall; // = 6.290 - 0.0130 * 3;
113 // static const double oinnerwall; // = 6.425 + 0.0130 * 3;
114
115 std::vector<int> m_trkIdxOrigin;
116 std::vector<RecMdcKalTrack*> m_tracksOrigin;
117 std::vector<RecMdcKalTrack::PidType> m_trkPidOrigin;
118 std::vector<WTrackParameter> m_wtrkInfit;
119 std::vector<HepLorentzVector> m_p4Infit;
120 std::vector<HepPoint3D> m_x3Infit;
121
122 // int m_vtxidx;
123 std::vector<VertexParameter> m_vtxsOrigin;
124
125 // debug
126 int thePath;
127};
128
129// forward declarations, inline definitions
131
132#endif /* VERTEXFITREFINE_VERTEXFITREFINE_H */
133/* ===================================================================<<< */
134/* ==================== VertexFitRefine.h ends here ===================== */
const Int_t n
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