Add class and function docs.
[u/mrichter/AliRoot.git] / EVE / EveBase / AliEveTrackFitter.h
CommitLineData
d810d0de 1// $Id$
2// Main authors: Matevz Tadel & Alja Mrak-Tadel: 2006, 2007
3
4/**************************************************************************
5 * Copyright(c) 1998-2008, ALICE Experiment at CERN, all rights reserved. *
6 * See http://aliceinfo.cern.ch/Offline/AliRoot/License.html for *
51346b82 7 * full copyright notice. *
d810d0de 8 **************************************************************************/
5a1436d6 9
10#ifndef ALIEVE_TrackFitter_H
11#define ALIEVE_TrackFitter_H
12
84aff7a4 13#include <TEvePointSet.h>
5a1436d6 14#include <map>
15
16class TGraphErrors;
17class TGraph;
18class AliRieman;
19
84aff7a4 20class TEveTrackList;
5a1436d6 21
d810d0de 22class AliEveTrackFitter : public TEvePointSet
5a1436d6 23{
24private:
d810d0de 25 AliEveTrackFitter(const AliEveTrackFitter&); // Not implemented
26 AliEveTrackFitter& operator=(const AliEveTrackFitter&); // Not implemented
5a1436d6 27
5a1436d6 28protected:
40790e5b 29
5a1436d6 30 struct Point_t
31 {
40790e5b 32 TEvePointSet *fPS; // point set
33 Int_t fIdx; // id in point set
fd31e9de 34
40790e5b 35 Point_t(TEvePointSet* ps=0, Int_t i=0) : fPS(ps), fIdx(i) {}
fd31e9de 36 Point_t(const Point_t& p) : fPS(p.fPS), fIdx(p.fIdx) {}
fd31e9de 37
40790e5b 38 Point_t& operator=(const Point_t& p) {
39 fPS = p.fPS; fIdx = p.fIdx; return *this;
40 }
41
42 bool operator<(const Point_t& o) const {
43 if (fPS != o.fPS) return fPS < o.fPS;
44 return fIdx < o.fIdx;
45 }
5a1436d6 46 };
47
40790e5b 48 typedef std::map<Point_t, Int_t> PointMap_t;
49
50 Float_t fAlpha; // transformation angle to AliRieman local system (where x>>y)
51 AliRieman* fRieman; // rieman fitter
fd31e9de 52
40790e5b 53 Bool_t fConnected; // connection to the TEvePointSet signal
5a1436d6 54
40790e5b 55 PointMap_t fSPMap; // map of selected points
56 TEveTrackList* fTrackList; // list of tracks removed in the destructor
51346b82 57
40790e5b 58 TGraph *fGraphPicked; // graph of selected points debug info
59 TGraphErrors *fGraphHelix; // graph of fitted points for debug info
5a1436d6 60
5a1436d6 61public:
40790e5b 62 AliEveTrackFitter(const Text_t* name = "TrackFitter", Int_t n_points=0);
d810d0de 63 virtual ~AliEveTrackFitter();
51346b82 64
40790e5b 65 virtual void AddFitPoint(TEvePointSet*,Int_t); // slot for PointCtrlClicked() signal
5a1436d6 66
40790e5b 67 virtual void Start();
68 virtual void Stop();
69 virtual void FitTrack();
70 virtual void Reset(Int_t n_points=0, Int_t n_int_ids=0);
5a1436d6 71
a189470c 72 Bool_t GetConnected(){ return fConnected; }
73 AliRieman* GetRieman(){ return fRieman; }
5a1436d6 74
40790e5b 75 TGraph* GetGraphPicked() { return fGraphPicked; }
76 TGraphErrors* GetGraphHelix() { return fGraphHelix; }
77 void DrawDebugGraph();
a189470c 78
40790e5b 79 virtual void DestroyElements(); // *MENU*
5a1436d6 80
40790e5b 81 ClassDef(AliEveTrackFitter, 0); // Interface of TEvePointSet allowing helix fit.
82};
5a1436d6 83
84#endif