1 #ifndef ALIHLTMUONDATATYPES_H
2 #define ALIHLTMUONDATATYPES_H
3 /**************************************************************************
4 * Copyright(c) 1998-2007, ALICE Experiment at CERN, All rights reserved. *
6 * Author: The ALICE Off-line Project. *
7 * Contributors are mentioned in the code where appropriate. *
9 * Permission to use, copy, modify and distribute this software and its *
10 * documentation strictly for non-commercial purposes is hereby granted *
11 * without fee, provided that the above copyright notice appears in all *
12 * copies and that both the copyright notice and this permission notice *
13 * appear in the supporting documentation. The authors make no claims *
14 * about the suitability of this software for any purpose. It is *
15 * provided "as is" without express or implied warranty. *
16 **************************************************************************/
21 * @file AliHLTMUONDataTypes.h
22 * @author Artur Szostak <artursz@iafrica.com>
24 * @brief Declaration of basic data types used in HLT/MUON module.
26 * The types and structs are defined with C linkage since C generally gives us
27 * more binary compatibility between compilers.
30 #include "AliHLTDataTypes.h"
37 * The common internal dimuon HLT data block header.
38 * These headers help to identify the data block when it is written to disk and
39 * helps to check the integrity of the data blocks in the system.
41 struct AliHLTMUONDataBlockHeader
43 AliHLTUInt16_t fType; // The type of the data block. Must contain a value
44 // defined by AliHLTMUONDataBlockType.
45 AliHLTUInt16_t fRecordWidth; // The number of bytes each record uses.
46 AliHLTUInt32_t fNrecords; // Number of records in this data block.
50 * The field structure of a single row of the AliHLTMUONHitReconstructor component's
53 struct AliHLTMUONHitRecoLutRow
55 AliHLTInt32_t fDetElemId; // The detector element ID of the pad.
56 AliHLTInt32_t fIX, fIY; // The X,Y number of the pad.
57 AliHLTFloat32_t fRealX, fRealY, fRealZ; // The real coordinate of the pad.
58 AliHLTFloat32_t fHalfPadSize; // half padsize in X for bending and Y for nonbending
59 AliHLTFloat32_t fPadSizeXY; // padsize in Y for bending plane and X for nonbending
60 AliHLTInt32_t fPlane; // The plane and PCB zone ID numbers.
61 AliHLTFloat32_t fPed, fSigma, fA0, fA1; // Calibration values
62 AliHLTInt32_t fThres, fSat; //Calibration values
66 * The field structure of a single row of the AliHLTMUONTriggerReconstructor component's
69 struct AliHLTMUONTriggerRecoLutRow
71 AliHLTUInt32_t fIdFlags; /// The chamber and detector element identifier packed in AliHLTMUONRecHitStruct::fFlags format.
72 AliHLTFloat32_t fX; // Global X coordinate of channel.
73 AliHLTFloat32_t fY; // Global Y coordinate of channel.
74 AliHLTFloat32_t fZ; // Global Z coordinate of channel.
78 * The lookup table structure for the AliHLTMUONTriggerReconstructor component.
79 * The LUT is used for translating from channel addresses to geometrical positions
80 * and other relevant information of the strips in the trigger chambers.
82 struct AliHLTMUONTriggerRecoLookupTable
84 // The dimentions of the LUT are as follows:
85 // [trigger crate ID][local board ID][chamber][cathode - X/Y][bit set in bit pattern]
86 // - The trigger crate ID comes form the regional headers in the DDL payload.
87 // - Local board ID numbers come from the local trigger structures in the
89 // - The chamber is for chambers 11 to 14 coded as [0..3], 0 for chamber 11,
90 // 1 for chamber 12 etc.
91 // - The cathode 0 is for the X trigger strips (bending plane) and 1 is
92 // for the Y strips (non-bending plane).
93 // - The "bit set in pattern" indicates the bit number that was set in
94 // the strip patterns found in the local structures of the DDL payload.
95 AliHLTMUONTriggerRecoLutRow fRow[16][16][4][2][16];
102 * The sign/charge of a particle.
104 enum AliHLTMUONParticleSign
112 * The chamber names of the dimuon spectrometer.
114 enum AliHLTMUONChamberName
116 kUnknownChamber = -1,
134 * The internal data block type codes.
136 enum AliHLTMUONDataBlockType
138 kUnknownDataBlock = 0,
139 kTriggerRecordsDataBlock = 1000,
140 kTrigRecsDebugDataBlock = 1001,
141 kRecHitsDataBlock = 2000,
142 kClustersDataBlock = 2001,
143 kChannelsDataBlock = 2002,
144 kMansoTracksDataBlock = 3000,
145 kMansoCandidatesDataBlock = 3001,
146 kSinglesDecisionDataBlock = 4000,
147 kPairsDecisionDataBlock = 4001
152 * Stream operator to be able to print AliHLTMUONParticleSign with human
153 * readable names to some stream object like cout (standard output).
155 inline std::ostream& operator << (std::ostream& stream, AliHLTMUONParticleSign sign)
159 case kSignMinus: stream << "kSignMinus"; break;
160 case kSignUnknown: stream << "kSignUnknown"; break;
161 case kSignPlus: stream << "kSignPlus"; break;
162 default: stream << "INVALID";
168 * Stream operator to be able to print AliHLTMUONChamberName with human
169 * readable names to some stream object like cout (standard output).
171 inline std::ostream& operator << (std::ostream& stream, AliHLTMUONChamberName chamber)
175 case kUnknownChamber: stream << "kUnknownChamber"; break;
176 case kChamber1: stream << "kChamber1"; break;
177 case kChamber2: stream << "kChamber2"; break;
178 case kChamber3: stream << "kChamber3"; break;
179 case kChamber4: stream << "kChamber4"; break;
180 case kChamber5: stream << "kChamber5"; break;
181 case kChamber6: stream << "kChamber6"; break;
182 case kChamber7: stream << "kChamber7"; break;
183 case kChamber8: stream << "kChamber8"; break;
184 case kChamber9: stream << "kChamber9"; break;
185 case kChamber10: stream << "kChamber10"; break;
186 case kChamber11: stream << "kChamber11"; break;
187 case kChamber12: stream << "kChamber12"; break;
188 case kChamber13: stream << "kChamber13"; break;
189 case kChamber14: stream << "kChamber14"; break;
190 default: stream << "INVALID";
196 * Stream operator to be able to print AliHLTMUONDataBlockType with human
197 * readable names to some stream object like cout (standard output).
199 inline std::ostream& operator << (std::ostream& stream, AliHLTMUONDataBlockType type)
203 case kUnknownDataBlock: stream << "kUnknownDataBlock"; break;
204 case kTriggerRecordsDataBlock: stream << "kTriggerRecordsDataBlock"; break;
205 case kTrigRecsDebugDataBlock: stream << "kTrigRecsDebugDataBlock"; break;
206 case kRecHitsDataBlock: stream << "kRecHitsDataBlock"; break;
207 case kClustersDataBlock: stream << "kClustersDataBlock"; break;
208 case kChannelsDataBlock: stream << "kChannelsDataBlock"; break;
209 case kMansoTracksDataBlock: stream << "kMansoTracksDataBlock"; break;
210 case kMansoCandidatesDataBlock: stream << "kMansoCandidatesDataBlock"; break;
211 case kSinglesDecisionDataBlock: stream << "kSinglesDecisionDataBlock"; break;
212 case kPairsDecisionDataBlock: stream << "kPairsDecisionDataBlock"; break;
213 default: stream << "INVALID";
219 * Stream operator for usage with std::ostream classes which prints the common
220 * data block header in the following format:
221 * {fType = xx, fRecordWidth = yy, fNrecords = zz}
223 inline std::ostream& operator << (
224 std::ostream& stream, const AliHLTMUONDataBlockHeader& header
227 stream << "{fType = " << AliHLTMUONDataBlockType(header.fType)
228 << ", fRecordWidth = " << header.fRecordWidth
229 << ", fNrecords = " << header.fNrecords << "}";
234 inline bool operator == (
235 const AliHLTMUONDataBlockHeader& a, const AliHLTMUONDataBlockHeader& b
238 return a.fType == b.fType and a.fRecordWidth == b.fRecordWidth
239 and a.fNrecords == b.fNrecords;
242 inline bool operator != (
243 const AliHLTMUONDataBlockHeader& a, const AliHLTMUONDataBlockHeader& b
246 return not operator == (a, b);
249 #endif // ALIHLTMUONDATATYPES_H