]>
Commit | Line | Data |
---|---|---|
f644512a | 1 | /************************************************************************** |
2 | * Copyright(c) 1998-1999, ALICE Experiment at CERN, All rights reserved. * | |
3 | * * | |
4 | * Author: The ALICE Off-line Project. * | |
5 | * Contributors are mentioned in the code where appropriate. * | |
6 | * * | |
7 | * Permission to use, copy, modify and distribute this software and its * | |
8 | * documentation strictly for non-commercial purposes is hereby granted * | |
9 | * without fee, provided that the above copyright notice appears in all * | |
10 | * copies and that both the copyright notice and this permission notice * | |
11 | * appear in the supporting documentation. The authors make no claims * | |
12 | * about the suitability of this software for any purpose. It is * | |
13 | * provided "as is" without express or implied warranty. * | |
14 | **************************************************************************/ | |
15 | ||
16 | //------------------------------------------------------------------------- | |
17 | // Implementation of the HLT TPC Hough Kalman track class | |
18 | // | |
19 | // Origin: Cvetan Cheshkov, CERN, Cvetan.Cheshkov@cern.ch | |
20 | //------------------------------------------------------------------------- | |
21 | ||
22 | #include "AliL3HoughKalmanTrack.h" | |
23 | ||
24 | #include "AliL3StandardIncludes.h" | |
25 | #include "AliL3HoughTrack.h" | |
26 | #include "AliL3HoughBaseTransformer.h" | |
27 | #include "AliL3HoughTransformerRow.h" | |
28 | #include "AliL3Histogram.h" | |
29 | ||
30 | Int_t CalcExternalParams(const AliL3HoughTrack& t, Double_t deltax, Double_t deltay, Double_t deltaeta, const Double_t zvertex, const Double_t xhit, Double_t xx[5]); | |
31 | ||
32 | ClassImp(AliL3HoughKalmanTrack) | |
33 | ||
34 | //____________________________________________________________________________ | |
35 | AliL3HoughKalmanTrack::AliL3HoughKalmanTrack(const AliL3HoughTrack& t) throw (const Char_t *) | |
36 | : AliTPCtrack() | |
37 | { | |
38 | // The method constructs an AliL3HoughKalmanTrack object | |
39 | // from an HLT Hough track | |
40 | ||
41 | SetChi2(0.); | |
42 | SetNumberOfClusters(t.GetLastRow()-t.GetFirstRow()); | |
43 | SetLabel(t.GetMCid()); | |
44 | SetFakeRatio(0.); | |
45 | SetMass(0.13957); | |
46 | ||
47 | fdEdx=0; | |
48 | fAlpha = fmod((t.GetSector()+0.5)*(2*TMath::Pi()/18),2*TMath::Pi()); | |
49 | if (fAlpha < -TMath::Pi()) fAlpha += 2*TMath::Pi(); | |
50 | else if (fAlpha >= TMath::Pi()) fAlpha -= 2*TMath::Pi(); | |
51 | ||
52 | const Double_t xhit = 82.97; | |
53 | const Double_t zvertex = t.GetFirstPointZ(); | |
54 | Double_t xx[5]; | |
55 | Double_t deltax = t.GetPterr(); | |
56 | Double_t deltay = t.GetPsierr(); | |
57 | Double_t deltaeta = t.GetTglerr(); | |
58 | if(CalcExternalParams(t,0,0,0,zvertex,xhit,xx)==0) throw "AliL3HoughKalmanTrack: conversion failed !\n"; | |
59 | ||
60 | //Filling of the track paramaters | |
61 | fX=xhit; | |
62 | fP0=xx[0]; | |
63 | fP1=xx[1]; | |
64 | fP2=xx[2]; | |
65 | fP3=xx[3]; | |
66 | fP4=xx[4]; | |
67 | ||
c84a5e9e | 68 | SaveLocalConvConst(); |
69 | ||
f644512a | 70 | //and covariance matrix |
71 | //For the moment estimate the covariance matrix numerically | |
72 | Double_t xx1[5]; | |
73 | if(CalcExternalParams(t,deltax,0,0,zvertex,xhit,xx1)==0) throw "AliL3HoughKalmanTrack: conversion failed !\n"; | |
74 | Double_t xx2[5]; | |
75 | if(CalcExternalParams(t,0,deltay,0,zvertex,xhit,xx2)==0) throw "AliL3HoughKalmanTrack: conversion failed !\n"; | |
76 | Double_t xx3[5]; | |
77 | if(CalcExternalParams(t,0,0,deltaeta,zvertex,xhit,xx3)==0) throw "AliL3HoughKalmanTrack: conversion failed !\n"; | |
78 | ||
79 | Double_t dx1[5],dx2[5],dx3[5]; | |
80 | for(Int_t i=0;i<5;i++) { | |
81 | dx1[i]=xx1[i]-xx[i]; | |
82 | dx2[i]=xx2[i]-xx[i]; | |
83 | dx3[i]=xx3[i]-xx[i]; | |
84 | } | |
85 | ||
86 | fC00=dx1[0]*dx1[0]+dx2[0]*dx2[0]; | |
87 | fC22=dx1[2]*dx1[2]+dx2[2]*dx2[2]; | |
88 | fC44=dx1[4]*dx1[4]+dx2[4]*dx2[4]; | |
89 | fC20=dx1[2]*dx1[0]+dx2[2]*dx2[0]; | |
90 | fC40=dx1[4]*dx1[0]+dx2[4]*dx2[0]; | |
91 | fC42=dx1[4]*dx1[2]+dx2[4]*dx2[2]; | |
92 | fC33=dx3[3]*dx3[3]; | |
93 | fC11=dx3[1]*dx3[1]; | |
94 | fC31=dx3[3]*dx3[1]; | |
95 | fC10=fC30=fC21=fC41=fC32=fC43=0; | |
96 | fC20=fC42=fC40=0; | |
97 | ||
98 | } | |
99 | ||
100 | //____________________________________________________________________________ | |
101 | Int_t CalcExternalParams(const AliL3HoughTrack& t, Double_t deltax, Double_t deltay, Double_t deltaeta, const Double_t zvertex, const Double_t xhit, Double_t xx[5]) | |
102 | { | |
103 | // Translate the parameters of the Hough tracks into | |
104 | // AliKalmanTrack paramters | |
105 | ||
106 | //First get the emiision angle and track curvature | |
107 | Double_t binx = t.GetBinX()+deltax; | |
108 | Double_t biny = t.GetBinY()+deltay; | |
109 | Double_t psi = atan((binx-biny)/(AliL3HoughTransformerRow::GetBeta1()-AliL3HoughTransformerRow::GetBeta2())); | |
110 | Double_t kappa = 2.0*(binx*cos(psi)-AliL3HoughTransformerRow::GetBeta1()*sin(psi)); | |
111 | Double_t radius = 1./kappa; | |
112 | ||
113 | //Local y coordinate | |
114 | Double_t centerx = -1.*radius*sin(psi); | |
115 | Double_t centery = radius*cos(psi); | |
116 | Double_t aa = (xhit - centerx)*(xhit - centerx); | |
117 | Double_t r2 = radius*radius; | |
118 | if(aa > r2) return 0; | |
119 | Double_t aa2 = sqrt(r2 - aa); | |
120 | Double_t y1 = centery + aa2; | |
121 | Double_t y2 = centery - aa2; | |
122 | Double_t yhit = y1; | |
123 | if(fabs(y2) < fabs(y1)) yhit = y2; | |
124 | ||
125 | //Local z coordinate | |
126 | Double_t stot = sqrt(xhit*xhit+yhit*yhit); | |
127 | Double_t zhit; | |
128 | ||
129 | //Lambda | |
130 | Double_t eta=t.GetPseudoRapidity()+deltaeta; | |
131 | Double_t theta = 2*atan(exp(-1.*eta)); | |
132 | Double_t tanl = 1./tan(theta); | |
133 | zhit = zvertex + stot*tanl; | |
134 | ||
135 | //Local sine of track azimuthal angle | |
136 | Double_t sinbeta = centerx/radius; | |
137 | ||
138 | xx[0] = yhit; | |
139 | xx[1] = zhit; | |
140 | xx[2] = sinbeta; | |
141 | xx[3] = tanl; | |
142 | xx[4] = kappa; | |
143 | return 1; | |
144 | } |