]> git.uio.no Git - u/mrichter/AliRoot.git/blame - EVE/alice-macros/track_fitter.C
Modified macros to be compilable by ACLiC
[u/mrichter/AliRoot.git] / EVE / alice-macros / track_fitter.C
CommitLineData
ba978640 1/**************************************************************************
2 * Copyright(c) 1998-2008, ALICE Experiment at CERN, all rights reserved. *
3 * See http://aliceinfo.cern.ch/Offline/AliRoot/License.html for *
4 * full copyright notice. *
5 **************************************************************************/
6
84079bc7 7//
8// Select points from TEvePointSet(clusters, hits, etc.) with Alt+mouse-left
9// click action.
10//
11// In AliEvetrackFitEditor press "Fit" button to make track fit on the
12// selected points. To fit new track, press "Reset".
13
ba978640 14#if !defined(__CINT__) || defined(__MAKECINT__)
15#include <TEveManager.h>
16#include <TEveSelection.h>
17
18#include <EVE/EveBase/AliEveTrackFitter.h>
19#include <EVE/EveBase/AliEveCosmicRayFitter.h>
20#endif
21
84079bc7 22void track_fitter(Int_t mode = 1)
23{
24 gEve->GetSelection()->SetPickToSelect(1);
25 gEve->GetHighlight()->SetPickToSelect(0);
26
27 if (mode == 0)
28 {
29 // helix fit
30 AliEveTrackFitter* t = new AliEveTrackFitter();
31 gEve->AddElement(t);
32 t->Start();
33 }
34 else
35 {
36 // straight line fit
37 AliEveCosmicRayFitter* t = new AliEveCosmicRayFitter();
38 gEve->AddElement(t);
39 t->Start();
40 }
41}