]> git.uio.no Git - u/mrichter/AliRoot.git/blame - HLT/BASE/util/AliHLTGlobalBarrelTrack.h
support for the track geometry class added
[u/mrichter/AliRoot.git] / HLT / BASE / util / AliHLTGlobalBarrelTrack.h
CommitLineData
a1408c4b 1//-*- Mode: C++ -*-
2// $Id$
3#ifndef ALIHLTGLOBALBARRELTRACK_H
4#define ALIHLTGLOBALBARRELTRACK_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 AliHLTGlobalBarrelTrack.h
10 @author Matthias Richter
11 @date 2009-06-24
12 @brief An AliKalmanTrack implementation for global HLT barrel tracks.
13*/
14
15#include "AliKalmanTrack.h"
16#include "AliHLTDataTypes.h"
17#include "AliHLTExternalTrackParam.h"
18#include <vector>
19using namespace std;
20
da35073f 21class TClonesArray;
354cc456 22class AliHLTSpacePointContainer;
f9a30fdc 23class AliHLTTrackGeometry;
da35073f 24
a1408c4b 25/**
26 * @class AliHLTGlobalBarrelTrack
27 * Representation of global HLT barrel tracks.
28 *
29 * @ingroup alihlt_global_components
30 */
31class AliHLTGlobalBarrelTrack : public AliKalmanTrack
32{
33 public:
34 /** standard constructor */
35 AliHLTGlobalBarrelTrack();
36 /** copy constructor */
37 AliHLTGlobalBarrelTrack(const AliHLTGlobalBarrelTrack& t);
093b64dc 38 /** copy constructor */
39 AliHLTGlobalBarrelTrack(const AliHLTExternalTrackParam& p);
7941f004 40 /** copy constructor */
41 AliHLTGlobalBarrelTrack(const AliExternalTrackParam& p);
093b64dc 42
354cc456 43 /// assignment operator
44 /// the standard assignment operator for AliHLTGlobalBarrelTrack is in principle
45 /// covered by the template definition, however, compiler does not seem to recognize
46 /// correctly -> effC++ warning,
47 AliHLTGlobalBarrelTrack& operator=(const AliHLTGlobalBarrelTrack& t) {
48 if (this==&t) return *this;
49 this->~AliHLTGlobalBarrelTrack(); new (this) AliHLTGlobalBarrelTrack(t);
50 return *this;
51 }
093b64dc 52 template <class c>
09ed1692 53 AliHLTGlobalBarrelTrack& operator=(const c& t) {
54 this->~AliHLTGlobalBarrelTrack(); new (this) AliHLTGlobalBarrelTrack(t);
55 return *this;
56 }
57
a1408c4b 58 /** destructor */
59 ~AliHLTGlobalBarrelTrack();
60
9b775d2d 61 /// inherited from AliKalmanTrack
62 Int_t GetClusterIndex(Int_t i) const {
8f3528aa 63 return (i<(int)fPoints.size()) ?fPoints[i] :0;
9b775d2d 64 }
65
1d36223d 66 /// inherited from AliKalmanTrack, dummy implementation
67 virtual Int_t GetNumberOfTracklets() const {return 0;}
68 /// inherited from AliKalmanTrack, dummy implementation
69 virtual Int_t GetTrackletIndex(Int_t) const {return -1;}
70 /// inherited from AliKalmanTrack, dummy implementation
71 virtual Double_t GetPIDsignal() const {return 0.;}
72
a1408c4b 73 /// Get the x position of the last assigned point
74 Double_t GetLastPointX() const {return fLastX;}
75 /// Get the y position of the last assigned point
76 Double_t GetLastPointY() const {return fLastY;}
093b64dc 77 /// return Track ID
78 Int_t TrackID() const {return fTrackID;}
2a24cbbe 79 /// return Track ID, inherited for AliExternalTrackParam
80 Int_t GetID() const {return fTrackID;}
a1408c4b 81
82 /// Get the number of associated points
83 UInt_t GetNumberOfPoints() const;
84
85 /// Get the list of associated points
86 const UInt_t* GetPoints() const;
87
354cc456 88 /// Set the space point data
89 void SetSpacePointContainer(AliHLTSpacePointContainer* points) {fSpacePoints=points;}
f9a30fdc 90 /// Set track point container
91 void SetTrackGeometry(AliHLTTrackGeometry* points);
92 /// Get track point container
93 AliHLTTrackGeometry* GetTrackGeometry() const {return fTrackPoints;}
94
95 /// associate the track space points to the calculated track points
96 int AssociateSpacePoints(AliHLTTrackGeometry* trackpoints, AliHLTSpacePointContainer& spacepoints) const;
354cc456 97
a1408c4b 98 /// Set the list of associated points
99 int SetPoints(const UInt_t* pArray, UInt_t arraySize);
100
d8cddd2e 101 static int ConvertTrackDataArray(const AliHLTTracksData* pTracks, unsigned sizeInByte, vector<AliHLTGlobalBarrelTrack> &tgtArray);
a1408c4b 102
093b64dc 103 /// inherited from AliKalmanTrack, dummy implementation
a1408c4b 104 Double_t GetPredictedChi2(const AliCluster*) const {return 0.0;}
105
093b64dc 106 /// inherited from AliKalmanTrack, dummy implementation
a1408c4b 107 Bool_t PropagateTo(Double_t, Double_t, Double_t) {return kFALSE;}
108
093b64dc 109 /// inherited from AliKalmanTrack, dummy implementation
a1408c4b 110 Bool_t Update(const AliCluster*, Double_t, Int_t) {return kFALSE;}
111
093b64dc 112 /// Inherited from TObject, prints the track parameters
113 virtual void Print(Option_t* option = "") const;
114
354cc456 115 /// Inherited from TObject, draw the track
116 virtual void Draw(Option_t *option="");
117
118 int DrawProjXYSpacePoints(Option_t *option, const AliHLTSpacePointContainer* fSpacePoints, const float scale, float center[2]);
119 int DrawProjXYTrack(Option_t *option, const float scale, float center[2]);
120 int DrawProjXYTrackPoints(Option_t *option, const float scale, const float center[2], int firstpadrow, int step, float lastpoint[2]);
121
5dc6c74b 122 Double_t GetPathLengthTo( Double_t x, Double_t b ) const;
123
da35073f 124 static int ReadTracks(const char* filename, TClonesArray& tgt, AliHLTComponentDataType dt=kAliHLTVoidDataType, unsigned specification=kAliHLTVoidDataSpec);
354cc456 125 static int ReadTrackList(const char* listfile, TClonesArray& tgt, AliHLTComponentDataType dt=kAliHLTVoidDataType, unsigned specification=kAliHLTVoidDataSpec);
da35073f 126
354cc456 127 /// calculate crossing point with a plane parallel to z axis, at distance x
128 /// and phi
129 int CalculateCrossingPoint(float xPlane, float phiPlane, float& u, float& v);
a1408c4b 130
f9a30fdc 131 protected:
132 /// calculate and set internal helix parameters
133 int CalculateHelixParams();
134
a1408c4b 135 private:
9b775d2d 136
a1408c4b 137 /// array of points
138 vector<UInt_t> fPoints; //
139
140 /// x position of the last assigned point
141 Double_t fLastX; //
142 /// y position of the last assigned point
143 Double_t fLastY; //
144
093b64dc 145 /// track Id for identification during the reconstruction
146 Int_t fTrackID; //
147
354cc456 148 /// helix parameters
149 Float_t fHelixRadius; //
150 Float_t fHelixCenterX; //
151 Float_t fHelixCenterY; //
152
153 /// the space points assigned to the track
154 AliHLTSpacePointContainer* fSpacePoints; //!
f9a30fdc 155 /// the track points according to a geometry
156 AliHLTTrackGeometry* fTrackPoints; //!
354cc456 157
a1408c4b 158 ClassDef(AliHLTGlobalBarrelTrack, 0)
159};
160#endif