]>
Commit | Line | Data |
---|---|---|
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 | ||
21 | extern "C" | |
22 | { | |
23 | ||
24 | /** | |
25 | * Structure contains information about the trigger decision for a pair of tracks. | |
26 | */ | |
27 | struct 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 | */ | |
55 | struct AliHLTMUONPairsDecisionBlockStruct | |
56 | { | |
57 | AliHLTMUONDataBlockHeader fHeader; // Common data block header. | |
58 | ||
18ce6ea1 | 59 | // Number of unlike sign pt triggers for both tracks having any pt. |
60 | AliHLTUInt32_t fNunlikeAnyPt; | |
61 | ||
90a74d7a | 62 | // Number of unlike sign low pt triggers where both tracks have |
63 | // pt > low cut. | |
64 | AliHLTUInt32_t fNunlikeLowPt; | |
65 | ||
66 | // Number of unlike sign high pt triggers where both tracks have | |
67 | // pt > high cut. | |
68 | AliHLTUInt32_t fNunlikeHighPt; | |
69 | ||
18ce6ea1 | 70 | // Number of like sign pt triggers where both tracks have any pt. |
71 | AliHLTUInt32_t fNlikeAnyPt; | |
72 | ||
90a74d7a | 73 | // Number of like sign low pt triggers where both tracks have |
74 | // pt > low cut. | |
75 | AliHLTUInt32_t fNlikeLowPt; | |
76 | ||
77 | // Number of like sign high pt triggers where both tracks have | |
78 | // pt > high cut. | |
79 | AliHLTUInt32_t fNlikeHighPt; | |
80 | ||
81 | // Number of pairs that have invariant mass > low mass cut, any pt | |
82 | // and unlike sign. | |
83 | AliHLTUInt32_t fNmassAny; | |
84 | ||
85 | // Number of pairs that have invariant mass > low mass cut, | |
86 | // pt > low pt cut and unlike sign. | |
87 | AliHLTUInt32_t fNmassLow; | |
88 | ||
c9537879 | 89 | // Number of pairs that have invariant mass > high mass cut, |
90a74d7a | 90 | // pt > high pt cut and unlike sign. |
91 | AliHLTUInt32_t fNmassHigh; | |
92 | ||
93 | // Array of decisions for track pairs. | |
23ad6161 | 94 | //AliHLTMUONPairDecisionStruct fDecision[/*fHeader.fNrecords*/]; |
90a74d7a | 95 | }; |
96 | ||
97 | } // extern "C" | |
98 | ||
99 | ||
100 | /** | |
101 | * Stream operator for usage with std::ostream classes which prints the | |
102 | * trigger decision information for pairs of tracks in the following format: | |
18ce6ea1 | 103 | * {fTrackAId = xx, fTrackBId = yy, fTriggerBits = 0xZZ, fInvMass = ww} |
90a74d7a | 104 | */ |
105 | inline std::ostream& operator << ( | |
106 | std::ostream& stream, const AliHLTMUONPairDecisionStruct& trig | |
107 | ) | |
108 | { | |
109 | stream << "{fTrackAId = " << trig.fTrackAId | |
110 | << ", fTrackBId = " << trig.fTrackBId << ", fTriggerBits = " | |
111 | << std::showbase << std::hex << trig.fTriggerBits << std::dec | |
18ce6ea1 | 112 | << ", fInvMass = " << trig.fInvMass << "}"; |
90a74d7a | 113 | return stream; |
114 | } | |
115 | ||
116 | /** | |
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[] = [{..}, {..}, ...]} | |
122 | */ | |
123 | std::ostream& operator << ( | |
124 | std::ostream& stream, | |
125 | const AliHLTMUONPairsDecisionBlockStruct& block | |
126 | ); | |
127 | ||
128 | ||
129 | inline bool operator == ( | |
130 | const AliHLTMUONPairDecisionStruct& a, | |
131 | const AliHLTMUONPairDecisionStruct& b | |
132 | ) | |
133 | { | |
134 | return a.fTrackAId == b.fTrackAId and a.fTrackBId == b.fTrackBId | |
18ce6ea1 | 135 | and a.fTriggerBits == b.fTriggerBits |
90a74d7a | 136 | and a.fTriggerBits == b.fTriggerBits; |
137 | } | |
138 | ||
139 | inline bool operator != ( | |
140 | const AliHLTMUONPairDecisionStruct& a, | |
141 | const AliHLTMUONPairDecisionStruct& b | |
142 | ) | |
143 | { | |
144 | return not operator == (a, b); | |
145 | } | |
146 | ||
147 | ||
148 | bool operator == ( | |
149 | const AliHLTMUONPairsDecisionBlockStruct& a, | |
150 | const AliHLTMUONPairsDecisionBlockStruct& b | |
151 | ); | |
152 | ||
153 | inline bool operator != ( | |
154 | const AliHLTMUONPairsDecisionBlockStruct& a, | |
155 | const AliHLTMUONPairsDecisionBlockStruct& b | |
156 | ) | |
157 | { | |
158 | return not operator == (a, b); | |
159 | } | |
160 | ||
161 | #endif // ALIHLTMUONPAIRSDECISIONBLOCKSTRUCT_H |