Main Page   Class Hierarchy   Compound List   File List   Compound Members  

kfitterparticle.h

00001 //
00002 // $Id: kfitterparticle.h,v 1.7 2002/03/27 23:42:30 jtanaka Exp $
00003 //
00004 // $Log: kfitterparticle.h,v $
00005 // Revision 1.7  2002/03/27 23:42:30  jtanaka
00006 // Add new fitter to the mass-constraint fit.
00007 //
00008 // Revision 1.6  2002/01/03 11:04:36  katayama
00009 // Point3D and other header files are cleaned
00010 //
00011 // Revision 1.5  2000/03/07 17:09:13  jtanaka
00012 // bug fixed, use "similarity" etc.
00013 //
00014 // Revision 1.4  1999/03/29 05:38:16  jtanaka
00015 // new class structure, new+old interfaces
00016 //
00017 // Revision 1.3  1998/09/08 11:52:07  jtanaka
00018 // non-const --> const
00019 //
00020 // Revision 1.2  1998/07/23 11:58:01  jtanaka
00021 // endif HEADER --> endif /* HEADER */
00022 //
00023 // Revision 1.1  1998/01/22 03:21:39  jtanaka
00024 // Updated from Tanaka san. New Interface etc.
00025 //
00026 //
00027 // kfitterparticle of KFitter
00028 //
00029 // ver1.0  : ?
00030 // ver3.0  : 1999/03
00031 //
00032 // author  : jtanaka
00033 // e-mail  : jtanaka@hep.phys.s.u-tokyo.ac.jp
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   //constructor
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); // This is obsolete
00063   // since mass is obtained from HepLorentzVector's information.
00064 #endif
00065   kfitterparticle(const kfitterparticle&);
00066   //destructor
00067   virtual ~kfitterparticle(void){};
00068   
00069   //input
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   //void mass(const double);
00078   void vertex(const HepPoint3D&);
00079   void errVertex(const HepSymMatrix&);
00080 
00081   //output
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); // momentum+position
00097   HepMatrix        mompos(const unsigned) const;
00098 
00099   //fitter
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   //operator
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   //void set_charge_mass(double c,double m) { charge(c); mass(m); }
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   //before fit
00139   HepLorentzVector   m_momentum_b;
00140   HepPoint3D         m_position_b;
00141   HepSymMatrix       m_error_b;
00142   //after fit
00143   HepLorentzVector   m_momentum_a;
00144   HepPoint3D         m_position_a;
00145   HepSymMatrix       m_error_a;
00146   //properties
00147   double             m_charge;
00148   double             m_mass;
00149   //vertex
00150   HepPoint3D         m_vertex;
00151   HepSymMatrix       m_errVertex;
00152 };
00153 
00154 #endif /* KFITTERPARTILCE_H */

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