/home/bes3soft/bes3soft/Boss/7.0.2/dist/7.0.2/Analysis/VertexFit/VertexFit-00-02-78/VertexFit/WTrackParameter.h

Go to the documentation of this file.
00001 #ifndef WTrack_Parameter_H
00002 #define WTrack_Parameter_H
00003 
00004 //--------------------------------------------------------------------------------
00005 //
00006 // Track Parameters Format:  (Px, Py, Pz, E, x, y, z)
00007 //
00008 // Author   Date         Comments
00009 // K.L He   10/31/2005   original version
00010 // Martin   09/02/2010   remove dependency of Class Helix(from Belle), add some 
00011 //                       kindly comments 
00012 // 
00013 //--------------------------------------------------------------------------------
00014 #include <cmath>
00015 #include "CLHEP/Matrix/Vector.h"
00016 #include "CLHEP/Vector/LorentzVector.h"
00017 #include "CLHEP/Vector/ThreeVector.h"
00018 #include "CLHEP/Matrix/SymMatrix.h"
00019 #include "CLHEP/Matrix/Matrix.h"
00020 using CLHEP::HepVector;
00021 using CLHEP::HepLorentzVector;
00022 using CLHEP::Hep3Vector;
00023 using CLHEP::HepMatrix;
00024 using CLHEP::HepSymMatrix;
00025 #include "CLHEP/Geometry/Point3D.h"
00026 
00027 #ifndef ENABLE_BACKWARDS_COMPATIBILITY
00028         typedef HepGeom::Point3D<double> HepPoint3D;
00029 #endif
00030 
00031 class WTrackParameter 
00032 {
00033 public:
00034 
00035         WTrackParameter();
00036         ~WTrackParameter(){;}
00037         WTrackParameter(const WTrackParameter &wtrk);
00038         WTrackParameter& operator =(const WTrackParameter &wtrk);
00039         
00040         // For charged tracks
00041         WTrackParameter(const int charge, const HepLorentzVector &p, const HepPoint3D &x, const double err[]);
00042         WTrackParameter(const int charge, const HepLorentzVector &p, const HepPoint3D &x, const HepSymMatrix &err);
00043         WTrackParameter(const double mass, const HepVector &helix, const double err[]);
00044         WTrackParameter(const double mass, const HepVector &helix, const HepSymMatrix &err);
00045         
00046         // For Neutral tracks
00047         WTrackParameter(const HepPoint3D &x, const HepLorentzVector &p, const double dphi, const double dtheta, const double dE);
00048         WTrackParameter(const HepLorentzVector &p, const double dphi, const double dtheta, const double dE);
00049         
00050         // Set methods
00051         void              setW(const HepVector &w) {m_w = w; m_mass = sqrt(w[3]*w[3] - w[2]*w[2] - w[1]*w[1] - w[0]*w[0]);}
00052         void              setW(const int n, const double w) {m_w[n] = w;}
00053         void              setEw(const HepSymMatrix &Ew) {m_Ew = Ew;}
00054         void              setCharge(const int charge) {m_charge = charge;}
00055         void              setMass(const double mass) {m_mass = mass;}
00056         void              setType(const int type) {m_type = type;}
00057         void              setVplm(const HepSymMatrix &Vplm) {m_Vplm = Vplm;}
00058         void              setPlmp(const HepVector &plmp) {m_plmp = plmp;}
00059         
00060         // Get methods
00061         int               type() const {return m_type;}
00062         int               charge() const {return m_charge;}
00063         double            mass() const {return m_mass;} 
00064         bool              IsInvariableMass() const {return m_massInvariable;}
00065         double            phi() const {return atan(w()[1]/(w()[0]));}
00066         double            Lambda() const {return w()[2]/sqrt(w()[0]*w()[0] + w()[1]*w()[1]);}
00067         HepVector         w() const {return m_w;}
00068         HepSymMatrix      Ew() const {return m_Ew;}
00069         HepLorentzVector  p() const {return HepLorentzVector(m_w[0], m_w[1], m_w[2], m_w[3]);}
00070         HepSymMatrix      Ep() const {return m_Ew.sub(1, 4); }
00071         HepPoint3D        x() const {return HepPoint3D(m_w[4], m_w[5], m_w[6]);}
00072         HepVector         X() const {return m_w.sub(5, 7); }
00073         HepSymMatrix      Ex() const {return m_Ew.sub(5, 7); }
00074         HepVector         philambdamass();
00075         HepSymMatrix      Vplm() const {return m_Vplm;}
00076         HepVector         plmp() const {return m_plmp;}
00077 
00078 private:
00079         
00080         int               m_charge;           // charge of particle
00081         HepVector         m_w;                // HepVector(px, py, pz, E, x, y, z)
00082         HepSymMatrix      m_Ew;               // error matrix
00083         int               m_type;             // 1-charged track; 2-neutral track
00084         HepSymMatrix      m_Vplm;             // 
00085         HepVector         m_plmp;             // 
00086         double            m_mass;             // mass of particle  added by yanl 2010.7.23
00087         bool              m_massInvariable;   // tag of mass invariable  added by yanl 2010.8.12
00088 
00089         HepMatrix         GetCvtMatrix(const double mass, const HepVector &helix);  // conversion matrix of 5x1 into 7x1
00090         HepVector         CvtH2W(const double mass, const HepVector &helix);        // conversion of Helix into WTrackParameter
00091 };
00092 
00093 #endif  // WTrack_Parameter_H
00094 

Generated on Tue Nov 29 22:57:41 2016 for BOSS_7.0.2 by  doxygen 1.4.7