2 // Main authors: Matevz Tadel & Alja Mrak-Tadel: 2006, 2007
4 /**************************************************************************
5 * Copyright(c) 1998-2008, ALICE Experiment at CERN, all rights reserved. *
6 * See http://aliceinfo.cern.ch/Offline/AliRoot/License.html for *
7 * full copyright notice. *
8 **************************************************************************/
10 #ifndef AliEveTrackFitter_H
11 #define AliEveTrackFitter_H
13 #include <TEvePointSet.h>
22 class AliEveTrackFitter : public TEvePointSet
25 AliEveTrackFitter(const Text_t* name = "TrackFitter", Int_t nPoints=0);
26 virtual ~AliEveTrackFitter();
28 virtual void DestroyElements();
30 virtual void AddFitPoint(Int_t pointId); // slot for TEvePointSet::PointSelected() signal
34 virtual void FitTrack();
35 virtual void Reset(Int_t nPoints=0, Int_t nIntIds=0);
37 Bool_t GetConnected() const { return fConnected; }
38 AliRieman* GetRieman() const { return fRieman; }
40 TGraph* GetGraphPicked() const { return fGraphPicked; }
41 TGraphErrors* GetGraphHelix() const { return fGraphHelix; }
42 void DrawDebugGraph();
49 TEvePointSet *fPS; // point set
50 Int_t fIdx; // id in point set
52 Point_t(TEvePointSet* ps=0, Int_t i=0) : fPS(ps), fIdx(i) {}
53 Point_t(const Point_t& p) : fPS(p.fPS), fIdx(p.fIdx) {}
55 Point_t& operator=(const Point_t& p)
57 fPS = p.fPS; fIdx = p.fIdx; return *this;
60 bool operator<(const Point_t& o) const
62 if (fPS != o.fPS) return fPS < o.fPS;
67 typedef std::map<Point_t, Int_t> PointMap_t;
69 Float_t fAlpha; // transformation angle to AliRieman local system (where x>>y)
70 AliRieman* fRieman; // rieman fitter
72 Bool_t fConnected; // connection to the TEvePointSet signal
74 PointMap_t fSPMap; // map of selected points
75 TEveTrackList* fTrackList; // list of tracks removed in the destructor
77 TGraph *fGraphPicked; // graph of selected points debug info
78 TGraphErrors *fGraphHelix; // graph of fitted points for debug info
81 AliEveTrackFitter(const AliEveTrackFitter&); // Not implemented
82 AliEveTrackFitter& operator=(const AliEveTrackFitter&); // Not implemented
84 ClassDef(AliEveTrackFitter, 0); // Interface of TEvePointSet allowing helix fit.