To draw the geometry on Canvas I tried in the following way:
root> c1 = new TCanvas("c1","view configuration",200,10,700,500)
root> .x mygeom.C
root> mygeom.Draw()
root> c1->Update()
In some reason it does not show any geometry configuration. Just vacant
canvas appears. Do anyone have any suggestion? I will appreciate a lot!
--- Thanks, Jayoung
p.s. Just for reference I attached "mygeom.C" here. ============================================================= void mygeom() { // // This file has been generated automatically via the root // utility g2root from an interactive version of GEANT // (see ROOT class TGeometry header for an example of use) // TMaterial *mat; TMixture *mix; TRotMatrix *rot; TNode *Node, *Node1;
TGeometry *mygeom = new TGeometry("mygeom","mygeom.C");
//-----------List of Materials and Mixtures--------------
mat = new TMaterial("mat1","HYDROGEN",1.01,1,.0708); mat = new TMaterial("mat2","DEUTERIUM",2.01,1,.162); mat = new TMaterial("mat3","HELIUM",4,2,.125); mat = new TMaterial("mat4","LITHIUM",6.94,3,.534); mat = new TMaterial("mat5","BERILLIUM",9.01,4,1.848); mat = new TMaterial("mat6","CARBON",12.01,6,2.265); mat = new TMaterial("mat7","NITROGEN",14.01,7,.808); mat = new TMaterial("mat8","NEON",20.18,10,1.207); mat = new TMaterial("mat9","ALUMINIUM",26.97999,13,2.7); mat = new TMaterial("mat10","IRON",55.84999,26,7.869999); mat = new TMaterial("mat11","COPPER",63.54,29,8.96); mat = new TMaterial("mat12","TUNGSTEN",183.85,74,19.29999); mat = new TMaterial("mat13","LEAD",207.19,82,11.35); mat = new TMaterial("mat14","URANIUM",238.0299,92,18.95); mat = new TMaterial("mat15","AIR",14.60999,7.3,.001205); mat = new TMaterial("mat16","VACUUM",0,0,0); mix = new TMixture("mix22","BGO",3); mix->DefineElement(0,208.9799,83,.6710563); mix->DefineElement(1,72.58999,32,.1748205); mix->DefineElement(2,15.99899,8,.1541233); at = new TMaterial("mat23","SCINTILLATOR",20,10,1.031999);
//-----------List of Rotation matrices--------------
//-----------List of Volumes--------------
TBRIK *ROOT = new TBRIK("ROOT","ROOT","mat15",100,100,100); TBRIK *BGOL = new TBRIK("BGOL","BGOL","mix22",25,25,1.25); TBRIK *BGEL = new TBRIK("BGEL","BGEL","mix22",25,25,1.25); TBRIK *SCN1 = new TBRIK("SCN1","SCN1","mat23",25,25,1); TBRIK *BGOX = new TBRIK("BGOX","BGOX","mix22",12.5,25,1.25); TBRIK *XBGO = new TBRIK("XBGO","XBGO","mix22",12.5,1.25,1.25); TBRIK *BGOY = new TBRIK("BGOY","BGOY","mix22",25,12.5,1.25); TBRIK *YBGO = new TBRIK("YBGO","YBGO","mix22",1.25,12.5,1.25); TBRIK *S1AB = new TBRIK("S1AB","S1AB","mat23",25,25,.5);
//-----------List of Nodes--------------
Node1 = new TNode("ROOT1","ROOT1","ROOT"); Node1->cd(); Node = new TNode("SCN11","SCN11","SCN1",0,0,31,""); Node = new TNode("BGOL1","BGOL1","BGOL",0,0,-1.25,""); Node = new TNode("BGEL1","BGEL1","BGEL",0,0,-3.75,""); Node = new TNode("BGOL2","BGOL2","BGOL",0,0,-6.25,""); Node = new TNode("BGEL2","BGEL2","BGEL",0,0,-8.75,""); Node = new TNode("BGOL3","BGOL3","BGOL",0,0,-11.25,""); Node = new TNode("BGEL3","BGEL3","BGEL",0,0,-13.75,""); Node = new TNode("BGOL4","BGOL4","BGOL",0,0,-16.25,""); Node = new TNode("BGEL4","BGEL4","BGEL",0,0,-18.75,""); Node = new TNode("BGOL5","BGOL5","BGOL",0,0,-21.25,""); Node = new TNode("BGEL5","BGEL5","BGEL",0,0,-23.75,""); Node = new TNode("BGOL6","BGOL6","BGOL",0,0,-26.25,""); Node = new TNode("BGEL6","BGEL6","BGEL",0,0,-28.75,""); Node = new TNode("BGOL7","BGOL7","BGOL",0,0,-31.25,""); Node = new TNode("BGEL7","BGEL7","BGEL",0,0,-33.75,""); Node = new TNode("BGOL8","BGOL8","BGOL",0,0,-36.25,""); Node = new TNode("BGEL8","BGEL8","BGEL",0,0,-38.75,""); Node = new TNode("BGOL9","BGOL9","BGOL",0,0,-41.25,""); Node = new TNode("BGEL9","BGEL9","BGEL",0,0,-43.75,""); Node = new TNode("BGOL10","BGOL10","BGOL",0,0,-46.25,""); Node = new TNode("BGEL10","BGEL10","BGEL",0,0,-48.75,""); Node = new TNode("BGOL11","BGOL11","BGOL",0,0,-51.25,""); Node = new TNode("BGEL11","BGEL11","BGEL",0,0,-53.75,""); Node = new TNode("BGOL12","BGOL12","BGOL",0,0,-56.25,""); Node = new TNode("BGEL12","BGEL12","BGEL",0,0,-58.75,""); Node = new TNode("BGOL13","BGOL13","BGOL",0,0,-61.25,""); Node = new TNode("BGEL13","BGEL13","BGEL",0,0,-63.75,""); Node = new TNode("BGOL14","BGOL14","BGOL",0,0,-66.25,""); Node = new TNode("BGEL14","BGEL14","BGEL",0,0,-68.75,""); Node = new TNode("BGOL15","BGOL15","BGOL",0,0,-71.25,""); Node = new TNode("BGEL15","BGEL15","BGEL",0,0,-73.75,""); }