]> git.uio.no Git - u/mrichter/AliRoot.git/blame - EVE/EveBase/AliEveTrackFitter.h
Printout CDB URI if opening fails.
[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
a15e6d7d 10#ifndef AliEveTrackFitter_H
11#define AliEveTrackFitter_H
5a1436d6 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{
4b456ebb 24public:
25 AliEveTrackFitter(const Text_t* name = "TrackFitter", Int_t nPoints=0);
26 virtual ~AliEveTrackFitter();
27
28 virtual void DestroyElements();
29
30 virtual void AddFitPoint(Int_t pointId); // slot for TEvePointSet::PointSelected() signal
31
32 virtual void Start();
33 virtual void Stop();
34 virtual void FitTrack();
35 virtual void Reset(Int_t nPoints=0, Int_t nIntIds=0);
36
37 Bool_t GetConnected() const { return fConnected; }
38 AliRieman* GetRieman() const { return fRieman; }
39
40 TGraph* GetGraphPicked() const { return fGraphPicked; }
41 TGraphErrors* GetGraphHelix() const { return fGraphHelix; }
42 void DrawDebugGraph();
43
5a1436d6 44
5a1436d6 45protected:
40790e5b 46
5a1436d6 47 struct Point_t
48 {
40790e5b 49 TEvePointSet *fPS; // point set
50 Int_t fIdx; // id in point set
fd31e9de 51
40790e5b 52 Point_t(TEvePointSet* ps=0, Int_t i=0) : fPS(ps), fIdx(i) {}
fd31e9de 53 Point_t(const Point_t& p) : fPS(p.fPS), fIdx(p.fIdx) {}
fd31e9de 54
a15e6d7d 55 Point_t& operator=(const Point_t& p)
56 {
40790e5b 57 fPS = p.fPS; fIdx = p.fIdx; return *this;
58 }
59
a15e6d7d 60 bool operator<(const Point_t& o) const
61 {
40790e5b 62 if (fPS != o.fPS) return fPS < o.fPS;
63 return fIdx < o.fIdx;
64 }
5a1436d6 65 };
66
a15e6d7d 67 typedef std::map<Point_t, Int_t> PointMap_t;
40790e5b 68
a15e6d7d 69 Float_t fAlpha; // transformation angle to AliRieman local system (where x>>y)
70 AliRieman* fRieman; // rieman fitter
fd31e9de 71
a15e6d7d 72 Bool_t fConnected; // connection to the TEvePointSet signal
5a1436d6 73
a15e6d7d 74 PointMap_t fSPMap; // map of selected points
75 TEveTrackList* fTrackList; // list of tracks removed in the destructor
51346b82 76
a15e6d7d 77 TGraph *fGraphPicked; // graph of selected points debug info
78 TGraphErrors *fGraphHelix; // graph of fitted points for debug info
5a1436d6 79
4b456ebb 80private:
81 AliEveTrackFitter(const AliEveTrackFitter&); // Not implemented
82 AliEveTrackFitter& operator=(const AliEveTrackFitter&); // Not implemented
a189470c 83
40790e5b 84 ClassDef(AliEveTrackFitter, 0); // Interface of TEvePointSet allowing helix fit.
85};
5a1436d6 86
87#endif