]> git.uio.no Git - u/mrichter/AliRoot.git/blob - ITS/AliITSMaterialsTGeo.C
PWGPP-69 - initialize additional dEdx information diring tracking itteration 0 -...
[u/mrichter/AliRoot.git] / ITS / AliITSMaterialsTGeo.C
1 void AliITSMaterialsTGeo(TString gfile="geometry.root"){
2   // Macro to print out the ITS material definitions as found
3   // in the TGeo geometry file.
4
5   // retrives geometry 
6   if(!gGeoManager) gGeoManager = new TGeoManager();
7   TGeoManager::Import(gfile.Data());
8   if (!gGeoManager) {
9     cout<<"geometry not found\n";
10     return;
11   } // end if
12
13   TList *medlist=gGeoManager->GetListOfMedia();
14   TGeoMedium *med;
15   TGeoMaterial *mat;
16   Int_t imed,nmed,i;
17   printf("imed  Id       Med_Name             Mat_Name       ");
18   for(i=0;i<20;i++) printf("   par[%2d]   ",i);
19   printf("\n");
20   imed=0;
21   do{
22     med = (TGeoMedium*)(medlist->At(imed));
23     if(!med) continue;
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();
29     if(mat)
30       printf("%4d %4d %30s %30s",imed,med->GetId(),med->GetName(),mat->GetName());
31     else
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));
34     printf("\n");
35     imed++;
36     }
37   }while(med!=medlist->Last());
38 }