]>
Commit | Line | Data |
---|---|---|
90a74d7a | 1 | #ifndef ALIHLTMUONMANSOCANDIDATESBLOCKSTRUCT_H |
2 | #define ALIHLTMUONMANSOCANDIDATESBLOCKSTRUCT_H | |
3 | /* Copyright(c) 1998-2007, ALICE Experiment at CERN, All rights reserved. * | |
4 | * See cxx source for full Copyright notice */ | |
5 | ||
6 | /* $Id$ */ | |
7 | ||
8 | /** | |
9 | * @file AliHLTMUONMansoCandidatesBlockStruct.h | |
10 | * @author Artur Szostak <artursz@iafrica.com> | |
11 | * @date | |
12 | * @brief Definition of internal dimuon HLT track candidates data block | |
13 | * structure generated by the Manso algorithm. | |
14 | * | |
15 | * The structures are defined with C linkage since C generally gives us more | |
16 | * binary compatibility between compilers. | |
17 | */ | |
18 | ||
19 | #include "AliHLTMUONMansoTracksBlockStruct.h" | |
20 | ||
21 | extern "C" | |
22 | { | |
23 | ||
24 | /** | |
25 | * Structure containing information about a region of interest (RoI) used in | |
26 | * the Manso algorithm to find track candidates. | |
27 | */ | |
28 | struct AliHLTMUONMansoRoIStruct | |
29 | { | |
30 | AliHLTFloat32_t fX; // The X coordinate for the RoI disc centre. | |
31 | AliHLTFloat32_t fY; // The Y coordinate for the RoI disc centre. | |
32 | AliHLTFloat32_t fZ; // The detection plane Z coordinate in which the RoI is in. | |
33 | AliHLTFloat32_t fRadius; // The radius of the RoI disc. | |
34 | }; | |
35 | ||
36 | /** | |
37 | * This structure contains information about a track candidate that was attempted | |
38 | * during track reconstruction in the Manso algorithm. The regions of interests | |
39 | * used are indicated including the partially reconstructed track. | |
40 | */ | |
41 | struct AliHLTMUONMansoCandidateStruct | |
42 | { | |
43 | // The partially of fully reconstructed track. | |
44 | AliHLTMUONMansoTrackStruct fTrack; | |
45 | ||
46 | // The regions of interest searched on the various chambers. | |
47 | // fRoI[0] is region of interest on chamber 7, fRoI[1] is on 8 etc... | |
48 | AliHLTMUONMansoRoIStruct fRoI[4]; | |
a090ff22 | 49 | |
50 | // The parameters used for momentum estimation: | |
51 | AliHLTFloat32_t fZmiddle; // Z position in the middle of the magnetic field in centimetres. | |
52 | AliHLTFloat32_t fBl; // The integrated magnetic field in (T.m) tesla metres. | |
90a74d7a | 53 | }; |
54 | ||
55 | /** | |
56 | * AliHLTMUONMansoCandidatesBlockStruct defines the format of the internal | |
57 | * Manso track candidates data block. | |
58 | */ | |
59 | struct AliHLTMUONMansoCandidatesBlockStruct | |
60 | { | |
61 | AliHLTMUONDataBlockHeader fHeader; // Common data block header. | |
62 | ||
63 | // Array of Manso track candidates. | |
23ad6161 | 64 | //AliHLTMUONMansoCandidateStruct fCandidate[/*fHeader.fNrecords*/]; |
90a74d7a | 65 | }; |
66 | ||
67 | } // extern "C" | |
68 | ||
69 | ||
70 | /** | |
71 | * Stream operator for usage with std::ostream classes which prints the RoI | |
72 | * information in the following format: | |
73 | * {fX = xx, fY = yy, fZ = zz, fRadius = rr} | |
74 | */ | |
75 | std::ostream& operator << ( | |
76 | std::ostream& stream, const AliHLTMUONMansoRoIStruct& roi | |
77 | ); | |
78 | ||
79 | /** | |
80 | * Stream operator for usage with std::ostream classes which prints the track | |
81 | * candidate information in the following format: | |
a090ff22 | 82 | * {fTrack = xx, fRoI[0] = {...}, fRoI[1] = {...}, fRoI[2] = {...}, fRoI[3] = {...}, fZmiddle = yy, fBl = zz} |
90a74d7a | 83 | */ |
84 | std::ostream& operator << ( | |
85 | std::ostream& stream, const AliHLTMUONMansoCandidateStruct& candidate | |
86 | ); | |
87 | ||
88 | /** | |
89 | * Stream operator for usage with std::ostream classes which prints the | |
90 | * AliHLTMUONMansoCandidatesBlockStruct in the following format: | |
91 | * {fHeader = xx, fCandidate[] = [{..}, {..}, ...]} | |
92 | */ | |
93 | std::ostream& operator << ( | |
94 | std::ostream& stream, | |
95 | const AliHLTMUONMansoCandidatesBlockStruct& block | |
96 | ); | |
97 | ||
98 | ||
99 | inline bool operator == ( | |
100 | const AliHLTMUONMansoRoIStruct& a, | |
101 | const AliHLTMUONMansoRoIStruct& b | |
102 | ) | |
103 | { | |
104 | return a.fX == b.fX and a.fY == b.fY and a.fZ == b.fZ | |
105 | and a.fRadius == b.fRadius; | |
106 | } | |
107 | ||
108 | inline bool operator == ( | |
109 | const AliHLTMUONMansoCandidateStruct& a, | |
110 | const AliHLTMUONMansoCandidateStruct& b | |
111 | ) | |
112 | { | |
113 | return a.fTrack == b.fTrack | |
114 | and a.fRoI[0] == b.fRoI[0] and a.fRoI[1] == b.fRoI[1] | |
a090ff22 | 115 | and a.fRoI[2] == b.fRoI[2] and a.fRoI[3] == b.fRoI[3] |
116 | and a.fZmiddle == b.fZmiddle and a.fBl == b.fBl; | |
90a74d7a | 117 | } |
118 | ||
119 | inline bool operator != ( | |
120 | const AliHLTMUONMansoCandidateStruct& a, | |
121 | const AliHLTMUONMansoCandidateStruct& b | |
122 | ) | |
123 | { | |
124 | return not operator == (a, b); | |
125 | } | |
126 | ||
127 | ||
128 | bool operator == ( | |
129 | const AliHLTMUONMansoCandidatesBlockStruct& a, | |
130 | const AliHLTMUONMansoCandidatesBlockStruct& b | |
131 | ); | |
132 | ||
133 | inline bool operator != ( | |
134 | const AliHLTMUONMansoCandidatesBlockStruct& a, | |
135 | const AliHLTMUONMansoCandidatesBlockStruct& b | |
136 | ) | |
137 | { | |
138 | return not operator == (a, b); | |
139 | } | |
140 | ||
141 | #endif // ALIHLTMUONMANSOCANDIDATESBLOCKSTRUCT_H |