+// $Id$
+
// **************************************************************************
// This file is property of and copyright by the ALICE HLT Project *
// ALICE Experiment at CERN, All rights reserved. *
// *
//***************************************************************************
-
-#if __GNUC__>= 3
-using namespace std;
-#endif
+/// @file AliHLTTPCTrackMCMarkerComponent.cxx
+/// @author Matthias Kretz
+/// @date
+/// @brief Marker component for TPC cluster mc labels.
+///
#include "AliHLTTPCTrackMCMarkerComponent.h"
#include "AliHLTTPCTransform.h"
-#include "AliHLTTPCTrackSegmentData.h"
-#include "AliHLTTPCTrack.h"
-#include "AliHLTTPCTrackArray.h"
#include "AliHLTTPCTrackletDataFormat.h"
#include "AliHLTTPCCADef.h"
#include "AliHLTTPCDefinitions.h"
+#include "AliHLTTPCSpacePointData.h"
+#include "AliHLTTPCClusterMCData.h"
#include "AliCDBEntry.h"
#include "AliCDBManager.h"
#include "TObjArray.h"
#include "AliHLTExternalTrackParam.h"
#include "AliHLTTrackMCLabel.h"
-#include "AliHLTTPCClusterFinder.h"
#include <climits>
#include <cstdlib>
#include <cerrno>
-
+#include <algorithm>
// ROOT macro for the implementation of ROOT specific class methods
ClassImp( AliHLTTPCTrackMCMarkerComponent )
AliHLTTPCTrackMCMarkerComponent::AliHLTTPCTrackMCMarkerComponent()
{
// see header file for class documentation
+ for( int i=0; i<36*6; i++ ){
+ fClusterLabels[i] = 0;
+ }
}
// Public functions to implement AliHLTComponent's interface.
for( Int_t ih=0; ih<nHits; ih++){
UInt_t id = hits[ih];
- int iSlice = id>>25;
- int iPatch = (id>>22)&0x7;
- int iCluster = id&0x3fffff;
- if( iSlice<0 || iSlice>36 || iPatch<0 || iPatch>5 ){
+ int iSlice = AliHLTTPCSpacePointData::GetSlice(id);
+ int iPatch = AliHLTTPCSpacePointData::GetPatch(id);
+ unsigned int iCluster = AliHLTTPCSpacePointData::GetNumber(id);
+ if( iSlice<0 || iSlice>=36 || iPatch<0 || iPatch>5 ){
HLTError("Corrupted TPC cluster Id: slice %d, patch %d, cluster %d",
iSlice, iPatch,iCluster );
continue;
}
- AliHLTTPCClusterFinder::ClusterMCInfo *patchLabels = fClusterLabels[iSlice*6 + iPatch];
+ AliHLTTPCClusterMCData *patchLabels = fClusterLabels[iSlice*6 + iPatch];
if( !patchLabels ) continue;
- if( iCluster >= fNClusterLabels[iSlice*6 + iPatch] ){
+ if( iCluster >= patchLabels->fCount ){
HLTError("TPC slice %d, patch %d: ClusterID==%d >= N MC labels==%d ",
- iSlice, iPatch,iCluster, fNClusterLabels[iSlice*6 + iPatch] );
+ iSlice, iPatch,iCluster, patchLabels->fCount);
continue;
}
- AliHLTTPCClusterFinder::ClusterMCInfo &lab = patchLabels[iCluster];
+ AliHLTTPCClusterMCLabel &lab = patchLabels->fLabels[iCluster];
if ( lab.fClusterID[0].fMCID >= 0 ) labels.push_back( lab.fClusterID[0].fMCID );
if ( lab.fClusterID[1].fMCID >= 0 ) labels.push_back( lab.fClusterID[1].fMCID );
if ( lab.fClusterID[2].fMCID >= 0 ) labels.push_back( lab.fClusterID[2].fMCID );
for( int i=0; i<36*6; i++ ){
fClusterLabels[i] = 0;
- fNClusterLabels[i] = 0;
}
int nBlocks = (int)evtData.fBlockCnt;
if(iter->fDataType == AliHLTTPCDefinitions::fgkAliHLTDataTypeClusterMCInfo ) {
Int_t slice=AliHLTTPCDefinitions::GetMinSliceNr(iter->fSpecification);
Int_t patch=AliHLTTPCDefinitions::GetMinPatchNr(iter->fSpecification);
- fClusterLabels[ slice*6 + patch] = (AliHLTTPCClusterFinder::ClusterMCInfo *)iter->fPtr;
- fNClusterLabels[ slice*6 + patch] = iter->fSize/sizeof(AliHLTTPCClusterFinder::ClusterMCInfo);
- nInputMCLabels+=fNClusterLabels[ slice*6 + patch];
+ fClusterLabels[ slice*6 + patch] = (AliHLTTPCClusterMCData*)iter->fPtr;
+ nInputMCLabels+=fClusterLabels[ slice*6 + patch]->fCount;
}
}