Pythia6 dependence removed.
[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 <TQObject.h>
15#include <map>
16
17class TGraphErrors;
18class TGraph;
19class AliRieman;
20
84aff7a4 21class TEveTrackList;
5a1436d6 22
5a1436d6 23
d810d0de 24class AliEveTrackFitter : public TEvePointSet
5a1436d6 25{
26private:
d810d0de 27 AliEveTrackFitter(const AliEveTrackFitter&); // Not implemented
28 AliEveTrackFitter& operator=(const AliEveTrackFitter&); // Not implemented
5a1436d6 29
30 TGraph *fGraphSelected; // graph of selected points
31 TGraphErrors *fGraphFitted; // graph of fitted points
32
33protected:
34 struct Point_t
35 {
36 // inner structure to check duplicates
fd31e9de 37 TEvePointSet *fPS; // selected pointset
5a1436d6 38 Int_t fIdx; // location in the point set array
fd31e9de 39
40 Point_t(TEvePointSet* ps, Int_t i) : fPS(ps), fIdx(i) {}
41 Point_t(const Point_t& p) : fPS(p.fPS), fIdx(p.fIdx) {}
42 Point_t& operator=(const Point_t& p)
43 { fPS = p.fPS; fIdx = p.fIdx; return *this; }
44
5a1436d6 45 bool operator<(const Point_t& o) const
46 { if (fPS != o.fPS) return fPS < o.fPS; return fIdx < o.fIdx; }
47 };
48
fd31e9de 49 Float_t fAlpha; // transformation agle to local system (where x>>y)
50 AliRieman* fRieman; // rieman fitter
51
52 Bool_t fConnected; // object connected to pointset Ctrl-shift signal
5a1436d6 53
fd31e9de 54 TEveTrackList* fTrackList; // track list created with rieman fit
51346b82 55
fd31e9de 56 std::map<Point_t, Int_t> fMapPS; // map of selected points from different TEvePointSet
5a1436d6 57
5a1436d6 58public:
d810d0de 59 AliEveTrackFitter(const Text_t* name, Int_t n_points=0);
60 virtual ~AliEveTrackFitter();
51346b82 61
a189470c 62 virtual void AddFitPoint(TEvePointSet*,Int_t); // slot for PointCtrlClicked() signal
5a1436d6 63
fd31e9de 64 virtual void DestroyElements(); // *MENU*
5a1436d6 65
a189470c 66 virtual void Start();
67 virtual void Stop();
68 virtual void FitTrack();
69 virtual void Reset(Int_t n_points=0, Int_t n_int_ids=0);
5a1436d6 70
a189470c 71 Bool_t GetConnected(){ return fConnected; }
72 AliRieman* GetRieman(){ return fRieman; }
5a1436d6 73
a189470c 74 void DrawRiemanGraph();
75
76 TGraph* GetGraphSelected() { return fGraphSelected; }
77 TGraphErrors* GetGraphFitted() { return fGraphFitted; }
5a1436d6 78
d810d0de 79 ClassDef(AliEveTrackFitter, 0); // Interface to AliRieman fit.
80}; // endclass AliEveTrackFitter
5a1436d6 81
82#endif