CGEM BOSS 6.6.5.h
BESIII Offline Software System
Loading...
Searching...
No Matches
WTrackParameter.h
Go to the documentation of this file.
1#ifndef WTrack_Parameter_H
2#define WTrack_Parameter_H
3
4//--------------------------------------------------------------------------------
5//
6// Track Parameters Format: (Px, Py, Pz, E, x, y, z)
7//
8// Author Date Comments
9// K.L He 10/31/2005 original version
10// Martin 09/02/2010 remove dependency of Class Helix(from Belle), add some
11// kindly comments
12//
13//--------------------------------------------------------------------------------
14#include <cmath>
15#include "CLHEP/Matrix/Vector.h"
16#include "CLHEP/Vector/LorentzVector.h"
17#include "CLHEP/Vector/ThreeVector.h"
18#include "CLHEP/Matrix/SymMatrix.h"
19#include "CLHEP/Matrix/Matrix.h"
20using CLHEP::HepVector;
21using CLHEP::HepLorentzVector;
22using CLHEP::Hep3Vector;
23using CLHEP::HepMatrix;
24using CLHEP::HepSymMatrix;
25#include "CLHEP/Geometry/Point3D.h"
26
27#ifndef ENABLE_BACKWARDS_COMPATIBILITY
29#endif
30
32{
33public:
34
39
40 // For charged tracks
41 WTrackParameter(const int charge, const HepLorentzVector &p, const HepPoint3D &x, const double err[]);
42 WTrackParameter(const int charge, const HepLorentzVector &p, const HepPoint3D &x, const HepSymMatrix &err);
43 WTrackParameter(const double mass, const HepVector &helix, const double err[]);
44 WTrackParameter(const double mass, const HepVector &helix, const HepSymMatrix &err);
45
46 // For Neutral tracks
47 WTrackParameter(const HepPoint3D &x, const HepLorentzVector &p, const double dphi, const double dtheta, const double dE);
48 WTrackParameter(const HepLorentzVector &p, const double dphi, const double dtheta, const double dE);
49
50 // Set methods
51 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]);}
52 void setW(const int n, const double w) {m_w[n] = w;}
53 void setEw(const HepSymMatrix &Ew) {m_Ew = Ew;}
54 void setCharge(const int charge) {m_charge = charge;}
55 void setMass(const double mass) {m_mass = mass;}
56 void setType(const int type) {m_type = type;}
57 void setVplm(const HepSymMatrix &Vplm) {m_Vplm = Vplm;}
58 void setPlmp(const HepVector &plmp) {m_plmp = plmp;}
59
60 // Get methods
61 int type() const {return m_type;}
62 int charge() const {return m_charge;}
63 double mass() const {return m_mass;}
64 bool IsInvariableMass() const {return m_massInvariable;}
65 double phi() const {return atan(w()[1]/(w()[0]));}
66 double Lambda() const {return w()[2]/sqrt(w()[0]*w()[0] + w()[1]*w()[1]);}
67 HepVector w() const {return m_w;}
68 HepSymMatrix Ew() const {return m_Ew;}
69 HepLorentzVector p() const {return HepLorentzVector(m_w[0], m_w[1], m_w[2], m_w[3]);}
70 HepSymMatrix Ep() const {return m_Ew.sub(1, 4); }
71 HepPoint3D x() const {return HepPoint3D(m_w[4], m_w[5], m_w[6]);}
72 HepVector X() const {return m_w.sub(5, 7); }
73 HepSymMatrix Ex() const {return m_Ew.sub(5, 7); }
74 HepVector philambdamass();
75 HepSymMatrix Vplm() const {return m_Vplm;}
76 HepVector plmp() const {return m_plmp;}
77
78private:
79
80 int m_charge; // charge of particle
81 HepVector m_w; // HepVector(px, py, pz, E, x, y, z)
82 HepSymMatrix m_Ew; // error matrix
83 int m_type; // 1-charged track; 2-neutral track
84 HepSymMatrix m_Vplm; //
85 HepVector m_plmp; //
86 double m_mass; // mass of particle added by yanl 2010.7.23
87 bool m_massInvariable; // tag of mass invariable added by yanl 2010.8.12
88
89 HepMatrix GetCvtMatrix(const double mass, const HepVector &helix); // conversion matrix of 5x1 into 7x1
90 HepVector CvtH2W(const double mass, const HepVector &helix); // conversion of Helix into WTrackParameter
91};
92
93#endif // WTrack_Parameter_H
94
const Int_t n
HepGeom::Point3D< double > HepPoint3D
void setEw(const HepSymMatrix &Ew)
HepSymMatrix Ex() const
void setW(const int n, const double w)
int charge() const
HepVector plmp() const
HepLorentzVector p() const
void setMass(const double mass)
double phi() const
void setCharge(const int charge)
double Lambda() const
double mass() const
WTrackParameter & operator=(const WTrackParameter &wtrk)
HepVector w() const
void setW(const HepVector &w)
void setType(const int type)
HepSymMatrix Ep() const
HepPoint3D x() const
HepVector philambdamass()
HepSymMatrix Vplm() const
HepVector X() const
bool IsInvariableMass() const
void setPlmp(const HepVector &plmp)
HepSymMatrix Ew() const
void setVplm(const HepSymMatrix &Vplm)