StRoot  1
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Groups Pages
AliHLTTPCCARow.h
1 //-*- Mode: C++ -*-
2 // @(#) $Id: AliHLTTPCCARow.h,v 1.2 2016/06/21 03:39:45 smirnovd Exp $
3 // ************************************************************************
4 // This file is property of and copyright by the ALICE HLT Project *
5 // ALICE Experiment at CERN, All rights reserved. *
6 // See cxx source for full Copyright notice *
7 // *
8 //*************************************************************************
9 
10 #ifndef ALIHLTTPCCAROW_H
11 #define ALIHLTTPCCAROW_H
12 
13 #include "AliHLTTPCCADef.h"
14 #include "AliHLTTPCCAGrid.h"
15 
16 #ifdef HAVE_FLOAT16
17 typedef float16 StoredFloat;
18 #else
19 typedef float StoredFloat;
20 #endif
21 
30 {
31  friend class AliHLTTPCCASliceData;
32  public:
33 
34  AliHLTTPCCARow(): fGrid(), fNHits(0), fMaxY(0), fHitNumberOffset(0), fLinkUpData(0), fLinkDownData(0),
35  fHitDataY(0), fHitDataZ(0), fHitDataIsUsed(0), fClusterDataIndex(0), fHitWeights(0), fFirstHitInBin(0) {}
36 
37  short NHits() const { return fNHits; }
38  //float X() const { return fX; }
39  float MaxY() const { return fMaxY; }
40  const AliHLTTPCCAGrid &Grid() const { return fGrid; }
41 
42  int HitNumberOffset() const { return fHitNumberOffset; }
43 
44  void StoreToFile( FILE *f, const char *startPtr ) const;
45  void RestoreFromFile( FILE *f, char *startPtr );
46 
47  static inline short_v NHits( const AliHLTTPCCARow *array, const ushort_v &indexes ) { return short_v( array, &AliHLTTPCCARow::fNHits, indexes ); }
48  static inline short_v NHits( const AliHLTTPCCARow *array, const ushort_v &indexes, const ushort_m &mask ) { return short_v( array, &AliHLTTPCCARow::fNHits, indexes, mask ); }
49 
50  private:
51  AliHLTTPCCAGrid fGrid; // grid of hits
52 
53  short fNHits; // number of hits in this row
54  //float fX; // X coordinate of the row
55  float fMaxY; // maximal Y coordinate of the row
56 
57  int fHitNumberOffset; // index of the first hit in the hit array, used as
58 
59  short *fLinkUpData; // hit index in the row above which is linked to the given (global) hit index
60  short *fLinkDownData; // hit index in the row below which is linked to the given (global) hit index
61 
62  StoredFloat *fHitDataY; // packed y coordinate of the given (global) hit index
63  StoredFloat *fHitDataZ; // packed z coordinate of the given (global) hit index
64 
65  short *fHitDataIsUsed; // packed isUsed-flag of the given (global) hit index. Short because there is no bool_v
66 
67  int *fClusterDataIndex; // see SliceData::ClusterDataIndex()
68 
69  unsigned short *fHitWeights; // the weight of the longest tracklet crossed the cluster
70 
74  unsigned short *fFirstHitInBin; //X
75 };
76 
77 #endif