]>
Commit | Line | Data |
---|---|---|
5a1436d6 | 1 | // $Header$ |
2 | ||
3 | #ifndef ALIEVE_TrackFitter_H | |
4 | #define ALIEVE_TrackFitter_H | |
5 | ||
6 | #include <Reve/PointSet.h> | |
7 | #include <TQObject.h> | |
8 | #include <map> | |
9 | ||
10 | class TGraphErrors; | |
11 | class TGraph; | |
12 | class AliRieman; | |
13 | ||
14 | namespace Reve | |
15 | { | |
16 | class TrackList; | |
17 | } | |
18 | ||
19 | namespace Alieve { | |
20 | ||
21 | class TrackFitter : public Reve::PointSet | |
22 | { | |
23 | private: | |
24 | TrackFitter(const TrackFitter&); // Not implemented | |
25 | TrackFitter& operator=(const TrackFitter&); // Not implemented | |
26 | ||
27 | TGraph *fGraphSelected; // graph of selected points | |
28 | TGraphErrors *fGraphFitted; // graph of fitted points | |
29 | ||
30 | protected: | |
31 | struct Point_t | |
32 | { | |
33 | // inner structure to check duplicates | |
34 | Reve::PointSet* fPS; // selected pointset | |
35 | Int_t fIdx; // location in the point set array | |
36 | Point_t(Reve::PointSet* ps, Int_t i): fPS(ps), fIdx(i){} | |
37 | bool operator<(const Point_t& o) const | |
38 | { if (fPS != o.fPS) return fPS < o.fPS; return fIdx < o.fIdx; } | |
39 | }; | |
40 | ||
41 | Float_t fAlpha; // transformation agle to local system (where x>>y) | |
42 | AliRieman* fRieman; // rieman fitter | |
43 | ||
44 | Bool_t fConnected; // object connected to pointset Ctrl-shift signal | |
45 | ||
46 | Reve::TrackList* fTrackList; // track list created with rieman fit | |
47 | ||
48 | std::map<Point_t, Int_t> fMapPS; // map of selected points from different PointSet | |
49 | public: | |
50 | TrackFitter(const Text_t* name, Int_t n_points=0, TreeVarType_e tv_type=TVT_XYZ); | |
51 | virtual ~TrackFitter(); | |
52 | ||
53 | void AddFitPoint(Reve::PointSet*,Int_t); // slot for PointCtrlClicked() signal | |
54 | ||
55 | virtual void DestroyElements(); // *MENU* | |
56 | ||
57 | void Start(); | |
58 | void Stop(); | |
59 | void FitTrack(); | |
60 | virtual void Reset(Int_t n_points=0, Int_t n_int_ids=0); | |
61 | ||
62 | Bool_t GetConnected(){ return fConnected; } | |
63 | AliRieman* GetRieman(){ return fRieman; } | |
64 | ||
65 | void DrawRiemanGraph(); | |
66 | TGraph* GetGraphSelected(){ return fGraphSelected; } | |
67 | TGraphErrors* GetGraphFitted(){ return fGraphFitted; } | |
68 | ||
69 | ClassDef(TrackFitter, 0); // Interface to AliRieman fit. | |
70 | }; // endclass TrackFitter | |
71 | ||
72 | } | |
73 | ||
74 | #endif |