48 const TVector3& poserr,
49 const TVector3& momerr,
52 :
GFAbsTrackRep(5), _geane(geane), _pdg(PDGCode), _backw(0), _spu(1)
67 double* covarray=par.GetCov();
71 fCov[i][j]=covarray[count];
72 if(i!=j)
fCov[j][i]=covarray[count];
82 const TVector3& poserr,
83 const TVector3& momerr,
86 :
GFAbsTrackRep(5), _geane(geane), _pdg(PDGCode), _backw(0), _spu(1)
101 double* covarray=par.GetCov();
103 for(
int i=0;i<5;++i){
104 for(
int j=i;j<5;++j){
105 fCov[i][j]=covarray[count];
106 if(i!=j)
fCov[j][i]=covarray[count];
130 TMatrixT<double>& statePred)
132 TMatrixT<double> covPred(5,5);
140 TMatrixT<double>& statePred,
141 TMatrixT<double>& covPred)
145 GFException exc(
"GEANE propagation not possible for p.theta<THETACUT",__LINE__,__FILE__);
151 TVector3 o=pl.
getO();
152 TVector3
u=pl.
getU();
153 TVector3
v=pl.
getV();
172 for(
int i=0; i<5;++i){
173 for(
int j=i;j<5;++j){
174 cova[count++]=
fCov[i][j];
178 if(fabs(
fState[0][0])>10){
179 GFException exc(
"GeaneTrackRep: PROTECT AGAINST LOW MOMENTA",__LINE__,__FILE__);
209 GFException exc(
"GEANE propagation failed",__LINE__,__FILE__);
218 statePred[0][0]=result.
GetQp();
219 statePred[1][0]=result.
GetTV();
220 statePred[2][0]=result.
GetTW();
221 statePred[3][0]=result.
GetV();
222 statePred[4][0]=result.
GetW();
226 double* rescov=result.
GetCov();
228 for(
int i=0;i<5;++i){
229 for(
int j=i;j<5;++j){
230 covPred[i][j]=rescov[count];
231 if(i!=j)covPred[j][i]=rescov[count];
255 TVector3& dirInPoca){
257 GFException exc(
"GEANE propagation not possible for p.theta<THETACUT",__LINE__,__FILE__);
262 TMatrixT<double> statePred(dim,1);
263 TMatrixT<double> covPred(dim,dim);
276 for(
int i=0; i<5;++i){
277 for(
int j=i;j<5;++j){
278 cova[count++]=
fCov[i][j];
282 if(fabs(
fState[0][0])>10){
283 GFException exc(
"GeaneTrackRep: PROTECT AGAINST LOW MOMENTA",__LINE__,__FILE__);
311 GFException exc(
"GEANE propagation failed",__LINE__,__FILE__);
318 statePred[0][0]=result.
GetQp();
319 statePred[1][0]=result.
GetTV();
320 statePred[2][0]=result.
GetTW();
321 statePred[3][0]=result.
GetV();
322 statePred[4][0]=result.
GetW();
324 double* rescov=result.
GetCov();
326 for(
int i=0;i<5;++i){
327 for(
int j=i;j<5;++j){
328 covPred[i][j]=rescov[count];
329 if(i!=j)covPred[j][i]=rescov[count];
341 const TVector3& point2,
344 TVector3& poca_onwire)
347 GFException exc(
"GEANE propagation not possible for p.theta<THETACUT",__LINE__,__FILE__);
357 Double_t distance1, distance2;
358 distance1 = (point1 -
start).Mag();
359 distance2 = (point2 -
start).Mag();
360 Double_t maxdistance;
361 if(distance1 < distance2) maxdistance = distance2;
362 else maxdistance = distance1;
366 TVector3
point(0,0,0);
371 Float_t trklength = 0.;
375 Double_t cov55[5][5];
376 for(
int i = 0; i < 5; i++)
for(
int j = 0; j < 5; j++) cov55[i][j] =
fCov[i][j];
390 Int_t findpca =
_geane->
FindPCA(pca,
_pdg, point, point1, point2, maxdistance, Rad, poca, poca_onwire, Di, trklength);
393 GFException exc(
"findpca failure", __LINE__,__FILE__);
398 dirInPoca.SetXYZ(0., 0., 0.);
420 for(
int i=0; i<5;++i){
421 for(
int j=i;j<5;++j){
422 cova[count++]=
fCov[i][j];
426 if(fabs(
fState[0][0])>10){
427 GFException exc(
"GeaneTrackRep: PROTECT AGAINST LOW MOMENTA",__LINE__,__FILE__);
451 GFException exc(
"GEANE propagation failed",__LINE__,__FILE__);
467 TMatrixT<double> statePred(
fState);
469 return pl.
getO()+(statePred[3][0]*pl.
getU())+(statePred[4][0]*pl.
getV());
475 TMatrixT<double> statePred(
fState);
478 TVector3
mom = fSPU*pl.
getNormal()+fSPU*statePred[1][0]*pl.
getU()+fSPU*statePred[2][0]*pl.
getV();
479 mom.SetMag(1./fabs(statePred[0][0]));
485 TMatrixT<double> statePred(
fState);
489 mom.SetMag(1./fabs(statePred[0][0]));
490 pos = pl.
getO()+(statePred[3][0]*pl.
getU())+(statePred[4][0]*pl.
getV());
498 TMatrixT<double> statePred(
fState), covPred(
fCov);
502 pos = pl.
getO()+(statePred[3][0]*pl.
getU())+(statePred[4][0]*pl.
getV());
506 mom = fSPU*pl.
getNormal()+fSPU*statePred[1][0]*pl.
getU()+fSPU*statePred[2][0]*pl.
getV();
507 mom.SetMag(1./fabs(statePred[0][0]));
513 for(
int i = 0; i < 5; i++)
for(
int j = 0; j < 5; j++) cov55[i][j] = covPred[i][j];
519 statePred[4][0], statePred[1][0],
520 statePred[2][0], statePred[0][0],
526 for(
int i = 0; i < 6; i++)
for(
int j = 0; j < 6; j++) cov[i][j] = cov66[i][j];