BOSS 8.0.0
BESIII Offline Software System
Loading...
Searching...
No Matches
Analysis/VertexFit/include/VertexFit/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 "CLHEP/Matrix/Matrix.h"
15#include "CLHEP/Matrix/SymMatrix.h"
16#include "CLHEP/Matrix/Vector.h"
17#include "CLHEP/Vector/LorentzVector.h"
18#include "CLHEP/Vector/ThreeVector.h"
19#include <cmath>
20using CLHEP::Hep3Vector;
21using CLHEP::HepLorentzVector;
22using CLHEP::HepMatrix;
23using CLHEP::HepSymMatrix;
24using CLHEP::HepVector;
25#include "CLHEP/Geometry/Point3D.h"
26
27#ifndef ENABLE_BACKWARDS_COMPATIBILITY
28typedef HepGeom::Point3D<double> HepPoint3D;
29#endif
30
32public:
35 WTrackParameter( const WTrackParameter& wtrk );
37
38 // For charged tracks
39 WTrackParameter( const int charge, const HepLorentzVector& p, const HepPoint3D& x,
40 const double err[] );
41 WTrackParameter( const int charge, const HepLorentzVector& p, const HepPoint3D& x,
42 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,
48 const double dtheta, const double dE );
49 WTrackParameter( const HepLorentzVector& p, const double dphi, const double dtheta,
50 const double dE );
51
52 // Set methods
53 void setW( const HepVector& w ) {
54 m_w = w;
55 m_mass = sqrt( w[3] * w[3] - w[2] * w[2] - w[1] * w[1] - w[0] * w[0] );
56 }
57 void setW( const int n, const double w ) { m_w[n] = w; }
58 void setEw( const HepSymMatrix& Ew ) { m_Ew = Ew; }
59 void setCharge( const int charge ) { m_charge = charge; }
60 void setMass( const double mass ) { m_mass = mass; }
61 void setType( const int type ) { m_type = type; }
62 void setVplm( const HepSymMatrix& Vplm ) { m_Vplm = Vplm; }
63 void setPlmp( const HepVector& plmp ) { m_plmp = plmp; }
64
65 // Get methods
66 int type() const { return m_type; }
67 int charge() const { return m_charge; }
68 double mass() const { return m_mass; }
69 bool IsInvariableMass() const { return m_massInvariable; }
70 double phi() const { return atan( w()[1] / ( w()[0] ) ); }
71 double Lambda() const { return w()[2] / sqrt( w()[0] * w()[0] + w()[1] * w()[1] ); }
72 HepVector w() const { return m_w; }
73 HepSymMatrix Ew() const { return m_Ew; }
74 HepLorentzVector p() const { return HepLorentzVector( m_w[0], m_w[1], m_w[2], m_w[3] ); }
75 HepSymMatrix Ep() const { return m_Ew.sub( 1, 4 ); }
76 HepPoint3D x() const { return HepPoint3D( m_w[4], m_w[5], m_w[6] ); }
77 HepVector X() const { return m_w.sub( 5, 7 ); }
78 HepSymMatrix Ex() const { return m_Ew.sub( 5, 7 ); }
79 HepVector philambdamass();
80 HepSymMatrix Vplm() const { return m_Vplm; }
81 HepVector plmp() const { return m_plmp; }
82
83private:
84 int m_charge; // charge of particle
85 HepVector m_w; // HepVector(px, py, pz, E, x, y, z)
86 HepSymMatrix m_Ew; // error matrix
87 int m_type; // 1-charged track; 2-neutral track
88 HepSymMatrix m_Vplm; //
89 HepVector m_plmp; //
90 double m_mass; // mass of particle added by yanl 2010.7.23
91 bool m_massInvariable; // tag of mass invariable added by yanl 2010.8.12
92
93 HepMatrix GetCvtMatrix( const double mass,
94 const HepVector& helix ); // conversion matrix of 5x1 into 7x1
95 HepVector CvtH2W( const double mass,
96 const HepVector& helix ); // conversion of Helix into WTrackParameter
97};
98
99#endif // WTrack_Parameter_H
double mass
HepGeom::Point3D< double > HepPoint3D
const Int_t n
WTrackParameter & operator=(const WTrackParameter &wtrk)
HepVector philambdamass()