00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018
00019
00020
00021
00022
00023
00024
00025
00026
00027
00028
00029
00030
00031
00032
00033
00034
00035
00036
00037
00038
00039
00040
00041
00042
00043
00044
00045
00046
00047
00048
00049
00050
00051
00052
00053
00054
00055
00056
00057
00058
00059
00060
00061
00062
00063
00064
00065
00066 #ifndef KVERTEXFITTER_H
00067 #define KVERTEXFITTER_H
00068 #include "kfitter/kfitterbase2.h"
00069
00070 class kvertexfitter : public kfitterbase2 {
00071 public:
00072 kvertexfitter(void);
00073 ~kvertexfitter(void);
00074
00075 unsigned fit(void);
00076 unsigned fit2(void);
00077 unsigned fit3(void);
00078 unsigned fit4(void);
00079
00080
00081 void initialVertex(const HepPoint3D&);
00082 unsigned mode(const unsigned);
00083 void beamProfile(const HepSymMatrix&);
00084 void vertexProfile(const HepSymMatrix&);
00085 void knownVertex(void);
00086
00087
00088 HepPoint3D vertex(const unsigned = KF_AFTER_FIT);
00089 HepSymMatrix errVertex(void);
00090 HepMatrix errVertexTrack(const unsigned);
00091 unsigned mode(void);
00092 double chisq(void);
00093 double chisq(const unsigned);
00094 double vertexChisq(void);
00095
00096 void clear(void);
00097
00098 #if KF_WITH_OLD_INTERFACE
00099 void set_initial_vertex(const Hep3Vector &v){ initialVertex(static_cast<const HepPoint3D&>(v)); }
00100 void set_initial_vertex(double x,double y,double z)
00101 { HepPoint3D t(x,y,z); initialVertex(t); }
00102
00103 Hep3Vector get_vertex(){ return static_cast<Hep3Vector>(vertex()); }
00104 double get_vx() { return vertex().x(); }
00105 double get_vy() { return vertex().y(); }
00106 double get_vz() { return vertex().z(); }
00107 HepSymMatrix get_err_vertex(){ return errVertex(); }
00108 double get_err_vertex(int i,int j){ return errVertex()[i][j]; }
00109 HepMatrix get_err_vertex_track(int i){ return errVertexTrack(i); }
00110 #endif //KF_WITH_OLD_INTERFACE
00111
00112
00113 double trackchisq(const unsigned int n,
00114 const bool usex=false, const bool usey=false, const bool usez=true);
00115 double chisq_wo_ip(const bool usex=false, const bool usey=false, const bool usez=true,
00116 const bool dont_use_chash = false);
00117 unsigned dgf_wo_ip(const bool usex=false, const bool usey=false, const bool usez=true);
00118 double cl_wo_ip(const bool usex=false, const bool usey=false, const bool usez=true);
00119
00120 double chisq_woip(const bool usex=false, const bool usey=false, const bool usez=true,
00121 const bool dont_use_chash = false){
00122 return chisq_wo_ip(usex, usey, usez, dont_use_chash);
00123 }
00124 unsigned dgf_woip(const bool usex=false, const bool usey=false, const bool usez=true){
00125 return dgf_wo_ip(usex, usey, usez);
00126 }
00127 double cl_woip(const bool usex=false, const bool usey=false, const bool usez=true){
00128 return cl_wo_ip(usex, usey, usez);
00129 }
00130
00131 private:
00132
00133 unsigned m_mode;
00134 double *m_eachChisq;
00135 double m_vertexChisq;
00136
00137
00138 HepPoint3D m_vertex_b;
00139
00140
00141 HepPoint3D m_vertex_a;
00142 HepSymMatrix m_errVertex_a;
00143 std::vector<HepMatrix> m_errVertexTrack_a;
00144
00145
00146 unsigned m_setInputMatrix(void);
00147 unsigned m_setInputSubMatrix(void);
00148
00149
00150 unsigned m_setOutputMatrix(void);
00151
00152
00153 unsigned m_makeCoreMatrix(void);
00154 unsigned m_calDgf(void);
00155
00156
00157 HepSymMatrix m_errBeam;
00158 unsigned m_beam;
00159
00160
00161 unsigned m_knownVertex;
00162 };
00163
00164 #endif