1#ifndef VertexFit_VertexFit_H
2#define VertexFit_VertexFit_H
45 void AddVertex(
int number,
VertexParameter vpar,
int n1,
int n2,
int n3,
int n4,
int n5,
int n6,
int n7,
int n8,
int n9);
46 void AddVertex(
int number,
VertexParameter vpar,
int n1,
int n2,
int n3,
int n4,
int n5,
int n6,
int n7,
int n8,
int n9,
int n10);
47 void AddVertex(
int number,
VertexParameter vpar,
int n1,
int n2,
int n3,
int n4,
int n5,
int n6,
int n7,
int n8,
int n9,
int n10,
int n11);
48 void AddVertex(
int number,
VertexParameter vpar,
int n1,
int n2,
int n3,
int n4,
int n5,
int n6,
int n7,
int n8,
int n9,
int n10,
int n11,
int n12);
56 void setChisqCut(
const double chicut = 1000,
const double chiter = 1.0e-3) { m_chicut = chicut;m_chiter=chiter; }
64 void Swim(
int n){ vertexCovMatrix(
n); swimVertex(
n);}
71 double chisq()
const {
return m_chi;}
72 double chisq(
int n)
const {
return m_chisq[
n];}
77 bool pull(
int n,
int itk, HepVector& p);
87 HepVector
cpu()
const {
return m_cpu;}
91 HepVector
Vx(
int n)
const {
return m_vpar_infit[
n].Vx();}
92 HepSymMatrix
Evx(
int n)
const {
return m_vpar_infit[
n].Evx();}
93 double errorVx(
int n,
int i)
const {
return sqrt((m_vpar_infit[
n].
Evx())[i][i]);}
104 void fitVertex(
int n);
106 void vertexCovMatrix(
int n);
108 void swimVertex(
int n);
111 void swimBeam(
int n);
114 std::vector<VertexParameter> m_vpar_origin;
116 std::vector<VertexParameter> m_vpar_infit;
118 std::vector<VertexConstraints> m_vc;
120 std::vector<double> m_chisq;
124 std::vector<WTrackParameter> m_virtual_wtrk;
129 HepSymMatrix m_xcovOrigin;
130 HepSymMatrix m_xcovOriginInversed;
131 inline HepVector xOrigin()
const {
return m_xOrigin;}
132 inline void setXOrigin(
const HepVector &x) { m_xOrigin =
x;}
133 inline HepSymMatrix xcovOrigin()
const {
return m_xcovOrigin;}
134 inline void setXCovOrigin(
const HepSymMatrix &
v) {m_xcovOrigin =
v;}
135 inline HepSymMatrix xcovOriginInversed()
const {
return m_xcovOriginInversed;}
136 inline void setXCovOriginInversed(
const HepSymMatrix &
v){m_xcovOriginInversed =
v;}
140 HepSymMatrix m_xcovInfit;
141 HepSymMatrix m_xcovInfitInversed;
142 inline HepVector xInfit()
const {
return m_xInfit;}
143 inline void setXInfit(
const HepVector &x) {m_xInfit =
x;}
144 inline HepSymMatrix xcovInfit()
const {
return m_xcovInfit;}
145 void setXCovInfit(
const HepSymMatrix &
v) {m_xcovInfit =
v;}
146 inline HepSymMatrix xcovInfitInversed()
const {
return m_xcovInfitInversed;}
147 void setXCovInfitInversed(
const HepSymMatrix &
v) {m_xcovInfitInversed =
v;}
151 HepSymMatrix m_pcovOrigin;
152 inline HepVector pOrigin(
int i)
const {
return m_pOrigin.sub(i*NTRKPAR+1, (i+1)*NTRKPAR); }
153 inline void setPOrigin(
int i,
const HepVector &p) { m_pOrigin.sub(i*NTRKPAR+1, p); }
154 inline HepSymMatrix pcovOrigin(
int i)
const {
return m_pcovOrigin.sub(i*NTRKPAR+1, (i+1)*NTRKPAR); }
155 inline void setPCovOrigin(
int i,
const HepSymMatrix &
v) { m_pcovOrigin.sub(i*NTRKPAR+1,
v); }
159 HepSymMatrix m_pcovInfit;
160 inline HepVector pInfit(
int i)
const {
return m_pInfit.sub(i*NTRKPAR+1, (i+1)*NTRKPAR); }
161 inline void setPInfit(
int i,
const HepVector &p) { m_pInfit.sub(i*NTRKPAR+1, p); }
162 inline HepSymMatrix pcovInfit(
int i)
const {
return m_pcovInfit.sub(i*NTRKPAR+1, (i+1)*NTRKPAR); }
163 inline void setPCovInfit(
int i,
const HepSymMatrix &
v) { m_pcovInfit.sub(i*NTRKPAR+1,
v); }
167 inline HepMatrix vfB(
int i)
const {
return m_B.sub(i*NCONSTR+1, (i+1)*NCONSTR, 1, NVTXPAR);}
168 inline void setB(
int i,
const HepMatrix &e) {m_B.sub(i*NCONSTR+1, 1, e);}
171 inline HepMatrix vfBT(
int i)
const {
return m_BT.sub(1, NVTXPAR, i*NCONSTR+1, (i+1)*NCONSTR);}
172 inline void setBT(
int i,
const HepMatrix &e) {m_BT.sub(1, i*NCONSTR+1, e);}
175 inline HepMatrix vfA(
int i)
const {
return m_A.sub(i*NCONSTR+1, (i+1)*NCONSTR, i*NTRKPAR+1, (i+1)*NTRKPAR);}
176 inline void setA(
int i,
const HepMatrix &d) {m_A.sub(i*NCONSTR+1, i*NTRKPAR+1, d);}
179 inline HepMatrix vfAT(
int i)
const {
return m_AT.sub(i*NTRKPAR+1, (i+1)*NTRKPAR, i*NCONSTR+1, (i+1)*NCONSTR);}
180 inline void setAT(
int i,
const HepMatrix &d) {m_AT.sub(i*NTRKPAR+1, i*NCONSTR+1, d);}
183 inline HepMatrix vfKQ(
int i)
const {
return m_KQ.sub(1, NVTXPAR, i*NCONSTR+1, (i+1)*NCONSTR);}
184 inline void setKQ(
int i,
const HepMatrix &d) {m_KQ.sub(1, i*NCONSTR+1, d);}
187 inline HepVector vfG(
int i)
const {
return m_G.sub(i*NCONSTR+1, (i+1)*NCONSTR);}
188 inline void setG(
int i,
const HepVector &p) {m_G.sub(i*NCONSTR+1, p);}
191 inline HepSymMatrix vfW(
int i)
const {
return m_W.sub(i*NCONSTR+1, (i+1)*NCONSTR);}
192 inline void setW(
int i, HepSymMatrix &m) {m_W.sub(i*NCONSTR+1, m);}
195 inline HepMatrix vfE(
int i)
const {
return m_E.sub(i*NTRKPAR+1, (i+1)*NTRKPAR, 1, NVTXPAR);}
196 inline void setE(
int i,
const HepMatrix &p){m_E.sub(i*NTRKPAR+1, 1, p);}
203 HepVector Convert67(
const double &
mass,
const HepVector &p);
206 HepVector Convert76(
const HepVector &p);
218 static const int NTRKPAR;
219 static const int NVTXPAR;
220 static const int NCONSTR;
**********Class see also m_nmax DOUBLE PRECISION m_amel DOUBLE PRECISION m_x2 DOUBLE PRECISION m_alfinv DOUBLE PRECISION m_Xenph INTEGER m_KeyWtm INTEGER m_idyfs DOUBLE PRECISION m_zini DOUBLE PRECISION m_q2 DOUBLE PRECISION m_Wt_KF DOUBLE PRECISION m_WtCut INTEGER m_KFfin *COMMON c_KarLud $ !Input CMS energy[GeV] $ !CMS energy after beam spread beam strahlung[GeV] $ !Beam energy spread[GeV] $ !z boost due to beam spread $ !electron beam mass *ff pair spectrum $ !minimum v
std::vector< WTrackParameter > wTrackInfit() const
WTrackParameter wtrk(int n) const
HepVector Vx(int n) const
HepSymMatrix Ew(int n) const
void setIterNumber(const int niter=10)
double chisq(int n) const
WTrackParameter wVirtualTrack(int n) const
void AddBeamFit(int number, VertexParameter vpar, int n)
void AddVertex(int number, VertexParameter vpar, std::vector< int > lis)
HepSymMatrix Evx(int n) const
bool pull(int n, int itk, HepVector &p)
HepPoint3D vx(int n) const
HepLorentzVector pfit(int n) const
HepPoint3D xfit(int n) const
static VertexFit * instance()
VertexParameter vpar(int n) const
void BuildVirtualParticle(int number)
void setChisqCut(const double chicut=1000, const double chiter=1.0e-3)
double errorVx(int n, int i) const