Geometry for MFT (Brigitte)
[u/mrichter/AliRoot.git] / EVE / alice-macros / esd_V0_points.C
CommitLineData
5f1b6297 1// $Id$
d810d0de 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 **************************************************************************/
5f1b6297 9
ba978640 10#if !defined(__CINT__) || defined(__MAKECINT__)
11#include <TEveManager.h>
12#include <TEvePointSet.h>
13
6c49a8e1 14#include <AliESDEvent.h>
15#include <AliESDv0.h>
16#include <AliEveEventManager.h>
ba978640 17#endif
18
ca8a6926 19void esd_VO_fill_pointset(TEvePointSet* ps, Bool_t onFly)
5f1b6297 20{
d810d0de 21 AliESDEvent* esd = AliEveEventManager::AssertESD();
5f1b6297 22
23 Int_t NV0s = esd->GetNumberOfV0s();
5f1b6297 24
3a60982a 25 Double_t x, y, z;
26 for (Int_t n = 0; n < NV0s; ++n)
84aff7a4 27 {
5f1b6297 28 AliESDv0* av = esd->GetV0(n);
ca8a6926 29 if (av->GetOnFlyStatus() == onFly)
30 {
31 av->GetXYZ(x, y, z);
32 ps->SetNextPoint(x, y, z);
33 ps->SetPointId(av);
34 }
5f1b6297 35 }
ca8a6926 36}
37
38TEvePointSet* esd_V0_points_offline()
39{
40 TEvePointSet* points = new TEvePointSet("V0 offline vertex locations");
5f1b6297 41
ca8a6926 42 esd_VO_fill_pointset(points, kFALSE);
43
44 points->SetTitle(Form("N=%d", points->Size()));
5f1b6297 45 points->SetMarkerStyle(4);
e6e8b28b 46 points->SetMarkerSize(1.5);
fbc350a3 47 points->SetMarkerColor(kOrange+8);
5f1b6297 48
84aff7a4 49 gEve->AddElement(points);
50 gEve->Redraw3D();
5f1b6297 51
52 return points;
53}
ca8a6926 54
55TEvePointSet* esd_V0_points_onfly()
56{
57 TEvePointSet* points = new TEvePointSet("V0 on-the-fly vertex locations");
58
59 esd_VO_fill_pointset(points, kTRUE);
60
61 points->SetTitle(Form("N=%d", points->Size()));
62 points->SetMarkerStyle(4);
e6e8b28b 63 points->SetMarkerSize(1.5);
fbc350a3 64 points->SetMarkerColor(kPink+10);
ca8a6926 65
66 gEve->AddElement(points);
67 gEve->Redraw3D();
68
69 return points;
70}
71
72
73void esd_V0_points()
74{
75 esd_V0_points_offline();
76 esd_V0_points_onfly();
77}