Back to home page

EIC code displayed by LXR

 
 

    


File indexing completed on 2025-01-18 09:14:37

0001 #include "TGeoManager.h"
0002 #include "TGeoVolume.h"
0003 
0004 void test_shape()  {
0005   Double_t pars[] = {0,0,0,0,0,0,0,0,0,0,0,0};
0006   TGeoManager*  mgr=new TGeoManager();
0007   TGeoBBox*     world = new TGeoBBox("World",200,200,200);
0008   TGeoMaterial* mat_world = new TGeoMaterial("Air");
0009   TGeoMedium*   med_world = new TGeoMedium("Air",2,mat_world,pars);
0010   TGeoVolume*   vol_world = new TGeoVolume("World",world,med_world);
0011 
0012   //TGeoConeSeg*  tr        = new TGeoConeSeg("Tracker",60,5,60, 5,60, 0,360);
0013   TGeoTubeSeg*  tr        = new TGeoTubeSeg("Tracker",5,60, 60, 0,360);
0014   TGeoMaterial* mat_tr    = new TGeoMaterial("Iron");
0015   TGeoMedium*   med_tr    = new TGeoMedium("Iron",1,mat_tr,pars);
0016   TGeoVolume*   vol_tr    = new TGeoVolume("tracker",tr,med_tr);
0017 
0018   vol_world->AddNode(vol_tr,1);
0019   mgr->SetTopVolume(vol_world);
0020   mgr->CloseGeometry();
0021   vol_world->Draw("ogl");
0022 }
0023