na49view.C

Go to the documentation of this file.
00001 void na49view() {
00002    //
00003    // This macro generates
00004    // a begin_html <a href="gif/na49canvas.gif">Canvas</a> end_html
00005    // with 2 views of the NA49 detector using the old obsolete geometry package.
00006    //Author: Rene Brun
00007    
00008    TCanvas *c1 = new TCanvas("c1","The NA49 canvas",200,10,700,780);
00009 
00010    gBenchmark->Start("na49view");
00011 
00012    TPad *all = new TPad("all","A Global view of NA49",0.02,0.02,0.48,0.82,28);
00013    TPad *tof = new TPad("tof","One Time Of Flight element",0.52,0.02,0.98,0.82,28);
00014    all->Draw();
00015    tof->Draw();
00016    na49title = new TPaveLabel(0.04,0.86,0.96,0.98,"Two views of the NA49 detector");
00017    na49title->SetFillColor(32);
00018    na49title->Draw();
00019    //
00020    TFile *nageom = new TFile("na49.root");
00021    TGeometry *n49 =(TGeometry*)gROOT->FindObject("na49");
00022    n49->SetBomb(1.2);
00023    n49->cd();     //Set current geometry
00024    all->cd();     //Set current pad
00025    n49->Draw();
00026    c1->Update();
00027    tof->cd();
00028    TNode *TOFR1 = n49->GetNode("TOFR1");
00029    TOFR1->Draw();
00030    c1->Update();
00031 
00032    gBenchmark->Show("na49view");
00033 
00034    // To have a better and dynamic view of any of these pads,
00035    // you can click with the middle button of your mouse to select it.
00036    // Then select "View with x3d" in the VIEW menu of the Canvas.
00037    // Once in x3d, you are in wireframe mode by default.
00038    // You can switch to:
00039    //   - Hidden Line mode by typing E
00040    //   - Solid mode by typing R
00041    //   - Wireframe mode by typing W
00042    //   - Stereo mode by clicking S (and you need special glasses)
00043    //   - To leave x3d type Q
00044 }

Generated on Tue Jul 5 15:44:15 2011 for ROOT_528-00b_version by  doxygen 1.5.1