]>
Commit | Line | Data |
---|---|---|
52c19022 | 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: AliTRDtrackletMCM.cxx 28397 2008-09-02 09:33:00Z cblume $ */ | |
17 | ||
18 | //////////////////////////////////////////////////////////////////////////// | |
19 | // // | |
20 | // MCM tracklet // | |
21 | // // | |
22 | // Author: J. Klein (Jochen.Klein@cern.ch) // | |
23 | // // | |
24 | //////////////////////////////////////////////////////////////////////////// | |
25 | ||
26 | #include "AliTRDtrackletMCM.h" | |
27 | #include "AliLog.h" | |
28 | ||
29 | ClassImp(AliTRDtrackletMCM) | |
30 | ||
31 | AliTRDtrackletMCM::AliTRDtrackletMCM(UInt_t trackletWord) : | |
32 | AliTRDtrackletBase(), | |
4cc89512 | 33 | fGeo(0x0), |
52c19022 | 34 | fHCId(-1), |
35 | fTrackletWord(trackletWord), | |
36 | fMCM(-1), | |
4cc89512 | 37 | fROB(-1), |
38 | fLabel(-1) | |
52c19022 | 39 | { |
4cc89512 | 40 | fGeo = new AliTRDgeometry(); |
52c19022 | 41 | } |
42 | ||
43 | AliTRDtrackletMCM::AliTRDtrackletMCM(UInt_t trackletWord, Int_t hcid) : | |
44 | AliTRDtrackletBase(), | |
4cc89512 | 45 | fGeo(0x0), |
52c19022 | 46 | fHCId(hcid), |
47 | fTrackletWord(trackletWord), | |
48 | fMCM(-1), | |
4cc89512 | 49 | fROB(-1), |
50 | fLabel(-1) | |
52c19022 | 51 | { |
4cc89512 | 52 | fGeo = new AliTRDgeometry(); |
52c19022 | 53 | } |
54 | ||
b0a41e80 | 55 | AliTRDtrackletMCM::AliTRDtrackletMCM(UInt_t trackletWord, Int_t hcid, Int_t rob, Int_t mcm) : |
56 | AliTRDtrackletBase(), | |
57 | fGeo(0x0), | |
58 | fHCId(hcid), | |
59 | fTrackletWord(trackletWord), | |
60 | fMCM(mcm), | |
61 | fROB(rob), | |
62 | fLabel(-1) | |
63 | { | |
64 | fGeo = new AliTRDgeometry(); | |
65 | } | |
66 | ||
52c19022 | 67 | AliTRDtrackletMCM::AliTRDtrackletMCM(const AliTRDtrackletMCM &rhs) : |
68 | AliTRDtrackletBase(rhs), | |
4cc89512 | 69 | fGeo(0x0), |
52c19022 | 70 | fHCId(rhs.fHCId), |
71 | fTrackletWord(rhs.fTrackletWord), | |
72 | fMCM(rhs.fMCM), | |
4cc89512 | 73 | fROB(rhs.fROB), |
74 | fLabel(rhs.fLabel) | |
52c19022 | 75 | { |
4cc89512 | 76 | fGeo = new AliTRDgeometry(); |
52c19022 | 77 | } |
78 | ||
79 | AliTRDtrackletMCM::~AliTRDtrackletMCM() | |
80 | { | |
4cc89512 | 81 | delete fGeo; |
52c19022 | 82 | } |
83 | ||
84 | Int_t AliTRDtrackletMCM::GetYbin() const { | |
85 | // returns (signed) value of Y | |
86 | if (fTrackletWord & 0x1000) { | |
87 | return -((~(fTrackletWord-1)) & 0x1fff); | |
88 | } | |
89 | else { | |
90 | return (fTrackletWord & 0x1fff); | |
91 | } | |
92 | } | |
93 | ||
94 | Int_t AliTRDtrackletMCM::GetdY() const | |
95 | { | |
96 | // returns (signed) value of the deflection length | |
97 | if (fTrackletWord & (1 << 19)) { | |
98 | return -((~((fTrackletWord >> 13) - 1)) & 0x7f); | |
99 | } | |
100 | else { | |
101 | return ((fTrackletWord >> 13) & 0x7f); | |
102 | } | |
103 | } |