Using common loading methods for CDB entries that take care of missing subversion...
[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
1d8ae082 6// $Id$
90a74d7a 7
8/**
9 * @file AliHLTMUONPairsDecisionBlockStruct.h
10 * @author Artur Szostak <artursz@iafrica.com>
1d8ae082 11 * @date 21 May 2007
12 * @brief Definition of internal dimuon HLT trigger decision data structure containing decision information for pairs of tracks.
13 *
90a74d7a 14 * The structures are defined with C linkage since C generally gives us more
15 * binary compatibility between compilers.
16 */
17
18#include "AliHLTMUONDataTypes.h"
19
20extern "C"
21{
22
23/**
24 * Structure contains information about the trigger decision for a pair of tracks.
25 */
26struct AliHLTMUONPairDecisionStruct
27{
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;
32
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;
45
46 AliHLTFloat32_t fInvMass; // Invariant mass of the track pair assuming
47 // they are both muons in (GeV/c^2)
48};
49
50/**
51 * AliHLTMUONPairsDecisionBlockStruct defines the format of the internal
52 * dimuon HLT decision data block for pairs of tracks.
53 */
54struct AliHLTMUONPairsDecisionBlockStruct
55{
56 AliHLTMUONDataBlockHeader fHeader; // Common data block header.
57
18ce6ea1 58 // Number of unlike sign pt triggers for both tracks having any pt.
59 AliHLTUInt32_t fNunlikeAnyPt;
60
90a74d7a 61 // Number of unlike sign low pt triggers where both tracks have
62 // pt > low cut.
63 AliHLTUInt32_t fNunlikeLowPt;
64
65 // Number of unlike sign high pt triggers where both tracks have
66 // pt > high cut.
67 AliHLTUInt32_t fNunlikeHighPt;
68
18ce6ea1 69 // Number of like sign pt triggers where both tracks have any pt.
70 AliHLTUInt32_t fNlikeAnyPt;
71
90a74d7a 72 // Number of like sign low pt triggers where both tracks have
73 // pt > low cut.
74 AliHLTUInt32_t fNlikeLowPt;
75
76 // Number of like sign high pt triggers where both tracks have
77 // pt > high cut.
78 AliHLTUInt32_t fNlikeHighPt;
79
80 // Number of pairs that have invariant mass > low mass cut, any pt
81 // and unlike sign.
82 AliHLTUInt32_t fNmassAny;
83
84 // Number of pairs that have invariant mass > low mass cut,
85 // pt > low pt cut and unlike sign.
86 AliHLTUInt32_t fNmassLow;
87
c9537879 88 // Number of pairs that have invariant mass > high mass cut,
90a74d7a 89 // pt > high pt cut and unlike sign.
90 AliHLTUInt32_t fNmassHigh;
91
92 // Array of decisions for track pairs.
23ad6161 93 //AliHLTMUONPairDecisionStruct fDecision[/*fHeader.fNrecords*/];
90a74d7a 94};
95
96} // extern "C"
97
98
99/**
100 * Stream operator for usage with std::ostream classes which prints the
101 * trigger decision information for pairs of tracks in the following format:
18ce6ea1 102 * {fTrackAId = xx, fTrackBId = yy, fTriggerBits = 0xZZ, fInvMass = ww}
90a74d7a 103 */
104inline std::ostream& operator << (
105 std::ostream& stream, const AliHLTMUONPairDecisionStruct& trig
106 )
107{
710ddf4b 108 std::ios::fmtflags oldflags = stream.flags();
90a74d7a 109 stream << "{fTrackAId = " << trig.fTrackAId
110 << ", fTrackBId = " << trig.fTrackBId << ", fTriggerBits = "
111 << std::showbase << std::hex << trig.fTriggerBits << std::dec
18ce6ea1 112 << ", fInvMass = " << trig.fInvMass << "}";
710ddf4b 113 stream.flags(oldflags);
90a74d7a 114 return stream;
115}
116
117/**
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[] = [{..}, {..}, ...]}
123 */
124std::ostream& operator << (
125 std::ostream& stream,
126 const AliHLTMUONPairsDecisionBlockStruct& block
127 );
128
129
130inline bool operator == (
131 const AliHLTMUONPairDecisionStruct& a,
132 const AliHLTMUONPairDecisionStruct& b
133 )
134{
135 return a.fTrackAId == b.fTrackAId and a.fTrackBId == b.fTrackBId
18ce6ea1 136 and a.fTriggerBits == b.fTriggerBits
90a74d7a 137 and a.fTriggerBits == b.fTriggerBits;
138}
139
140inline bool operator != (
141 const AliHLTMUONPairDecisionStruct& a,
142 const AliHLTMUONPairDecisionStruct& b
143 )
144{
145 return not operator == (a, b);
146}
147
148
149bool operator == (
150 const AliHLTMUONPairsDecisionBlockStruct& a,
151 const AliHLTMUONPairsDecisionBlockStruct& b
152 );
153
154inline bool operator != (
155 const AliHLTMUONPairsDecisionBlockStruct& a,
156 const AliHLTMUONPairsDecisionBlockStruct& b
157 )
158{
159 return not operator == (a, b);
160}
161
162#endif // ALIHLTMUONPAIRSDECISIONBLOCKSTRUCT_H