void test() { // load libraries and open the TGeo manager gSystem->Load("libGeom"); TGeoManager *geom = new TGeoManager("ITS", "Simple ITS geometry"); TGeoMaterial *matVacuum = new TGeoMaterial("Vacuum", 0, 0, 0); TGeoMaterial *matAl = new TGeoMaterial("Al", 26.98, 13, 2.7); TGeoMedium *Vacuum = new TGeoMedium("vacuum", 1, matVacuum); TGeoMedium *Al = new TGeoMedium("al", 2, matAl); TGeoVolume *top = geom->MakeBox("CONT", Vacuum, 50.0, 50.0, 50.0); TGeoVolume *box1 = geom->MakeBox("BOX1", Al, 20.0, 20.0, 20.0); TGeoVolume *box2 = geom->MakeBox("BOX2", Al, 20.0, 20.0, 20.0); TGeoTranslation *t1 = new TGeoTranslation(-15.0, -5.0, 0.0); TGeoTranslation *t2 = new TGeoTranslation( 15.0, 5.0, 0.0); box1->SetLineColor(kRed); box2->SetLineColor(kBlue); geom->SetTopVolume(top); top->AddNode(box1, 1, t1); top->AddNode(box2, 2, t2); geom->CloseGeometry(); top->Draw(); geom->CheckOverlaps(0.1, "s"); }