]> git.uio.no Git - u/mrichter/AliRoot.git/blame - STEER/AliTrackPointArray.h
Moving the tag cut classes to base
[u/mrichter/AliRoot.git] / STEER / AliTrackPointArray.h
CommitLineData
98937d93 1#ifndef ALITRACKPOINTARRAY_H
2#define ALITRACKPOINTARRAY_H
3/* Copyright(c) 1998-1999, ALICE Experiment at CERN, All rights reserved. *
4 * See cxx source for full Copyright notice */
5
6//////////////////////////////////////////////////////////////////////////////
7// Class AliTrackPoint //
8// This class represent a single track space-point. //
9// It is used to access the points array defined in AliTrackPointArray. //
10// Note that the space point coordinates are given in the global frame. //
11// //
12// cvetan.cheshkov@cern.ch 3/11/2005 //
13//////////////////////////////////////////////////////////////////////////////
14
15#include <TObject.h>
16
17class AliTrackPoint : public TObject {
18
19 public:
20 AliTrackPoint();
21 AliTrackPoint(Float_t x, Float_t y, Float_t z, const Float_t *cov, UShort_t volid);
22 AliTrackPoint(const Float_t *xyz, const Float_t *cov, UShort_t volid);
23 AliTrackPoint(const AliTrackPoint &p);
24 AliTrackPoint& operator= (const AliTrackPoint& p);
25 virtual ~AliTrackPoint() {}
26
27 // Multiplication with TGeoMatrix and distance between points (chi2) to be implemented
28
29 void SetXYZ(Float_t x, Float_t y, Float_t z, const Float_t *cov = 0);
30 void SetXYZ(const Float_t *xyz, const Float_t *cov = 0);
31 void SetVolumeID(UShort_t volid) { fVolumeID = volid; }
32
33 Float_t GetX() const { return fX; }
34 Float_t GetY() const { return fY; }
35 Float_t GetZ() const { return fZ; }
36 void GetXYZ(Float_t *xyz, Float_t *cov = 0) const;
37 const Float_t *GetCov() const { return &fCov[0]; }
38 UShort_t GetVolumeID() const { return fVolumeID; }
39
46ae650f 40 Float_t GetResidual(const AliTrackPoint &p, Bool_t weighted = kFALSE) const;
4dcdc747 41 Bool_t GetPCA(const AliTrackPoint &p, AliTrackPoint &out) const;
46ae650f 42
43 Float_t GetAngle() const;
44 AliTrackPoint& Rotate(Float_t alpha) const;
45 AliTrackPoint& MasterToLocal() const;
46
47 void Print(Option_t *) const;
48
98937d93 49 private:
50
51 Float_t fX; // X coordinate
52 Float_t fY; // Y coordinate
53 Float_t fZ; // Z coordinate
54 Float_t fCov[6]; // Cov matrix
55 UShort_t fVolumeID; // Volume ID
56
57 ClassDef(AliTrackPoint,1)
58};
59
60//////////////////////////////////////////////////////////////////////////////
61// Class AliTrackPointArray //
62// This class contains the ESD track space-points which are used during //
63// the alignment procedures. Each space-point consist of 3 coordinates //
64// (and their errors) and the index of the sub-detector which contains //
65// the space-point. //
66// cvetan.cheshkov@cern.ch 3/11/2005 //
67//////////////////////////////////////////////////////////////////////////////
68
69class AliTrackPointArray : public TObject {
70
71 public:
72
73 AliTrackPointArray();
74 AliTrackPointArray(Int_t npoints);
75 AliTrackPointArray(const AliTrackPointArray &array);
76 AliTrackPointArray& operator= (const AliTrackPointArray& array);
77 virtual ~AliTrackPointArray();
78
79 // Bool_t AddPoint(Int_t i, AliCluster *cl, UShort_t volid);
80 Bool_t AddPoint(Int_t i, const AliTrackPoint *p);
81
82 Int_t GetNPoints() const { return fNPoints; }
83 Int_t GetCovSize() const { return fSize; }
84 Bool_t GetPoint(AliTrackPoint &p, Int_t i) const;
85 // Getters for fast access to the coordinate arrays
86 const Float_t* GetX() const { return &fX[0]; }
87 const Float_t* GetY() const { return &fY[0]; }
88 const Float_t* GetZ() const { return &fZ[0]; }
89 const Float_t* GetCov() const { return &fCov[0]; }
90 const UShort_t* GetVolumeID() const { return &fVolumeID[0]; }
91
92 Bool_t HasVolumeID(UShort_t volid) const;
46ae650f 93
98937d93 94 private:
95
96 Int_t fNPoints; // Number of space points
97 Float_t *fX; //[fNPoints] Array with space point X coordinates
98 Float_t *fY; //[fNPoints] Array with space point Y coordinates
99 Float_t *fZ; //[fNPoints] Array with space point Z coordinates
100 Int_t fSize; // Size of array with cov matrices = 6*N of points
101 Float_t *fCov; //[fSize] Array with space point coordinates cov matrix
102 UShort_t *fVolumeID; //[fNPoints] Array of space point volume IDs
103
104 ClassDef(AliTrackPointArray,1)
105};
106
107#endif