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