]>
Commit | Line | Data |
---|---|---|
c7585a2a | 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; | |
b97434b7 | 18 | class AliHLTDataDeflater; |
c7585a2a | 19 | |
20 | /** | |
21 | * @class AliHLTTPCTrackGeometry | |
22 | * Description of tracks in the TPC geometry. | |
23 | * This implementation describes track points of the track crossing with | |
24 | * the pad-row plane (yz). The radial distance of the plane is the x coordinate. | |
25 | * | |
26 | * The 32bit ids of the planes follow the same coding as the TPC clusters. | |
27 | * - bit 25-31: 7 bit slice number | |
28 | * - bit 22-24: 3 bit partition number | |
29 | * - bit 0-21: 22 bit row number | |
30 | * @ingroup alihlt-tpc | |
31 | */ | |
32 | class AliHLTTPCTrackGeometry : public AliHLTTrackGeometry | |
33 | { | |
34 | public: | |
35 | /// standard constructor | |
36 | AliHLTTPCTrackGeometry(); | |
37 | /// copy constructor | |
38 | AliHLTTPCTrackGeometry(const AliHLTTPCTrackGeometry&); | |
39 | /// assignment operator | |
40 | AliHLTTPCTrackGeometry& operator=(const AliHLTTPCTrackGeometry&); | |
41 | ||
42 | /// destructor | |
43 | ~AliHLTTPCTrackGeometry(); | |
44 | ||
45 | /// alpha of the plane | |
46 | virtual float GetPlaneAlpha(AliHLTUInt32_t planeId) const; | |
47 | /// radial distance from global {0,0,0} | |
48 | virtual float GetPlaneR(AliHLTUInt32_t planeId) const; | |
49 | /// theta of the plane | |
50 | virtual float GetPlaneTheta(AliHLTUInt32_t planeId) const ; | |
51 | /// check bounds in u and v coordinate | |
52 | virtual bool CheckBounds(AliHLTUInt32_t planeId, float u, float v) const; | |
53 | ||
54 | // track interface | |
55 | ||
56 | /// calculate the track points, expects the global magnetic field to be initialized | |
57 | virtual int CalculateTrackPoints(const AliHLTExternalTrackParam& track); | |
58 | ||
59 | /// calculate the track points, expects the global magnetic field to be initialized | |
60 | virtual int CalculateTrackPoints(AliHLTGlobalBarrelTrack& track); | |
61 | ||
62 | /// find the track point which can be associated to a spacepoint with coordinates and id | |
63 | virtual int FindMatchingTrackPoint(AliHLTUInt32_t spacepointId, float spacepoint[3], AliHLTUInt32_t& planeId); | |
64 | ||
c2bea8b3 | 65 | /// register track points in the index grid |
66 | virtual int RegisterTrackPoints(AliHLTTrackGrid* pGrid) const; | |
67 | ||
68 | /// fill track points to index grid | |
69 | virtual int FillTrackPoints(AliHLTTrackGrid* pGrid) const; | |
70 | ||
b97434b7 | 71 | virtual int Write(const AliHLTGlobalBarrelTrack& track, |
72 | AliHLTSpacePointContainer* pSpacePoints, | |
73 | AliHLTDataDeflater* pDeflater, | |
74 | AliHLTUInt8_t* outputPtr, | |
75 | AliHLTUInt32_t size, | |
76 | const char* option="") const; | |
77 | ||
78 | virtual int WriteAssociatedClusters(AliHLTSpacePointContainer* pSpacePoints, | |
79 | AliHLTDataDeflater* pDeflater, | |
80 | const char* option="") const; | |
81 | ||
82 | struct AliHLTTPCTrackBlock { | |
83 | AliHLTUInt16_t fSize; //! size in byte of the complete track block | |
84 | AliHLTUInt8_t fSlice; //! slice number -> rotation angle of local coordinates | |
85 | AliHLTUInt8_t fReserved; //! reserved field to fill 32bit | |
86 | AliHLTFloat32_t fX; //! first X | |
87 | AliHLTFloat32_t fY; //! first Y | |
88 | AliHLTFloat32_t fZ; //! first Z | |
89 | AliHLTFloat32_t fSinPsi; // local sine of the track momentum azimuthal angle | |
90 | AliHLTFloat32_t fTgl; // tangent of the track momentum dip angle | |
91 | AliHLTFloat32_t fq1Pt; // 1/pt (1/(GeV/c)) | |
92 | }; | |
93 | ||
eb50ad6b | 94 | /// create a collection of all points |
9003c201 | 95 | virtual AliHLTSpacePointContainer* ConvertToSpacePoints() const {return ConvertToSpacePoints(false);} |
96 | virtual AliHLTSpacePointContainer* ConvertToSpacePoints(bool bAssociated) const; | |
eb50ad6b | 97 | |
c2bea8b3 | 98 | /// get raw track point of id |
99 | const AliHLTTrackPoint* GetRawTrackPoint(AliHLTUInt32_t id) const; | |
100 | /// get raw track point of id | |
101 | AliHLTTrackPoint* GetRawTrackPoint(AliHLTUInt32_t id); | |
102 | ||
bbe2c314 | 103 | int FillRawResidual(int coordinate, TH2* histo, AliHLTSpacePointContainer* points) const; |
104 | ||
b97434b7 | 105 | const vector<AliHLTTrackGeometry::AliHLTTrackPoint>& GetRawPoints() const {return fRawTrackPoints;} |
106 | ||
c7585a2a | 107 | private: |
108 | /// calculate the track points, expects the global magnetic field to be initialized | |
109 | int CalculateTrackPoints(AliHLTGlobalBarrelTrack& track, int firstpadrow, int step); | |
110 | ||
bbe2c314 | 111 | vector<AliHLTTrackPoint> fRawTrackPoints; // list of points in raw coordinates |
112 | ||
c7585a2a | 113 | ClassDef(AliHLTTPCTrackGeometry, 0) |
114 | }; | |
115 | #endif |