]> git.uio.no Git - u/mrichter/AliRoot.git/commitdiff
RichMenu modified to switch between aligned and misaligned geometry
authordibari <dibari@f7af4fe6-9843-0410-8265-dc069ae4e863>
Wed, 24 May 2006 10:16:16 +0000 (10:16 +0000)
committerdibari <dibari@f7af4fe6-9843-0410-8265-dc069ae4e863>
Wed, 24 May 2006 10:16:16 +0000 (10:16 +0000)
RICH/RichMenu.C

index 496d01794494ef0c3648806b58503c4c944ff2a9..e5dd1573d60acd0b1630e228f2d87e11f31b2c28 100644 (file)
@@ -23,11 +23,23 @@ Bool_t AliceRead()
     if(!gAlice) Fatal("menu.C::ReadAlice","No gAlice in file");
     a=al->GetAliRun();//provides pointer to AliRun object
     Info("AliceRead","Run contains %i event(s)",a->GetEventsPerRun());      
     if(!gAlice) Fatal("menu.C::ReadAlice","No gAlice in file");
     a=al->GetAliRun();//provides pointer to AliRun object
     Info("AliceRead","Run contains %i event(s)",a->GetEventsPerRun());      
+    GeomAlign(kTRUE);
     RichGet();
     return kTRUE;   //old session opened from file
   }        
 }//AliceRead()
 //__________________________________________________________________________________________________
     RichGet();
     return kTRUE;   //old session opened from file
   }        
 }//AliceRead()
 //__________________________________________________________________________________________________
+void GeomAlign(Bool_t isAlign)
+{
+  if(gGeoManager) delete gGeoManager;
+  if(AliRICHParam::Instance()) delete AliRICHParam::Instance();
+  if(isAlign) 
+    TGeoManager::Import("geometry.root");
+  else
+    TGeoManager::Import("misaligned_geometry.root");
+  AliRICHParam::Instance();
+}
+//__________________________________________________________________________________________________
 void AliceNew()
 {
   Info("AliceNew","Init new session");
 void AliceNew()
 {
   Info("AliceNew","Init new session");
@@ -46,6 +58,8 @@ void RichMenu()
   TControlBar *pMenu = new TControlBar("vertical","MAIN");
        
   if(AliceRead()){//it's from file, show some info
   TControlBar *pMenu = new TControlBar("vertical","MAIN");
        
   if(AliceRead()){//it's from file, show some info
+    pMenu->AddButton("Geometry Align OK      "         ,"GeomAlign(kTRUE);"  , "Ideal Geometry Aligned");
+    pMenu->AddButton("Geometry MisAligned SET"         ,"GeomAlign(kFALSE);"  , "Misaligned Geometry SET");
     pMenu->AddButton("Display single chambers"         ,"r->Display();"  , "Display Fast");
     pMenu->AddButton("Display ALL chambers"            ,"r->DisplayEvent(0,0);"  , "Display Fast");
     pMenu->AddButton("Recon with stack"                ,"AliRICHReconstructor::CheckPR(        )","Create RSR.root with ntuple hn");    
     pMenu->AddButton("Display single chambers"         ,"r->Display();"  , "Display Fast");
     pMenu->AddButton("Display ALL chambers"            ,"r->DisplayEvent(0,0);"  , "Display Fast");
     pMenu->AddButton("Recon with stack"                ,"AliRICHReconstructor::CheckPR(        )","Create RSR.root with ntuple hn");