BOSS 7.0.1
BESIII Offline Software System
Loading...
Searching...
No Matches
WTrackParameter Class Reference

#include <WTrackParameter.h>

Public Member Functions

 WTrackParameter ()
 
 ~WTrackParameter ()
 
 WTrackParameter (const WTrackParameter &wtrk)
 
WTrackParameteroperator= (const WTrackParameter &wtrk)
 
 WTrackParameter (const int charge, const HepLorentzVector &p, const HepPoint3D &x, const double err[])
 
 WTrackParameter (const int charge, const HepLorentzVector &p, const HepPoint3D &x, const HepSymMatrix &err)
 
 WTrackParameter (const double mass, const HepVector &helix, const double err[])
 
 WTrackParameter (const double mass, const HepVector &helix, const HepSymMatrix &err)
 
 WTrackParameter (const HepPoint3D &x, const HepLorentzVector &p, const double dphi, const double dtheta, const double dE)
 
 WTrackParameter (const HepLorentzVector &p, const double dphi, const double dtheta, const double dE)
 
void setW (const HepVector &w)
 
void setW (const int n, const double w)
 
void setEw (const HepSymMatrix &Ew)
 
void setCharge (const int charge)
 
void setMass (const double mass)
 
void setType (const int type)
 
void setVplm (const HepSymMatrix &Vplm)
 
void setPlmp (const HepVector &plmp)
 
int type () const
 
int charge () const
 
double mass () const
 
bool IsInvariableMass () const
 
double phi () const
 
double Lambda () const
 
HepVector w () const
 
HepSymMatrix Ew () const
 
HepLorentzVector p () const
 
HepSymMatrix Ep () const
 
HepPoint3D x () const
 
HepVector X () const
 
HepSymMatrix Ex () const
 
HepVector philambdamass ()
 
HepSymMatrix Vplm () const
 
HepVector plmp () const
 
 WTrackParameter ()
 
 ~WTrackParameter ()
 
 WTrackParameter (const WTrackParameter &wtrk)
 
WTrackParameteroperator= (const WTrackParameter &wtrk)
 
 WTrackParameter (const int charge, const HepLorentzVector &p, const HepPoint3D &x, const double err[])
 
 WTrackParameter (const int charge, const HepLorentzVector &p, const HepPoint3D &x, const HepSymMatrix &err)
 
 WTrackParameter (const double mass, const HepVector &helix, const double err[])
 
 WTrackParameter (const double mass, const HepVector &helix, const HepSymMatrix &err)
 
 WTrackParameter (const HepPoint3D &x, const HepLorentzVector &p, const double dphi, const double dtheta, const double dE)
 
 WTrackParameter (const HepLorentzVector &p, const double dphi, const double dtheta, const double dE)
 
void setW (const HepVector &w)
 
void setW (const int n, const double w)
 
void setEw (const HepSymMatrix &Ew)
 
void setCharge (const int charge)
 
void setMass (const double mass)
 
void setType (const int type)
 
void setVplm (const HepSymMatrix &Vplm)
 
void setPlmp (const HepVector &plmp)
 
int type () const
 
int charge () const
 
double mass () const
 
bool IsInvariableMass () const
 
double phi () const
 
double Lambda () const
 
HepVector w () const
 
HepSymMatrix Ew () const
 
HepLorentzVector p () const
 
HepSymMatrix Ep () const
 
HepPoint3D x () const
 
HepVector X () const
 
HepSymMatrix Ex () const
 
HepVector philambdamass ()
 
HepSymMatrix Vplm () const
 
HepVector plmp () const
 

Detailed Description

Constructor & Destructor Documentation

◆ WTrackParameter() [1/16]

WTrackParameter::WTrackParameter ( )

Definition at line 3 of file WTrackParameter.cxx.

4{
5 m_w = HepVector(7, 0);
6 m_Ew = HepSymMatrix(7, 0);
7 m_charge = 0;
8 m_type = 1;
9 m_mass = 0;
10 m_massInvariable = true;
11}

Referenced by WTrackParameter().

◆ ~WTrackParameter() [1/2]

WTrackParameter::~WTrackParameter ( )
inline

◆ WTrackParameter() [2/16]

WTrackParameter::WTrackParameter ( const WTrackParameter wtrk)

Definition at line 13 of file WTrackParameter.cxx.

14{
15 m_charge = wtrk.m_charge;
16 m_w = wtrk.m_w;
17 m_Ew = wtrk.m_Ew;
18 m_type = wtrk.m_type;
19 m_plmp = wtrk.m_plmp;
20 m_Vplm = wtrk.m_Vplm;
21 m_mass = wtrk.m_mass;
22 m_massInvariable = wtrk.m_massInvariable;
23}

◆ WTrackParameter() [3/16]

WTrackParameter::WTrackParameter ( const int  charge,
const HepLorentzVector &  p,
const HepPoint3D x,
const double  err[] 
)

Definition at line 53 of file WTrackParameter.cxx.

54{
55 HepSymMatrix error(5, 0);
56 int k = 0;
57 for (int i = 0; i < 5; i++)
58 {
59 for(int j = i; j < 5; j++)
60 {
61 error[i][j] = err[k];
62 error[j][i] = err[k];
63 k++;
64 }
65 }
66 *this = WTrackParameter(charge, p, x, error);
67}

◆ WTrackParameter() [4/16]

WTrackParameter::WTrackParameter ( const int  charge,
const HepLorentzVector &  p,
const HepPoint3D x,
const HepSymMatrix &  err 
)

Definition at line 69 of file WTrackParameter.cxx.

70{
71 m_w = HepVector(7, 0);
72 m_Ew = HepSymMatrix(7, 0);
73 m_charge = charge;
74 m_type = 1;
75 m_mass = p.m();
76 m_massInvariable = true;
77 for (int i = 0; i < 4; i++)
78 m_w[i] = p[i];
79 for (int i = 0; i < 3; i++)
80 m_w[i+4] = x[i];
81
82 HepVector helix(5, 0);
83 double phi0 = atan2(-p[0], p[1]);
84 if (cos(phi0) != 0)
85 helix[0] = x[0] / cos(phi0);
86 else
87 helix[0] = x[1] / sin(phi0);
88 helix[1] = phi0;
89 helix[2] = charge/p.perp();
90 helix[3] = x[3];
91 helix[4] = p[3]/p.perp();
92 HepMatrix dWdA(7, 5, 0);
93 dWdA = GetCvtMatrix(p.m(), helix);
94 m_Ew = err.similarity(dWdA);
95}
double sin(const BesAngle a)
double cos(const BesAngle a)

◆ WTrackParameter() [5/16]

WTrackParameter::WTrackParameter ( const double  mass,
const HepVector &  helix,
const double  err[] 
)

Definition at line 97 of file WTrackParameter.cxx.

98{
99 HepSymMatrix error(5, 0);
100 int k = 0;
101 for(int i = 0; i < 5; i++)
102 {
103 for(int j = i; j < 5; j++)
104 {
105 error[i][j] = err[k];
106 error[j][i] = err[k];
107 k++;
108 }
109 }
110 *this = WTrackParameter(mass, hel, error);
111}

◆ WTrackParameter() [6/16]

WTrackParameter::WTrackParameter ( const double  mass,
const HepVector &  helix,
const HepSymMatrix &  err 
)

Definition at line 114 of file WTrackParameter.cxx.

115{
116 m_type = 1;
117 m_mass = mass;
118 m_w = HepVector(7, 0);
119 m_Ew = HepSymMatrix(7, 0);
120 HepMatrix dWdA(7, 5, 0);
121 dWdA = GetCvtMatrix(mass, hel);
122 m_Ew = err.similarity(dWdA);
123 m_w = CvtH2W(mass, hel);
124 m_charge = hel[2] > 0 ? +1 : -1;
125 m_massInvariable = true;
126}

◆ WTrackParameter() [7/16]

WTrackParameter::WTrackParameter ( const HepPoint3D x,
const HepLorentzVector &  p,
const double  dphi,
const double  dtheta,
const double  dE 
)

Definition at line 135 of file WTrackParameter.cxx.

136{
137 m_w = HepVector(7, 0);
138 m_Ew = HepSymMatrix(7, 0);
139 m_type = 2;
140 m_mass = p.m();
141 m_charge = 0;
142 m_massInvariable = true;
143 for (int i = 0; i< 4; i++)
144 m_w[i] = p[i];
145 for (int i = 0; i< 3; i++)
146 m_w[i+4] = x[i];
147
148 HepMatrix dwda(7, 3, 0);
149 dwda[0][0] = -p.py();
150 dwda[1][0] = p.px();
151 dwda[4][0] = -x.y();
152 dwda[5][0] = x.x();
153
154 dwda[0][1] = p.px()*p.pz()/p.perp();
155 dwda[1][1] = p.py()*p.pz()/p.perp();
156 dwda[2][1] = -p.perp();
157 dwda[6][1] = -x.distance2()/sqrt(x.x()*x.x()+x.y()*x.y());
158
159 dwda[0][2] = p.px()/p.rho();
160 dwda[1][2] = p.py()/p.rho();
161 dwda[2][2] = p.pz()/p.rho();
162 dwda[3][2] = p.rho()/p.e();
163 // dwda[4][2] = x.x()/(x.x()*x.x()+x.y()*x.y());
164 // dwda[5][2] = x.y()/(x.x()*x.x()+x.y()*x.y());
165 // dwda[6][2] = x.z()/(x.x()*x.x()+x.y()*x.y());
166
167 HepSymMatrix emcmea(3, 0);
168 emcmea[0][0] = dphi * dphi;
169 emcmea[1][1] = dthe * dthe;
170 emcmea[2][2] = dE * dE;
171 m_Ew = emcmea.similarity(dwda);
172}

◆ WTrackParameter() [8/16]

WTrackParameter::WTrackParameter ( const HepLorentzVector &  p,
const double  dphi,
const double  dtheta,
const double  dE 
)

Definition at line 128 of file WTrackParameter.cxx.

129{
130 HepPoint3D x(0, 0, 0);
131 *this = WTrackParameter(x, p, dphi, dthe, dE);
132}

◆ WTrackParameter() [9/16]

WTrackParameter::WTrackParameter ( )

◆ ~WTrackParameter() [2/2]

WTrackParameter::~WTrackParameter ( )
inline

◆ WTrackParameter() [10/16]

WTrackParameter::WTrackParameter ( const WTrackParameter wtrk)

◆ WTrackParameter() [11/16]

WTrackParameter::WTrackParameter ( const int  charge,
const HepLorentzVector &  p,
const HepPoint3D x,
const double  err[] 
)

◆ WTrackParameter() [12/16]

WTrackParameter::WTrackParameter ( const int  charge,
const HepLorentzVector &  p,
const HepPoint3D x,
const HepSymMatrix &  err 
)

◆ WTrackParameter() [13/16]

WTrackParameter::WTrackParameter ( const double  mass,
const HepVector &  helix,
const double  err[] 
)

◆ WTrackParameter() [14/16]

WTrackParameter::WTrackParameter ( const double  mass,
const HepVector &  helix,
const HepSymMatrix &  err 
)

◆ WTrackParameter() [15/16]

WTrackParameter::WTrackParameter ( const HepPoint3D x,
const HepLorentzVector &  p,
const double  dphi,
const double  dtheta,
const double  dE 
)

◆ WTrackParameter() [16/16]

WTrackParameter::WTrackParameter ( const HepLorentzVector &  p,
const double  dphi,
const double  dtheta,
const double  dE 
)

Member Function Documentation

◆ charge() [1/2]

int WTrackParameter::charge ( ) const
inline

◆ charge() [2/2]

int WTrackParameter::charge ( ) const
inline

Definition at line 62 of file InstallArea/include/VertexFit/VertexFit/WTrackParameter.h.

62{return m_charge;}

◆ Ep() [1/2]

HepSymMatrix WTrackParameter::Ep ( ) const
inline

Definition at line 70 of file Analysis/VertexFit/VertexFit-00-02-77/VertexFit/WTrackParameter.h.

70{return m_Ew.sub(1, 4); }

◆ Ep() [2/2]

HepSymMatrix WTrackParameter::Ep ( ) const
inline

Definition at line 70 of file InstallArea/include/VertexFit/VertexFit/WTrackParameter.h.

70{return m_Ew.sub(1, 4); }

◆ Ew() [1/2]

◆ Ew() [2/2]

HepSymMatrix WTrackParameter::Ew ( ) const
inline

Definition at line 68 of file InstallArea/include/VertexFit/VertexFit/WTrackParameter.h.

68{return m_Ew;}

◆ Ex() [1/2]

HepSymMatrix WTrackParameter::Ex ( ) const
inline

Definition at line 73 of file Analysis/VertexFit/VertexFit-00-02-77/VertexFit/WTrackParameter.h.

73{return m_Ew.sub(5, 7); }

◆ Ex() [2/2]

HepSymMatrix WTrackParameter::Ex ( ) const
inline

Definition at line 73 of file InstallArea/include/VertexFit/VertexFit/WTrackParameter.h.

73{return m_Ew.sub(5, 7); }

◆ IsInvariableMass() [1/2]

bool WTrackParameter::IsInvariableMass ( ) const
inline

Definition at line 64 of file Analysis/VertexFit/VertexFit-00-02-77/VertexFit/WTrackParameter.h.

64{return m_massInvariable;}

◆ IsInvariableMass() [2/2]

bool WTrackParameter::IsInvariableMass ( ) const
inline

Definition at line 64 of file InstallArea/include/VertexFit/VertexFit/WTrackParameter.h.

64{return m_massInvariable;}

◆ Lambda() [1/2]

double WTrackParameter::Lambda ( ) const
inline

Definition at line 66 of file Analysis/VertexFit/VertexFit-00-02-77/VertexFit/WTrackParameter.h.

66{return w()[2]/sqrt(w()[0]*w()[0] + w()[1]*w()[1]);}

Referenced by TrackPool::AddMissTrack().

◆ Lambda() [2/2]

double WTrackParameter::Lambda ( ) const
inline

Definition at line 66 of file InstallArea/include/VertexFit/VertexFit/WTrackParameter.h.

66{return w()[2]/sqrt(w()[0]*w()[0] + w()[1]*w()[1]);}

◆ mass() [1/2]

double WTrackParameter::mass ( ) const
inline

Definition at line 63 of file Analysis/VertexFit/VertexFit-00-02-77/VertexFit/WTrackParameter.h.

63{return m_mass;}

Referenced by VertexFit::pull(), setMass(), and WTrackParameter().

◆ mass() [2/2]

double WTrackParameter::mass ( ) const
inline

Definition at line 63 of file InstallArea/include/VertexFit/VertexFit/WTrackParameter.h.

63{return m_mass;}

◆ operator=() [1/2]

WTrackParameter & WTrackParameter::operator= ( const WTrackParameter wtrk)

Definition at line 25 of file WTrackParameter.cxx.

26{
27 if (this == &wtrk)
28 return *this;
29 m_charge = wtrk.m_charge;
30 m_type = wtrk.m_type;
31 m_w = wtrk.m_w;
32 m_Ew = wtrk.m_Ew;
33 m_plmp = wtrk.m_plmp;
34 m_Vplm = wtrk.m_Vplm;
35 m_mass = wtrk.m_mass;
36 m_massInvariable = wtrk.m_massInvariable;
37 return *this;
38}

◆ operator=() [2/2]

WTrackParameter & WTrackParameter::operator= ( const WTrackParameter wtrk)

◆ p() [1/2]

◆ p() [2/2]

HepLorentzVector WTrackParameter::p ( ) const
inline

Definition at line 69 of file InstallArea/include/VertexFit/VertexFit/WTrackParameter.h.

69{return HepLorentzVector(m_w[0], m_w[1], m_w[2], m_w[3]);}

◆ phi() [1/2]

double WTrackParameter::phi ( ) const
inline

Definition at line 65 of file Analysis/VertexFit/VertexFit-00-02-77/VertexFit/WTrackParameter.h.

65{return atan(w()[1]/(w()[0]));}

◆ phi() [2/2]

double WTrackParameter::phi ( ) const
inline

Definition at line 65 of file InstallArea/include/VertexFit/VertexFit/WTrackParameter.h.

65{return atan(w()[1]/(w()[0]));}

◆ philambdamass() [1/2]

HepVector WTrackParameter::philambdamass ( )

Definition at line 40 of file WTrackParameter.cxx.

41{
42 HepVector tmp(4,0);
43 if (w()[1] >= 0)
44 tmp[0] = atan(w()[1]/(w()[0]));
45 else
46 tmp[0] = atan(w()[1]/(w()[0])) + 3.1415926;
47 tmp[1] = w()[2]/sqrt(w()[0]*w()[0] + w()[1]*w()[1]);
48 tmp[2] = p().m();
49 tmp[3] = sqrt(w()[3]*w()[3] - p().m()*p().m());
50 return tmp;
51}

◆ philambdamass() [2/2]

HepVector WTrackParameter::philambdamass ( )

◆ plmp() [1/2]

HepVector WTrackParameter::plmp ( ) const
inline

Definition at line 76 of file Analysis/VertexFit/VertexFit-00-02-77/VertexFit/WTrackParameter.h.

76{return m_plmp;}

Referenced by setPlmp().

◆ plmp() [2/2]

HepVector WTrackParameter::plmp ( ) const
inline

Definition at line 76 of file InstallArea/include/VertexFit/VertexFit/WTrackParameter.h.

76{return m_plmp;}

◆ setCharge() [1/2]

◆ setCharge() [2/2]

void WTrackParameter::setCharge ( const int  charge)
inline

Definition at line 54 of file InstallArea/include/VertexFit/VertexFit/WTrackParameter.h.

54{m_charge = charge;}

◆ setEw() [1/2]

◆ setEw() [2/2]

void WTrackParameter::setEw ( const HepSymMatrix &  Ew)
inline

Definition at line 53 of file InstallArea/include/VertexFit/VertexFit/WTrackParameter.h.

53{m_Ew = Ew;}

◆ setMass() [1/2]

void WTrackParameter::setMass ( const double  mass)
inline

◆ setMass() [2/2]

void WTrackParameter::setMass ( const double  mass)
inline

Definition at line 55 of file InstallArea/include/VertexFit/VertexFit/WTrackParameter.h.

55{m_mass = mass;}

◆ setPlmp() [1/2]

void WTrackParameter::setPlmp ( const HepVector &  plmp)
inline

◆ setPlmp() [2/2]

void WTrackParameter::setPlmp ( const HepVector &  plmp)
inline

Definition at line 58 of file InstallArea/include/VertexFit/VertexFit/WTrackParameter.h.

58{m_plmp = plmp;}

◆ setType() [1/2]

void WTrackParameter::setType ( const int  type)
inline

◆ setType() [2/2]

void WTrackParameter::setType ( const int  type)
inline

Definition at line 56 of file InstallArea/include/VertexFit/VertexFit/WTrackParameter.h.

56{m_type = type;}

◆ setVplm() [1/2]

void WTrackParameter::setVplm ( const HepSymMatrix &  Vplm)
inline

◆ setVplm() [2/2]

void WTrackParameter::setVplm ( const HepSymMatrix &  Vplm)
inline

Definition at line 57 of file InstallArea/include/VertexFit/VertexFit/WTrackParameter.h.

57{m_Vplm = Vplm;}

◆ setW() [1/4]

◆ setW() [2/4]

void WTrackParameter::setW ( const HepVector &  w)
inline

Definition at line 51 of file InstallArea/include/VertexFit/VertexFit/WTrackParameter.h.

51{m_w = w; m_mass = sqrt(w[3]*w[3] - w[2]*w[2] - w[1]*w[1] - w[0]*w[0]);}

◆ setW() [3/4]

void WTrackParameter::setW ( const int  n,
const double  w 
)
inline

Definition at line 52 of file Analysis/VertexFit/VertexFit-00-02-77/VertexFit/WTrackParameter.h.

52{m_w[n] = w;}
const Int_t n

◆ setW() [4/4]

void WTrackParameter::setW ( const int  n,
const double  w 
)
inline

Definition at line 52 of file InstallArea/include/VertexFit/VertexFit/WTrackParameter.h.

52{m_w[n] = w;}

◆ type() [1/2]

int WTrackParameter::type ( ) const
inline

Definition at line 61 of file Analysis/VertexFit/VertexFit-00-02-77/VertexFit/WTrackParameter.h.

61{return m_type;}

Referenced by setType().

◆ type() [2/2]

int WTrackParameter::type ( ) const
inline

Definition at line 61 of file InstallArea/include/VertexFit/VertexFit/WTrackParameter.h.

61{return m_type;}

◆ Vplm() [1/2]

HepSymMatrix WTrackParameter::Vplm ( ) const
inline

Definition at line 75 of file Analysis/VertexFit/VertexFit-00-02-77/VertexFit/WTrackParameter.h.

75{return m_Vplm;}

Referenced by setVplm().

◆ Vplm() [2/2]

HepSymMatrix WTrackParameter::Vplm ( ) const
inline

Definition at line 75 of file InstallArea/include/VertexFit/VertexFit/WTrackParameter.h.

75{return m_Vplm;}

◆ w() [1/2]

◆ w() [2/2]

HepVector WTrackParameter::w ( ) const
inline

Definition at line 67 of file InstallArea/include/VertexFit/VertexFit/WTrackParameter.h.

67{return m_w;}

◆ x() [1/2]

HepPoint3D WTrackParameter::x ( ) const
inline

Definition at line 71 of file Analysis/VertexFit/VertexFit-00-02-77/VertexFit/WTrackParameter.h.

71{return HepPoint3D(m_w[4], m_w[5], m_w[6]);}
HepGeom::Point3D< double > HepPoint3D

Referenced by VertexConstraints::UpdateConstraints(), and WTrackParameter().

◆ X() [1/2]

HepVector WTrackParameter::X ( ) const
inline

Definition at line 72 of file Analysis/VertexFit/VertexFit-00-02-77/VertexFit/WTrackParameter.h.

72{return m_w.sub(5, 7); }

Referenced by VertexConstraints::UpdateConstraints().

◆ x() [2/2]

HepPoint3D WTrackParameter::x ( ) const
inline

Definition at line 71 of file InstallArea/include/VertexFit/VertexFit/WTrackParameter.h.

71{return HepPoint3D(m_w[4], m_w[5], m_w[6]);}

◆ X() [2/2]

HepVector WTrackParameter::X ( ) const
inline

Definition at line 72 of file InstallArea/include/VertexFit/VertexFit/WTrackParameter.h.

72{return m_w.sub(5, 7); }

The documentation for this class was generated from the following files: