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