]> git.uio.no Git - u/mrichter/AliRoot.git/blob - HLT/TPCLib/AliHLTTPCTrackGeometry.h
filling the track index grid
[u/mrichter/AliRoot.git] / HLT / TPCLib / AliHLTTPCTrackGeometry.h
1 //-*- Mode: C++ -*-
2 // $Id$
3 #ifndef ALIHLTTPCTRACKGEOMETRY_H
4 #define ALIHLTTPCTRACKGEOMETRY_H
5 //* This file is property of and copyright by the ALICE HLT Project        * 
6 //* ALICE Experiment at CERN, All rights reserved.                         *
7 //* See cxx source for full Copyright notice                               *
8
9 /// @file   AliHLTTPCTrackGeometry.h
10 /// @author Matthias Richter
11 /// @date   2011-05-20
12 /// @brief  Desciption of a track by a sequence of track points
13 ///
14
15 #include "AliHLTTrackGeometry.h"
16
17 class AliHLTGlobalBarrelTrack;
18
19 /**
20  * @class AliHLTTPCTrackGeometry
21  * Description of tracks in the TPC geometry.
22  * This implementation describes track points of the track crossing with
23  * the pad-row plane (yz). The radial distance of the plane is the x coordinate.
24  * 
25  * The 32bit ids of the planes follow the same coding as the TPC clusters.
26  * - bit 25-31:  7 bit slice number
27  * - bit 22-24:  3 bit partition number
28  * - bit  0-21: 22 bit row number
29  * @ingroup alihlt-tpc
30  */
31 class AliHLTTPCTrackGeometry : public AliHLTTrackGeometry
32 {
33  public:
34   /// standard constructor
35   AliHLTTPCTrackGeometry();
36   /// copy constructor
37   AliHLTTPCTrackGeometry(const AliHLTTPCTrackGeometry&);
38   /// assignment operator
39   AliHLTTPCTrackGeometry& operator=(const AliHLTTPCTrackGeometry&);
40
41   /// destructor
42   ~AliHLTTPCTrackGeometry();
43
44   /// alpha of the plane
45   virtual float GetPlaneAlpha(AliHLTUInt32_t planeId) const;
46   /// radial distance from global {0,0,0}
47   virtual float GetPlaneR(AliHLTUInt32_t planeId) const;
48   /// theta of the plane
49   virtual float GetPlaneTheta(AliHLTUInt32_t planeId) const ;
50   /// check bounds in u and v coordinate
51   virtual bool CheckBounds(AliHLTUInt32_t planeId, float u, float v) const;
52
53   // track interface
54
55   /// calculate the track points, expects the global magnetic field to be initialized
56   virtual int CalculateTrackPoints(const AliHLTExternalTrackParam& track);
57
58   /// calculate the track points, expects the global magnetic field to be initialized
59   virtual int CalculateTrackPoints(AliHLTGlobalBarrelTrack& track);
60
61   /// find the track point which can be associated to a spacepoint with coordinates and id
62   virtual int FindMatchingTrackPoint(AliHLTUInt32_t spacepointId, float spacepoint[3], AliHLTUInt32_t& planeId);
63
64   /// register track points in the index grid
65   virtual int RegisterTrackPoints(AliHLTTrackGrid* pGrid) const;
66
67   /// fill track points to index grid
68   virtual int FillTrackPoints(AliHLTTrackGrid* pGrid) const;
69
70   /// create a collection of all points
71   virtual AliHLTSpacePointContainer* ConvertToSpacePoints() const {return ConvertToSpacePoints(false);}
72   virtual AliHLTSpacePointContainer* ConvertToSpacePoints(bool bAssociated) const;
73
74   /// get raw track point of id
75   const AliHLTTrackPoint* GetRawTrackPoint(AliHLTUInt32_t id) const;
76   /// get raw track point of id
77   AliHLTTrackPoint* GetRawTrackPoint(AliHLTUInt32_t id);
78
79   int FillRawResidual(int coordinate, TH2* histo, AliHLTSpacePointContainer* points) const;
80
81  private:
82   /// calculate the track points, expects the global magnetic field to be initialized
83   int CalculateTrackPoints(AliHLTGlobalBarrelTrack& track, int firstpadrow, int step);
84
85   vector<AliHLTTrackPoint> fRawTrackPoints; // list of points in raw coordinates
86
87   ClassDef(AliHLTTPCTrackGeometry, 0)
88 };
89 #endif