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 #ifndef KFITTERPARTICLE_H
00036 #define KFITTERPARTICLE_H
00037 #include "kfitter/kfitter_ini.h"
00038 #include <iostream>
00039 #include "CLHEP/Matrix/Matrix.h"
00040 #include "CLHEP/Matrix/SymMatrix.h"
00041 #include "CLHEP/Vector/ThreeVector.h"
00042 #include "CLHEP/Vector/LorentzVector.h"
00043 #ifndef CLHEP_POINT3D_H
00044 #include "CLHEP/Geometry/Point3D.h"
00045 #endif
00046
00047 class kfitterparticle{
00048 public:
00049
00050 kfitterparticle(void);
00051 kfitterparticle(const HepLorentzVector &p,
00052 const HepPoint3D &x,
00053 const HepSymMatrix &e,
00054 const double q,
00055 const unsigned = KF_BEFORE_FIT);
00056 #if KF_WITH_OLD_INTERFACE
00057 kfitterparticle(const HepLorentzVector&,
00058 const HepPoint3D&,
00059 const HepSymMatrix&,
00060 const double,
00061 const double,
00062 const unsigned = KF_BEFORE_FIT);
00063
00064 #endif
00065 kfitterparticle(const kfitterparticle&);
00066
00067 virtual ~kfitterparticle(void){};
00068
00069
00070 void momentum(const HepLorentzVector&,
00071 const unsigned = KF_BEFORE_FIT);
00072 void position(const HepPoint3D&,
00073 const unsigned = KF_BEFORE_FIT);
00074 void error(const HepSymMatrix&,
00075 const unsigned = KF_BEFORE_FIT);
00076 void charge(const double);
00077
00078 void vertex(const HepPoint3D&);
00079 void errVertex(const HepSymMatrix&);
00080
00081
00082 HepLorentzVector momentum(const unsigned = KF_AFTER_FIT);
00083 HepLorentzVector momentum(const unsigned = KF_AFTER_FIT) const;
00084 HepPoint3D position(const unsigned = KF_AFTER_FIT);
00085 HepPoint3D position(const unsigned = KF_AFTER_FIT) const;
00086 HepSymMatrix error(const unsigned = KF_AFTER_FIT);
00087 HepSymMatrix error(const unsigned = KF_AFTER_FIT) const;
00088 double charge(void);
00089 double charge(void) const;
00090 double mass(void);
00091 double mass(void) const;
00092 HepPoint3D vertex(void);
00093 HepPoint3D vertex(void) const;
00094 HepSymMatrix errVertex(void);
00095 HepSymMatrix errVertex(void) const;
00096 HepMatrix mompos(const unsigned);
00097 HepMatrix mompos(const unsigned) const;
00098
00099
00100 double getFitParameter(const unsigned,
00101 const unsigned);
00102 double getFitParameter(const unsigned,
00103 const unsigned) const;
00104 HepMatrix getFitParameter(const unsigned);
00105 HepMatrix getFitParameter(const unsigned) const;
00106 HepSymMatrix getFitError(const unsigned);
00107 HepSymMatrix getFitError(const unsigned) const;
00108
00109
00110 kfitterparticle & operator = (const kfitterparticle &);
00111
00112 #if KF_WITH_OLD_INTERFACE
00113 void set_4momentum(const HepLorentzVector &p) { momentum(p); }
00114 void set_position(const Hep3Vector &x) { position(static_cast<const HepPoint3D&>(x)); }
00115 void set_error(const HepSymMatrix &e) { error(e); }
00116 void set_4momentum(int f, const HepLorentzVector &p) { f==0 ? momentum(p) : momentum(p,KF_AFTER_FIT); }
00117 void set_position(int f, const Hep3Vector &x) { f==0 ? position(static_cast<const HepPoint3D&>(x)) : position(static_cast<const HepPoint3D&>(x),KF_AFTER_FIT); }
00118 void set_error(int f, const HepSymMatrix &e) { f==0 ? error(e) : error(e,KF_AFTER_FIT); }
00119
00120 void set_vertex(const Hep3Vector &v) { vertex(static_cast<const HepPoint3D&>(v)); }
00121 void set_err_vertex(const HepSymMatrix &e) { errVertex(e); }
00122
00123 HepLorentzVector get_4momentum() const { return momentum(); }
00124 Hep3Vector get_position() const { return static_cast<Hep3Vector>(position()); }
00125 HepSymMatrix get_error() const { return error(); }
00126 HepLorentzVector get_4momentum(int f) const { return f==0 ? momentum(KF_BEFORE_FIT) : momentum(); }
00127 Hep3Vector get_position(int f) const { return f==0 ? static_cast<Hep3Vector>(position(KF_BEFORE_FIT)) : static_cast<Hep3Vector>(position()); }
00128 HepSymMatrix get_error(int f) const { return f==0 ? error(KF_BEFORE_FIT) : error(); }
00129 double get_charge() const { return charge(); }
00130 double get_mass() const { return mass(); }
00131 double get_fit_parameter(int i) const { return getFitParameter(i,KF_BEFORE_FIT); }
00132 HepSymMatrix get_fit_error() const { return getFitError(KF_BEFORE_FIT); }
00133 Hep3Vector get_vertex() const { return static_cast<Hep3Vector>(vertex()); }
00134 HepSymMatrix get_err_vertex() const { return errVertex(); }
00135 #endif // KF_WITH_OLD_INTERFACE
00136
00137 private:
00138
00139 HepLorentzVector m_momentum_b;
00140 HepPoint3D m_position_b;
00141 HepSymMatrix m_error_b;
00142
00143 HepLorentzVector m_momentum_a;
00144 HepPoint3D m_position_a;
00145 HepSymMatrix m_error_a;
00146
00147 double m_charge;
00148 double m_mass;
00149
00150 HepPoint3D m_vertex;
00151 HepSymMatrix m_errVertex;
00152 };
00153
00154 #endif