From: richterm Date: Fri, 3 Jul 2009 22:03:32 +0000 (+0000) Subject: updating the ESD tracks with the result of the ITS reconstruction X-Git-Url: http://git.uio.no/git/?a=commitdiff_plain;h=cd60a73f02e660d3d1bde15a71427295c6c6f09d;p=u%2Fmrichter%2FAliRoot.git updating the ESD tracks with the result of the ITS reconstruction --- diff --git a/HLT/global/AliHLTGlobalEsdConverterComponent.cxx b/HLT/global/AliHLTGlobalEsdConverterComponent.cxx index 744dd708998..b63429e63ab 100644 --- a/HLT/global/AliHLTGlobalEsdConverterComponent.cxx +++ b/HLT/global/AliHLTGlobalEsdConverterComponent.cxx @@ -274,8 +274,7 @@ int AliHLTGlobalEsdConverterComponent::ProcessBlocks(TTree* pTree, AliESDEvent* } } - std::vector trackIdESD2TPCmap; // map esd index -> tpc index - + // convert the TPC tracks to ESD tracks for (const AliHLTComponentBlockData* pBlock=GetFirstInputBlock(kAliHLTDataTypeTrack|kAliHLTDataOriginTPC); pBlock!=NULL; pBlock=GetNextInputBlock()) { vector tracks; @@ -309,54 +308,41 @@ int AliHLTGlobalEsdConverterComponent::ProcessBlocks(TTree* pTree, AliESDEvent* } } - // ITS updated tracks - /* - int nESDTracks = pESD->GetNumberOfTracks(); - - // create map of tpc->esd track indices - - int *trackIdTPC2ESDmap = new int[ nTPCTracks ]; - { - for( int i=0; i=0 && tpcId tracks; + if ((iResult=AliHLTGlobalBarrelTrack::ConvertTrackDataArray(reinterpret_cast(pBlock->fPtr), pBlock->fSize, tracks))>0) { + for (vector::iterator element=tracks.begin(); + element!=tracks.end(); element++) { + int ncl=0; + const UInt_t* pointsArray=element->GetPoints(); + for( unsigned il=0; ilGetNumberOfPoints(); il++ ){ + // TODO: check what needs to be done with the clusters + if( pointsArray[il]<~(UInt_t)0 ) {/*tITS.SetClusterIndex(ncl, tr.fClusterIds[il]);*/} + ncl++; } + //tITS.SetNumberOfClusters( ncl ); + int tpcID=element->TrackID(); + // the ITS tracker assigns the TPC track used as seed for a certain track to + // the trackID + if( tpcID<0 || tpcID>=pESD->GetNumberOfTracks()) continue; + + AliESDtrack *tESD = pESD->GetTrack( tpcID ); + if( tESD ) tESD->UpdateTrackParams( &(*element), AliESDtrack::kITSin ); } - - for (int ndx=0; ndx=0; ndx++) { - iter = blocks+ndx; - if(iter->fDataType == fgkITSTracksDataType ) { - AliHLTITSTrackDataHeader *inPtr = reinterpret_cast( iter->fPtr ); - int nTracks = inPtr->fTrackletCnt; - for( int itr=0; itrfTracks[itr]; - AliHLTITSTrack tITS( tr.fTrackParam ); - int ncl=0; - for( int il=0; il<6; il++ ){ - if( tr.fClusterIds[il]>=0 ) tITS.SetClusterIndex(ncl++, tr.fClusterIds[il]); - } - tITS.SetNumberOfClusters( ncl ); - int tpcId = tr.fTPCId; - if( tpcId<0 || tpcId>=nTPCTracks ) continue; - int esdID = trackIdTPC2ESDmap[tpcId]; - if( esdID<0 || esdID>=nESDTracks ) continue; - AliESDtrack *tESD = pESD->GetTrack( esdID ); - if( tESD ) tESD->UpdateTrackParams( &tITS, AliESDtrack::kITSin ); - } - } - } - delete[] trackIdTPC2ESDmap; + } + } // primary vertex & V0's - + /* //AliHLTVertexer vertexer; //vertexer.SetESD( pESD ); //vertexer.FindPrimaryVertex(); //vertexer.FindV0s(); */ if (iAddedDataBlocks>0 && pTree) { - pTree->Fill(); + pTree->Fill(); } if (iResult>=0) iResult=iAddedDataBlocks;