]> git.uio.no Git - u/mrichter/AliRoot.git/blobdiff - EVE/EveBase/AliEveTrackFitter.h
Updated DAs to comply with root known problems
[u/mrichter/AliRoot.git] / EVE / EveBase / AliEveTrackFitter.h
index 3e93ccdc575283f14ea36c43427223d44d8ba07e..85d5355a517f73526f941a75a8aed1b55d5a7011 100644 (file)
@@ -7,11 +7,10 @@
  * full copyright notice.                                                 *
  **************************************************************************/
 
-#ifndef ALIEVE_TrackFitter_H
-#define ALIEVE_TrackFitter_H
+#ifndef AliEveTrackFitter_H
+#define AliEveTrackFitter_H
 
 #include <TEvePointSet.h>
-#include <TQObject.h>
 #include <map>
 
 class TGraphErrors;
@@ -20,63 +19,69 @@ class AliRieman;
 
 class TEveTrackList;
 
-
 class AliEveTrackFitter : public TEvePointSet
 {
-private:
-  AliEveTrackFitter(const AliEveTrackFitter&);            // Not implemented
-  AliEveTrackFitter& operator=(const AliEveTrackFitter&); // Not implemented
+public:
+  AliEveTrackFitter(const Text_t* name = "TrackFitter", Int_t nPoints=0);
+  virtual ~AliEveTrackFitter();
+
+  virtual void DestroyElements();
+
+  virtual void  AddFitPoint(Int_t pointId);  // slot for TEvePointSet::PointSelected() signal
+
+  virtual void  Start();
+  virtual void  Stop();
+  virtual void  FitTrack();
+  virtual void  Reset(Int_t nPoints=0, Int_t nIntIds=0);
+
+  Bool_t        GetConnected() const { return fConnected; }
+  AliRieman*    GetRieman()    const { return fRieman; }
+
+  TGraph*       GetGraphPicked() const { return fGraphPicked; }
+  TGraphErrors* GetGraphHelix()  const { return fGraphHelix; }
+  void          DrawDebugGraph();
 
-  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; }
+    {
+      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; }
+    {
+      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
-
-  Bool_t     fConnected;            // object connected to pointset Ctrl-shift signal
-
-  TEveTrackList* fTrackList;        // track list created with rieman fit
+  typedef std::map<Point_t, Int_t> PointMap_t;
 
-  std::map<Point_t, Int_t> fMapPS;  // map of selected points from different TEvePointSet
-
-public:
-  AliEveTrackFitter(const Text_t* name, Int_t n_points=0);
-  virtual ~AliEveTrackFitter();
+  Float_t            fAlpha;           // transformation angle to AliRieman local system (where x>>y)
+  AliRieman*         fRieman;          // rieman fitter
 
-  virtual void AddFitPoint(TEvePointSet*,Int_t);  // slot for PointCtrlClicked() signal
+  Bool_t             fConnected;       // connection to the TEvePointSet signal
 
-  virtual void DestroyElements();   // *MENU*
+  PointMap_t         fSPMap;           // map of selected points
+  TEveTrackList*     fTrackList;       // list of tracks removed in the destructor
 
-  virtual void Start();
-  virtual void Stop();
-  virtual void FitTrack();
-  virtual void Reset(Int_t n_points=0, Int_t n_int_ids=0);
+  TGraph            *fGraphPicked;     // graph of selected points debug info
+  TGraphErrors      *fGraphHelix;      // graph of fitted points for debug info
 
-  Bool_t        GetConnected(){ return fConnected; }
-  AliRieman*    GetRieman(){ return fRieman; }
-
-  void          DrawRiemanGraph();
-
-  TGraph*       GetGraphSelected() { return fGraphSelected; }
-  TGraphErrors* GetGraphFitted()   { return fGraphFitted; }
+private:
+  AliEveTrackFitter(const AliEveTrackFitter&);            // Not implemented
+  AliEveTrackFitter& operator=(const AliEveTrackFitter&); // Not implemented
 
-  ClassDef(AliEveTrackFitter, 0); // Interface to AliRieman fit.
-}; // endclass AliEveTrackFitter
+  ClassDef(AliEveTrackFitter, 0); // Interface of TEvePointSet allowing helix fit.
+};
 
 #endif