]>
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 | // |
6bf84b68 | 48 | |
6d50f529 | 49 | } |
e3b2b5e5 | 50 | |
6d50f529 | 51 | //_____________________________________________________________________________ |
52 | AliTRDltuTracklet::AliTRDltuTracklet(Int_t det, Int_t row, Float_t rowz | |
53 | , Float_t slope, Float_t offset, Float_t time | |
54 | , Int_t ncl, Int_t label, Float_t q) | |
55 | :TObject() | |
56 | ,fX(time) | |
57 | ,fY(offset) | |
58 | ,fSlope(slope) | |
59 | ,fRowz(rowz) | |
60 | ,fDetector(det) | |
61 | ,fRow(row) | |
62 | ,fNclusters(ncl) | |
63 | ,fLabel(label) | |
64 | ,fQ(q) | |
65 | { | |
66 | // | |
67 | // AliTRDltuTracklet constructor | |
68 | // | |
e3b2b5e5 | 69 | |
70 | } | |
71 | ||
72 | //_____________________________________________________________________________ | |
73 | AliTRDltuTracklet::~AliTRDltuTracklet() | |
74 | { | |
75 | // | |
6bf84b68 | 76 | // Destructor |
e3b2b5e5 | 77 | // |
78 | ||
79 | } | |
80 | ||
81 | //_____________________________________________________________________________ | |
82 | Float_t AliTRDltuTracklet::GetPt(Float_t field) const | |
83 | { | |
6d50f529 | 84 | // |
85 | // Transverse momentum calculation | |
86 | // Curvature R = (fX*fX + fY*fY) / (2 * sin(alpha)) | |
e3b2b5e5 | 87 | // alpha = angle deviation from "infinite momentum" |
88 | // | |
6d50f529 | 89 | // Consistent with AliTRDmcmTracklet::GetPt(...) |
90 | // | |
e3b2b5e5 | 91 | |
6bf84b68 | 92 | Float_t infSlope = TMath::ATan(fY/fX) / TMath::Pi()*180.0; |
6d50f529 | 93 | Float_t alpha = fSlope - infSlope; |
94 | Float_t r = TMath::Sqrt(fX*fX + fY*fY) | |
6bf84b68 | 95 | / (2.0 * TMath::Sin(alpha/180.0*TMath::Pi())); |
e3b2b5e5 | 96 | |
6d50f529 | 97 | Float_t pt = 0.3 * field * 0.01 * r; |
e3b2b5e5 | 98 | |
99 | return pt; | |
100 | ||
101 | } | |
102 | ||
103 | //_____________________________________________________________________________ | |
6bf84b68 | 104 | Int_t AliTRDltuTracklet::Compare(const TObject *o) const |
e3b2b5e5 | 105 | { |
106 | // | |
107 | // compare two LTU tracklets according to the intercept point Y1 | |
108 | // | |
109 | ||
6bf84b68 | 110 | AliTRDltuTracklet *ltutrk = (AliTRDltuTracklet *) o; |
111 | ||
112 | if (fRow != ltutrk->fRow) { | |
113 | return +1; | |
114 | } | |
115 | if (fDetector != ltutrk->fDetector) { | |
116 | return +1; | |
117 | } | |
118 | ||
119 | if (fY < ltutrk->fY) { | |
120 | return -1; | |
121 | } | |
122 | if (fY == ltutrk->fY) { | |
123 | return 0; | |
124 | } | |
e3b2b5e5 | 125 | |
126 | return 1; | |
127 | ||
128 | } | |
129 | ||
130 | //_____________________________________________________________________________ | |
131 | Float_t AliTRDltuTracklet::GetYproj(Float_t xpl) const | |
132 | { | |
133 | // | |
134 | // y-projection (bending plane) onto the median plane | |
135 | // | |
136 | ||
6d50f529 | 137 | Float_t yproj = fY + TMath::Tan(fSlope/180.0*TMath::Pi()) * (xpl - fX); |
e3b2b5e5 | 138 | |
139 | return yproj; | |
140 | ||
141 | } | |
142 | ||
143 | //_____________________________________________________________________________ | |
144 | Float_t AliTRDltuTracklet::GetZproj(Float_t xpl) const | |
145 | { | |
146 | // | |
147 | // z-projection (using pad row center) onto the median plane | |
148 | // | |
149 | ||
6d50f529 | 150 | Float_t zproj = fRowz * xpl / fX; |
e3b2b5e5 | 151 | |
152 | return zproj; | |
153 | ||
154 | } | |
155 |