]> git.uio.no Git - u/mrichter/AliRoot.git/blame - HLT/MUON/AliHLTMUONMansoCandidatesBlockStruct.h
In AliMpPad:
[u/mrichter/AliRoot.git] / HLT / MUON / AliHLTMUONMansoCandidatesBlockStruct.h
CommitLineData
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
21extern "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 */
28struct 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 */
41struct 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 */
55struct AliHLTMUONMansoCandidatesBlockStruct
56{
57 AliHLTMUONDataBlockHeader fHeader; // Common data block header.
58
59 // Array of Manso track candidates.
e83e889b 60#ifndef __SUNPRO_CC
90a74d7a 61 AliHLTMUONMansoCandidateStruct fCandidate[/*fHeader.fNrecords*/];
e83e889b 62#else
63 AliHLTMUONMansoCandidateStruct fCandidate[1];
64#endif
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 */
75std::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:
82 * {fTrack = xx, fRoI[0] = {...}, fRoI[1] = {...}, fRoI[2] = {...}, fRoI[3] = {...}}
83 */
84std::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 */
93std::ostream& operator << (
94 std::ostream& stream,
95 const AliHLTMUONMansoCandidatesBlockStruct& block
96 );
97
98
99inline 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
108inline 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]
115 and a.fRoI[2] == b.fRoI[2] and a.fRoI[3] == b.fRoI[3];
116}
117
118inline bool operator != (
119 const AliHLTMUONMansoCandidateStruct& a,
120 const AliHLTMUONMansoCandidateStruct& b
121 )
122{
123 return not operator == (a, b);
124}
125
126
127bool operator == (
128 const AliHLTMUONMansoCandidatesBlockStruct& a,
129 const AliHLTMUONMansoCandidatesBlockStruct& b
130 );
131
132inline bool operator != (
133 const AliHLTMUONMansoCandidatesBlockStruct& a,
134 const AliHLTMUONMansoCandidatesBlockStruct& b
135 )
136{
137 return not operator == (a, b);
138}
139
140#endif // ALIHLTMUONMANSOCANDIDATESBLOCKSTRUCT_H