]>
Commit | Line | Data |
---|---|---|
e3b2b5e5 | 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 | // // | |
18 | // // | |
19 | // TRD chamber local track (LTU, tracklet) // | |
20 | // // | |
6d50f529 | 21 | // Author: // |
22 | // Bogdan Vulpescu // | |
e3b2b5e5 | 23 | // // |
24 | /////////////////////////////////////////////////////////////////////////////// | |
25 | ||
26 | #include <TMath.h> | |
27 | ||
28 | #include "AliTRDltuTracklet.h" | |
29 | ||
30 | ClassImp(AliTRDltuTracklet) | |
31 | ||
32 | //_____________________________________________________________________________ | |
6d50f529 | 33 | AliTRDltuTracklet::AliTRDltuTracklet() |
34 | :TObject() | |
35 | ,fX(0) | |
36 | ,fY(0) | |
37 | ,fSlope(0) | |
38 | ,fRowz(0) | |
39 | ,fDetector(0) | |
40 | ,fRow(0) | |
41 | ,fNclusters(0) | |
42 | ,fLabel(0) | |
43 | ,fQ(0) | |
e3b2b5e5 | 44 | { |
45 | // | |
6d50f529 | 46 | // AliTRDltuTracklet default constructor |
e3b2b5e5 | 47 | // |
6d50f529 | 48 | } |
e3b2b5e5 | 49 | |
6d50f529 | 50 | //_____________________________________________________________________________ |
51 | AliTRDltuTracklet::AliTRDltuTracklet(Int_t det, Int_t row, Float_t rowz | |
52 | , Float_t slope, Float_t offset, Float_t time | |
53 | , Int_t ncl, Int_t label, Float_t q) | |
54 | :TObject() | |
55 | ,fX(time) | |
56 | ,fY(offset) | |
57 | ,fSlope(slope) | |
58 | ,fRowz(rowz) | |
59 | ,fDetector(det) | |
60 | ,fRow(row) | |
61 | ,fNclusters(ncl) | |
62 | ,fLabel(label) | |
63 | ,fQ(q) | |
64 | { | |
65 | // | |
66 | // AliTRDltuTracklet constructor | |
67 | // | |
e3b2b5e5 | 68 | |
69 | } | |
70 | ||
71 | //_____________________________________________________________________________ | |
72 | AliTRDltuTracklet::~AliTRDltuTracklet() | |
73 | { | |
74 | // | |
75 | // destructor | |
76 | // | |
77 | ||
78 | } | |
79 | ||
80 | //_____________________________________________________________________________ | |
81 | Float_t AliTRDltuTracklet::GetPt(Float_t field) const | |
82 | { | |
6d50f529 | 83 | // |
84 | // Transverse momentum calculation | |
85 | // Curvature R = (fX*fX + fY*fY) / (2 * sin(alpha)) | |
e3b2b5e5 | 86 | // alpha = angle deviation from "infinite momentum" |
87 | // | |
6d50f529 | 88 | // Consistent with AliTRDmcmTracklet::GetPt(...) |
89 | // | |
e3b2b5e5 | 90 | |
91 | Float_t infSlope = TMath::ATan(fY/fX)/TMath::Pi()*180.0; | |
6d50f529 | 92 | Float_t alpha = fSlope - infSlope; |
93 | Float_t r = TMath::Sqrt(fX*fX + fY*fY) | |
94 | / (2.0*TMath::Sin(alpha/180.0*TMath::Pi())); | |
e3b2b5e5 | 95 | |
6d50f529 | 96 | Float_t pt = 0.3 * field * 0.01 * r; |
e3b2b5e5 | 97 | |
98 | return pt; | |
99 | ||
100 | } | |
101 | ||
102 | //_____________________________________________________________________________ | |
103 | Int_t AliTRDltuTracklet::Compare(const TObject * o) const | |
104 | { | |
105 | // | |
106 | // compare two LTU tracklets according to the intercept point Y1 | |
107 | // | |
108 | ||
109 | AliTRDltuTracklet *ltutrk = (AliTRDltuTracklet*)o; | |
110 | ||
111 | if (fRow != ltutrk->fRow) return +1; | |
112 | if (fDetector != ltutrk->fDetector) return +1; | |
113 | ||
114 | if (fY < ltutrk->fY) return -1; | |
115 | if (fY == ltutrk->fY) return 0; | |
116 | ||
117 | return 1; | |
118 | ||
119 | } | |
120 | ||
121 | //_____________________________________________________________________________ | |
122 | Float_t AliTRDltuTracklet::GetYproj(Float_t xpl) const | |
123 | { | |
124 | // | |
125 | // y-projection (bending plane) onto the median plane | |
126 | // | |
127 | ||
6d50f529 | 128 | Float_t yproj = fY + TMath::Tan(fSlope/180.0*TMath::Pi()) * (xpl - fX); |
e3b2b5e5 | 129 | |
130 | return yproj; | |
131 | ||
132 | } | |
133 | ||
134 | //_____________________________________________________________________________ | |
135 | Float_t AliTRDltuTracklet::GetZproj(Float_t xpl) const | |
136 | { | |
137 | // | |
138 | // z-projection (using pad row center) onto the median plane | |
139 | // | |
140 | ||
6d50f529 | 141 | Float_t zproj = fRowz * xpl / fX; |
e3b2b5e5 | 142 | |
143 | return zproj; | |
144 | ||
145 | } | |
146 |