]> git.uio.no Git - u/mrichter/AliRoot.git/blob - HLT/MUON/AliHLTMUONMansoCandidatesBlockStruct.h
Utility rewritten to make it run much faster (Seforo).
[u/mrichter/AliRoot.git] / HLT / MUON / AliHLTMUONMansoCandidatesBlockStruct.h
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];
49 };
50
51 /**
52  * AliHLTMUONMansoCandidatesBlockStruct defines the format of the internal
53  * Manso track candidates data block.
54  */
55 struct AliHLTMUONMansoCandidatesBlockStruct
56 {
57         AliHLTMUONDataBlockHeader fHeader; // Common data block header.
58
59         // Array of Manso track candidates.
60         //AliHLTMUONMansoCandidateStruct fCandidate[/*fHeader.fNrecords*/];
61 };
62
63 } // extern "C"
64
65
66 /**
67  * Stream operator for usage with std::ostream classes which prints the RoI
68  * information in the following format:
69  *  {fX = xx, fY = yy, fZ = zz, fRadius = rr}
70  */
71 std::ostream& operator << (
72                 std::ostream& stream, const AliHLTMUONMansoRoIStruct& roi
73         );
74
75 /**
76  * Stream operator for usage with std::ostream classes which prints the track
77  * candidate information in the following format:
78  *  {fTrack = xx, fRoI[0] = {...}, fRoI[1] = {...}, fRoI[2] = {...}, fRoI[3] = {...}}
79  */
80 std::ostream& operator << (
81                 std::ostream& stream, const AliHLTMUONMansoCandidateStruct& candidate
82         );
83
84 /**
85  * Stream operator for usage with std::ostream classes which prints the
86  * AliHLTMUONMansoCandidatesBlockStruct in the following format:
87  *   {fHeader = xx, fCandidate[] = [{..}, {..}, ...]}
88  */
89 std::ostream& operator << (
90                 std::ostream& stream,
91                 const AliHLTMUONMansoCandidatesBlockStruct& block
92         );
93
94
95 inline bool operator == (
96                 const AliHLTMUONMansoRoIStruct& a,
97                 const AliHLTMUONMansoRoIStruct& b
98         )
99 {
100         return a.fX == b.fX and a.fY == b.fY and a.fZ == b.fZ
101                 and a.fRadius == b.fRadius;
102 }
103
104 inline bool operator == (
105                 const AliHLTMUONMansoCandidateStruct& a,
106                 const AliHLTMUONMansoCandidateStruct& b
107         )
108 {
109         return a.fTrack == b.fTrack
110                 and a.fRoI[0] == b.fRoI[0] and a.fRoI[1] == b.fRoI[1]
111                 and a.fRoI[2] == b.fRoI[2] and a.fRoI[3] == b.fRoI[3];
112 }
113
114 inline bool operator != (
115                 const AliHLTMUONMansoCandidateStruct& a,
116                 const AliHLTMUONMansoCandidateStruct& b
117         )
118 {
119         return not operator == (a, b);
120 }
121
122
123 bool operator == (
124                 const AliHLTMUONMansoCandidatesBlockStruct& a,
125                 const AliHLTMUONMansoCandidatesBlockStruct& b
126         );
127
128 inline bool operator != (
129                 const AliHLTMUONMansoCandidatesBlockStruct& a,
130                 const AliHLTMUONMansoCandidatesBlockStruct& b
131         )
132 {
133         return not operator == (a, b);
134 }
135
136 #endif // ALIHLTMUONMANSOCANDIDATESBLOCKSTRUCT_H