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 AliHLTInt32_t fPlane; // The plane and PCB zone ID numbers.
60 AliHLTFloat32_t fPed, fSigma, fA0, fA1; // Calibration values
61 AliHLTInt32_t fThres, fSat; //Calibration values
65 * The field structure of a single row of the AliHLTMUONTriggerReconstructor component's
68 struct AliHLTMUONTriggerRecoLutRow
70 AliHLTFloat32_t fX; // Global X coordinate of channel.
71 AliHLTFloat32_t fY; // Global Y coordinate of channel.
72 AliHLTFloat32_t fZ; // Global Z coordinate of channel.
76 * The lookup table structure for the AliHLTMUONTriggerReconstructor component.
77 * The LUT is used for translating from channel addresses to geometrical positions
78 * and other relevant information of the strips in the trigger chambers.
80 struct AliHLTMUONTriggerRecoLookupTable
82 // [regional header index][local board ID][chamber][cathode - X/Y][bit set in bit pattern]
83 AliHLTMUONTriggerRecoLutRow fRow[8][16][4][2][16];
90 * The sign/charge of a particle.
92 enum AliHLTMUONParticleSign
100 * The chamber names of the dimuon spectrometer.
102 enum AliHLTMUONChamberName
104 kUnknownChamber = -1,
122 * The internal data block type codes.
124 enum AliHLTMUONDataBlockType
126 kUnknownDataBlock = 0,
127 kTriggerRecordsDataBlock = 1000,
128 kTrigRecsDebugDataBlock = 1001,
129 kTriggerChannelsDataBlock = 1002,
130 kRecHitsDataBlock = 2000,
131 kClustersDataBlock = 2001,
132 kChannelsDataBlock = 2002,
133 kMansoTracksDataBlock = 3000,
134 kMansoCandidatesDataBlock = 3001,
135 kSinglesDecisionDataBlock = 4000,
136 kPairsDecisionDataBlock = 4001
141 * Stream operator to be able to print AliHLTMUONParticleSign with human
142 * readable names to some stream object like cout (standard output).
144 inline std::ostream& operator << (std::ostream& stream, AliHLTMUONParticleSign sign)
148 case kSignMinus: stream << "kSignMinus"; break;
149 case kSignUnknown: stream << "kSignUnknown"; break;
150 case kSignPlus: stream << "kSignPlus"; break;
151 default: stream << "INVALID";
157 * Stream operator to be able to print AliHLTMUONChamberName with human
158 * readable names to some stream object like cout (standard output).
160 inline std::ostream& operator << (std::ostream& stream, AliHLTMUONChamberName chamber)
164 case kUnknownChamber: stream << "kUnknownChamber"; break;
165 case kChamber1: stream << "kChamber1"; break;
166 case kChamber2: stream << "kChamber2"; break;
167 case kChamber3: stream << "kChamber3"; break;
168 case kChamber4: stream << "kChamber4"; break;
169 case kChamber5: stream << "kChamber5"; break;
170 case kChamber6: stream << "kChamber6"; break;
171 case kChamber7: stream << "kChamber7"; break;
172 case kChamber8: stream << "kChamber8"; break;
173 case kChamber9: stream << "kChamber9"; break;
174 case kChamber10: stream << "kChamber10"; break;
175 case kChamber11: stream << "kChamber11"; break;
176 case kChamber12: stream << "kChamber12"; break;
177 case kChamber13: stream << "kChamber13"; break;
178 case kChamber14: stream << "kChamber14"; break;
179 default: stream << "INVALID";
185 * Stream operator to be able to print AliHLTMUONDataBlockType with human
186 * readable names to some stream object like cout (standard output).
188 inline std::ostream& operator << (std::ostream& stream, AliHLTMUONDataBlockType type)
192 case kUnknownDataBlock: stream << "kUnknownDataBlock"; break;
193 case kTriggerRecordsDataBlock: stream << "kTriggerRecordsDataBlock"; break;
194 case kTrigRecsDebugDataBlock: stream << "kTrigRecsDebugDataBlock"; break;
195 case kTriggerChannelsDataBlock: stream << "kTriggerChannelsDataBlock"; break;
196 case kRecHitsDataBlock: stream << "kRecHitsDataBlock"; break;
197 case kClustersDataBlock: stream << "kClustersDataBlock"; break;
198 case kChannelsDataBlock: stream << "kChannelsDataBlock"; break;
199 case kMansoTracksDataBlock: stream << "kMansoTracksDataBlock"; break;
200 case kMansoCandidatesDataBlock: stream << "kMansoCandidatesDataBlock"; break;
201 case kSinglesDecisionDataBlock: stream << "kSinglesDecisionDataBlock"; break;
202 case kPairsDecisionDataBlock: stream << "kPairsDecisionDataBlock"; break;
203 default: stream << "INVALID";
209 * Stream operator for usage with std::ostream classes which prints the common
210 * data block header in the following format:
211 * {fType = xx, fRecordWidth = yy, fNrecords = zz}
213 inline std::ostream& operator << (
214 std::ostream& stream, const AliHLTMUONDataBlockHeader& header
217 stream << "{fType = " << AliHLTMUONDataBlockType(header.fType)
218 << ", fRecordWidth = " << header.fRecordWidth
219 << ", fNrecords = " << header.fNrecords << "}";
224 inline bool operator == (
225 const AliHLTMUONDataBlockHeader& a, const AliHLTMUONDataBlockHeader& b
228 return a.fType == b.fType and a.fRecordWidth == b.fRecordWidth
229 and a.fNrecords == b.fNrecords;
232 inline bool operator != (
233 const AliHLTMUONDataBlockHeader& a, const AliHLTMUONDataBlockHeader& b
236 return not operator == (a, b);
239 #endif // ALIHLTMUONDATATYPES_H