Changing to using char** rather than const char** for main() due to coverty warning.
[u/mrichter/AliRoot.git] / HLT / MUON / AliHLTMUONTracksBlockStruct.h
CommitLineData
a8982f78 1#ifndef ALIHLTMUONTRACKSBLOCKSTRUCT_H
2#define ALIHLTMUONTRACKSBLOCKSTRUCT_H
3/* This file is property of and copyright by the ALICE HLT Project *
4 * ALICE Experiment at CERN, All rights reserved. *
5 * See cxx source for full Copyright notice */
6
7// $Id: AliHLTMUONTracksBlockStruct.h 36627 2009-11-10 19:21:49Z aszostak $
8
9///
10/// @file AliHLTMUONTracksBlockStruct.h
11/// @author Artur Szostak <artursz@iafrica.com>
12/// @date 10 Feb 2010
13/// @brief Definition the internal dimuon HLT data block for full tracks.
14///
15/// The tracks data block is an internal dimuon HLT data block structure generated
16/// by the tracker component to store found tracks.
17/// The structures are defined with C linkage since C generally gives us more
18/// binary compatibility between compilers.
19///
20
21#include "AliHLTMUONRecHitsBlockStruct.h"
22
23extern "C"
24{
25
26/**
27 * Track structure containing information about a track found by the tracker.
28 */
29struct AliHLTMUONTrackStruct
30{
31 AliHLTInt32_t fId; /// Each track should have an ID number unique for a given event. -1 == invalid.
32
33 AliHLTInt32_t fTrigRec; /// The associated trigger record ID that was matched to the track.
34
35 // The flags word constains the following bit fields (bit 31 is most
36 // significant):
37 // bits: [31][30][29 -- 16][ 15 ][ 14 ]...[ 1 ][ 0 ]
38 // field: - + reserved hst[15] hst[14] hst[1] hst[0]
39 // Where fields hst[i] indicates if fHit[i] has been filled/set.
40 // Reserved bits should be set to zero.
41 // Particle sign: if '-' is set then particle has minus sign.
42 // if '+' is set then particle has negative sign.
43 // Either '+' or '-' should be set and if neither then the particle
44 // sign is unknown.
45 AliHLTUInt32_t fFlags; /// Bit fields for the track structure.
46
47 AliHLTFloat32_t fPx; /// Particle's momentum X component in GeV/c.
48 AliHLTFloat32_t fPy; /// Particle's momentum Y component in GeV/c.
49 AliHLTFloat32_t fPz; /// Particle's momentum Z component in GeV/c.
50
51 AliHLTFloat32_t fInverseBendingMomentum; /// One over the momentum of the fitted track [GeV/c].
52 AliHLTFloat32_t fThetaX; /// The slope of the fitted track in the non-bending plane.
53 AliHLTFloat32_t fThetaY; /// The slope of the fitted track in the bending plane.
54 AliHLTFloat32_t fX; /// Non-bending plane coordinate for the distance of closest approach (DCA) [cm].
55 AliHLTFloat32_t fY; /// Bending plane coordinate for the DCA [cm].
56 AliHLTFloat32_t fZ; /// Z coordinate for the DCA [cm].
57
58 // Chi squared of the track fit.
59 // If set to -1 then no fit was done and the momentum vector and DCA coordinate is invalid.
60 AliHLTFloat32_t fChi2; /// The chi squared of the fit of fHit points to the track model.
61
62 AliHLTMUONRecHitStruct fHit[16]; /// Particle hit coordinates found by the hit reconstruction stage.
63};
64
65/**
66 * AliHLTMUONTracksBlockStruct defines the format of the internal tracks data block.
67 */
68struct AliHLTMUONTracksBlockStruct
69{
70 AliHLTMUONDataBlockHeader fHeader; // Common data block header.
71
72 // Array of tracks.
73 //AliHLTMUONTrackStruct fTrack[/*fHeader.fNrecords*/];
74};
75
76} // extern "C"
77
78
79/**
80 * Stream operator for usage with std::ostream classes which prints the track
81 * information in the following format:
82 * {fId = xx, fTrigRec = yy, fFlags = 0xZZ, fPx = uu, fPy = vv, fPz = ww,
83 * fInverseBendingMomentum = pp, fThetaX = nn, fThetaY = mm, fX = kk, fY = ll, fZ = hh,
84 * fChi2 = ss, fHit[0] = {...}, fHit[1] = {...}, ... fHit[14] = {...}, fHit[15] = {...}}
85 */
86std::ostream& operator << (
87 std::ostream& stream, const AliHLTMUONTrackStruct& trigrec
88 );
89
90/**
91 * Stream operator for usage with std::ostream classes which prints the
92 * AliHLTMUONTracksBlockStruct in the following format:
93 * {fHeader = xx, fTrack[] = [{..}, {..}, ...]}
94 */
95std::ostream& operator << (
96 std::ostream& stream, const AliHLTMUONTracksBlockStruct& block
97 );
98
99
100bool operator == (
101 const AliHLTMUONTrackStruct& a,
102 const AliHLTMUONTrackStruct& b
103 );
104
105inline bool operator != (
106 const AliHLTMUONTrackStruct& a,
107 const AliHLTMUONTrackStruct& b
108 )
109{
110 return not operator == (a, b);
111}
112
113
114bool operator == (
115 const AliHLTMUONTracksBlockStruct& a,
116 const AliHLTMUONTracksBlockStruct& b
117 );
118
119inline bool operator != (
120 const AliHLTMUONTracksBlockStruct& a,
121 const AliHLTMUONTracksBlockStruct& b
122 )
123{
124 return not operator == (a, b);
125}
126
127#endif // ALIHLTMUONTRACKSBLOCKSTRUCT_H