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 ALIEVE_TrackFitter_H
11 #define ALIEVE_TrackFitter_H
13 #include <TEvePointSet.h>
22 class AliEveTrackFitter : public TEvePointSet
25 AliEveTrackFitter(const AliEveTrackFitter&); // Not implemented
26 AliEveTrackFitter& operator=(const AliEveTrackFitter&); // Not implemented
32 TEvePointSet *fPS; // point set
33 Int_t fIdx; // id in point set
35 Point_t(TEvePointSet* ps=0, Int_t i=0) : fPS(ps), fIdx(i) {}
36 Point_t(const Point_t& p) : fPS(p.fPS), fIdx(p.fIdx) {}
38 Point_t& operator=(const Point_t& p) {
39 fPS = p.fPS; fIdx = p.fIdx; return *this;
42 bool operator<(const Point_t& o) const {
43 if (fPS != o.fPS) return fPS < o.fPS;
48 typedef std::map<Point_t, Int_t> PointMap_t;
50 Float_t fAlpha; // transformation angle to AliRieman local system (where x>>y)
51 AliRieman* fRieman; // rieman fitter
53 Bool_t fConnected; // connection to the TEvePointSet signal
55 PointMap_t fSPMap; // map of selected points
56 TEveTrackList* fTrackList; // list of tracks removed in the destructor
58 TGraph *fGraphPicked; // graph of selected points debug info
59 TGraphErrors *fGraphHelix; // graph of fitted points for debug info
62 AliEveTrackFitter(const Text_t* name = "TrackFitter", Int_t n_points=0);
63 virtual ~AliEveTrackFitter();
65 virtual void AddFitPoint(TEvePointSet*,Int_t); // slot for PointCtrlClicked() signal
69 virtual void FitTrack();
70 virtual void Reset(Int_t n_points=0, Int_t n_int_ids=0);
72 Bool_t GetConnected(){ return fConnected; }
73 AliRieman* GetRieman(){ return fRieman; }
75 TGraph* GetGraphPicked() { return fGraphPicked; }
76 TGraphErrors* GetGraphHelix() { return fGraphHelix; }
77 void DrawDebugGraph();
79 virtual void DestroyElements(); // *MENU*
81 ClassDef(AliEveTrackFitter, 0); // Interface of TEvePointSet allowing helix fit.