chambers added
authorkir <kir@f7af4fe6-9843-0410-8265-dc069ae4e863>
Fri, 28 May 2004 11:58:58 +0000 (11:58 +0000)
committerkir <kir@f7af4fe6-9843-0410-8265-dc069ae4e863>
Fri, 28 May 2004 11:58:58 +0000 (11:58 +0000)
RICH/Geom.C

index 021e998..f8ca501 100644 (file)
@@ -9,40 +9,56 @@ void Geom()
   
   new TGeoManager("ALICE-RICH-GM", "ALICE-RICH geometry");
   
-  TGeoMedium *pVacuum  =new TGeoMedium("Vacuum",  1,new TGeoMaterial("Vacuum",  a=0,z=0,den=0));
-  TGeoMedium *pNeoceram=new TGeoMedium("Neoceram",1,new TGeoMaterial("Neoceram",a=0,z=0,den=0));
-  TGeoMedium *pSiO2    =new TGeoMedium("SiO2",    1,new TGeoMaterial("SiO2",    a=0,z=0,den=0));
-  TGeoMedium *pC6F14   =new TGeoMedium("C6F14",   1,new TGeoMaterial("C6F14",   a=0,z=0,den=0));
+  TGeoMedium *pAir      =new TGeoMedium("Air"   ,  1,gGeoManager->GetMaterial("Air"));
+  TGeoMedium *pNeoceram =new TGeoMedium("Neoceram",1,new TGeoMaterial("Neoceram",a=0,z=0,den=0));
+  TGeoMedium *pSiO2     =new TGeoMedium("SiO2",    1,new TGeoMaterial("SiO2",    a=0,z=0,den=0));
+  TGeoMedium *pC6F14    =new TGeoMedium("C6F14",   1,new TGeoMaterial("C6F14",   a=0,z=0,den=0));
+  TGeoMedium *pCH4      =new TGeoMedium("CH4",     1,new TGeoMaterial("CH4",     a=0,z=0,den=0));
 
-  TGeoVolume *pMother=gGeoManager->MakeBox("MOTHER",pVacuum,dx=1000,dy=1000,dz=3000);
+  TGeoVolume *pMother=gGeoManager->MakeBox("ALICE",pAir,dx=10*m/2,dy=10*m/2,dz=30*m/2);
   
-  
-  TGeoVolume *pRadiator =gGeoManager->MakeBox("Radiator" ,pC6F14,   dx=413*mm/2,dy=1330*mm/2,dz=24*mm/2);  
-  TGeoVolume *pRadBack  =gGeoManager->MakeBox("RadBack"  ,pNeoceram,dx=413*mm/2,dy=1330*mm/2,dz= 4*mm/2);pRadBack->SetLineColor(kRed);
-  TGeoVolume *pRadLong  =gGeoManager->MakeBox("RadLong"  ,pNeoceram,dx=  5*mm/2,dy=1330*mm/2,dz=15*mm/2);pRadLong->SetLineColor(kGreen);
-  TGeoVolume *pRadShort =gGeoManager->MakeBox("RadShort" ,pNeoceram,dx=403*mm/2,dy=   5*mm/2,dz=15*mm/2);pRadShort->SetLineColor(kGreen);
-  TGeoVolume *pRadWin   =gGeoManager->MakeBox("RadWin"   ,pSiO2,    dx=413*mm/2,dy=1330*mm/2,dz= 5*mm/2);pRadWin ->SetLineColor(kBlue);
-  TGeoVolume *pRadSpacer=gGeoManager->MakeTube("RadSpacer",pSiO2,   rmin=0,rmax=10*mm/2,dz= 15*mm/2);pRadSpacer ->SetLineColor(kYellow);
-  pRadiator->AddNode(pRadBack,copy=1,new TGeoTranslation(0,0,-10.0*mm));
-  pRadiator->AddNode(pRadWin ,copy=1,new TGeoTranslation(0,0,  9.5*mm));
-  pRadiator->AddNode(pRadLong,copy=1,new TGeoTranslation(-403*mm/2-2.5*mm,0,0));
-  pRadiator->AddNode(pRadLong,copy=2,new TGeoTranslation( 403*mm/2+2.5*mm,0,0));
-  pRadiator->AddNode(pRadShort,copy=1,new TGeoTranslation(0,-1330*mm/2+5*mm/2     ,0));
-  pRadiator->AddNode(pRadShort,copy=2,new TGeoTranslation(0,-1330*mm/2+5*mm+5*mm/2,0));
-  pRadiator->AddNode(pRadShort,copy=3,new TGeoTranslation(0, 1330*mm/2-5*mm-5*mm/2,0));
-  pRadiator->AddNode(pRadShort,copy=4,new TGeoTranslation(0, 1330*mm/2-5*mm/2     ,0));
+  TGeoVolume *pRICH     =gGeoManager->MakeBox( "RICH" ,pCH4,   dx=2*m/2,dy=2*m/2,dz=10*cm/2);      
+  TGeoVolume *pRad      =gGeoManager->MakeBox( "RICH radiator" ,pC6F14,   dx=413*mm/2,dy=1330*mm/2,dz=24*mm/2);  
+  TGeoVolume *pRadBack  =gGeoManager->MakeBox( "RadBack"  ,pNeoceram,dx=413*mm/2,dy=1330*mm/2,dz= 4*mm/2);pRadBack   ->SetLineColor(kRed);
+  TGeoVolume *pRadLong  =gGeoManager->MakeBox( "RadLong"  ,pNeoceram,dx=  5*mm/2,dy=1330*mm/2,dz=15*mm/2);pRadLong   ->SetLineColor(kGreen);
+  TGeoVolume *pRadShort =gGeoManager->MakeBox( "RadShort" ,pNeoceram,dx=403*mm/2,dy=   5*mm/2,dz=15*mm/2);pRadShort  ->SetLineColor(kGreen);
+  TGeoVolume *pRadWin   =gGeoManager->MakeBox( "RadWin"   ,pSiO2,    dx=413*mm/2,dy=1330*mm/2,dz= 5*mm/2);pRadWin    ->SetLineColor(kBlue);
+  TGeoVolume *pRadSpacer=gGeoManager->MakeTube("RadSpacer",pSiO2,   rmin=0,rmax=10*mm/2,dz= 15*mm/2);    pRadSpacer ->SetLineColor(kYellow);
+//Nodes  
+  pRad->AddNode(pRadBack,copy=1,new TGeoTranslation(0,0,-10.0*mm));
+  pRad->AddNode(pRadWin ,copy=1,new TGeoTranslation(0,0,  9.5*mm));
+  pRad->AddNode(pRadLong,copy=1,new TGeoTranslation(-403*mm/2-2.5*mm,0,0));
+  pRad->AddNode(pRadLong,copy=2,new TGeoTranslation( 403*mm/2+2.5*mm,0,0));
+  pRad->AddNode(pRadShort,copy=1,new TGeoTranslation(0,-1330*mm/2+5*mm/2     ,0));
+  pRad->AddNode(pRadShort,copy=2,new TGeoTranslation(0,-1330*mm/2+5*mm+5*mm/2,0));
+  pRad->AddNode(pRadShort,copy=3,new TGeoTranslation(0, 1330*mm/2-5*mm-5*mm/2,0));
+  pRad->AddNode(pRadShort,copy=4,new TGeoTranslation(0, 1330*mm/2-5*mm/2     ,0));
   
   for(int i=-1;i<=1;i++)
     for(int j=0;j<10;j++)
-      pRadiator->AddNode(pRadSpacer,copy=j+1,new TGeoTranslation(i*105*mm,-1330*mm/2+116*mm+j*122*mm,0));
+      pRad->AddNode(pRadSpacer,copy=i+j+1,new TGeoTranslation(i*105*mm,-1330*mm/2+116*mm+j*122*mm,0));
+  
+  AliRICHParam *pPar=new AliRICHParam;
+  
+  for(copy=1;copy<=7;copy++)  
+    pMother->AddNode(pRICH,copy,new TGeoTranslation(pPar->C(copy)->X(),pPar->C(copy)->Y(),pPar->C(copy)->Z()));
+  
+  pRICH->AddNode(pRad,copy=1,new TGeoTranslation(-(413*mm+25*mm),0,-12*mm));//out sourface of quartz window at z=0
+  pRICH->AddNode(pRad,copy=2,new TGeoTranslation(  0            ,0,-12*mm));
+  pRICH->AddNode(pRad,copy=3,new TGeoTranslation(  413*mm+25*mm ,0,-12*mm));
   
+//Closing and drawing  
+  gGeoManager->SetTopVolume(pMother); 
+  gGeoManager->CloseGeometry();     
+  gGeoManager->SetVisOption(0);   
+  gGeoManager->GetMasterVolume()->Draw();  
+//axises  
+  Double_t X[6]={0,0,0,300,0,0};  Double_t Y[6]={0,0,0,0,300,0};  Double_t Z[6]={0,0,0,0,0,300};  
+  TPolyLine3D *pXaxis=new TPolyLine3D(2,X);pXaxis->SetLineColor(kRed);   pXaxis->Draw();
+  TPolyLine3D *pYaxis=new TPolyLine3D(2,Y);pYaxis->SetLineColor(kGreen); pYaxis->Draw();
+  TPolyLine3D *pZaxis=new TPolyLine3D(2,Z);pZaxis->SetLineColor(kBlue);  pZaxis->Draw();  
   
-  pMother->AddNode(pRadiator,copy=1,new TGeoTranslation(-60*cm,0,-12*mm));//out sourface of quartz window at z=0
-  pMother->AddNode(pRadiator,copy=2,new TGeoTranslation(  0   ,0,-12*mm));
-  pMother->AddNode(pRadiator,copy=3,new TGeoTranslation( 60*cm,0,-12*mm));
-  gGeoManager->SetTopVolume(pMother);  
-  gGeoManager->CloseGeometry();   
-  pMother->Draw();
+  gPad->GetView()->RotateView(270,30);
   new TBrowser;
 }//Geom()