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 */
9 * @file AliHLTMUONPairsDecisionBlockStruct.h
10 * @author Artur Szostak <artursz@iafrica.com>
12 * @brief Definition of internal dimuon HLT trigger decision data structure
13 * containing decision information for pairs of tracks.
15 * The structures are defined with C linkage since C generally gives us more
16 * binary compatibility between compilers.
19 #include "AliHLTMUONDataTypes.h"
25 * Structure contains information about the trigger decision for a pair of tracks.
27 struct AliHLTMUONPairDecisionStruct
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;
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;
47 AliHLTFloat32_t fInvMass; // Invariant mass of the track pair assuming
48 // they are both muons in (GeV/c^2)
52 * AliHLTMUONPairsDecisionBlockStruct defines the format of the internal
53 * dimuon HLT decision data block for pairs of tracks.
55 struct AliHLTMUONPairsDecisionBlockStruct
57 AliHLTMUONDataBlockHeader fHeader; // Common data block header.
59 // Number of unlike sign pt triggers for both tracks having any pt.
60 AliHLTUInt32_t fNunlikeAnyPt;
62 // Number of unlike sign low pt triggers where both tracks have
64 AliHLTUInt32_t fNunlikeLowPt;
66 // Number of unlike sign high pt triggers where both tracks have
68 AliHLTUInt32_t fNunlikeHighPt;
70 // Number of like sign pt triggers where both tracks have any pt.
71 AliHLTUInt32_t fNlikeAnyPt;
73 // Number of like sign low pt triggers where both tracks have
75 AliHLTUInt32_t fNlikeLowPt;
77 // Number of like sign high pt triggers where both tracks have
79 AliHLTUInt32_t fNlikeHighPt;
81 // Number of pairs that have invariant mass > low mass cut, any pt
83 AliHLTUInt32_t fNmassAny;
85 // Number of pairs that have invariant mass > low mass cut,
86 // pt > low pt cut and unlike sign.
87 AliHLTUInt32_t fNmassLow;
89 // Number of pairs that have invariant mass > low mass cut,
90 // pt > high pt cut and unlike sign.
91 AliHLTUInt32_t fNmassHigh;
93 // Array of decisions for track pairs.
94 AliHLTMUONPairDecisionStruct fDecision[/*fHeader.fNrecords*/];
101 * Stream operator for usage with std::ostream classes which prints the
102 * trigger decision information for pairs of tracks in the following format:
103 * {fTrackAId = xx, fTrackBId = yy, fTriggerBits = 0xZZ, fInvMass = ww}
105 inline std::ostream& operator << (
106 std::ostream& stream, const AliHLTMUONPairDecisionStruct& trig
109 stream << "{fTrackAId = " << trig.fTrackAId
110 << ", fTrackBId = " << trig.fTrackBId << ", fTriggerBits = "
111 << std::showbase << std::hex << trig.fTriggerBits << std::dec
112 << ", fInvMass = " << trig.fInvMass << "}";
117 * Stream operator for usage with std::ostream classes which prints the
118 * AliHLTMUONPairsDecisionBlockStruct in the following format:
119 * {fHeader = aa, fNunlikeLowPt = bb, fNunlikeHighPt = cc, fNlikeLowPt = dd,
120 * fNlikeHighPt = ee, fNmassAny = ff, fNmassLow = gg, fNmassHigh = hh
121 * fDecision[] = [{..}, {..}, ...]}
123 std::ostream& operator << (
124 std::ostream& stream,
125 const AliHLTMUONPairsDecisionBlockStruct& block
129 inline bool operator == (
130 const AliHLTMUONPairDecisionStruct& a,
131 const AliHLTMUONPairDecisionStruct& b
134 return a.fTrackAId == b.fTrackAId and a.fTrackBId == b.fTrackBId
135 and a.fTriggerBits == b.fTriggerBits
136 and a.fTriggerBits == b.fTriggerBits;
139 inline bool operator != (
140 const AliHLTMUONPairDecisionStruct& a,
141 const AliHLTMUONPairDecisionStruct& b
144 return not operator == (a, b);
149 const AliHLTMUONPairsDecisionBlockStruct& a,
150 const AliHLTMUONPairsDecisionBlockStruct& b
153 inline bool operator != (
154 const AliHLTMUONPairsDecisionBlockStruct& a,
155 const AliHLTMUONPairsDecisionBlockStruct& b
158 return not operator == (a, b);
161 #endif // ALIHLTMUONPAIRSDECISIONBLOCKSTRUCT_H