]> git.uio.no Git - u/mrichter/AliRoot.git/blob - EVE/alice-macros/esd_kink_points.C
change eve redraw while processing event
[u/mrichter/AliRoot.git] / EVE / alice-macros / esd_kink_points.C
1 // $Id$
2 // Main authors: Paraskevi Ganoti: 2009
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          *
7  * full copyright notice.                                                 *
8  **************************************************************************/
9
10 void esd_kink_fill_pointset(TEvePointSet* ps)
11 {
12   AliESDEvent* esd = AliEveEventManager::AssertESD();
13
14   for (Int_t n=0; n<esd->GetNumberOfTracks(); ++n)
15   { 
16       AliESDtrack* track = esd->GetTrack(n);
17       if(track->GetKinkIndex(0)<0){
18     
19           AliESDkink *kink = esd->GetKink(TMath::Abs(track->GetKinkIndex(0))-1);
20           const TVector3 Position(kink->GetPosition());
21           ps->SetNextPoint(Position.X(), Position.Y(), Position.Z());
22           ps->SetPointId(kink);
23       }
24   }
25
26 }
27
28 TEvePointSet* esd_kink_points()
29 {
30   TEvePointSet* points = new TEvePointSet("Kink vertex locations");
31
32   esd_kink_fill_pointset(points);
33
34   points->SetTitle(Form("N=%d", points->Size()));
35   points->SetMarkerStyle(4);
36   points->SetMarkerSize(1.5);
37   points->SetMarkerColor(kOrange+8);
38
39   gEve->AddElement(points);
40   gEve->Redraw3D();
41
42   return points;
43 }