]>
Commit | Line | Data |
---|---|---|
694bca28 | 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 | /* $Id$ */ | |
17 | ||
9c9d2487 | 18 | |
19 | //////////////////////////////////////////////////////////////////////////////// | |
20 | // | |
21 | // AliBarrelTrack is a snapshot of the TPC or TRD track. | |
22 | // The barrel track is stored by tracker every time a track is crossing | |
23 | // reference plane. | |
24 | // | |
25 | // Barrel track have | |
26 | // - state vactor in "external represenantion" | |
27 | // - diagonal elements of covariance matric | |
28 | // - auxiliary paramrters: | |
29 | // chi2, number of clusters, number of sector srossed | |
30 | // - methods to compare with track references | |
31 | // | |
32 | // Barrel track can be directly compared with AliTrackReferences, | |
33 | // TPC and TRD tracks can be compared using the same macro. | |
34 | // | |
35 | // S. Radomski, [GSI] mail: S.Radomski@gsi.de | |
36 | // 07.04.2003 | |
37 | // | |
38 | //////////////////////////////////////////////////////////////////////////////// | |
39 | ||
40 | #include "AliBarrelTrack.h" | |
41 | ||
42 | ClassImp(AliBarrelTrack) | |
43 | ||
44 | //////////////////////////////////////////////////////////////////////////////// | |
45 | ||
46 | AliBarrelTrack:: AliBarrelTrack() : TObject() { | |
47 | // | |
48 | // Standard constructor | |
49 | // reset all data-members | |
50 | // | |
51 | ||
52 | fLabel = fRefPlane = fIsIn = 0; | |
53 | fX = fAlpha = 0.0; | |
54 | fZ = fY = fTgLambda = fSnPhi = f1Pt = 0.0; | |
55 | ||
56 | for(Int_t i=0; i<5; i++) fTimeHypothesis[i] = 0; | |
57 | ||
58 | fLength = 0.0; | |
59 | fNClusters = fNWrong = fNRotate = 0; | |
60 | fChi2 = 0.0; | |
61 | fMass = fdEdX = 0; | |
62 | ||
63 | fCy = fCz = fCtg = fCpt = fCphi = 0.0; | |
64 | } | |
65 | ||
66 | //////////////////////////////////////////////////////////////////////////////// | |
67 | ||
68 | void AliBarrelTrack::SetLabel(Int_t label) { | |
69 | // | |
70 | // Sets the label | |
71 | // | |
72 | ||
73 | fLabel = label; | |
74 | } | |
75 | ||
76 | //////////////////////////////////////////////////////////////////////////////// | |
77 | ||
78 | void AliBarrelTrack::SetX(Double_t x, Double_t alpha) { | |
79 | // | |
80 | ||
81 | fX = x; | |
82 | fAlpha = alpha; | |
83 | } | |
84 | ||
85 | //////////////////////////////////////////////////////////////////////////////// | |
86 | ||
694bca28 | 87 | void AliBarrelTrack::SetRefPlane(Int_t nRefPlane, Int_t isIn) |
88 | { | |
89 | // | |
90 | // Define the reference plane | |
91 | // | |
9c9d2487 | 92 | fRefPlane = nRefPlane; |
93 | fIsIn = isIn; | |
94 | } | |
95 | ||
96 | //////////////////////////////////////////////////////////////////////////////// | |
97 | ||
694bca28 | 98 | void AliBarrelTrack::SetNClusters(Int_t nClusters, Double_t chi2) |
99 | { | |
100 | // | |
101 | // Set number of cluster | |
102 | // | |
9c9d2487 | 103 | fNClusters = nClusters; |
104 | fChi2 = chi2; | |
105 | } | |
106 | ||
107 | //////////////////////////////////////////////////////////////////////////////// | |
108 | ||
694bca28 | 109 | void AliBarrelTrack::SetTime(Double_t time[5], Double_t length) |
110 | { | |
111 | // | |
112 | // Set time for a track | |
113 | // | |
9c9d2487 | 114 | for(Int_t i=0; i<5; i++) |
115 | fTimeHypothesis[i] = time[i]; | |
116 | ||
117 | fLength = length; | |
118 | } | |
119 | ||
120 | //////////////////////////////////////////////////////////////////////////////// | |
121 | ||
122 | void AliBarrelTrack::SetStateVector(Double_t vec[5]) { | |
123 | // | |
124 | // Set State Vector from external representation | |
125 | // | |
126 | ||
127 | ||
128 | fY = vec[0]; | |
129 | fZ = vec[1]; | |
130 | fTgLambda = vec[3]; | |
131 | fSnPhi = vec[2]; | |
132 | f1Pt = vec[4]; | |
133 | } | |
134 | ||
135 | //////////////////////////////////////////////////////////////////////////////// | |
136 | ||
137 | void AliBarrelTrack::SetCovarianceMatrix(Double_t vec[15]) { | |
138 | // | |
139 | // Set Covariance Matrix from external represenatation | |
140 | // | |
141 | ||
142 | fCy = vec[0]; | |
143 | fCz = vec[2]; | |
144 | fCtg = vec[9]; | |
145 | fCphi = vec[5]; | |
146 | fCpt = vec[14]; | |
147 | } | |
148 | ||
149 | //////////////////////////////////////////////////////////////////////////////// |