]> git.uio.no Git - u/mrichter/AliRoot.git/blob - HLT/TPCLib/tracking-ca/AliHLTTPCCAGrid.h
GPU tracker update
[u/mrichter/AliRoot.git] / HLT / TPCLib / tracking-ca / AliHLTTPCCAGrid.h
1 //-*- Mode: C++ -*-
2 // $Id$
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 ALIHLTTPCCAGRID_H
11 #define ALIHLTTPCCAGRID_H
12
13 #include "AliHLTTPCCADef.h"
14
15 /**
16  * @class AliHLTTPCCAGrid
17  *
18  * 2-dimensional grid of pointers.
19  * pointers to (y,z)-like objects are assigned to the corresponding grid bin
20  * used by AliHLTTPCCATracker to speed-up the hit operations
21  * grid axis are named Z,Y to be similar to TPC row coordinates.
22  */
23 class AliHLTTPCCAGrid
24 {
25   public:
26     GPUd() void CreateEmpty();
27     GPUd() void Create( float yMin, float yMax, float zMin, float zMax, float sy, float sz  );
28
29     GPUd() int GetBin( float Y, float Z ) const;
30     /**
31      * returns -1 if the row is empty == no hits
32      */
33     GPUd() int GetBinBounded( float Y, float Z ) const;
34     GPUd() void GetBin( float Y, float Z, int* const bY, int* const bZ ) const;
35
36     GPUd() unsigned int  N()        const { return fN;  }
37     GPUd() unsigned int  Ny()       const { return fNy; }
38     GPUd() unsigned int  Nz()       const { return fNz; }
39     GPUd() float YMin()     const { return fYMin; }
40     GPUd() float YMax()     const { return fYMax; }
41     GPUd() float ZMin()     const { return fZMin; }
42     GPUd() float ZMax()     const { return fZMax; }
43     GPUd() float StepYInv() const { return fStepYInv; }
44     GPUd() float StepZInv() const { return fStepZInv; }
45
46   private:
47     unsigned int fNy;        //* N bins in Y
48     unsigned int fNz;        //* N bins in Z
49     unsigned int fN;         //* total N bins
50     float fYMin;     //* minimal Y value
51     float fYMax;     //* maximal Y value
52     float fZMin;     //* minimal Z value
53     float fZMax;     //* maximal Z value
54     float fStepYInv; //* inverse bin size in Y
55     float fStepZInv; //* inverse bin size in Z
56
57 };
58
59 #endif //ALIHLTTPCCAGRID_H