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 containing decision information for pairs of tracks.
14 * The structures are defined with C linkage since C generally gives us more
15 * binary compatibility between compilers.
18 #include "AliHLTMUONDataTypes.h"
24 * Structure contains information about the trigger decision for a pair of tracks.
26 struct AliHLTMUONPairDecisionStruct
28 // The ID numbers of the tracks we are referring to.
29 // These could also be trigger record ID numbers.
30 AliHLTInt32_t fTrackAId;
31 AliHLTInt32_t fTrackBId;
33 // The trigger bits have the following meaning:
34 // bit: [31 --- 7][ 6 ][ 5 ][ 4 ][3--2][1--0]
35 // field: reserved hiM loM unlike hipt lopt
36 // Reserved bits should be set to zero.
37 // hiM == Pair passed the high invariant mass cut.
38 // loM == Pair passed the low invariant mass cut.
39 // unlike == is the pair an unlike sign pair.
40 // hipt: 0 if neither track has pt > high pt cut, 1 if either has
41 // and 2 if both have. A value of 3 is invalid.
42 // lopt: 0 if neither track has pt > lo pt cut, 1 if either has
43 // and 2 if both have. A value of 3 is invalid.
44 AliHLTUInt32_t fTriggerBits;
46 AliHLTFloat32_t fInvMass; // Invariant mass of the track pair assuming
47 // they are both muons in (GeV/c^2)
51 * AliHLTMUONPairsDecisionBlockStruct defines the format of the internal
52 * dimuon HLT decision data block for pairs of tracks.
54 struct AliHLTMUONPairsDecisionBlockStruct
56 AliHLTMUONDataBlockHeader fHeader; // Common data block header.
58 // Number of unlike sign pt triggers for both tracks having any pt.
59 AliHLTUInt32_t fNunlikeAnyPt;
61 // Number of unlike sign low pt triggers where both tracks have
63 AliHLTUInt32_t fNunlikeLowPt;
65 // Number of unlike sign high pt triggers where both tracks have
67 AliHLTUInt32_t fNunlikeHighPt;
69 // Number of like sign pt triggers where both tracks have any pt.
70 AliHLTUInt32_t fNlikeAnyPt;
72 // Number of like sign low pt triggers where both tracks have
74 AliHLTUInt32_t fNlikeLowPt;
76 // Number of like sign high pt triggers where both tracks have
78 AliHLTUInt32_t fNlikeHighPt;
80 // Number of pairs that have invariant mass > low mass cut, any pt
82 AliHLTUInt32_t fNmassAny;
84 // Number of pairs that have invariant mass > low mass cut,
85 // pt > low pt cut and unlike sign.
86 AliHLTUInt32_t fNmassLow;
88 // Number of pairs that have invariant mass > high mass cut,
89 // pt > high pt cut and unlike sign.
90 AliHLTUInt32_t fNmassHigh;
92 // Array of decisions for track pairs.
93 //AliHLTMUONPairDecisionStruct fDecision[/*fHeader.fNrecords*/];
100 * Stream operator for usage with std::ostream classes which prints the
101 * trigger decision information for pairs of tracks in the following format:
102 * {fTrackAId = xx, fTrackBId = yy, fTriggerBits = 0xZZ, fInvMass = ww}
104 inline std::ostream& operator << (
105 std::ostream& stream, const AliHLTMUONPairDecisionStruct& trig
108 std::ios::fmtflags oldflags = stream.flags();
109 stream << "{fTrackAId = " << trig.fTrackAId
110 << ", fTrackBId = " << trig.fTrackBId << ", fTriggerBits = "
111 << std::showbase << std::hex << trig.fTriggerBits << std::dec
112 << ", fInvMass = " << trig.fInvMass << "}";
113 stream.flags(oldflags);
118 * Stream operator for usage with std::ostream classes which prints the
119 * AliHLTMUONPairsDecisionBlockStruct in the following format:
120 * {fHeader = aa, fNunlikeLowPt = bb, fNunlikeHighPt = cc, fNlikeLowPt = dd,
121 * fNlikeHighPt = ee, fNmassAny = ff, fNmassLow = gg, fNmassHigh = hh
122 * fDecision[] = [{..}, {..}, ...]}
124 std::ostream& operator << (
125 std::ostream& stream,
126 const AliHLTMUONPairsDecisionBlockStruct& block
130 inline bool operator == (
131 const AliHLTMUONPairDecisionStruct& a,
132 const AliHLTMUONPairDecisionStruct& b
135 return a.fTrackAId == b.fTrackAId and a.fTrackBId == b.fTrackBId
136 and a.fTriggerBits == b.fTriggerBits
137 and a.fTriggerBits == b.fTriggerBits;
140 inline bool operator != (
141 const AliHLTMUONPairDecisionStruct& a,
142 const AliHLTMUONPairDecisionStruct& b
145 return not operator == (a, b);
150 const AliHLTMUONPairsDecisionBlockStruct& a,
151 const AliHLTMUONPairsDecisionBlockStruct& b
154 inline bool operator != (
155 const AliHLTMUONPairsDecisionBlockStruct& a,
156 const AliHLTMUONPairsDecisionBlockStruct& b
159 return not operator == (a, b);
162 #endif // ALIHLTMUONPAIRSDECISIONBLOCKSTRUCT_H