]> git.uio.no Git - u/mrichter/AliRoot.git/blame - HLT/TPCLib/tracking-ca/AliHLTTPCCAGrid.h
update of GPU tracker from David Rohr
[u/mrichter/AliRoot.git] / HLT / TPCLib / tracking-ca / AliHLTTPCCAGrid.h
CommitLineData
d54804bf 1//-*- Mode: C++ -*-
2// $Id$
ce565086 3// ************************************************************************
fbb9b71b 4// This file is property of and copyright by the ALICE HLT Project *
ce565086 5// ALICE Experiment at CERN, All rights reserved. *
6// See cxx source for full Copyright notice *
7// *
8//*************************************************************************
d54804bf 9
10#ifndef ALIHLTTPCCAGRID_H
11#define ALIHLTTPCCAGRID_H
12
00d07bcd 13#include "AliHLTTPCCADef.h"
d54804bf 14
15/**
16 * @class AliHLTTPCCAGrid
17 *
18 * 2-dimensional grid of pointers.
4acc2401 19 * pointers to (y,z)-like objects are assigned to the corresponding grid bin
d54804bf 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 */
23class AliHLTTPCCAGrid
24{
fbb9b71b 25 public:
4acc2401 26 GPUd() void CreateEmpty();
fbb9b71b 27 GPUd() void Create( float yMin, float yMax, float zMin, float zMax, float sy, float sz );
d54804bf 28
4acc2401 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 *bY, int *bZ ) const;
fbb9b71b 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
7be9b0d7 46#ifndef CUDA_DEVICE_EMULATION
fbb9b71b 47 private:
7be9b0d7 48#endif
fbb9b71b 49
50 unsigned int fNy; //* N bins in Y
51 unsigned int fNz; //* N bins in Z
52 unsigned int fN; //* total N bins
53 float fYMin; //* minimal Y value
54 float fYMax; //* maximal Y value
55 float fZMin; //* minimal Z value
56 float fZMax; //* maximal Z value
57 float fStepYInv; //* inverse bin size in Y
58 float fStepZInv; //* inverse bin size in Z
d54804bf 59
00d07bcd 60};
d54804bf 61
62#endif