17 #ifndef ALIHLTTPCCATRACKLETVECTOR_H
18 #define ALIHLTTPCCATRACKLETVECTOR_H
21 #include "AliHLTTPCCAParameters.h"
22 #include "AliHLTTPCCATrackParamVector.h"
31 ushort_m IsValid()
const {
return fNHits > ushort_v( Vc::Zero ); }
33 ushort_v NHits()
const {
return fNHits; }
34 ushort_v FirstRow()
const {
return fFirstRow; }
35 ushort_v LastRow()
const {
return fLastRow; }
38 unsigned short HitIndexAtRow(
int rowIndex,
int trackIndex )
const {
39 return fRowHits[rowIndex][trackIndex];
41 ushort_v HitIndexAtRow(
int rowIndex )
const {
return ushort_v( fRowHits[rowIndex] ); }
51 void SetNHits (
const ushort_v &x ) { fNHits = x; }
52 void SetFirstRow(
const ushort_v &x ) { fFirstRow = x; }
53 void SetLastRow (
const ushort_v &x ) { fLastRow = x; }
56 void SetRowHits(
int rowIndex,
const ushort_v &trackIndex,
const ushort_v &hitIndex );
57 void SetRowHits(
const ushort_v &rowIndex,
const ushort_v &trackIndex,
const ushort_v &hitIndex );
58 void SetRowHits(
int rowIndex,
const ushort_v &trackIndex,
const ushort_v &hitIndex,
const short_m &mask );
59 void SetRowHits(
const ushort_v &rowIndex,
const ushort_v &trackIndex,
const ushort_v &hitIndex,
const short_m &mask );
61 void AddHitIds(
const ushort_v &rowIndexes,
const ushort_v &hitIndexes,
const ushort_m &mask );
63 int MaxNRows()
const {
return fRowHits.
Size(); }
72 inline void AliHLTTPCCATrackletVector::SetRowHits(
int rowIndex,
const ushort_v &trackIndex,
73 const ushort_v &hitIndex )
75 assert( trackIndex[0] + ushort_v( Vc::IndexesFromZero ) == trackIndex );
76 assert( ( trackIndex[0] % ushort_v::Size ) == 0 );
77 UNUSED_PARAM1( trackIndex );
78 hitIndex.store( fRowHits[rowIndex] );
81 inline void AliHLTTPCCATrackletVector::SetRowHits(
const ushort_v &rowIndexes,
const ushort_v &trackIndex,
82 const ushort_v &hitIndex )
84 assert( trackIndex[0] + ushort_v( Vc::IndexesFromZero ) == trackIndex );
85 assert( ( trackIndex[0] % ushort_v::Size ) == 0 );
86 UNUSED_PARAM1( trackIndex );
87 hitIndex.scatter( fRowHits[0], rowIndexes * ushort_v::Size + ushort_v( Vc::IndexesFromZero ) );
90 inline void AliHLTTPCCATrackletVector::SetRowHits(
int rowIndex,
const ushort_v &trackIndex,
91 const ushort_v &hitIndex,
const short_m &mask )
93 assert( trackIndex[0] + ushort_v( Vc::IndexesFromZero ) == trackIndex );
94 assert( ( trackIndex[0] % ushort_v::Size ) == 0 );
95 UNUSED_PARAM1( trackIndex );
96 assert( &fRowHits[0] != 0 );
97 debugF() <<
"TrackletVector::SetRowHits " << rowIndex <<
" old: ";
98 debugF() << ushort_v( fRowHits[rowIndex] );
99 debugF() <<
" new: " << hitIndex << mask;
100 hitIndex.store( fRowHits[rowIndex], mask );
101 debugF() <<
" done: " << ushort_v( fRowHits[rowIndex] ) << std::endl;
104 inline void AliHLTTPCCATrackletVector::SetRowHits(
const ushort_v &rowIndexes,
const ushort_v &trackIndex,
105 const ushort_v &hitIndex,
const short_m &mask )
107 assert( trackIndex[0] + ushort_v( Vc::IndexesFromZero ) == trackIndex );
108 assert( ( trackIndex[0] % ushort_v::Size ) == 0 );
109 UNUSED_PARAM1( trackIndex );
110 hitIndex.scatter( fRowHits[0], rowIndexes * ushort_v::Size + ushort_v( Vc::IndexesFromZero ), mask );
115 #endif // ALIHLTTPCCATRACKLETVECTOR_H