]> git.uio.no Git - u/mrichter/AliRoot.git/blame - EVE/Alieve/TrackFitter.h
First big commit of the mchview program and its accompanying library,
[u/mrichter/AliRoot.git] / EVE / Alieve / TrackFitter.h
CommitLineData
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
10class TGraphErrors;
11class TGraph;
12class AliRieman;
13
14namespace Reve
15{
16class TrackList;
17}
18
19namespace Alieve {
20
21class TrackFitter : public Reve::PointSet
22{
23private:
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
30protected:
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
49public:
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