]>
Commit | Line | Data |
---|---|---|
90a74d7a | 1 | #ifndef ALIHLTMUONMANSOTRACKSBLOCKSTRUCT_H |
2 | #define ALIHLTMUONMANSOTRACKSBLOCKSTRUCT_H | |
3 | /* Copyright(c) 1998-2007, ALICE Experiment at CERN, All rights reserved. * | |
4 | * See cxx source for full Copyright notice */ | |
5 | ||
1d8ae082 | 6 | // $Id$ |
90a74d7a | 7 | |
dba14d7d | 8 | /// |
9 | /// @file AliHLTMUONMansoTracksBlockStruct.h | |
10 | /// @author Artur Szostak <artursz@iafrica.com> | |
11 | /// @date 21 May 2007 | |
12 | /// @brief Definition the Manso tracks internal dimuon HLT data block. | |
13 | /// | |
14 | /// The Manso tracks data block is an internal dimuon HLT data block structure | |
15 | /// generated by the Manso algorithm. | |
16 | /// The structures are defined with C linkage since C generally gives us more | |
17 | /// binary compatibility between compilers. | |
18 | /// | |
90a74d7a | 19 | |
20 | #include "AliHLTMUONRecHitsBlockStruct.h" | |
21 | ||
22 | extern "C" | |
23 | { | |
24 | ||
25 | /** | |
26 | * Track structure containing information about a partial track generated by | |
27 | * the Manso algorithm. | |
28 | */ | |
29 | struct AliHLTMUONMansoTrackStruct | |
30 | { | |
31 | AliHLTInt32_t fId; // Each Manso track should have an ID number unique | |
32 | // for a given event. -1 == invalid. | |
33 | ||
34 | AliHLTInt32_t fTrigRec; // The associated trigger record ID used as the | |
35 | // seed for the Manso algorithm. | |
36 | ||
37 | // The flags word constains the following bit fields (bit 31 is most | |
38 | // significant): | |
39 | // bits: [31][30][29 --- 4][ 3 ][ 2 ][ 1 ][ 0 ] | |
40 | // field: - + reserved hst[3] hst[2] hst[1] hst[0] | |
41 | // Where fields hst[i] indicates if fHit[i] has been filled/set. | |
42 | // Reserved bits should be set to zero. | |
43 | // Particle sign: if '-' is set then particle has minus sign. | |
44 | // if '+' is set then particle has negative sign. | |
45 | // Either '+' or '-' should be set and if neither then the particle | |
46 | // sign is unknown. | |
47 | AliHLTUInt32_t fFlags; | |
48 | ||
49 | AliHLTFloat32_t fPx; // Particle's momentum X component in GeV/c. | |
50 | AliHLTFloat32_t fPy; // Particle's momentum Y component in GeV/c. | |
51 | AliHLTFloat32_t fPz; // Particle's momentum Z component in GeV/c. | |
52 | AliHLTFloat32_t fChi2; // The chi squared of the fit of fHit points to | |
dba14d7d | 53 | // the track model. If -1 then no fit done and |
54 | // momentum vector is invalid. | |
90a74d7a | 55 | |
56 | // Particle hit coordinates on tracking chambers 7 to 10. | |
57 | // fHit[0] is for chamber 7 fHit[1] for chamber 8 etc... | |
58 | AliHLTMUONRecHitStruct fHit[4]; | |
59 | }; | |
60 | ||
61 | /** | |
62 | * AliHLTMUONMansoTracksBlockStruct defines the format of the internal | |
63 | * Manso tracks data block. | |
64 | */ | |
65 | struct AliHLTMUONMansoTracksBlockStruct | |
66 | { | |
67 | AliHLTMUONDataBlockHeader fHeader; // Common data block header. | |
68 | ||
69 | // Array of Manso tracks. | |
23ad6161 | 70 | //AliHLTMUONMansoTrackStruct fTrack[/*fHeader.fNrecords*/]; |
90a74d7a | 71 | }; |
72 | ||
73 | } // extern "C" | |
74 | ||
75 | ||
76 | /** | |
77 | * Stream operator for usage with std::ostream classes which prints the track | |
78 | * information in the following format: | |
79 | * {fId = xx, fTrigRec = yy, fFlags = 0xZZ, fPx = uu, fPy = vv, fPz = ww, | |
80 | * fChi2 = ss, fHit[0] = {...}, fHit[1] = {...}, fHit[2] = {...}, | |
81 | * fHit[3] = {...}} | |
82 | */ | |
83 | std::ostream& operator << ( | |
84 | std::ostream& stream, const AliHLTMUONMansoTrackStruct& trigrec | |
85 | ); | |
86 | ||
87 | /** | |
88 | * Stream operator for usage with std::ostream classes which prints the | |
89 | * AliHLTMUONMansoTracksBlockStruct in the following format: | |
90 | * {fHeader = xx, fTrack[] = [{..}, {..}, ...]} | |
91 | */ | |
92 | std::ostream& operator << ( | |
93 | std::ostream& stream, const AliHLTMUONMansoTracksBlockStruct& block | |
94 | ); | |
95 | ||
96 | ||
97 | inline bool operator == ( | |
98 | const AliHLTMUONMansoTrackStruct& a, | |
99 | const AliHLTMUONMansoTrackStruct& b | |
100 | ) | |
101 | { | |
102 | return a.fId == b.fId and a.fTrigRec == b.fTrigRec | |
103 | and a.fFlags == b.fFlags and a.fPx == b.fPx and a.fPy == b.fPy | |
104 | and a.fPz == b.fPz and a.fChi2 == b.fChi2 | |
105 | and a.fHit[0] == b.fHit[0] and a.fHit[1] == b.fHit[1] | |
106 | and a.fHit[2] == b.fHit[2] and a.fHit[3] == b.fHit[3]; | |
107 | } | |
108 | ||
109 | inline bool operator != ( | |
110 | const AliHLTMUONMansoTrackStruct& a, | |
111 | const AliHLTMUONMansoTrackStruct& b | |
112 | ) | |
113 | { | |
114 | return not operator == (a, b); | |
115 | } | |
116 | ||
117 | ||
118 | bool operator == ( | |
119 | const AliHLTMUONMansoTracksBlockStruct& a, | |
120 | const AliHLTMUONMansoTracksBlockStruct& b | |
121 | ); | |
122 | ||
123 | inline bool operator != ( | |
124 | const AliHLTMUONMansoTracksBlockStruct& a, | |
125 | const AliHLTMUONMansoTracksBlockStruct& b | |
126 | ) | |
127 | { | |
128 | return not operator == (a, b); | |
129 | } | |
130 | ||
131 | #endif // ALIHLTMUONMANSOTRACKSBLOCKSTRUCT_H |