Main Page   Class Hierarchy   Compound List   File List   Compound Members  

kvertexfitter.h

00001 //
00002 // $Id: kvertexfitter.h,v 1.18 2002/06/10 14:04:18 sumisawa Exp $
00003 //
00004 // $Log: kvertexfitter.h,v $
00005 // Revision 1.18  2002/06/10 14:04:18  sumisawa
00006 // add functions which return modified chi2 (add functions with suffix "_woip")
00007 //
00008 // Revision 1.17  2002/06/04 12:56:05  sumisawa
00009 // add functions which return modified chi2
00010 //
00011 // Revision 1.16  2002/03/27 23:42:30  jtanaka
00012 // Add new fitter to the mass-constraint fit.
00013 //
00014 // Revision 1.15  2000/04/24 09:29:24  jtanaka
00015 // bug fix : calculation of each tracks in fit3() of kvertexfitter.
00016 // add vertexChisq() function.
00017 //
00018 // Revision 1.14  2000/03/07 17:09:14  jtanaka
00019 // bug fixed, use "similarity" etc.
00020 //
00021 // Revision 1.13  2000/03/07 10:52:38  katayama
00022 // compatibility with CC5.0
00023 //
00024 // Revision 1.12  1999/12/10 15:50:11  jtanaka
00025 // add refitter for slowpion to kvertexfitter and BF is changed sligthly
00026 //
00027 // Revision 1.11  1999/07/19 18:06:56  jtanaka
00028 // bug fix : chisq
00029 //
00030 // Revision 1.10  1999/07/19 15:58:35  jtanaka
00031 // added Mdst_charged
00032 //
00033 // Revision 1.9  1999/06/20 06:30:13  jtanaka
00034 // added beam position fit
00035 //
00036 // Revision 1.8  1999/05/26 12:02:29  jtanaka
00037 // speed up etc.
00038 //
00039 // Revision 1.7  1999/03/29 05:38:19  jtanaka
00040 // new class structure, new+old interfaces
00041 //
00042 // Revision 1.6  1998/09/28 13:26:08  jtanaka
00043 // bug fix in kmakemother.h and <vector.h> -> <vector>
00044 //
00045 // Revision 1.5  1998/09/08 11:52:08  jtanaka
00046 // non-const --> const
00047 //
00048 // Revision 1.4  1998/07/23 11:58:04  jtanaka
00049 // endif HEADER --> endif /* HEADER */
00050 //
00051 // Revision 1.3  1998/01/22 03:21:41  jtanaka
00052 // Updated from Tanaka san. New Interface etc.
00053 //
00054 // Revision 1.2  1997/10/24 07:05:10  katayama
00055 // Updated from Tanaka san. Bug fixes etc.
00056 //
00057 //
00058 // kvertexfitter of KFitter
00059 //
00060 // ver2.0  : 1998/01
00061 // ver3.0  : 1999/03
00062 //
00063 // author  : jtanaka
00064 // e-mail  : jtanaka@hep.phys.s.u-tokyo.ac.jp
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);  // large Matrix
00076   unsigned fit2(void); // small Matrix
00077   unsigned fit3(void); // small Matrix + Beam Position
00078   unsigned fit4(void); // small Matrix + known Vertex : for mainly slow pion
00079 
00080   //input interface
00081   void initialVertex(const HepPoint3D&);
00082   unsigned mode(const unsigned);
00083   void beamProfile(const HepSymMatrix&);
00084   void vertexProfile(const HepSymMatrix&); // = beamProfile
00085   void knownVertex(void);
00086 
00087   //output interface
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 // Add by T.N (2002/05/14)
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   //mode
00133   unsigned m_mode;
00134   double *m_eachChisq;
00135   double m_vertexChisq;
00136 
00137   //before fitting
00138   HepPoint3D m_vertex_b;
00139 
00140   //after fitting
00141   HepPoint3D   m_vertex_a;
00142   HepSymMatrix m_errVertex_a;
00143   std::vector<HepMatrix> m_errVertexTrack_a;
00144   
00145   //input functions
00146   unsigned m_setInputMatrix(void);
00147   unsigned m_setInputSubMatrix(void);
00148 
00149   //output functions
00150   unsigned m_setOutputMatrix(void);
00151 
00152   //fit functions
00153   unsigned m_makeCoreMatrix(void);
00154   unsigned m_calDgf(void);
00155 
00156   // beam profile
00157   HepSymMatrix m_errBeam;
00158   unsigned m_beam;
00159 
00160   // known vertex
00161   unsigned m_knownVertex;
00162 };
00163 
00164 #endif /* KVERTEXFITTER_H */

Generated on Tue Apr 13 13:25:32 2004 for ATLAS JAPAN by doxygen1.2.14 written by Dimitri van Heesch, © 1997-2002