1 void AliITSMaterialsTGeo(TString gfile="geometry.root"){
2 // Macro to print out the ITS material definitions as found
3 // in the TGeo geometry file.
6 if(!gGeoManager) gGeoManager = new TGeoManager();
7 TGeoManager::Import(gfile.Data());
9 cout<<"geometry not found\n";
13 TList *medlist=gGeoManager->GetListOfMedia();
17 printf("imed Id Med_Name Mat_Name ");
18 for(i=0;i<20;i++) printf(" par[%2d] ",i);
22 med = (TGeoMedium*)(medlist->At(imed));
24 /*if((((med->GetName())[0]=='I')&& // Only ITS.
25 ((med->GetName())[1]=='T')&&
26 ((med->GetName())[2]=='S')&&
27 ((med->GetName())[3]=='_')))*/{
28 mat = med->GetMaterial();
30 printf("%4d %4d %30s %30s",imed,med->GetId(),med->GetName(),mat->GetName());
32 printf("%4d %4d %30s %30s",imed,med->GetId(),med->GetName(),"No Material");
33 for(i=0;i<20;i++) printf(" %12g",med->GetParam(i));
37 }while(med!=medlist->Last());