]> git.uio.no Git - u/mrichter/AliRoot.git/blame - STEER/AliTrackPointArray.h
Correct bug in MakeSlidingCell and define 3 new data members related to the number...
[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
40 private:
41
42 Float_t fX; // X coordinate
43 Float_t fY; // Y coordinate
44 Float_t fZ; // Z coordinate
45 Float_t fCov[6]; // Cov matrix
46 UShort_t fVolumeID; // Volume ID
47
48 ClassDef(AliTrackPoint,1)
49};
50
51//////////////////////////////////////////////////////////////////////////////
52// Class AliTrackPointArray //
53// This class contains the ESD track space-points which are used during //
54// the alignment procedures. Each space-point consist of 3 coordinates //
55// (and their errors) and the index of the sub-detector which contains //
56// the space-point. //
57// cvetan.cheshkov@cern.ch 3/11/2005 //
58//////////////////////////////////////////////////////////////////////////////
59
60class AliTrackPointArray : public TObject {
61
62 public:
63
64 AliTrackPointArray();
65 AliTrackPointArray(Int_t npoints);
66 AliTrackPointArray(const AliTrackPointArray &array);
67 AliTrackPointArray& operator= (const AliTrackPointArray& array);
68 virtual ~AliTrackPointArray();
69
70 // Bool_t AddPoint(Int_t i, AliCluster *cl, UShort_t volid);
71 Bool_t AddPoint(Int_t i, const AliTrackPoint *p);
72
73 Int_t GetNPoints() const { return fNPoints; }
74 Int_t GetCovSize() const { return fSize; }
75 Bool_t GetPoint(AliTrackPoint &p, Int_t i) const;
76 // Getters for fast access to the coordinate arrays
77 const Float_t* GetX() const { return &fX[0]; }
78 const Float_t* GetY() const { return &fY[0]; }
79 const Float_t* GetZ() const { return &fZ[0]; }
80 const Float_t* GetCov() const { return &fCov[0]; }
81 const UShort_t* GetVolumeID() const { return &fVolumeID[0]; }
82
83 Bool_t HasVolumeID(UShort_t volid) const;
84
85 private:
86
87 Int_t fNPoints; // Number of space points
88 Float_t *fX; //[fNPoints] Array with space point X coordinates
89 Float_t *fY; //[fNPoints] Array with space point Y coordinates
90 Float_t *fZ; //[fNPoints] Array with space point Z coordinates
91 Int_t fSize; // Size of array with cov matrices = 6*N of points
92 Float_t *fCov; //[fSize] Array with space point coordinates cov matrix
93 UShort_t *fVolumeID; //[fNPoints] Array of space point volume IDs
94
95 ClassDef(AliTrackPointArray,1)
96};
97
98#endif