# Problem with MakeCone and CompositeShape

Hello,
I’d like to create a geometry formed by a shape defined by a composite shape : difference between 2 shapes (a rectangle and a cone).

First, I define a makebox and a makecone. Then, I define my composite shape : Rectangle – Cone:translation. Finally I define a volume using the shape built with the composite shape.
My problem is that the cone shape can’t be found, whereas it exits. For prove, if I replace the MakeCone by a MakeTube, the shape is found and the volume created using the composite shape.

So, I’m very surprised, and I’d like to know if there is a problem in my geometry (see below) or if there is a more global problem.

(Version used : ROOT 6.12/04 on MacOs)

Thanks a lot

Julien

void test_root()
{

TString root_file = “TEST” ;
TGeoManager *geom = new TGeoManager (“GeoManager”, “Root_Geometry”) ;

TGeoMaterial* vacuum = new TGeoMaterial (“vacuum”) ;
TGeoMedium * vide = new TGeoMedium (“VIDE”, 1 , vacuum) ;

TGeoTranslation *trsl_1 = new TGeoTranslation (“tr1” , 0.0, 0.0, -21.25/2+2.887/2 ) ;
trsl_1->RegisterYourself() ;

Double_t x_size, y_size, z_size ;
x_size = 21.4 ;
y_size = 21.4 ;
z_size = 21.2 ;
TGeoVolume *rectangle_ext = geom -> MakeBox ( “Rectangle_ext” , vide , x_size/2 , y_size/2 , z_size/2 ) ;

//TGeoVolume *cone_bas = geom -> MakeCone ( “Cone_bas”, vide, 2.887/2, 0.0 , 4.0 , 0.0, 10.0); //NOK
TGeoVolume *cone_bas = geom -> MakeTube ( “Cone_bas”, vide, 0.0, 10.0, 2.887/2); //OK

TString operation_booleenne = “Rectangle_ext - Cone_bas:tr1” ;
TGeoCompositeShape * world_shape = new TGeoCompositeShape( “World_shape”, operation_booleenne) ;
TGeoVolume *world = new TGeoVolume (“World” , world_shape, vide) ;

world->Export(“test.root”) ;
world->Draw();

geom -> SetTopVolume (world) ;
geom->CheckOverlaps(0.0001) ;
geom->PrintOverlaps() ;

}