1#ifndef VertexFit_VertexFit_H
2#define VertexFit_VertexFit_H
5#include "VertexFit/WTrackParameter.h"
6#include "VertexFit/VertexParameter.h"
7#include "VertexFit/VertexConstraints.h"
8#include "VertexFit/TrackPool.h"
37 void AddVertex(
int number,
VertexParameter vpar,
int n1,
int n2,
int n3,
int n4,
int n5,
int n6,
int n7,
int n8,
int n9);
38 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);
39 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);
40 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);
48 void setChisqCut(
const double chicut = 1000,
const double chiter = 1.0e-3) { m_chicut = chicut;m_chiter = chiter; }
50 double factor()
const {
return m_factor; }
58 void Swim(
int n){ vertexCovMatrix(
n); swimVertex(
n);}
65 double chisq()
const {
return m_chi;}
66 double chisq(
int n)
const {
return m_chisq[
n];}
71 bool pull(
int n,
int itk, HepVector& p);
81 HepVector
cpu()
const {
return m_cpu;}
85 HepVector
Vx(
int n)
const {
return m_vpar_infit[
n].Vx();}
86 HepSymMatrix
Evx(
int n)
const {
return m_vpar_infit[
n].Evx();}
87 double errorVx(
int n,
int i)
const {
return sqrt((m_vpar_infit[
n].
Evx())[i][i]);}
98 void fitVertex(
int n);
100 void vertexCovMatrix(
int n);
102 void swimVertex(
int n);
105 void swimBeam(
int n);
108 std::vector<VertexParameter> m_vpar_origin;
110 std::vector<VertexParameter> m_vpar_infit;
112 std::vector<VertexConstraints> m_vc;
114 std::vector<double> m_chisq;
118 std::vector<WTrackParameter> m_virtual_wtrk;
123 HepSymMatrix m_xcovOrigin;
124 HepSymMatrix m_xcovOriginInversed;
125 inline HepVector xOrigin()
const {
return m_xOrigin;}
126 inline void setXOrigin(
const HepVector &x) { m_xOrigin =
x;}
127 inline HepSymMatrix xcovOrigin()
const {
return m_xcovOrigin;}
128 inline void setXCovOrigin(
const HepSymMatrix &
v) {m_xcovOrigin =
v;}
129 inline HepSymMatrix xcovOriginInversed()
const {
return m_xcovOriginInversed;}
130 inline void setXCovOriginInversed(
const HepSymMatrix &
v){m_xcovOriginInversed =
v;}
134 HepSymMatrix m_xcovInfit;
135 HepSymMatrix m_xcovInfitInversed;
136 inline HepVector xInfit()
const {
return m_xInfit;}
137 inline void setXInfit(
const HepVector &x) {m_xInfit =
x;}
138 inline HepSymMatrix xcovInfit()
const {
return m_xcovInfit;}
139 void setXCovInfit(
const HepSymMatrix &
v) {m_xcovInfit =
v;}
140 inline HepSymMatrix xcovInfitInversed()
const {
return m_xcovInfitInversed;}
141 void setXCovInfitInversed(
const HepSymMatrix &
v) {m_xcovInfitInversed =
v;}
145 HepSymMatrix m_pcovOrigin;
146 inline HepVector pOrigin(
int i)
const {
return m_pOrigin.sub(i*NTRKPAR+1, (i+1)*NTRKPAR); }
147 inline void setPOrigin(
int i,
const HepVector &p) { m_pOrigin.sub(i*NTRKPAR+1, p); }
148 inline HepSymMatrix pcovOrigin(
int i)
const {
return m_pcovOrigin.sub(i*NTRKPAR+1, (i+1)*NTRKPAR); }
149 inline void setPCovOrigin(
int i,
const HepSymMatrix &
v) { m_pcovOrigin.sub(i*NTRKPAR+1,
v); }
153 HepSymMatrix m_pcovInfit;
154 inline HepVector pInfit(
int i)
const {
return m_pInfit.sub(i*NTRKPAR+1, (i+1)*NTRKPAR); }
155 inline void setPInfit(
int i,
const HepVector &p) { m_pInfit.sub(i*NTRKPAR+1, p); }
156 inline HepSymMatrix pcovInfit(
int i)
const {
return m_pcovInfit.sub(i*NTRKPAR+1, (i+1)*NTRKPAR); }
157 inline void setPCovInfit(
int i,
const HepSymMatrix &
v) { m_pcovInfit.sub(i*NTRKPAR+1,
v); }
161 inline HepMatrix vfB(
int i)
const {
return m_B.sub(i*NCONSTR+1, (i+1)*NCONSTR, 1, NVTXPAR);}
162 inline void setB(
int i,
const HepMatrix &e) {m_B.sub(i*NCONSTR+1, 1, e);}
165 inline HepMatrix vfBT(
int i)
const {
return m_BT.sub(1, NVTXPAR, i*NCONSTR+1, (i+1)*NCONSTR);}
166 inline void setBT(
int i,
const HepMatrix &e) {m_BT.sub(1, i*NCONSTR+1, e);}
169 inline HepMatrix vfA(
int i)
const {
return m_A.sub(i*NCONSTR+1, (i+1)*NCONSTR, i*NTRKPAR+1, (i+1)*NTRKPAR);}
170 inline void setA(
int i,
const HepMatrix &d) {m_A.sub(i*NCONSTR+1, i*NTRKPAR+1, d);}
173 inline HepMatrix vfAT(
int i)
const {
return m_AT.sub(i*NTRKPAR+1, (i+1)*NTRKPAR, i*NCONSTR+1, (i+1)*NCONSTR);}
174 inline void setAT(
int i,
const HepMatrix &d) {m_AT.sub(i*NTRKPAR+1, i*NCONSTR+1, d);}
177 inline HepMatrix vfKQ(
int i)
const {
return m_KQ.sub(1, NVTXPAR, i*NCONSTR+1, (i+1)*NCONSTR);}
178 inline void setKQ(
int i,
const HepMatrix &d) {m_KQ.sub(1, i*NCONSTR+1, d);}
181 inline HepVector vfG(
int i)
const {
return m_G.sub(i*NCONSTR+1, (i+1)*NCONSTR);}
182 inline void setG(
int i,
const HepVector &p) {m_G.sub(i*NCONSTR+1, p);}
185 inline HepSymMatrix vfW(
int i)
const {
return m_W.sub(i*NCONSTR+1, (i+1)*NCONSTR);}
186 inline void setW(
int i, HepSymMatrix &m) {m_W.sub(i*NCONSTR+1, m);}
189 inline HepMatrix vfE(
int i)
const {
return m_E.sub(i*NTRKPAR+1, (i+1)*NTRKPAR, 1, NVTXPAR);}
190 inline void setE(
int i,
const HepMatrix &p){m_E.sub(i*NTRKPAR+1, 1, p);}
196 HepVector Convert67(
const double &
mass,
const HepVector &p);
199 HepVector Convert76(
const HepVector &p);
211 static const int NTRKPAR;
212 static const int NVTXPAR;
213 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
static VertexFit * instance()
HepVector Vx(int n) const
void AddVertex(int number, VertexParameter vpar, int n1, int n2, int n3, int n4, int n5, int n6, int n7, int n8)
HepSymMatrix Ew(int n) const
void setIterNumber(const int niter=10)
void AddVertex(int number, VertexParameter vpar, int n1, int n2, int n3, int n4, int n5)
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)
double chisq(int n) const
WTrackParameter wVirtualTrack(int n) const
void AddBeamFit(int number, VertexParameter vpar, int n)
void AddVertex(int number, VertexParameter vpar, int n1, int n2, int n3, int n4, int n5, int n6, int n7)
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
void AddVertex(int number, VertexParameter vpar, int n1, int n2, int n3, int n4)
HepLorentzVector pfit(int n) const
void AddVertex(int number, VertexParameter vpar, int n1, int n2, int n3, int n4, int n5, int n6, int n7, int n8, int n9)
HepPoint3D xfit(int n) const
void AddVertex(int number, VertexParameter vpar, int n1, int n2, int n3)
void AddVertex(int number, VertexParameter vpar, int n1, int n2, int n3, int n4, int n5, int n6)
void setMagCorrFactor(const double factor=1.000)
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)
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)
void AddVertex(int number, VertexParameter vpar, int n1, int n2)
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