Geometry for MFT (Brigitte)
[u/mrichter/AliRoot.git] / EVE / alice-macros / esd_cascade_points.C
1 // $Id$
2
3 /**************************************************************************
4  * Copyright(c) 1998-2008, ALICE Experiment at CERN, all rights reserved. *
5  * See http://aliceinfo.cern.ch/Offline/AliRoot/License.html for          *
6  * full copyright notice.                                                 *
7  **************************************************************************/
8 #if !defined(__CINT__) || defined(__MAKECINT__)
9 #include <TEveManager.h>
10 #include <TEvePointSet.h>
11
12 #include <AliESDEvent.h>
13 #include <AliESDcascade.h>
14 #include <AliRunLoader.h>
15 #include <AliEveEventManager.h>
16 #endif
17
18 void esd_cascade_fill_pointset(TEvePointSet* ps)
19 {
20   AliESDEvent* esd = AliEveEventManager::AssertESD();
21
22   Int_t NCascades = esd->GetNumberOfCascades();
23
24   Double_t x, y, z;
25   for (Int_t n = 0; n < NCascades; ++n)
26   {
27     AliESDcascade* av = esd->GetCascade(n);
28     av->GetXYZcascade(x, y, z);
29     ps->SetNextPoint(x, y, z);
30     ps->SetPointId(av);
31   }
32 }
33
34 TEvePointSet* esd_cascade_points()
35 {
36   TEvePointSet* points = new TEvePointSet("Cascade vertex locations");
37
38   esd_cascade_fill_pointset(points);
39
40   points->SetTitle(Form("N=%d", points->Size()));
41   points->SetMarkerStyle(4);
42   points->SetMarkerSize(1.5);
43   points->SetMarkerColor(kMagenta-9);
44
45   gEve->AddElement(points);
46   gEve->Redraw3D();
47
48   return points;
49 }