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