45 double ptrk = trk->
energy();
46 double e = sqrt( ptrk * ptrk +
mass *
mass );
47 double the = trk->
theta();
48 double phi = trk->
phi();
49 HepLorentzVector p4( ptrk *
sin( the ) *
cos( phi ), ptrk *
sin( the ) *
sin( phi ),
50 ptrk *
cos( the ), e );
51 double dphi = trk->
dphi();
52 double dthe = trk->
dtheta();
53 double de = trk->
dE();
59 HepSymMatrix Vpl = HepSymMatrix( 2, 0 );
61 HepSymMatrix Vclus = HepSymMatrix( 3, 0 );
62 Vclus = ( wtrk.
Ew() ).sub( 5, 7 );
63 double xpr = x - m_BeamPosition[0];
64 double ypr = y - m_BeamPosition[1];
65 double zpr = z - m_BeamPosition[2];
66 double Rpr = sqrt( xpr * xpr + ypr * ypr );
68 HepMatrix J( 2, 3, 0 );
69 J[0][0] = -ypr / ( Rpr * Rpr );
70 J[0][1] = xpr / ( Rpr * Rpr );
71 J[1][0] = -xpr * zpr / ( Rpr * Rpr * Rpr );
72 J[1][1] = -ypr * zpr / ( Rpr * Rpr * Rpr );
74 Vpl = Vclus.similarity( J ) + m_VBeamPosition.similarity( J );
78 double phipre = atan( ypr / xpr );
80 if ( xpr < 0 ) { phipre = atan( ypr / xpr ) + 3.1415926; }
81 double lambdapre = zpr / Rpr;
84 double p0x = ptrk *
cos( phipre ) / sqrt( 1 + lambdapre * lambdapre );
85 double p0y = ptrk *
sin( phipre ) / sqrt( 1 + lambdapre * lambdapre );
86 double p0z = ptrk * lambdapre / sqrt( 1 + lambdapre * lambdapre );
89 double p0ver = sqrt( p0x * p0x + p0y * p0y );
91 HepMatrix B( 4, 3, 0 );
93 B[0][1] = -p0z * p0x * p0ver / ( p0e * p0e );
96 B[1][1] = -p0z * p0y * p0ver / ( p0e * p0e );
98 B[2][1] = p0ver * p0ver * p0ver / ( p0e * p0e );
102 HepSymMatrix Vple( 3, 0 );
103 Vple[0][0] = Vpl[0][0];
104 Vple[1][1] = Vpl[1][1];
105 Vple[2][2] = de * de;
107 HepSymMatrix Vpxyze( 4, 0 );
108 Vpxyze = Vple.similarity( B );
115 wtrk.
setEw( Vpxyze );
117 HepSymMatrix Vplme( 4, 0 );
118 Vplme[0][0] = Vpl[0][0];
119 Vplme[1][1] = Vpl[1][1];
120 Vplme[3][3] = de * de;
123 HepVector plmp( 4, 0 );
135 std::cout <<
"TrackPool: wrong track index"
136 <<
" " << number <<
" , " <<
numberWTrack() << std::endl;
144 m_numberone = m_numberone + 4;
151 double ptrk = trk->
energy();
152 double e = sqrt( ptrk * ptrk +
mass *
mass );
153 double the = trk->
theta();
154 double phi = trk->
phi();
155 HepLorentzVector p4( e *
sin( the ) *
cos( phi ), e *
sin( the ) *
sin( phi ),
157 double dphi = trk->
dphi();
158 double dthe = trk->
dtheta();
166 HepSymMatrix Vpe = HepSymMatrix( 2, 0 );
168 HepSymMatrix Vclus = HepSymMatrix( 3, 0 );
169 Vclus = ( wtrk.
Ew() ).sub( 5, 7 );
170 double xpr = x - m_BeamPosition[0];
171 double ypr = y - m_BeamPosition[1];
172 double zpr = z - m_BeamPosition[2];
173 double Rpr = sqrt( xpr * xpr + ypr * ypr );
175 HepMatrix J( 2, 3, 0 );
176 J[0][0] = -ypr / ( Rpr * Rpr );
177 J[0][1] = xpr / ( Rpr * Rpr );
178 J[1][0] = -xpr * zpr / ( Rpr * Rpr * Rpr );
179 J[1][1] = -ypr * zpr / ( Rpr * Rpr * Rpr );
181 Vpe = Vclus.similarity( J ) + m_VBeamPosition.similarity( J );
184 double phipre = atan( ypr / xpr );
186 if ( xpr < 0 ) { phipre = atan( ypr / xpr ) + 3.1415926; }
187 double lambdapre = zpr / Rpr;
189 HepVector plmp( 4, 0 );
196 HepSymMatrix Vplm( 3, 0 );
197 Vplm[0][0] = Vpe[0][0];
198 Vplm[1][1] = Vpe[1][1];
202 double p0x = ptrk *
cos( phipre ) / sqrt( 1 + lambdapre * lambdapre );
203 double p0y = ptrk *
sin( phipre ) / sqrt( 1 + lambdapre * lambdapre );
204 double p0z = ptrk * lambdapre / sqrt( 1 + lambdapre * lambdapre );
223 m_numberone = m_numberone + 3;
224 m_numbertwo = m_numbertwo + 1;
233 double ptrk = trk->
energy();
234 double e = sqrt( ptrk * ptrk +
mass *
mass );
235 double the = trk->
theta();
236 double phi = trk->
phi();
237 HepLorentzVector p4( e *
sin( the ) *
cos( phi ), e *
sin( the ) *
sin( phi ),
239 double dphi = trk->
dphi();
240 double dthe = trk->
dtheta();
248 HepSymMatrix Vpe = HepSymMatrix( 2, 0 );
250 HepSymMatrix Vclus = HepSymMatrix( 3, 0 );
251 Vclus = ( wtrk.
Ew() ).sub( 5, 7 );
252 double xpr = x - m_BeamPosition[0];
253 double ypr = y - m_BeamPosition[1];
254 double zpr = z - m_BeamPosition[2];
255 double Rpr = sqrt( xpr * xpr + ypr * ypr );
257 HepMatrix J( 2, 3, 0 );
258 J[0][0] = -ypr / ( Rpr * Rpr );
259 J[0][1] = xpr / ( Rpr * Rpr );
260 J[1][0] = -xpr * zpr / ( Rpr * Rpr * Rpr );
261 J[1][1] = -ypr * zpr / ( Rpr * Rpr * Rpr );
263 Vpe = Vclus.similarity( J ) + m_VBeamPosition.similarity( J );
265 double phipre = atan( ypr / xpr );
267 if ( xpr < 0 ) { phipre = atan( ypr / xpr ) + 3.1415926; }
268 double lambdapre = zpr / Rpr;
270 HepVector plmp( 4, 0 );
277 HepSymMatrix Vplm( 2, 0 );
278 Vplm[0][0] = Vpe[0][0];
279 Vplm[1][1] = Vpe[1][1];
283 double p0x = ptrk *
cos( phipre ) / sqrt( 1 + lambdapre * lambdapre );
284 double p0y = ptrk *
sin( phipre ) / sqrt( 1 + lambdapre * lambdapre );
285 double p0z = ptrk * lambdapre / sqrt( 1 + lambdapre * lambdapre );
304 m_numberone = m_numberone + 2;
305 m_numbertwo = m_numbertwo + 2;
309 const HepLorentzVector p4 ) {
318 HepVector plmp( 4, 0 );
319 double phipre = atan( p4[1] / p4[0] );
321 if ( p4[0] < 0 ) { phipre = atan( p4[1] / p4[0] ) + 3.1415926; }
326 HepSymMatrix Vplm( 3, 0 );
336 m_numberone = m_numberone + 1;
337 m_numbertwo = m_numbertwo + 3;
371 HepSymMatrix Ew = HepSymMatrix( 7, 0 );
372 for (
int i = 0; i < 7; i++ )
374 for (
int j = 0; j < 7; j++ )
376 if ( i == j ) Ew[i][j] = 1E+6;
387 m_numbertwo = m_numbertwo + 4;
407 double ptrk = trk->
energy();
408 double e = sqrt( ptrk * ptrk +
mass *
mass );
409 double the = trk->
theta();
410 double phi = trk->
phi();
411 HepLorentzVector p4( ptrk *
sin( the ) *
cos( phi ), ptrk *
sin( the ) *
sin( phi ),
412 ptrk *
cos( the ), e );
413 double dphi = trk->
dphi();
414 double dthe = trk->
dtheta();
415 double de = trk->
dE();
426 std::cout <<
"TrackPool: wrong track index"
427 <<
" " << number <<
" , " <<
numberWTrack() << std::endl;
437 m_numberone = m_numberone + 4;
438 m_numbertwo = m_numbertwo + 3;