1 #ifndef ALIHLTMUONRECHITSBLOCKSTRUCT_H
2 #define ALIHLTMUONRECHITSBLOCKSTRUCT_H
3 /* Copyright(c) 1998-2007, ALICE Experiment at CERN, All rights reserved. *
4 * See cxx source for full Copyright notice */
9 * @file AliHLTMUONRecHitsBlockStruct.h
10 * @author Indranil Das <indra.das@saha.ac.in>,
11 * Artur Szostak <artursz@iafrica.com>
13 * @brief Definition of internal dimuon HLT reconstructed hit data block structure.
15 * The structures are defined with C linkage since C generally gives us more
16 * binary compatibility between compilers.
19 #include "AliHLTMUONDataTypes.h"
25 * A 3D reconstructed hit point structure.
26 * These are used to store the hits reconstructed on the tracking or trigger
28 * Reconstructed hit values of (0, 0, 0) indicate an invalid or nil hit.
30 struct AliHLTMUONRecHitStruct
32 // The flags word constains the following bit fields (bit 31 is most
35 // bits: [ 31 -- 16 ][ 15 -- 12 ][ 11 --- 0 ]
36 // field: reserved chamber detElemId
39 // reserved bits must be set to zero.
40 // chamber - specifies the chamber number in the range [0..13], 0xF for invalid.
41 // detElemId - specifies the detector element ID number.
42 AliHLTUInt32_t fFlags;
44 AliHLTFloat32_t fX; // X coordinate.
45 AliHLTFloat32_t fY; // Y coordinate.
46 AliHLTFloat32_t fZ; // Z coordinate.
50 * AliHLTMUONRecHitsBlockStruct defines the format of the internal
51 * reconstructed hit data block.
53 struct AliHLTMUONRecHitsBlockStruct
55 AliHLTMUONDataBlockHeader fHeader; // Common data block header
57 // Array of reconstructed hits.
58 //AliHLTMUONRecHitStruct fHit[/*fHeader.fNrecords*/];
65 * Stream operator for usage with std::ostream classes which prints the
66 * reconstructed hit in the following format: {fX = xx, fY = yy, fZ = zz}
68 inline std::ostream& operator << (
69 std::ostream& stream, const AliHLTMUONRecHitStruct& hit
72 stream << "{fFlags = " << std::showbase << std::hex
73 << hit.fFlags << std::dec << ", fX = " << hit.fX
74 << ", fY = " << hit.fY << ", fZ = " << hit.fZ << "}";
79 * Stream operator for usage with std::ostream classes which prints the
80 * AliHLTMUONRecHitsBlockStruct in the following format:
81 * {fHeader = xx, fHit[] = [{..}, {..}, ...]}
83 std::ostream& operator << (
84 std::ostream& stream, const AliHLTMUONRecHitsBlockStruct& block
88 inline bool operator == (
89 const AliHLTMUONRecHitStruct& a, const AliHLTMUONRecHitStruct& b
92 return a.fFlags == b.fFlags and a.fX == b.fX and a.fY == b.fY and a.fZ == b.fZ;
95 inline bool operator != (
96 const AliHLTMUONRecHitStruct& a, const AliHLTMUONRecHitStruct& b
99 return not operator == (a, b);
104 const AliHLTMUONRecHitsBlockStruct& a,
105 const AliHLTMUONRecHitsBlockStruct& b
108 inline bool operator != (
109 const AliHLTMUONRecHitsBlockStruct& a,
110 const AliHLTMUONRecHitsBlockStruct& b
113 return not operator == (a, b);
116 #endif // ALIHLTMUONRECHITSBLOCKSTRUCT_H