]> git.uio.no Git - u/mrichter/AliRoot.git/blobdiff - HLT/MUON/AliHLTMUONUtils.cxx
FindFASTJET
[u/mrichter/AliRoot.git] / HLT / MUON / AliHLTMUONUtils.cxx
index 697cef20a2aca795aa0ada53167e377815896334..12c13ff83263b5125a78e6b2c556762c3f852c26 100644 (file)
@@ -13,7 +13,7 @@
  * provided "as is" without express or implied warranty.                  *
  **************************************************************************/
 
-/* $Id$ */
+// $Id$
 
 ///
 /// @file   AliHLTMUONUtils.cxx
@@ -31,6 +31,7 @@
 #include "AliHLTMUONChannelsBlockStruct.h"
 #include "AliHLTMUONMansoTracksBlockStruct.h"
 #include "AliHLTMUONMansoCandidatesBlockStruct.h"
+#include "AliHLTMUONTracksBlockStruct.h"
 #include "AliHLTMUONSinglesDecisionBlockStruct.h"
 #include "AliHLTMUONPairsDecisionBlockStruct.h"
 #include "AliMUONTrackerDDLDecoderEventHandler.h"
@@ -38,6 +39,8 @@
 #include <cmath>
 #include <cassert>
 
+ClassImp(AliHLTMUONUtils);
+
 
 AliHLTUInt32_t AliHLTMUONUtils::PackTriggerRecordFlags(
                AliHLTMUONParticleSign sign, const bool hitset[4]
@@ -114,15 +117,68 @@ void AliHLTMUONUtils::UnpackRecHitFlags(
 {
        /// This unpacks the AliHLTMUONRecHitStruct::fFlags bits into
        /// its component fields.
-       /// [in]  @param flags  The flags from an AliHLTMUONRecHitStruct structure.
-       /// [out] @param chamber    Sets the chamber number in the range [0..13].
-       /// [out] @param detElemId  Sets the detector element ID number.
+       /// @param [in]  flags  The flags from an AliHLTMUONRecHitStruct structure.
+       /// @param [out] chamber    Sets the chamber number in the range [0..13].
+       /// @param [out] detElemId  Sets the detector element ID number.
        
        chamber = (flags >> 12) & 0xF;
        detElemId = flags & 0xFFF;
 }
 
 
+AliHLTUInt32_t AliHLTMUONUtils::PackTrackFlags(
+               AliHLTMUONParticleSign sign, const bool hitset[16]
+       )
+{
+       /// This packs the given parameters into the bits of a word appropriate
+       /// for AliHLTMUONTrackStruct::fFlags.
+       /// @param sign    The particle sign.
+       /// @param hitset  Flags to indicate if the corresponding fHits[i] elements
+       ///                was set/filled.
+       /// @return  Returns the 32 bit packed word.
+       
+       AliHLTUInt32_t flags;
+       switch (sign)
+       {
+       case kSignMinus: flags = 0x80000000; break;
+       case kSignPlus:  flags = 0x40000000; break;
+       default:         flags = 0x00000000; break;
+       }
+       
+       for (AliHLTUInt32_t i = 0; i < 16; i++)
+       {
+               flags |= (hitset[i] ? (0x1 << i) : 0);
+       }
+       return flags;
+}
+
+
+void AliHLTMUONUtils::UnpackTrackFlags(
+               AliHLTUInt32_t flags, AliHLTMUONParticleSign& sign, bool hitset[16]
+       )
+{
+       /// This unpacks the AliHLTMUONTrackStruct::fFlags bits into
+       /// its component fields.
+       /// @param flags  The flags from an AliHLTMUONTrackStruct structure.
+       /// @param sign    Sets this to the particle sign.
+       /// @param hitset  Sets the array elements to indicate if the corresponding
+       ///                fHits[i] element was set/filled.
+       
+       AliHLTUInt32_t signbits = flags & 0xC0000000;
+       switch (signbits)
+       {
+       case 0x80000000: sign = kSignMinus;   break;
+       case 0x40000000: sign = kSignPlus;    break;
+       default:         sign = kSignUnknown; break;
+       }
+       
+       for (AliHLTUInt32_t i = 0; i < 16; i++)
+       {
+               hitset[i] = ((flags & (0x1u << i)) == (0x1u << i));
+       }
+}
+
+
 AliHLTUInt32_t AliHLTMUONUtils::PackTrackDecisionBits(bool highPt, bool lowPt)
 {
        ///
@@ -442,6 +498,10 @@ AliHLTMUONDataBlockType AliHLTMUONUtils::ParseCommandLineTypeString(const char*
        {
                return kMansoCandidatesDataBlock;
        }
+       else if (strcmp(type, "tracks") == 0)
+       {
+               return kTracksDataBlock;
+       }
        else if (strcmp(type, "singlesdecision") == 0)
        {
                return kSinglesDecisionDataBlock;
@@ -485,6 +545,9 @@ const char* AliHLTMUONUtils::DataBlockTypeToString(AliHLTMUONDataBlockType type)
        case kMansoCandidatesDataBlock:
                t = AliHLTMUONConstants::MansoCandidatesBlockDataType();
                break;
+       case kTracksDataBlock:
+               t = AliHLTMUONConstants::TracksBlockDataType();
+               break;
        case kSinglesDecisionDataBlock:
                t = AliHLTMUONConstants::SinglesDecisionBlockDataType();
                break;
@@ -519,7 +582,10 @@ const char* AliHLTMUONUtils::FailureReasonToString(WhyNotValid reason)
        case kInvalidDetElementNumber: return "kInvalidDetElementNumber";
        case kInvalidChamberNumber: return "kInvalidChamberNumber";
        case kHitIsNil: return "kHitIsNil";
-       case kInvalidChannelCount: return "kInvalidChannelCount";
+       case kInvalidChannelCountB: return "kInvalidChannelCountB";
+       case kInvalidChannelCountNB: return "kInvalidChannelCountNB";
+       case kInvalidChargeB: return "kInvalidChargeB";
+       case kInvalidChargeNB: return "kInvalidChargeNB";
        case kInvalidBusPatchId: return "kInvalidBusPatchId";
        case kInvalidManuId: return "kInvalidManuId";
        case kInvalidChannelAddress: return "kInvalidChannelAddress";
@@ -527,6 +593,8 @@ const char* AliHLTMUONUtils::FailureReasonToString(WhyNotValid reason)
        case kDataWordDifferent: return "kDataWordDifferent";
        case kChiSquareInvalid: return "kChiSquareInvalid";
        case kMomentumVectorNotZero: return "kMomentumVectorNotZero";
+       case kMomentumParamsNotZero: return "kMomentumParamsNotZero";
+       case kDCAVertexNotZero: return "kDCAVertexNotZero";
        case kRoiRadiusInvalid: return "kRoiRadiusInvalid";
        case kHitNotWithinRoi: return "kHitNotWithinRoi";
        case kPtValueNotValid: return "kPtValueNotValid";
@@ -578,9 +646,16 @@ const char* AliHLTMUONUtils::FailureReasonToMessage(WhyNotValid reason)
                return "An invalid chamber number was found.";
        case kHitIsNil:
                return "The hit cannot be set to a nil value.";
-       case kInvalidChannelCount:
-               return "The number of channels indicated is zero or outside"
-                       " the valid range.";
+       case kInvalidChannelCountB:
+               return "The number of channels in the bending plane indicated"
+                       " is zero or outside the valid range.";
+       case kInvalidChannelCountNB:
+               return "The number of channels in the non-bending plane indicated"
+                       " is zero or outside the valid range.";
+       case kInvalidChargeB:
+               return "The charge in the bending plane does not have a valid value.";
+       case kInvalidChargeNB:
+               return "The charge in the non-bending plane does not have a valid value.";
        case kInvalidBusPatchId:
                return "The bus patch identifier is outside the valid range.";
        case kInvalidManuId:
@@ -593,10 +668,16 @@ const char* AliHLTMUONUtils::FailureReasonToMessage(WhyNotValid reason)
                return "The raw data word is different from the unpacked values.";
        case kChiSquareInvalid:
                return "The chi squared value must be a positive value or -1"
-                       " indicating a fitting error.";
+                       " indicating no fit or a fitting error.";
        case kMomentumVectorNotZero:
                return "The chi sqaured value is set to -1 indicating momentum"
                        " was not fitted, but the momentum vector was not zero.";
+       case kMomentumParamsNotZero:
+               return "The chi sqaured value is set to -1 indicating the track"
+                       " was not fitted, but the fitted momentum parameters are not zero.";
+       case kDCAVertexNotZero:
+               return "The chi sqaured value is set to -1 indicating the track"
+                       " was not fitted, but the DCA vertex is not zero.";
        case kRoiRadiusInvalid:
                return "The region of interest radius is invalid.";
        case kHitNotWithinRoi:
@@ -651,7 +732,10 @@ bool AliHLTMUONUtils::RecordNumberWasSet(WhyNotValid reason)
        case kInvalidDetElementNumber:
        case kInvalidChamberNumber:
        case kHitIsNil:
-       case kInvalidChannelCount:
+       case kInvalidChannelCountB:
+       case kInvalidChannelCountNB:
+       case kInvalidChargeB:
+       case kInvalidChargeNB:
        case kInvalidBusPatchId:
        case kInvalidManuId:
        case kInvalidChannelAddress:
@@ -676,12 +760,12 @@ bool AliHLTMUONUtils::HeaderOk(
 {
        /// Method used to check if the header information corresponds to the
        /// supposed type of the raw dHLT data block.
-       /// [in]  \param block  The data block to check.
-       /// [out] \param reason  If this is not NULL, then it is assumed to point
+       /// \param [in]  block  The data block to check.
+       /// \param [out] reason  If this is not NULL, then it is assumed to point
        ///      to an array of at least 'reasonCount' number of elements. It will
        ///      be filled with the reason codes describing why the header is not
        ///      valid.
-       /// [in/out] \param reasonCount  This should initially specify the size of
+       /// \param [in,out] reasonCount  This should initially specify the size of
        ///      the array pointed to by 'reason'. It will be filled with the number
        ///      of items actually filled into the reason array upon exit from this
        ///      method.
@@ -724,12 +808,12 @@ bool AliHLTMUONUtils::HeaderOk(
 {
        /// Method used to check if the header information corresponds to the
        /// supposed type of the raw dHLT data block.
-       /// [in]  \param block  The data block to check.
-       /// [out] \param reason  If this is not NULL, then it is assumed to point
+       /// \param [in]  block  The data block to check.
+       /// \param [out] reason  If this is not NULL, then it is assumed to point
        ///      to an array of at least 'reasonCount' number of elements. It will
        ///      be filled with the reason codes describing why the header is not
        ///      valid.
-       /// [in/out] \param reasonCount  This should initially specify the size of
+       /// \param [in,out] reasonCount  This should initially specify the size of
        ///      the array pointed to by 'reason'. It will be filled with the number
        ///      of items actually filled into the reason array upon exit from this
        ///      method.
@@ -772,12 +856,12 @@ bool AliHLTMUONUtils::HeaderOk(
 {
        /// Method used to check if the header information corresponds to the
        /// supposed type of the raw dHLT data block.
-       /// [in]  \param block  The data block to check.
-       /// [out] \param reason  If this is not NULL, then it is assumed to point
+       /// \param [in]  block  The data block to check.
+       /// \param [out] reason  If this is not NULL, then it is assumed to point
        ///      to an array of at least 'reasonCount' number of elements. It will
        ///      be filled with the reason codes describing why the header is not
        ///      valid.
-       /// [in/out] \param reasonCount  This should initially specify the size of
+       /// \param [in,out] reasonCount  This should initially specify the size of
        ///      the array pointed to by 'reason'. It will be filled with the number
        ///      of items actually filled into the reason array upon exit from this
        ///      method.
@@ -820,12 +904,12 @@ bool AliHLTMUONUtils::HeaderOk(
 {
        /// Method used to check if the header information corresponds to the
        /// supposed type of the raw dHLT data block.
-       /// [in]  \param block  The data block to check.
-       /// [out] \param reason  If this is not NULL, then it is assumed to point
+       /// \param [in]  block  The data block to check.
+       /// \param [out] reason  If this is not NULL, then it is assumed to point
        ///      to an array of at least 'reasonCount' number of elements. It will
        ///      be filled with the reason codes describing why the header is not
        ///      valid.
-       /// [in/out] \param reasonCount  This should initially specify the size of
+       /// \param [in,out] reasonCount  This should initially specify the size of
        ///      the array pointed to by 'reason'. It will be filled with the number
        ///      of items actually filled into the reason array upon exit from this
        ///      method.
@@ -868,12 +952,12 @@ bool AliHLTMUONUtils::HeaderOk(
 {
        /// Method used to check if the header information corresponds to the
        /// supposed type of the raw dHLT data block.
-       /// [in]  \param block  The data block to check.
-       /// [out] \param reason  If this is not NULL, then it is assumed to point
+       /// \param [in]  block  The data block to check.
+       /// \param [out] reason  If this is not NULL, then it is assumed to point
        ///      to an array of at least 'reasonCount' number of elements. It will
        ///      be filled with the reason codes describing why the header is not
        ///      valid.
-       /// [in/out] \param reasonCount  This should initially specify the size of
+       /// \param [in,out] reasonCount  This should initially specify the size of
        ///      the array pointed to by 'reason'. It will be filled with the number
        ///      of items actually filled into the reason array upon exit from this
        ///      method.
@@ -916,12 +1000,12 @@ bool AliHLTMUONUtils::HeaderOk(
 {
        /// Method used to check if the header information corresponds to the
        /// supposed type of the raw dHLT data block.
-       /// [in]  \param block  The data block to check.
-       /// [out] \param reason  If this is not NULL, then it is assumed to point
+       /// \param [in]  block  The data block to check.
+       /// \param [out] reason  If this is not NULL, then it is assumed to point
        ///      to an array of at least 'reasonCount' number of elements. It will
        ///      be filled with the reason codes describing why the header is not
        ///      valid.
-       /// [in/out] \param reasonCount  This should initially specify the size of
+       /// \param [in,out] reasonCount  This should initially specify the size of
        ///      the array pointed to by 'reason'. It will be filled with the number
        ///      of items actually filled into the reason array upon exit from this
        ///      method.
@@ -964,12 +1048,12 @@ bool AliHLTMUONUtils::HeaderOk(
 {
        /// Method used to check if the header information corresponds to the
        /// supposed type of the raw dHLT data block.
-       /// [in]  \param block  The data block to check.
-       /// [out] \param reason  If this is not NULL, then it is assumed to point
+       /// \param [in]  block  The data block to check.
+       /// \param [out] reason  If this is not NULL, then it is assumed to point
        ///      to an array of at least 'reasonCount' number of elements. It will
        ///      be filled with the reason codes describing why the header is not
        ///      valid.
-       /// [in/out] \param reasonCount  This should initially specify the size of
+       /// \param [in,out] reasonCount  This should initially specify the size of
        ///      the array pointed to by 'reason'. It will be filled with the number
        ///      of items actually filled into the reason array upon exit from this
        ///      method.
@@ -1005,6 +1089,54 @@ bool AliHLTMUONUtils::HeaderOk(
 }
 
 
+bool AliHLTMUONUtils::HeaderOk(
+               const AliHLTMUONTracksBlockStruct& block,
+               WhyNotValid* reason, AliHLTUInt32_t& reasonCount
+       )
+{
+       /// Method used to check if the header information corresponds to the
+       /// supposed type of the raw dHLT data block.
+       /// \param [in]  block  The data block to check.
+       /// \param [out] reason  If this is not NULL, then it is assumed to point
+       ///      to an array of at least 'reasonCount' number of elements. It will
+       ///      be filled with the reason codes describing why the header is not
+       ///      valid.
+       /// \param [in,out] reasonCount  This should initially specify the size of
+       ///      the array pointed to by 'reason'. It will be filled with the number
+       ///      of items actually filled into the reason array upon exit from this
+       ///      method.
+       /// \returns  true if there is no problem with the header and false otherwise.
+       
+       AliHLTUInt32_t maxCount = reasonCount;
+       reasonCount = 0;
+       bool result = true;
+       
+       // The block must have the correct type.
+       if (block.fHeader.fType != kTracksDataBlock)
+       {
+               if (reason != NULL and reasonCount < maxCount)
+               {
+                       reason[reasonCount] = kHeaderContainsWrongType;
+                       reasonCount++;
+               }
+               result = false;
+       }
+       
+       // The block's record width must be the correct size.
+       if (block.fHeader.fRecordWidth != sizeof(AliHLTMUONTrackStruct))
+       {
+               if (reason != NULL and reasonCount < maxCount)
+               {
+                       reason[reasonCount] = kHeaderContainsWrongRecordWidth;
+                       reasonCount++;
+               }
+               result = false;
+       }
+       
+       return result;
+}
+
+
 bool AliHLTMUONUtils::HeaderOk(
                const AliHLTMUONSinglesDecisionBlockStruct& block,
                WhyNotValid* reason, AliHLTUInt32_t& reasonCount
@@ -1012,12 +1144,12 @@ bool AliHLTMUONUtils::HeaderOk(
 {
        /// Method used to check if the header information corresponds to the
        /// supposed type of the raw dHLT data block.
-       /// [in]  \param block  The data block to check.
-       /// [out] \param reason  If this is not NULL, then it is assumed to point
+       /// \param [in]  block  The data block to check.
+       /// \param [out] reason  If this is not NULL, then it is assumed to point
        ///      to an array of at least 'reasonCount' number of elements. It will
        ///      be filled with the reason codes describing why the header is not
        ///      valid.
-       /// [in/out] \param reasonCount  This should initially specify the size of
+       /// \param [in,out] reasonCount  This should initially specify the size of
        ///      the array pointed to by 'reason'. It will be filled with the number
        ///      of items actually filled into the reason array upon exit from this
        ///      method.
@@ -1060,12 +1192,12 @@ bool AliHLTMUONUtils::HeaderOk(
 {
        /// Method used to check if the header information corresponds to the
        /// supposed type of the raw dHLT data block.
-       /// [in]  \param block  The data block to check.
-       /// [out] \param reason  If this is not NULL, then it is assumed to point
+       /// \param [in]  block  The data block to check.
+       /// \param [out] reason  If this is not NULL, then it is assumed to point
        ///      to an array of at least 'reasonCount' number of elements. It will
        ///      be filled with the reason codes describing why the header is not
        ///      valid.
-       /// [in/out] \param reasonCount  This should initially specify the size of
+       /// \param [in,out] reasonCount  This should initially specify the size of
        ///      the array pointed to by 'reason'. It will be filled with the number
        ///      of items actually filled into the reason array upon exit from this
        ///      method.
@@ -1109,12 +1241,12 @@ bool AliHLTMUONUtils::IntegrityOk(
 {
        /// This method is used to check more extensively if the integrity of the
        /// trigger record structure is OK and returns true in that case.
-       /// [in] \param tr  The trigger record structure to check.
-       /// [out] \param reason  If this is not NULL, then it is assumed to point
+       /// \param [in]  tr  The trigger record structure to check.
+       /// \param [out] reason  If this is not NULL, then it is assumed to point
        ///      to an array of at least 'reasonCount' number of elements. It will
        ///      be filled with the reason codes describing why the structure is
        ///      not valid.
-       /// [in/out] \param reasonCount  This should initially specify the size of
+       /// \param [in,out] reasonCount  This should initially specify the size of
        ///      the array pointed to by 'reason'. It will be filled with the number
        ///      of items actually filled into the reason array upon exit from this
        ///      method.
@@ -1200,12 +1332,12 @@ bool AliHLTMUONUtils::IntegrityOk(
 {
        /// This method is used to check more extensively if the integrity of the
        /// dHLT raw internal data block is OK and returns true in that case.
-       /// [in] \param block  The trigger record data block to check.
-       /// [out] \param reason  If this is not NULL, then it is assumed to point
+       /// \param [in]  block  The trigger record data block to check.
+       /// \param [out] reason  If this is not NULL, then it is assumed to point
        ///      to an array of at least 'reasonCount' number of elements. It will
        ///      be filled with the reason codes describing why the data block is
        ///      not valid.
-       /// [out] \param recordNum  If this is not NULL, then it is assumed to point
+       /// \param [out] recordNum  If this is not NULL, then it is assumed to point
        ///      to an array of at least 'reasonCount' number of elements. It will
        ///      be filled with the number of the trigger record that had a problem.
        ///      The value 'recordNum[i]' will only contain a valid value if
@@ -1218,7 +1350,7 @@ bool AliHLTMUONUtils::IntegrityOk(
        ///        - kInvalidChamberNumber
        /// \note You can use RecordNumberWasSet(reason[i]) to check if 'recordNum[i]'
        ///      was set and is valid or not.
-       /// [in/out] \param reasonCount  This should initially specify the size of
+       /// \param [in,out] reasonCount  This should initially specify the size of
        ///      the array pointed to by 'reason' and 'recordNum'. It will be filled
        ///      with the number of items actually filled into the arrays upon exit
        ///      from this method.
@@ -1278,12 +1410,12 @@ bool AliHLTMUONUtils::IntegrityOk(
 {
        /// This method is used to check more extensively if the integrity of the
        /// trigger record debug information structure is OK and returns true in that case.
-       /// [in] \param trigInfo  The trigger record debug information structure to check.
-       /// [out] \param reason  If this is not NULL, then it is assumed to point
+       /// \param [in]  trigInfo  The trigger record debug information structure to check.
+       /// \param [out] reason  If this is not NULL, then it is assumed to point
        ///      to an array of at least 'reasonCount' number of elements. It will
        ///      be filled with the reason codes describing why the structure is not
        ///      valid.
-       /// [in/out] \param reasonCount  This should initially specify the size of
+       /// \param [in,out] reasonCount  This should initially specify the size of
        ///      the array pointed to by 'reason'. It will be filled with the number
        ///      of items actually filled into the reason array upon exit from this
        ///      method.
@@ -1336,13 +1468,13 @@ bool AliHLTMUONUtils::IntegrityOk(
 {
        /// This method is used to check more extensively if the integrity of the
        /// dHLT raw internal data block is OK and returns true in that case.
-       /// [in] \param block  The trigger record debugging information data block
+       /// \param [in]  block  The trigger record debugging information data block
        ///      to check.
-       /// [out] \param reason  If this is not NULL, then it is assumed to point
+       /// \param [out] reason  If this is not NULL, then it is assumed to point
        ///      to an array of at least 'reasonCount' number of elements. It will
        ///      be filled with the reason codes describing why the data block is
        ///      not valid.
-       /// [out] \param recordNum  If this is not NULL, then it is assumed to point
+       /// \param [out] recordNum  If this is not NULL, then it is assumed to point
        ///      to an array of at least 'reasonCount' number of elements. It will
        ///      be filled with the number of the trigger record debug information
        ///      structure that had a problem.
@@ -1352,7 +1484,7 @@ bool AliHLTMUONUtils::IntegrityOk(
        ///        - kInvalidDetElementNumber
        /// \note You can use RecordNumberWasSet(reason[i]) to check if 'recordNum[i]'
        ///      was set and is valid or not.
-       /// [in/out] \param reasonCount  This should initially specify the size of
+       /// \param [in,out] reasonCount  This should initially specify the size of
        ///      the array pointed to by 'reason' and 'recordNum'. It will be filled
        ///      with the number of items actually filled into the arrays upon exit
        ///      from this method.
@@ -1412,12 +1544,12 @@ bool AliHLTMUONUtils::IntegrityOk(
 {
        /// This method is used to check more extensively if the integrity of the
        /// reconstructed hit structure is OK and returns true in that case.
-       /// [in] \param hit  The reconstructed hit structure to check.
-       /// [out] \param reason  If this is not NULL, then it is assumed to point
+       /// \param [in]  hit  The reconstructed hit structure to check.
+       /// \param [out] reason  If this is not NULL, then it is assumed to point
        ///      to an array of at least 'reasonCount' number of elements. It will
        ///      be filled with the reason codes describing why the structure is
        ///      not valid.
-       /// [in/out] \param reasonCount  This should initially specify the size of
+       /// \param [in,out] reasonCount  This should initially specify the size of
        ///      the array pointed to by 'reason'. It will be filled with the number
        ///      of items actually filled into the reason array upon exit from this
        ///      method.
@@ -1483,12 +1615,12 @@ bool AliHLTMUONUtils::IntegrityOk(
 {
        /// This method is used to check more extensively if the integrity of the
        /// dHLT raw internal hits data block is OK and returns true in that case.
-       /// [in] \param block  The reconstructed hits data block to check.
-       /// [out] \param reason  If this is not NULL, then it is assumed to point
+       /// \param [in]  block  The reconstructed hits data block to check.
+       /// \param [out] reason  If this is not NULL, then it is assumed to point
        ///      to an array of at least 'reasonCount' number of elements. It will
        ///      be filled with the reason codes describing why the data block is
        ///      not valid.
-       /// [out] \param recordNum  If this is not NULL, then it is assumed to point
+       /// \param [out] recordNum  If this is not NULL, then it is assumed to point
        ///      to an array of at least 'reasonCount' number of elements. It will
        ///      be filled with the number of the reconstructed hits that had a problem.
        ///      The value 'recordNum[i]' will only contain a valid value if
@@ -1498,7 +1630,7 @@ bool AliHLTMUONUtils::IntegrityOk(
        ///        - kInvalidChamberNumber
        /// \note You can use RecordNumberWasSet(reason[i]) to check if 'recordNum[i]'
        ///      was set and is valid or not.
-       /// [in/out] \param reasonCount  This should initially specify the size of
+       /// \param [in,out] reasonCount  This should initially specify the size of
        ///      the array pointed to by 'reason' and 'recordNum'. It will be filled
        ///      with the number of items actually filled into the arrays upon exit
        ///      from this method.
@@ -1558,12 +1690,12 @@ bool AliHLTMUONUtils::IntegrityOk(
 {
        /// This method is used to check more extensively if the integrity of the
        /// cluster structure is OK and returns true in that case.
-       /// [in] \param cluster  The cluster structure to check.
-       /// [out] \param reason  If this is not NULL, then it is assumed to point
+       /// \param [in]  cluster  The cluster structure to check.
+       /// \param [out] reason  If this is not NULL, then it is assumed to point
        ///      to an array of at least 'reasonCount' number of elements. It will
        ///      be filled with the reason codes describing why the structure is
        ///      not valid.
-       /// [in/out] \param reasonCount  This should initially specify the size of
+       /// \param [in,out] reasonCount  This should initially specify the size of
        ///      the array pointed to by 'reason'. It will be filled with the number
        ///      of items actually filled into the reason array upon exit from this
        ///      method.
@@ -1609,13 +1741,42 @@ bool AliHLTMUONUtils::IntegrityOk(
        }
        
        // The number of channels should be in a reasonable range.
-       // between 1 and the maximum number of channels per DDL.
-       // 1<<17 taken from the 11 bits MANU ID + 6 bits channel address.
-       if (cluster.fNchannels < 1 or (1<<17) < cluster.fNchannels)
+       // Using a value of 5*5*2, 5 pads by 5 pads by 2 cathode planes.
+       if (int(cluster.fNchannelsB) < 1 or (5*5*2) < int(cluster.fNchannelsB))
+       {
+               if (reason != NULL and reasonCount < maxCount)
+               {
+                       reason[reasonCount] = kInvalidChannelCountB;
+                       reasonCount++;
+               }
+               result = false;
+       }
+       if (int(cluster.fNchannelsNB) < 1 or (5*5*2) < int(cluster.fNchannelsNB))
        {
                if (reason != NULL and reasonCount < maxCount)
                {
-                       reason[reasonCount] = kInvalidChannelCount;
+                       reason[reasonCount] = kInvalidChannelCountNB;
+                       reasonCount++;
+               }
+               result = false;
+       }
+
+       
+       // The charge values must be a positive value or -1.
+       if (not (cluster.fChargeB >= 0 or cluster.fChargeB == -1))
+       {
+               if (reason != NULL and reasonCount < maxCount)
+               {
+                       reason[reasonCount] = kInvalidChargeB;
+                       reasonCount++;
+               }
+               result = false;
+       }
+       if (not (cluster.fChargeNB >= 0 or cluster.fChargeNB == -1))
+       {
+               if (reason != NULL and reasonCount < maxCount)
+               {
+                       reason[reasonCount] = kInvalidChargeNB;
                        reasonCount++;
                }
                result = false;
@@ -1634,12 +1795,12 @@ bool AliHLTMUONUtils::IntegrityOk(
 {
        /// This method is used to check more extensively if the integrity of the
        /// dHLT internal clusters data block is OK and returns true in that case.
-       /// [in] \param block  The clusters data block to check.
-       /// [out] \param reason  If this is not NULL, then it is assumed to point
+       /// \param [in]  block  The clusters data block to check.
+       /// \param [out] reason  If this is not NULL, then it is assumed to point
        ///      to an array of at least 'reasonCount' number of elements. It will
        ///      be filled with the reason codes describing why the data block is
        ///      not valid.
-       /// [out] \param recordNum  If this is not NULL, then it is assumed to point
+       /// \param [out] recordNum  If this is not NULL, then it is assumed to point
        ///      to an array of at least 'reasonCount' number of elements. It will
        ///      be filled with the number of the cluster structure that had a problem.
        ///      The value 'recordNum[i]' will only contain a valid value if
@@ -1647,10 +1808,13 @@ bool AliHLTMUONUtils::IntegrityOk(
        ///        - kInvalidIdValue
        ///        - kHitIsNil
        ///        - kInvalidDetElementNumber
-       ///        - kInvalidChannelCount
+       ///        - kInvalidChannelCountB
+       ///        - kInvalidChannelCountNB
+       ///        - kInvalidChargeB
+       ///        - kInvalidChargeNB
        /// \note You can use RecordNumberWasSet(reason[i]) to check if 'recordNum[i]'
        ///      was set and is valid or not.
-       /// [in/out] \param reasonCount  This should initially specify the size of
+       /// \param [in,out] reasonCount  This should initially specify the size of
        ///      the array pointed to by 'reason' and 'recordNum'. It will be filled
        ///      with the number of items actually filled into the arrays upon exit
        ///      from this method.
@@ -1728,12 +1892,12 @@ bool AliHLTMUONUtils::IntegrityOk(
 {
        /// This method is used to check more extensively if the integrity of the
        /// channel structure is OK and returns true in that case.
-       /// [in] \param cluster  The channel structure to check.
-       /// [out] \param reason  If this is not NULL, then it is assumed to point
+       /// \param [in]  cluster  The channel structure to check.
+       /// \param [out] reason  If this is not NULL, then it is assumed to point
        ///      to an array of at least 'reasonCount' number of elements. It will
        ///      be filled with the reason codes describing why the structure is
        ///      not valid.
-       /// [in/out] \param reasonCount  This should initially specify the size of
+       /// \param [in,out] reasonCount  This should initially specify the size of
        ///      the array pointed to by 'reason'. It will be filled with the number
        ///      of items actually filled into the reason array upon exit from this
        ///      method.
@@ -1829,12 +1993,12 @@ bool AliHLTMUONUtils::IntegrityOk(
 {
        /// This method is used to check more extensively if the integrity of the
        /// dHLT internal channels data block is OK and returns true in that case.
-       /// [in] \param block  The channels data block to check.
-       /// [out] \param reason  If this is not NULL, then it is assumed to point
+       /// \param [in]  block  The channels data block to check.
+       /// \param [out] reason  If this is not NULL, then it is assumed to point
        ///      to an array of at least 'reasonCount' number of elements. It will
        ///      be filled with the reason codes describing why the data block is
        ///      not valid.
-       /// [out] \param recordNum  If this is not NULL, then it is assumed to point
+       /// \param [out] recordNum  If this is not NULL, then it is assumed to point
        ///      to an array of at least 'reasonCount' number of elements. It will
        ///      be filled with the number of the channel structure that had a problem.
        ///      The value 'recordNum[i]' will only contain a valid value if
@@ -1847,7 +2011,7 @@ bool AliHLTMUONUtils::IntegrityOk(
        ///        - kDataWordDifferent
        /// \note You can use RecordNumberWasSet(reason[i]) to check if 'recordNum[i]'
        ///      was set and is valid or not.
-       /// [in/out] \param reasonCount  This should initially specify the size of
+       /// \param [in,out] reasonCount  This should initially specify the size of
        ///      the array pointed to by 'reason' and 'recordNum'. It will be filled
        ///      with the number of items actually filled into the arrays upon exit
        ///      from this method.
@@ -1858,24 +2022,6 @@ bool AliHLTMUONUtils::IntegrityOk(
        
        const AliHLTMUONChannelStruct* channel =
                reinterpret_cast<const AliHLTMUONChannelStruct*>(&block + 1);
-       
-       // Check if any cluster ID is duplicated.
-       for (AliHLTUInt32_t i = 0; i < block.fHeader.fNrecords; i++)
-       {
-               AliHLTInt32_t id = channel[i].fClusterId;
-               for (AliHLTUInt32_t j = i+1; j < block.fHeader.fNrecords; j++)
-               {
-                       if (id == channel[j].fClusterId)
-                       {
-                               if (reason != NULL and reasonCount < maxCount)
-                               {
-                                       reason[reasonCount] = kFoundDuplicateIDs;
-                                       reasonCount++;
-                               }
-                               result = false;
-                       }
-               }
-       }
 
        // Check integrity of individual channel structures.
        for (AliHLTUInt32_t i = 0; i < block.fHeader.fNrecords; i++)
@@ -1907,12 +2053,12 @@ bool AliHLTMUONUtils::IntegrityOk(
 {
        /// This method is used to check more extensively if the integrity of the
        /// Manso track structure is OK and returns true in that case.
-       /// [in] \param track  The track structure to check.
-       /// [out] \param reason  If this is not NULL, then it is assumed to point
+       /// \param [in]  track  The track structure to check.
+       /// \param [out] reason  If this is not NULL, then it is assumed to point
        ///      to an array of at least 'reasonCount' number of elements. It will
        ///      be filled with the reason codes describing why the structure is
        ///      not valid.
-       /// [in/out] \param reasonCount  This should initially specify the size of
+       /// \param [in,out] reasonCount  This should initially specify the size of
        ///      the array pointed to by 'reason'. It will be filled with the number
        ///      of items actually filled into the reason array upon exit from this
        ///      method.
@@ -2033,12 +2179,12 @@ bool AliHLTMUONUtils::IntegrityOk(
 {
        /// This method is used to check more extensively if the integrity of the
        /// dHLT internal Manso track data block is OK and returns true in that case.
-       /// [in] \param block  The Manso track data block to check.
-       /// [out] \param reason  If this is not NULL, then it is assumed to point
+       /// \param [in]  block  The Manso track data block to check.
+       /// \param [out] reason  If this is not NULL, then it is assumed to point
        ///      to an array of at least 'reasonCount' number of elements. It will
        ///      be filled with the reason codes describing why the data block is
        ///      not valid.
-       /// [out] \param recordNum  If this is not NULL, then it is assumed to point
+       /// \param [out] recordNum  If this is not NULL, then it is assumed to point
        ///      to an array of at least 'reasonCount' number of elements. It will
        ///      be filled with the number of the Manso track that had a problem.
        ///      The value 'recordNum[i]' will only contain a valid value if
@@ -2054,7 +2200,7 @@ bool AliHLTMUONUtils::IntegrityOk(
        ///        - kInvalidChamberNumber
        /// \note You can use RecordNumberWasSet(reason[i]) to check if 'recordNum[i]'
        ///      was set and is valid or not.
-       /// [in/out] \param reasonCount  This should initially specify the size of
+       /// \param [in,out] reasonCount  This should initially specify the size of
        ///      the array pointed to by 'reason' and 'recordNum'. It will be filled
        ///      with the number of items actually filled into the arrays upon exit
        ///      from this method.
@@ -2114,12 +2260,12 @@ bool AliHLTMUONUtils::IntegrityOk(
 {
        /// This method is used to check more extensively if the integrity of the
        /// Manso track candidate structure is OK and returns true in that case.
-       /// [in] \param track  The track candidate structure to check.
-       /// [out] \param reason  If this is not NULL, then it is assumed to point
+       /// \param [in]  track  The track candidate structure to check.
+       /// \param [out] reason  If this is not NULL, then it is assumed to point
        ///      to an array of at least 'reasonCount' number of elements. It will
        ///      be filled with the reason codes describing why the structure is
        ///      not valid.
-       /// [in/out] \param reasonCount  This should initially specify the size of
+       /// \param [in,out] reasonCount  This should initially specify the size of
        ///      the array pointed to by 'reason'. It will be filled with the number
        ///      of items actually filled into the reason array upon exit from this
        ///      method.
@@ -2179,12 +2325,12 @@ bool AliHLTMUONUtils::IntegrityOk(
        /// This method is used to check more extensively if the integrity of the
        /// dHLT internal Manso candidates data block is OK and returns true in
        /// that case.
-       /// [in] \param block  The Manso track candidate data block to check.
-       /// [out] \param reason  If this is not NULL, then it is assumed to point
+       /// \param [in]  block  The Manso track candidate data block to check.
+       /// \param [out] reason  If this is not NULL, then it is assumed to point
        ///      to an array of at least 'reasonCount' number of elements. It will
        ///      be filled with the reason codes describing why the data block is
        ///      not valid.
-       /// [out] \param recordNum  If this is not NULL, then it is assumed to point
+       /// \param [out] recordNum  If this is not NULL, then it is assumed to point
        ///      to an array of at least 'reasonCount' number of elements. It will
        ///      be filled with the number of the track candidate that had a problem.
        ///      The value 'recordNum[i]' will only contain a valid value if
@@ -2199,7 +2345,7 @@ bool AliHLTMUONUtils::IntegrityOk(
        ///        - kHitNotWithinRoi
        /// \note You can use RecordNumberWasSet(reason[i]) to check if 'recordNum[i]'
        ///      was set and is valid or not.
-       /// [in/out] \param reasonCount  This should initially specify the size of
+       /// \param [in,out] reasonCount  This should initially specify the size of
        ///      the array pointed to by 'reason' and 'recordNum'. It will be filled
        ///      with the number of items actually filled into the arrays upon exit
        ///      from this method.
@@ -2251,6 +2397,240 @@ bool AliHLTMUONUtils::IntegrityOk(
 }
 
 
+bool AliHLTMUONUtils::IntegrityOk(
+               const AliHLTMUONTrackStruct& track,
+               WhyNotValid* reason,
+               AliHLTUInt32_t& reasonCount
+       )
+{
+       /// This method is used to check more extensively if the integrity of the
+       /// full track structure is OK and returns true in that case.
+       /// \param [in]  track  The track structure to check.
+       /// \param [out] reason  If this is not NULL, then it is assumed to point
+       ///      to an array of at least 'reasonCount' number of elements. It will
+       ///      be filled with the reason codes describing why the structure is
+       ///      not valid.
+       /// \param [in,out] reasonCount  This should initially specify the size of
+       ///      the array pointed to by 'reason'. It will be filled with the number
+       ///      of items actually filled into the reason array upon exit from this
+       ///      method.
+       /// \returns  true if there is no problem with the structure and false otherwise.
+       
+       AliHLTUInt32_t maxCount = reasonCount;
+       reasonCount = 0;
+       bool result = true;
+       
+       // Check that the track ID has a valid value.
+       if (not (track.fId >= 0 or track.fId == -1))
+       {
+               if (reason != NULL and reasonCount < maxCount)
+               {
+                       reason[reasonCount] = kInvalidIdValue;
+                       reasonCount++;
+               }
+               result = false;
+       }
+       
+       // Check that the corresponding trigger record ID has a valid value.
+       if (not (track.fTrigRec >= 0 or track.fTrigRec == -1))
+       {
+               if (reason != NULL and reasonCount < maxCount)
+               {
+                       reason[reasonCount] = kInvalidTriggerIdValue;
+                       reasonCount++;
+               }
+               result = false;
+       }
+       
+       // Make sure that the reserved bits in the fFlags field are set
+       // to zero.
+       if ((track.fFlags & 0x3FFF0000) != 0)
+       {
+               if (reason != NULL and reasonCount < maxCount)
+               {
+                       reason[reasonCount] = kReservedBitsNotZero;
+                       reasonCount++;
+               }
+               result = false;
+       }
+
+       // Make sure the sign is not invalid.
+       if ((track.fFlags & 0xC0000000) == 0xC0000000)
+       {
+               if (reason != NULL and reasonCount < maxCount)
+               {
+                       reason[reasonCount] = kParticleSignBitsNotValid;
+                       reasonCount++;
+               }
+               result = false;
+       }
+
+       // Check that fHit[i] is nil if the corresponding bit in the
+       // flags word is zero.
+       const AliHLTMUONRecHitStruct& nilhit = AliHLTMUONConstants::NilRecHitStruct();
+       for (int i = 0; i < 16; i++)
+       {
+               if ((track.fFlags & (0x1 << i)) == 0 and track.fHit[i] != nilhit)
+               {
+                       if (reason != NULL and reasonCount < maxCount)
+                       {
+                               reason[reasonCount] = kHitNotMarkedAsNil;
+                               reasonCount++;
+                       }
+                       result = false;
+                       break;
+               }
+       }
+
+       // Check that the chi squared value is valid
+       if (not (track.fChi2 >= 0 or track.fChi2 == -1))
+       {
+               if (reason != NULL and reasonCount < maxCount)
+               {
+                       reason[reasonCount] = kChiSquareInvalid;
+                       reasonCount++;
+               }
+               result = false;
+       }
+
+       // Check that if chi squared is -1 then the momentum vector is zero.
+       if (track.fChi2 == -1 and
+           not (track.fPx == 0 and track.fPy == 0 and track.fPz == 0)
+          )
+       {
+               if (reason != NULL and reasonCount < maxCount)
+               {
+                       reason[reasonCount] = kMomentumVectorNotZero;
+                       reasonCount++;
+               }
+               result = false;
+       }
+
+       // Check that if chi squared is -1 then the momentum parameters are zero.
+       if (track.fChi2 == -1 and
+           not (track.fInverseBendingMomentum == 0 and track.fThetaX == 0 and track.fThetaY == 0)
+          )
+       {
+               if (reason != NULL and reasonCount < maxCount)
+               {
+                       reason[reasonCount] = kMomentumParamsNotZero;
+                       reasonCount++;
+               }
+               result = false;
+       }
+
+       // Check that if chi squared is -1 then the momentum parameters are zero.
+       if (track.fChi2 == -1 and
+           not (track.fX == 0 and track.fY == 0 and track.fZ == 0)
+          )
+       {
+               if (reason != NULL and reasonCount < maxCount)
+               {
+                       reason[reasonCount] = kDCAVertexNotZero;
+                       reasonCount++;
+               }
+               result = false;
+       }
+       
+       // Check the individual hits
+       for (int i = 0; i < 16; i++)
+       {
+               AliHLTUInt32_t filledCount = maxCount - reasonCount;
+               if (not IntegrityOk(track.fHit[i], reason + reasonCount, filledCount))
+               {
+                       reasonCount += filledCount;
+                       result = false;
+               }
+       }
+       
+       return result;
+}
+
+
+bool AliHLTMUONUtils::IntegrityOk(
+               const AliHLTMUONTracksBlockStruct& block,
+               WhyNotValid* reason,
+               AliHLTUInt32_t* recordNum,
+               AliHLTUInt32_t& reasonCount
+       )
+{
+       /// This method is used to check more extensively if the integrity of the
+       /// dHLT internal track data block is OK and returns true in that case.
+       /// \param [in]  block  The track data block to check.
+       /// \param [out] reason  If this is not NULL, then it is assumed to point
+       ///      to an array of at least 'reasonCount' number of elements. It will
+       ///      be filled with the reason codes describing why the data block is
+       ///      not valid.
+       /// \param [out] recordNum  If this is not NULL, then it is assumed to point
+       ///      to an array of at least 'reasonCount' number of elements. It will
+       ///      be filled with the number of the Manso track that had a problem.
+       ///      The value 'recordNum[i]' will only contain a valid value if
+       ///      the corresponding 'reason[i]' contains one of:
+       ///        - kInvalidIdValue
+       ///        - kInvalidTriggerIdValue
+       ///        - kReservedBitsNotZero
+       ///        - kParticleSignBitsNotValid
+       ///        - kHitNotMarkedAsNil
+       ///        - kChiSquareInvalid
+       ///        - kMomentumVectorNotZero
+       ///        - kMomentumParamsNotZero
+       ///        - kDCAVertexNotZero
+       ///        - kInvalidDetElementNumber
+       ///        - kInvalidChamberNumber
+       /// \note You can use RecordNumberWasSet(reason[i]) to check if 'recordNum[i]'
+       ///      was set and is valid or not.
+       /// \param [in,out] reasonCount  This should initially specify the size of
+       ///      the array pointed to by 'reason' and 'recordNum'. It will be filled
+       ///      with the number of items actually filled into the arrays upon exit
+       ///      from this method.
+       /// \returns  true if there is no problem with the data and false otherwise.
+       
+       AliHLTUInt32_t maxCount = reasonCount;
+       bool result = HeaderOk(block, reason, reasonCount);
+       
+       const AliHLTMUONTrackStruct* track =
+               reinterpret_cast<const AliHLTMUONTrackStruct*>(&block + 1);
+       
+       // Check if any track ID is duplicated.
+       for (AliHLTUInt32_t i = 0; i < block.fHeader.fNrecords; i++)
+       {
+               AliHLTInt32_t id = track[i].fId;
+               for (AliHLTUInt32_t j = i+1; j < block.fHeader.fNrecords; j++)
+               {
+                       if (id == track[j].fId)
+                       {
+                               if (reason != NULL and reasonCount < maxCount)
+                               {
+                                       reason[reasonCount] = kFoundDuplicateIDs;
+                                       reasonCount++;
+                               }
+                               result = false;
+                       }
+               }
+       }
+       
+       // Check that all the tracks have integrity.
+       for (AliHLTUInt32_t i = 0; i < block.fHeader.fNrecords; i++)
+       {
+               AliHLTUInt32_t filledCount = maxCount - reasonCount;
+               if (not IntegrityOk(track[i], reason+reasonCount, filledCount))
+               {
+                       // reasons filled in IntegrityOk, now we just need to adjust
+                       // reasonCount and fill the recordNum values.
+                       if (recordNum != NULL)
+                       {
+                               for (AliHLTUInt32_t n = 0; n < filledCount; n++)
+                                       recordNum[reasonCount + n] = i;
+                       }
+                       reasonCount += filledCount;
+                       result = false;
+               }
+       }
+       
+       return result;
+}
+
+
 bool AliHLTMUONUtils::IntegrityOk(
                const AliHLTMUONTrackDecisionStruct& decision,
                WhyNotValid* reason,
@@ -2259,12 +2639,12 @@ bool AliHLTMUONUtils::IntegrityOk(
 {
        /// This method is used to check more extensively if the integrity of the
        /// single track trigger decision structure is OK and returns true in that case.
-       /// [in] \param decision  The trigger decision structure to check.
-       /// [out] \param reason  If this is not NULL, then it is assumed to point
+       /// \param [in]  decision  The trigger decision structure to check.
+       /// \param [out] reason  If this is not NULL, then it is assumed to point
        ///      to an array of at least 'reasonCount' number of elements. It will
        ///      be filled with the reason codes describing why the structure is not
        ///      valid.
-       /// [in/out] \param reasonCount  This should initially specify the size of
+       /// \param [in,out] reasonCount  This should initially specify the size of
        ///      the array pointed to by 'reason'. It will be filled with the number
        ///      of items actually filled into the reason array upon exit from this
        ///      method.
@@ -2322,12 +2702,12 @@ bool AliHLTMUONUtils::IntegrityOk(
        /// This method is used to check more extensively if the integrity of the
        /// dHLT internal single track trigger decision data block is OK and returns
        /// true in that case.
-       /// [in] \param block  The single track trigger decision data block to check.
-       /// [out] \param reason  If this is not NULL, then it is assumed to point
+       /// \param [in]  block  The single track trigger decision data block to check.
+       /// \param [out] reason  If this is not NULL, then it is assumed to point
        ///      to an array of at least 'reasonCount' number of elements. It will
        ///      be filled with the reason codes describing why the data block is
        ///      not valid.
-       /// [out] \param recordNum  If this is not NULL, then it is assumed to point
+       /// \param [out] recordNum  If this is not NULL, then it is assumed to point
        ///      to an array of at least 'reasonCount' number of elements. It will
        ///      be filled with the number of the trigger decision that had a problem.
        ///      The value 'recordNum[i]' will only contain a valid value if
@@ -2337,7 +2717,7 @@ bool AliHLTMUONUtils::IntegrityOk(
        ///        - kPtValueNotValid
        /// \note You can use RecordNumberWasSet(reason[i]) to check if 'recordNum[i]'
        ///      was set and is valid or not.
-       /// [in/out] \param reasonCount  This should initially specify the size of
+       /// \param [in,out] reasonCount  This should initially specify the size of
        ///      the array pointed to by 'reason' and 'recordNum'. It will be filled
        ///      with the number of items actually filled into the arrays upon exit
        ///      from this method.
@@ -2397,12 +2777,12 @@ bool AliHLTMUONUtils::IntegrityOk(
 {
        /// This method is used to check more extensively if the integrity of the
        /// track pair trigger decision structure is OK and returns true in that case.
-       /// [in] \param decision  The trigger decision structure to check.
-       /// [out] \param reason  If this is not NULL, then it is assumed to point
+       /// \param [in]  decision  The trigger decision structure to check.
+       /// \param [out] reason  If this is not NULL, then it is assumed to point
        ///      to an array of at least 'reasonCount' number of elements. It will
        ///      be filled with the reason codes describing why the structure is not
        ///      valid.
-       /// [in/out] \param reasonCount  This should initially specify the size of
+       /// \param [in,out] reasonCount  This should initially specify the size of
        ///      the array pointed to by 'reason'. It will be filled with the number
        ///      of items actually filled into the reason array upon exit from this
        ///      method.
@@ -2497,12 +2877,12 @@ bool AliHLTMUONUtils::IntegrityOk(
        /// This method is used to check more extensively if the integrity of the
        /// dHLT internal track pair trigger decision data block is OK and returns
        /// true in that case.
-       /// [in] \param block  The track pair trigger decision data block to check.
-       /// [out] \param reason  If this is not NULL, then it is assumed to point
+       /// \param [in]  block  The track pair trigger decision data block to check.
+       /// \param [out] reason  If this is not NULL, then it is assumed to point
        ///      to an array of at least 'reasonCount' number of elements. It will
        ///      be filled with the reason codes describing why the data block is
        ///      not valid.
-       /// [out] \param recordNum  If this is not NULL, then it is assumed to point
+       /// \param [out] recordNum  If this is not NULL, then it is assumed to point
        ///      to an array of at least 'reasonCount' number of elements. It will
        ///      be filled with the number of the trigger decision that had a problem.
        ///      The value 'recordNum[i]' will only contain a valid value if
@@ -2515,7 +2895,7 @@ bool AliHLTMUONUtils::IntegrityOk(
        ///        - kHighPtCountInvalid
        /// \note You can use RecordNumberWasSet(reason[i]) to check if 'recordNum[i]'
        ///      was set and is valid or not.
-       /// [in/out] \param reasonCount  This should initially specify the size of
+       /// \param [in,out] reasonCount  This should initially specify the size of
        ///      the array pointed to by 'reason' and 'recordNum'. It will be filled
        ///      with the number of items actually filled into the arrays upon exit
        ///      from this method.