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.
79 * The sign/charge of a particle.
81 enum AliHLTMUONParticleSign
89 * The chamber names of the dimuon spectrometer.
91 enum AliHLTMUONChamberName
111 * The internal data block type codes.
113 enum AliHLTMUONDataBlockType
115 kUnknownDataBlock = 0,
116 kTriggerRecordsDataBlock = 1000,
117 kTrigRecsDebugDataBlock = 1001,
118 kTriggerChannelsDataBlock = 1002,
119 kRecHitsDataBlock = 2000,
120 kClustersDataBlock = 2001,
121 kChannelsDataBlock = 2002,
122 kMansoTracksDataBlock = 3000,
123 kMansoCandidatesDataBlock = 3001,
124 kSinglesDecisionDataBlock = 4000,
125 kPairsDecisionDataBlock = 4001
130 * Stream operator to be able to print AliHLTMUONParticleSign with human
131 * readable names to some stream object like cout (standard output).
133 inline std::ostream& operator << (std::ostream& stream, AliHLTMUONParticleSign sign)
137 case kSignMinus: stream << "kSignMinus"; break;
138 case kSignUnknown: stream << "kSignUnknown"; break;
139 case kSignPlus: stream << "kSignPlus"; break;
140 default: stream << "INVALID";
146 * Stream operator to be able to print AliHLTMUONChamberName with human
147 * readable names to some stream object like cout (standard output).
149 inline std::ostream& operator << (std::ostream& stream, AliHLTMUONChamberName chamber)
153 case kUnknownChamber: stream << "kUnknownChamber"; break;
154 case kChamber1: stream << "kChamber1"; break;
155 case kChamber2: stream << "kChamber2"; break;
156 case kChamber3: stream << "kChamber3"; break;
157 case kChamber4: stream << "kChamber4"; break;
158 case kChamber5: stream << "kChamber5"; break;
159 case kChamber6: stream << "kChamber6"; break;
160 case kChamber7: stream << "kChamber7"; break;
161 case kChamber8: stream << "kChamber8"; break;
162 case kChamber9: stream << "kChamber9"; break;
163 case kChamber10: stream << "kChamber10"; break;
164 case kChamber11: stream << "kChamber11"; break;
165 case kChamber12: stream << "kChamber12"; break;
166 case kChamber13: stream << "kChamber13"; break;
167 case kChamber14: stream << "kChamber14"; break;
168 default: stream << "INVALID";
174 * Stream operator to be able to print AliHLTMUONDataBlockType with human
175 * readable names to some stream object like cout (standard output).
177 inline std::ostream& operator << (std::ostream& stream, AliHLTMUONDataBlockType type)
181 case kUnknownDataBlock: stream << "kUnknownDataBlock"; break;
182 case kTriggerRecordsDataBlock: stream << "kTriggerRecordsDataBlock"; break;
183 case kTrigRecsDebugDataBlock: stream << "kTrigRecsDebugDataBlock"; break;
184 case kTriggerChannelsDataBlock: stream << "kTriggerChannelsDataBlock"; break;
185 case kRecHitsDataBlock: stream << "kRecHitsDataBlock"; break;
186 case kClustersDataBlock: stream << "kClustersDataBlock"; break;
187 case kChannelsDataBlock: stream << "kChannelsDataBlock"; break;
188 case kMansoTracksDataBlock: stream << "kMansoTracksDataBlock"; break;
189 case kMansoCandidatesDataBlock: stream << "kMansoCandidatesDataBlock"; break;
190 case kSinglesDecisionDataBlock: stream << "kSinglesDecisionDataBlock"; break;
191 case kPairsDecisionDataBlock: stream << "kPairsDecisionDataBlock"; break;
192 default: stream << "INVALID";
198 * Stream operator for usage with std::ostream classes which prints the common
199 * data block header in the following format:
200 * {fType = xx, fRecordWidth = yy, fNrecords = zz}
202 inline std::ostream& operator << (
203 std::ostream& stream, const AliHLTMUONDataBlockHeader& header
206 stream << "{fType = " << AliHLTMUONDataBlockType(header.fType)
207 << ", fRecordWidth = " << header.fRecordWidth
208 << ", fNrecords = " << header.fNrecords << "}";
213 inline bool operator == (
214 const AliHLTMUONDataBlockHeader& a, const AliHLTMUONDataBlockHeader& b
217 return a.fType == b.fType and a.fRecordWidth == b.fRecordWidth
218 and a.fNrecords == b.fNrecords;
221 inline bool operator != (
222 const AliHLTMUONDataBlockHeader& a, const AliHLTMUONDataBlockHeader& b
225 return not operator == (a, b);
228 #endif // ALIHLTMUONDATATYPES_H