void test2() { // Mirror parameters const Double_t kR1 = 1363; const Double_t kRad = 425; const Double_t kR2 = 1363+8; TGeoManager* manager = new TGeoManager("manager", "test"); // Make the world TGeoBBox* box1 = new TGeoBBox("box1", 2000, 2000, 2000); TGeoVolume *top = new TGeoVolume("top", box1); manager->SetTopVolume(top); // Mirror Double_t r = kR2*TMath::Tan(TMath::ASin(kRad/kR1)); Double_t deg2rad = TMath::Pi()/180; TGeoArb8* cut = new TGeoArb8("cut", kR2/2.); for(Int_t i=0; iSetVertex(i, 0, 0); cut->SetVertex(4, r*TMath::Cos(60*deg2rad), r*TMath::Sin(60*deg2rad)); cut->SetVertex(5, r*TMath::Cos(-8.6*deg2rad), r*TMath::Sin(-8.6*deg2rad)); cut->SetVertex(6, r*TMath::Cos(188.6*deg2rad), r*TMath::Sin(188.6*deg2rad)); cut->SetVertex(7, r*TMath::Cos(120*deg2rad), r*TMath::Sin(120*deg2rad)); TGeoSphere* mirSph = new TGeoSphere("mirSph", kR1, kR2, 0, TMath::ASin(kRad/kR1)/deg2rad); TGeoTranslation* tr = new TGeoTranslation("tr", 0, 0, kR2/2.); tr->RegisterYourself(); TGeoCompositeShape* mirSphCut = new TGeoCompositeShape("cs", "mirSph*(cut:tr)"); TGeoVolume* mirror = new TGeoVolume("mirror", mirSphCut); top->AddNode(mirror, 1); manager->CloseGeometry(); top->Draw(); }