]> git.uio.no Git - u/mrichter/AliRoot.git/blob - EVE/alice-macros/esd_cascade_points.C
Clarify cluster loop. Add check for cluster being 0 (seen in online reco-viz).
[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
9 void esd_cascade_fill_pointset(TEvePointSet* ps)
10 {
11   AliESDEvent* esd = AliEveEventManager::AssertESD();
12
13   Int_t NCascades = esd->GetNumberOfCascades();
14
15   Double_t x, y, z;
16   for (Int_t n = 0; n < NCascades; ++n)
17   {
18     AliESDcascade* av = esd->GetCascade(n);
19     av->GetXYZcascade(x, y, z);
20     ps->SetNextPoint(x, y, z);
21     ps->SetPointId(av);
22   }
23 }
24
25 TEvePointSet* esd_cascade_points()
26 {
27   TEvePointSet* points = new TEvePointSet("Cascade vertex locations");
28
29   esd_cascade_fill_pointset(points);
30
31   points->SetTitle(Form("N=%d", points->Size()));
32   points->SetMarkerStyle(4);
33   points->SetMarkerSize(1.5);
34   points->SetMarkerColor(kMagenta-9);
35
36   gEve->AddElement(points);
37   gEve->Redraw3D();
38
39   return points;
40 }