]> git.uio.no Git - u/mrichter/AliRoot.git/blob - TPC/macros/tpc_tracks.C
Possibility to getthe data from zip file
[u/mrichter/AliRoot.git] / TPC / macros / tpc_tracks.C
1
2 class TEveProjectionManager;
3 class TEveGeoShape;
4 class TEveElement;
5 class TEveElementList;
6
7 TEveProjectionManager  * proj = 0;
8 TEveGeoShape * geom = 0;
9
10 void tpc_tracks(const char *input=0)
11 {
12   //
13   //
14   //
15   if (input){
16     TString ipath(input);
17     if (ipath.Contains(".zip")){
18       char command[1000];
19       sprintf(command,"xrdcp %s in.zip",input);
20       gSystem->Exec(command);
21       gSystem->Exec("unzip in.zip");
22     }
23   }
24
25   TEveUtil::LoadMacro("alieve_init.C");
26   alieve_init(".", -1);
27
28   TEveUtil::LoadMacro("geom_gentle.C");
29
30   TEveUtil::LoadMacro("primary_vertex.C");
31   TEveUtil::LoadMacro("esd_tracks.C");
32   TEveUtil::LoadMacro("its_clusters.C+");
33   TEveUtil::LoadMacro("tpc_clusters.C+");
34
35   TEveViewer* nv = gEve->SpawnNewViewer("NLT Projected");
36   TEveScene*  ns = gEve->SpawnNewScene("NLT"); 
37   nv->AddScene(ns);
38   TGLViewer* v = nv->GetGLViewer();
39   v->SetCurrentCamera(TGLViewer::kCameraOrthoXOY);
40   TGLCameraMarkupStyle* mup = v->GetCameraMarkup();
41   if(mup) mup->SetShow(kFALSE);
42
43   TEveTrackCounter* g_trkcnt = new TEveTrackCounter("Primary Counter");
44   gEve->AddToListTree(g_trkcnt, kFALSE);
45
46   TEveProjectionManager* p = new TEveProjectionManager; proj = p;
47   gEve->AddToListTree(p, kTRUE);
48   gEve->AddElement(proj, ns);
49
50   // geometry
51   TEveGeoShape* gg = geom_gentle();
52   geom = gg;
53
54   // event
55   gEvent->AddNewEventCommand("on_new_event();");
56   gEvent->GotoEvent(0);
57
58   gEve->Redraw3D(kTRUE);
59 }
60
61 /**************************************************************************/
62
63 void on_new_event()
64 {
65   try {
66     //TEvePointSet* itsc = its_clusters();
67     //itsc->SetMarkerColor(5);
68
69     TEvePointSet* tpcc = tpc_clusters();
70     tpcc->SetMarkerColor(4);
71   }
72   catch(TEveException& exc) {
73     printf("Exception loading ITS/TPC clusters: %s\n", exc.Data());
74   }
75
76   TEveTrackList* cont = esd_tracks();
77   cont->SetLineWidth((Width_t)2);
78
79   TEveElement* top = gEve->GetCurrentEvent();
80   proj->DestroyElements();
81   //AliESDEvent* esd = AliEveEventManager::AssertESD();
82
83   // geom
84   proj->ImportElements(geom);
85   // event
86   proj->ImportElements(top);
87   // top->SetRnrState(kFALSE);
88 }