#define ALIEVE_TrackFitter_H
#include <TEvePointSet.h>
-#include <TQObject.h>
#include <map>
class TGraphErrors;
class TEveTrackList;
-
class AliEveTrackFitter : public TEvePointSet
{
private:
AliEveTrackFitter(const AliEveTrackFitter&); // Not implemented
AliEveTrackFitter& operator=(const AliEveTrackFitter&); // Not implemented
- TGraph *fGraphSelected; // graph of selected points
- TGraphErrors *fGraphFitted; // graph of fitted points
-
protected:
+
struct Point_t
{
- // inner structure to check duplicates
- TEvePointSet *fPS; // selected pointset
- Int_t fIdx; // location in the point set array
+ TEvePointSet *fPS; // point set
+ Int_t fIdx; // id in point set
- Point_t(TEvePointSet* ps, Int_t i) : fPS(ps), fIdx(i) {}
+ Point_t(TEvePointSet* ps=0, Int_t i=0) : fPS(ps), fIdx(i) {}
Point_t(const Point_t& p) : fPS(p.fPS), fIdx(p.fIdx) {}
- Point_t& operator=(const Point_t& p)
- { fPS = p.fPS; fIdx = p.fIdx; return *this; }
- bool operator<(const Point_t& o) const
- { if (fPS != o.fPS) return fPS < o.fPS; return fIdx < o.fIdx; }
+ Point_t& operator=(const Point_t& p) {
+ fPS = p.fPS; fIdx = p.fIdx; return *this;
+ }
+
+ bool operator<(const Point_t& o) const {
+ if (fPS != o.fPS) return fPS < o.fPS;
+ return fIdx < o.fIdx;
+ }
};
- Float_t fAlpha; // transformation agle to local system (where x>>y)
- AliRieman* fRieman; // rieman fitter
+ typedef std::map<Point_t, Int_t> PointMap_t;
+
+ Float_t fAlpha; // transformation angle to AliRieman local system (where x>>y)
+ AliRieman* fRieman; // rieman fitter
- Bool_t fConnected; // object connected to pointset Ctrl-shift signal
+ Bool_t fConnected; // connection to the TEvePointSet signal
- TEveTrackList* fTrackList; // track list created with rieman fit
+ PointMap_t fSPMap; // map of selected points
+ TEveTrackList* fTrackList; // list of tracks removed in the destructor
- std::map<Point_t, Int_t> fMapPS; // map of selected points from different TEvePointSet
+ TGraph *fGraphPicked; // graph of selected points debug info
+ TGraphErrors *fGraphHelix; // graph of fitted points for debug info
public:
- AliEveTrackFitter(const Text_t* name, Int_t n_points=0);
+ AliEveTrackFitter(const Text_t* name = "TrackFitter", Int_t n_points=0);
virtual ~AliEveTrackFitter();
- virtual void AddFitPoint(TEvePointSet*,Int_t); // slot for PointCtrlClicked() signal
-
- virtual void DestroyElements(); // *MENU*
+ virtual void AddFitPoint(TEvePointSet*,Int_t); // slot for PointCtrlClicked() signal
- virtual void Start();
- virtual void Stop();
- virtual void FitTrack();
- virtual void Reset(Int_t n_points=0, Int_t n_int_ids=0);
+ virtual void Start();
+ virtual void Stop();
+ virtual void FitTrack();
+ virtual void Reset(Int_t n_points=0, Int_t n_int_ids=0);
Bool_t GetConnected(){ return fConnected; }
AliRieman* GetRieman(){ return fRieman; }
- void DrawRiemanGraph();
+ TGraph* GetGraphPicked() { return fGraphPicked; }
+ TGraphErrors* GetGraphHelix() { return fGraphHelix; }
+ void DrawDebugGraph();
- TGraph* GetGraphSelected() { return fGraphSelected; }
- TGraphErrors* GetGraphFitted() { return fGraphFitted; }
+ virtual void DestroyElements(); // *MENU*
- ClassDef(AliEveTrackFitter, 0); // Interface to AliRieman fit.
-}; // endclass AliEveTrackFitter
+ ClassDef(AliEveTrackFitter, 0); // Interface of TEvePointSet allowing helix fit.
+};
#endif