]> git.uio.no Git - u/mrichter/AliRoot.git/blame - HLT/MUON/AliHLTMUONPairsDecisionBlockStruct.h
Adding a unknown chamber constant.
[u/mrichter/AliRoot.git] / HLT / MUON / AliHLTMUONPairsDecisionBlockStruct.h
CommitLineData
90a74d7a 1#ifndef ALIHLTMUONPAIRSDECISIONBLOCKSTRUCT_H
2#define ALIHLTMUONPAIRSDECISIONBLOCKSTRUCT_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 AliHLTMUONPairsDecisionBlockStruct.h
10 * @author Artur Szostak <artursz@iafrica.com>
11 * @date
12 * @brief Definition of internal dimuon HLT trigger decision data structure
13 * containing decision information for pairs of tracks.
14 *
15 * The structures are defined with C linkage since C generally gives us more
16 * binary compatibility between compilers.
17 */
18
19#include "AliHLTMUONDataTypes.h"
20
21extern "C"
22{
23
24/**
25 * Structure contains information about the trigger decision for a pair of tracks.
26 */
27struct AliHLTMUONPairDecisionStruct
28{
29 // The ID numbers of the tracks we are referring to.
30 // These could also be trigger record ID numbers.
31 AliHLTInt32_t fTrackAId;
32 AliHLTInt32_t fTrackBId;
33
34 // The trigger bits have the following meaning:
35 // bit: [31 --- 7][ 6 ][ 5 ][ 4 ][3--2][1--0]
36 // field: reserved hiM loM unlike hipt lopt
37 // Reserved bits should be set to zero.
38 // hiM == Pair passed the high invariant mass cut.
39 // loM == Pair passed the low invariant mass cut.
40 // unlike == is the pair an unlike sign pair.
41 // hipt: 0 if neither track has pt > high pt cut, 1 if either has
42 // and 2 if both have. A value of 3 is invalid.
43 // lopt: 0 if neither track has pt > lo pt cut, 1 if either has
44 // and 2 if both have. A value of 3 is invalid.
45 AliHLTUInt32_t fTriggerBits;
46
47 AliHLTFloat32_t fInvMass; // Invariant mass of the track pair assuming
48 // they are both muons in (GeV/c^2)
49};
50
51/**
52 * AliHLTMUONPairsDecisionBlockStruct defines the format of the internal
53 * dimuon HLT decision data block for pairs of tracks.
54 */
55struct AliHLTMUONPairsDecisionBlockStruct
56{
57 AliHLTMUONDataBlockHeader fHeader; // Common data block header.
58
59 // Number of unlike sign low pt triggers where both tracks have
60 // pt > low cut.
61 AliHLTUInt32_t fNunlikeLowPt;
62
63 // Number of unlike sign high pt triggers where both tracks have
64 // pt > high cut.
65 AliHLTUInt32_t fNunlikeHighPt;
66
67 // Number of like sign low pt triggers where both tracks have
68 // pt > low cut.
69 AliHLTUInt32_t fNlikeLowPt;
70
71 // Number of like sign high pt triggers where both tracks have
72 // pt > high cut.
73 AliHLTUInt32_t fNlikeHighPt;
74
75 // Number of pairs that have invariant mass > low mass cut, any pt
76 // and unlike sign.
77 AliHLTUInt32_t fNmassAny;
78
79 // Number of pairs that have invariant mass > low mass cut,
80 // pt > low pt cut and unlike sign.
81 AliHLTUInt32_t fNmassLow;
82
83 // Number of pairs that have invariant mass > low mass cut,
84 // pt > high pt cut and unlike sign.
85 AliHLTUInt32_t fNmassHigh;
86
87 // Array of decisions for track pairs.
88 AliHLTMUONPairDecisionStruct fDecision[/*fHeader.fNrecords*/];
89};
90
91} // extern "C"
92
93
94/**
95 * Stream operator for usage with std::ostream classes which prints the
96 * trigger decision information for pairs of tracks in the following format:
97 * {fTrackAId = xx, fTrackBId = yy, fTriggerBits = 0xZZ}
98 */
99inline std::ostream& operator << (
100 std::ostream& stream, const AliHLTMUONPairDecisionStruct& trig
101 )
102{
103 stream << "{fTrackAId = " << trig.fTrackAId
104 << ", fTrackBId = " << trig.fTrackBId << ", fTriggerBits = "
105 << std::showbase << std::hex << trig.fTriggerBits << std::dec
106 << "}";
107 return stream;
108}
109
110/**
111 * Stream operator for usage with std::ostream classes which prints the
112 * AliHLTMUONPairsDecisionBlockStruct in the following format:
113 * {fHeader = aa, fNunlikeLowPt = bb, fNunlikeHighPt = cc, fNlikeLowPt = dd,
114 * fNlikeHighPt = ee, fNmassAny = ff, fNmassLow = gg, fNmassHigh = hh
115 * fDecision[] = [{..}, {..}, ...]}
116 */
117std::ostream& operator << (
118 std::ostream& stream,
119 const AliHLTMUONPairsDecisionBlockStruct& block
120 );
121
122
123inline bool operator == (
124 const AliHLTMUONPairDecisionStruct& a,
125 const AliHLTMUONPairDecisionStruct& b
126 )
127{
128 return a.fTrackAId == b.fTrackAId and a.fTrackBId == b.fTrackBId
129 and a.fTriggerBits == b.fTriggerBits;
130}
131
132inline bool operator != (
133 const AliHLTMUONPairDecisionStruct& a,
134 const AliHLTMUONPairDecisionStruct& b
135 )
136{
137 return not operator == (a, b);
138}
139
140
141bool operator == (
142 const AliHLTMUONPairsDecisionBlockStruct& a,
143 const AliHLTMUONPairsDecisionBlockStruct& b
144 );
145
146inline bool operator != (
147 const AliHLTMUONPairsDecisionBlockStruct& a,
148 const AliHLTMUONPairsDecisionBlockStruct& b
149 )
150{
151 return not operator == (a, b);
152}
153
154#endif // ALIHLTMUONPAIRSDECISIONBLOCKSTRUCT_H