]> git.uio.no Git - u/mrichter/AliRoot.git/blame - STEER/AliTrackResiduals.h
Protection against special particle types.
[u/mrichter/AliRoot.git] / STEER / AliTrackResiduals.h
CommitLineData
98937d93 1#ifndef ALITRACKRESIDUALS_H
2#define ALITRACKRESIDUALS_H
3
4//************************************************************************
5// AliTrackResiduals: base class for collecting the track space point *
6// residuals produced by the fast track fitters (AliTrackFitter class). *
7// It provides an interface to the arrays which contain the space points *
8// and track extrapolation points within the detector volume to be *
9// aligned. The derived classes should implement method to analyze the *
10// track residuals and minimize their sum in order to get the *
11// AliAlignObj for the given detector volume. *
12//************************************************************************
13
14#include "TObject.h"
15
46ae650f 16#include "AliAlignObjAngles.h"
17
98937d93 18class AliTrackPointArray;
19
20class AliTrackResiduals : public TObject {
21
22 public:
23
24 AliTrackResiduals();
46ae650f 25 AliTrackResiduals(Int_t ntracks);
98937d93 26 AliTrackResiduals(const AliTrackResiduals &res);
27 AliTrackResiduals& operator= (const AliTrackResiduals& res);
28 virtual ~AliTrackResiduals();
29
30 void SetNTracks(Int_t ntracks);
98937d93 31 Bool_t AddTrackPointArrays(AliTrackPointArray *volarray, AliTrackPointArray *trackarray);
cc345ce3 32 void InitAlignObj();
33 void SetMinNPoints(Int_t n) { fMinNPoints = n; }
98937d93 34
35 virtual Bool_t Minimize() = 0;
36
37 Int_t GetNTracks() const { return fN; }
38 Int_t GetNFilledTracks() const { return fLast; }
39 Bool_t GetTrackPointArrays(Int_t i, AliTrackPointArray* &volarray, AliTrackPointArray* &trackarray) const;
40 AliAlignObj *GetAlignObj() const { return fAlignObj; }
46ae650f 41 Float_t GetChi2() const { return fChi2; }
42 Int_t GetNdf() const { return fNdf; }
cc345ce3 43 Int_t GetMinNPoints() const { return fMinNPoints; }
98937d93 44
45 protected:
46
47 void DeleteTrackPointArrays();
48
49 Int_t fN; // Number of tracks
50 Int_t fLast; // Index of the last filled track arrays
51 AliAlignObj *fAlignObj; // Pointer to the volume alignment object to be fitted
52 AliTrackPointArray **fVolArray; //! Pointers to the arrays containing space points
53 AliTrackPointArray **fTrackArray; //! Pointers to the arrays containing track extrapolation points
46ae650f 54 Float_t fChi2; // Chi2 (or distance) of residuals minimization
55 Int_t fNdf; // Number of degrees of freedom
cc345ce3 56 Int_t fMinNPoints; // Minimum allowed Number of points in the volume which is to be aligned
98937d93 57 Bool_t fIsOwner; // Track point arrays owned by the object
58
59 ClassDef(AliTrackResiduals,1)
60
61};
62
63#endif