3 #include "TPolyMarker3D.h"
10 // report bug to pierella@bo.infn.it
13 // generate an event with TOF included
16 cerr<<"ROOT TOF Geometry...\n";
17 cerr<<"(TRD and TPC are included)\n";
18 TFile *file=TFile::Open("galice.root");
19 if (!file->IsOpen()) {cerr<<"Can't open galice.root !\n"; return 1;}
21 TCanvas *c1=new TCanvas("ddisplay", "TOF display",0,0,700,730);
22 TView *v=new TView(1);
23 v->SetRange(-430,-560,-430,430,560,1710);
30 //draw TOF with TRD and TPC included
31 TGeometry *geom=(TGeometry*)file->Get("AliceGeom");
32 TList *list = geom->GetListOfNodes();
33 TNode * main = (TNode*)((geom->GetListOfNodes())->First());
34 TIter next(main->GetListOfNodes());
36 while((module = (TNode*)next())) {
38 sprintf(ch,"%s\n",module->GetTitle());
39 //printf("%s\n",module->GetTitle());
40 if ((ch[0]=='F'&&ch[1]=='T' && ch[2]=='O') || (ch[0]=='T'&&ch[1]=='R' && ch[2]=='D') || (ch[0]=='T'&&ch[1]=='P' && ch[2]=='C')){ //if TOF or TPC or TRD draw
41 module->SetVisibility(3);
43 module->SetVisibility(-1);
50 c1->Modified(); c1->Update();
53 // Draw the geometry using the x3d viewver.
57 // once in x3d viewer, type m to see the menu.
58 // For example typing r will show a solid model of this geometry.