CGEM BOSS 6.6.5.g
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
 

Detailed Description

Definition at line 31 of file WTrackParameter.h.

Constructor & Destructor Documentation

◆ WTrackParameter() [1/8]

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()

WTrackParameter::~WTrackParameter ( )
inline

Definition at line 36 of file WTrackParameter.h.

36{;}

◆ WTrackParameter() [2/8]

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/8]

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}
int charge() const
HepLorentzVector p() const
HepPoint3D x() const
@ error
Definition: Core.h:24

◆ WTrackParameter() [4/8]

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)
Definition: BesAngle.h:210
double cos(const BesAngle a)
Definition: BesAngle.h:213

◆ WTrackParameter() [5/8]

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}
double mass() const

◆ WTrackParameter() [6/8]

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/8]

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/8]

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}

Member Function Documentation

◆ charge()

int WTrackParameter::charge ( ) const
inline

◆ Ep()

HepSymMatrix WTrackParameter::Ep ( ) const
inline

Definition at line 70 of file WTrackParameter.h.

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

◆ Ew()

HepSymMatrix WTrackParameter::Ew ( ) const
inline

◆ Ex()

HepSymMatrix WTrackParameter::Ex ( ) const
inline

Definition at line 73 of file WTrackParameter.h.

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

◆ IsInvariableMass()

bool WTrackParameter::IsInvariableMass ( ) const
inline

Definition at line 64 of file WTrackParameter.h.

64{return m_massInvariable;}

◆ Lambda()

double WTrackParameter::Lambda ( ) const
inline

Definition at line 66 of file WTrackParameter.h.

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

Referenced by TrackPool::AddMissTrack().

◆ mass()

double WTrackParameter::mass ( ) const
inline

Definition at line 63 of file WTrackParameter.h.

63{return m_mass;}

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

◆ operator=()

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}

◆ p()

HepLorentzVector WTrackParameter::p ( ) const
inline

◆ phi()

double WTrackParameter::phi ( ) const
inline

Definition at line 65 of file WTrackParameter.h.

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

◆ philambdamass()

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}

◆ plmp()

HepVector WTrackParameter::plmp ( ) const
inline

Definition at line 76 of file WTrackParameter.h.

76{return m_plmp;}

Referenced by setPlmp().

◆ setCharge()

◆ setEw()

◆ setMass()

void WTrackParameter::setMass ( const double  mass)
inline

◆ setPlmp()

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

Definition at line 58 of file WTrackParameter.h.

58{m_plmp = plmp;}
HepVector plmp() const

Referenced by TrackPool::AddMissTrack(), and TrackPool::AddTrack().

◆ setType()

void WTrackParameter::setType ( const int  type)
inline

Definition at line 56 of file WTrackParameter.h.

56{m_type = type;}
int type() const

Referenced by TrackPool::AddMissTrack().

◆ setVplm()

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

Definition at line 57 of file WTrackParameter.h.

57{m_Vplm = Vplm;}
HepSymMatrix Vplm() const

Referenced by TrackPool::AddMissTrack(), and TrackPool::AddTrack().

◆ setW() [1/2]

◆ setW() [2/2]

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

Definition at line 52 of file WTrackParameter.h.

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

◆ type()

int WTrackParameter::type ( ) const
inline

Definition at line 61 of file WTrackParameter.h.

61{return m_type;}

Referenced by setType().

◆ Vplm()

HepSymMatrix WTrackParameter::Vplm ( ) const
inline

Definition at line 75 of file WTrackParameter.h.

75{return m_Vplm;}

Referenced by setVplm().

◆ w()

◆ x()

HepPoint3D WTrackParameter::x ( ) const
inline

Definition at line 71 of file 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()

HepVector WTrackParameter::X ( ) const
inline

Definition at line 72 of file WTrackParameter.h.

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

Referenced by VertexConstraints::UpdateConstraints().


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