AliRICHTresholdMap removed, ne implimentation ealier in AliRICHParam
authorkir <kir@f7af4fe6-9843-0410-8265-dc069ae4e863>
Mon, 10 Nov 2003 15:24:27 +0000 (15:24 +0000)
committerkir <kir@f7af4fe6-9843-0410-8265-dc069ae4e863>
Mon, 10 Nov 2003 15:24:27 +0000 (15:24 +0000)
RICH/AliRICHTresholdMap.cxx [deleted file]
RICH/AliRICHTresholdMap.h [deleted file]
RICH/RICHLinkDef.h
RICH/libRICH.pkg
RICH/menu.C

diff --git a/RICH/AliRICHTresholdMap.cxx b/RICH/AliRICHTresholdMap.cxx
deleted file mode 100644 (file)
index c018f1d..0000000
+++ /dev/null
@@ -1,142 +0,0 @@
-/**************************************************************************
- * Copyright(c) 1998-1999, ALICE Experiment at CERN, All rights reserved. *
- *                                                                        *
- * Author: The ALICE Off-line Project.                                    *
- * Contributors are mentioned in the code where appropriate.              *
- *                                                                        *
- * Permission to use, copy, modify and distribute this software and its   *
- * documentation strictly for non-commercial purposes is hereby granted   *
- * without fee, provided that the above copyright notice appears in all   *
- * copies and that both the copyright notice and this permission notice   *
- * appear in the supporting documentation. The authors make no claims     *
- * about the suitability of this software for any purpose. It is          *
- * provided "as is" without express or implied warranty.                  *
- **************************************************************************/
-
-
-
-#include "AliRICHTresholdMap.h"
-#include "AliSegmentation.h"
-
-#include <TObjArray.h>
-#include <TMath.h>
-
-ClassImp(AliRICHTresholdMap)
-
-
-AliRICHTresholdMap::AliRICHTresholdMap(AliSegmentation *seg)
-{
-
-// Constructor for AliRICHTresholdMap
-
-    fSegmentation = seg;
-    fNpx  = fSegmentation->Npx();
-    fNpy  = fSegmentation->Npy();
-    fMaxIndex=2*(fNpx+1)*2*(fNpy+1)+2*fNpy;
-    
-    fHitMap = new Int_t[fMaxIndex];
-    Clear();
-}
-
-
-AliRICHTresholdMap::~AliRICHTresholdMap()
-{
-// Destructor
-//    if (fDigits) delete   fDigits;
-    if (fHitMap) delete[] fHitMap;
-}
-
-void AliRICHTresholdMap::Clear(const char */*opt*/)
-{
-
-// Clear contents of hit map
-
-    memset(fHitMap,0,sizeof(int)*fMaxIndex);
-}
-
-Int_t AliRICHTresholdMap::CheckedIndex(Int_t ix, Int_t iy) const
-{
-
-// Check if index is valid
-
-    Int_t index=2*fNpy*(ix+fNpx)+(iy+fNpy);
-    if (index > fMaxIndex) {
-       printf("\n \n \n Try to read/write outside array !!!! \n \n %d %d %d %d %d %d",ix,iy, fMaxIndex, index, fNpx, fNpy);
-       return  fMaxIndex-1;
-    } else {
-       return index;
-    }
-}
-
-       
-void  AliRICHTresholdMap::FillHits()
-{
-
-// Dummy
-}
-
-
-void  AliRICHTresholdMap::SetHit(Int_t ix, Int_t iy, Int_t charge)
-{
-//
-// Set current hit
-//    fHitMap[kMaxNpady*(ix+fNpx)+(iy+fNpy)]=idigit+1;
-
-     fHitMap[CheckedIndex(ix, iy)]=charge;
-}
-
-void AliRICHTresholdMap::DeleteHit(Int_t ix, Int_t iy)
-{
-// Delete hit
-//
-//    fHitMap[kMaxNpady*(ix+fNpx)+(iy+fNpy)]=0;
-    fHitMap[CheckedIndex(ix, iy)]=0;
-}
-
-void AliRICHTresholdMap::FlagHit(Int_t ix, Int_t iy)
-{
-//
-// Flag hit
-
-    fHitMap[CheckedIndex(ix, iy)]=
-       -TMath::Abs(fHitMap[CheckedIndex(ix, iy)]);
-}
-
-Int_t AliRICHTresholdMap::GetHitIndex(Int_t ix, Int_t iy) const
-{
-
-// Return hit coordinates from index
-
-  //printf("ix:%d, iy:%d, index:%d\n",ix,iy,CheckedIndex(ix, iy));
-   
-  return TMath::Abs(fHitMap[CheckedIndex(ix, iy)]);
-    
-}
-
-TObject* AliRICHTresholdMap::GetHit(Int_t ix, Int_t iy) const
-{
-
-// Return index from coordinates
-
-    Int_t index=GetHitIndex(ix,iy);
-    if (index>0)
-      return((TObject*) index);
-    else
-      return((TObject*) 0);
-}
-
-FlagType AliRICHTresholdMap::TestHit(Int_t ix, Int_t iy)
-{
-
-// Is there a hit?
-
-    Int_t inf=fHitMap[CheckedIndex(ix, iy)];
-    if (inf < 0) {
-       return kUsed;
-    } else if (inf == 0) {
-       return kEmpty;
-    } else {
-       return kUnused;
-    }
-}
-
diff --git a/RICH/AliRICHTresholdMap.h b/RICH/AliRICHTresholdMap.h
deleted file mode 100644 (file)
index 5efc312..0000000
+++ /dev/null
@@ -1,52 +0,0 @@
-#ifndef ALIRICHTRESHOLDMAP_H
-#define ALIRICHTRESHOLDMAP_H
-
-
-/* Copyright(c) 1998-1999, ALICE Experiment at CERN, All rights reserved. *
- * See cxx source for full Copyright notice                               */
-
-/* 
-$Id$ 
-*/
-
-#include "AliHitMap.h"
-
-class  TObjArray;
-class  AliSegmentation;
-
-
-class AliRICHTresholdMap : public AliHitMap 
-{
-    
- public:
-  
-  AliRICHTresholdMap(AliSegmentation *seg);
-  AliRICHTresholdMap() {fSegmentation = 0; fHitMap=0;}
-  virtual ~AliRICHTresholdMap();
-  virtual  void    FillHits();
-  virtual  void    Clear(const char *opt = "");    
-  virtual  void    SetHit(Int_t ix, Int_t iy, Int_t idigit);
-  virtual  void    DeleteHit(Int_t ix, Int_t iy);
-  virtual Int_t    GetHitIndex(Int_t ix, Int_t iy) const;
-  virtual TObject* GetHit(Int_t ix, Int_t iy) const;
-  virtual  void    FlagHit(Int_t ix, Int_t iy);
-  virtual  Bool_t  ValidateHit(Int_t,Int_t) {return 1;}
-  virtual FlagType TestHit(Int_t ix, Int_t iy);
- private:
-  Int_t CheckedIndex(Int_t ix, Int_t iy) const;
-  
- private:
-  AliSegmentation     *fSegmentation;                    //Segmentation model
-  Int_t fNpx;                                            //Pads in x
-  Int_t fNpy;                                            //Pads in y
-  Int_t *fHitMap;                                        // !
-  Int_t fMaxIndex;                                       //Index size
-
-  ClassDef(AliRICHTresholdMap,2) // Implements Treshold Map as a 2-dim array
-};
-#endif 
-
-
-
-
-
index d87945a..865cae0 100644 (file)
@@ -20,7 +20,6 @@
 #pragma link C++ class  AliRICHPoints+;
 #pragma link C++ class  AliRICHDisplay+;
 #pragma link C++ class  AliRICHMap+;
-#pragma link C++ class  AliRICHTresholdMap+;
 #pragma link C++ class  AliRICHClusterFinder+;
 #pragma link C++ class  AliRICHRecon+;
 #pragma link C++ class  AliRICHDigitizer+;
index ed2168a..c23aac4 100644 (file)
@@ -1,6 +1,6 @@
 SRCS   =  AliRICH.cxx AliRICHv0.cxx AliRICHv1.cxx AliRICHv3.cxx\
         AliRICHParam.cxx AliRICHDisplay.cxx AliRICHPoints.cxx AliRICHGeometry.cxx\
-        AliRICHSegmentationV0.cxx AliRICHTresholdMap.cxx\
+        AliRICHSegmentationV0.cxx \
         AliRICHSegmentationV1.cxx AliRICHResponse.cxx \
         AliRICHClusterFinder.cxx AliRICHMap.cxx \
         AliRICHChamber.cxx AliRICHRecon.cxx \
index c988cb3..bee6fbf 100644 (file)
+void ControlPlots()
+{  
+  Int_t iChamber=1;
+  
+  TH1F *pCqH1=new TH1F("clusq","Clusters Charge;q [QDC]",300,0,4000);
+  al->LoadHeader();  al->LoadKinematics();
+  
+  Bool_t isHits=!rl->LoadHits();  
+    Bool_t isSDigits=!rl->LoadSDigits();  
+      Bool_t isClusters=!rl->LoadRecPoints();
+        Bool_t isDigits=!rl->LoadDigits();
+  
+  for(Int_t iEventN=0;iEventN<a->GetEventsPerRun();iEventN++){//events loop
+    al->GetEvent(iEventN);    
+    if(isHits){
+      for(Int_t iPrimN=0;iPrimN<rl->TreeH()->GetEntries();iPrimN++){//prims loop
+        rl->TreeH()->GetEntry(iPrimN);      
+        Int_t iTotalHits=0,iTotalCerenkovs=0,iTotalSpecials=0;
+        iTotalHits+=r->Hits()->GetEntries();
+        iTotalCerenkovs+=r->Cerenkovs()->GetEntries();
+        iTotalSpecials+=r->Specials()->GetEntries();
+      }//prims loop
+    }//isHits
+    if(isSDigits){
+      rl->TreeS()->GetEntry(0);
+    }//isSdigits
+    if(isDigits){
+      rl->TreeD()->GetEntry(0);
+      for(int i=1;i<=7;i++);
+    }//isDigits
+    if(isClusters){
+      rl->TreeR()->GetEntry(0);
+      Int_t iTotalClusters=0;
+      for(int i=1;i<=7;i++) iTotalClusters+=r->Clusters(i)->GetEntries();    
+      for(Int_t iClusterN=0;iClusterN<r->Clusters(iChamber)->GetEntries();iClusterN++){
+        pCqH1->Fill(((AliRICHcluster*)r->Clusters(iChamber)->At(i))->Q());
+      }//clusters loop
+    }//isClusters
+  }//events loop 
+  if(isHits) rl->UnloadHits();  
+    if(isSDigits) rl->UnloadSDigits(); 
+      if(isDigits) rl->UnloadDigits(); 
+        if(isClusters) rl->UnloadRecPoints();
+  al->UnloadHeader();  al->UnloadKinematics();
+  pCqH1->Draw();
+}//void ControlPlots()
+//__________________________________________________________________________________________________
 void MainTrank()
 {
   TStopwatch sw;TDatime time;
-  OLD_S_SD(); SD_D(); //D_C();
+  OLD_S_SD(); SD_D(); D_C();
   cout<<"\nInfo in <MainTrank>: Start time: ";time.Print();
   cout<<"Info in <MainTrank>: Stop  time: ";time.Set();  time.Print();
   cout<<"Info in <MainTrank>: Time  used: ";sw.Print();
 }
-
+//__________________________________________________________________________________________________
+void sh()
+{
+  if(rl->LoadHits()) return;
+  
+  Int_t iTotalHits=0;
+  for(Int_t iPrimN=0;iPrimN<rl->TreeH()->GetEntries();iPrimN++){//prims loop
+    rl->TreeH()->GetEntry(iPrimN);      
+    r->Hits()->Print();
+    iTotalHits+=r->Hits()->GetEntries();
+  }
+  Info("sh","totally %i hits",iTotalHits);
+  rl->UnloadHits();
+}
+//__________________________________________________________________________________________________
+void ssp()
+{
+  if(rl->LoadHits()) return;
+  
+  Int_t iTotalSpecials=0;
+  for(Int_t iPrimN=0;iPrimN<rl->TreeH()->GetEntries();iPrimN++){//prims loop
+    rl->TreeH()->GetEntry(iPrimN);      
+    r->Specials()->Print();
+    iTotalSpecials+=r->Specials()->GetEntries();
+  }
+  Info("ssp","totally %i specials",iTotalSpecials);
+  rl->UnloadHits();
+}
+//__________________________________________________________________________________________________
 void ss()
 {
   if(rl->LoadSDigits()) return;
   rl->TreeS()->GetEntry(0);
   r->SDigits()->Print();
-  Info("ss","totally %i",r->SDigits()->GetEntries());
+  Info("ss","totally %i sdigits",r->SDigits()->GetEntries());
   rl->UnloadSDigits();
 }
-
+//__________________________________________________________________________________________________
 void sd()
 {
   if(rl->LoadDigits()) return;
   rl->TreeD()->GetEntry(0);
-  for(int i=1;i<=7;i++) r->Digits(i)->Print();
+  Int_t iTotalDigits=0;
+  for(int i=1;i<=7;i++){
+    r->Digits(i)->Print();
+    iTotalDigits+=r->Digits(i)->GetEntries();
+  }
+  Info("sd","totally %i digits",iTotalDigits);
   rl->UnloadDigits();
 }
 
@@ -80,13 +160,16 @@ void OLD_S_SD()
     for(Int_t iPrimN=0;iPrimN<rl->TreeH()->GetEntries();iPrimN++){//prims loop
       rl->TreeH()->GetEntry(iPrimN);
       for(Int_t i=0;i<r->Specials()->GetEntries();i++){//specials loop          
-        Int_t padx= ((AliRICHSDigit*)r->Specials()->At(i))->PadX();
-        Int_t pady= ((AliRICHSDigit*)r->Specials()->At(i))->PadY();
+        Int_t padx= ((AliRICHSDigit*)r->Specials()->At(i))->PadX()+r->Param()->NpadsX()/2;
+        Int_t pady= ((AliRICHSDigit*)r->Specials()->At(i))->PadY()+r->Param()->NpadsY()/2;
         Double_t q=  ((AliRICHSDigit*)r->Specials()->At(i))->QPad();
         Int_t hitN= ((AliRICHSDigit*)r->Specials()->At(i))->HitNumber()-1;//!!! important -1
         Int_t chamber=((AliRICHhit*)r->Hits()->At(hitN))->C();
         Int_t track=((AliRICHhit*)r->Hits()->At(hitN))->GetTrack();
-        r->AddSDigit(chamber,padx+r->Param()->NpadsX()/2,pady+r->Param()->NpadsY()/2,q,track);
+        if(padx<1 || padx>r->Param()->NpadsX() ||pady<1 || pady>r->Param()->NpadsY())
+          Error("OLD_S_SD","pad is out of valid range padx= %i pady=%i event %i",padx,pady,iEventN);
+        else
+          r->AddSDigit(chamber,padx,pady,q,track);
       }//specials loop
     }//prims loop
     rl->TreeS()->Fill();
@@ -94,7 +177,7 @@ void OLD_S_SD()
   }//events loop  
     rl->UnloadHits();     rl->UnloadSDigits();  
   Info("OLD_S_SD","Stop.");    
-}//Specials2Sdigits()
+}//OLD_S_SD()
 //__________________________________________________________________________________________________
 void H_SD()
 {
@@ -133,7 +216,7 @@ void H_SD()
   rl->UnloadHits();
   rl->UnloadSDigits();  
   Info("H_SD","Stop.");  
-}//Hits2Sdigits()
+}//H_SD()
 //__________________________________________________________________________________________________
 void SD_D()
 {
@@ -143,7 +226,7 @@ void SD_D()
   
   for(Int_t iEventN=0;iEventN<a->GetEventsPerRun();iEventN++){//events loop
     al->GetEvent(iEventN);
-    
+    cout<<"Event "<<iEventN<<endl;  
     rl->MakeTree("D");r->MakeBranch("D"); //create TreeD with RICH branches 
     r->ResetSDigits();r->ResetDigits();//reset lists of sdigits and digits
     rl->TreeS()->GetEntry(0);  
@@ -162,20 +245,16 @@ void SD_D()
         q+=pSdig->Q();
         if(iNdigitsPerPad<=3)
           tr[iNdigitsPerPad-1]=pSdig->T(0);
-        else
-          Info("","More then 3 sdigits for the given pad");
+//        else
+//          Info("","More then 3 sdigits for the given pad");
       }else{//new pad, add the pevious one
-        if(id!=kBad&&r->Param()->IsOverTh(chamber,x,y,q)) {
-           
-           r->AddDigit(chamber,x,y,q,tr[0],tr[1],tr[2]);//ch-xpad-ypad-qdc-tr1-2-3
-         }
+        if(id!=kBad) r->AddDigit(chamber,x,y,q,tr[0],tr[1],tr[2]);//ch-xpad-ypad-qdc-tr1-2-3
         chamber=pSdig->C();x=pSdig->X();y=pSdig->Y();q=pSdig->Q();tr[0]=pSdig->T(0);id=pSdig->Id();
         iNdigitsPerPad=1;tr[1]=tr[2]=kBad;
       }
     }//sdigits loop (sorted)
   
-    if(r->SDigits()->GetEntries()&&r->Param()->IsOverTh(chamber,x,y,q))
-                  r->AddDigit(chamber,x,y,q,tr[0],tr[1],tr[2]);//add the last digit
+    if(r->SDigits()->GetEntries())r->AddDigit(chamber,x,y,q,tr[0],tr[1],tr[2]);//add the last digit
         
     rl->TreeD()->Fill();  
     rl->WriteDigits("OVERWRITE");
@@ -183,55 +262,9 @@ void SD_D()
   rl->UnloadSDigits();     rl->UnloadDigits();  
   r->ResetSDigits();r->ResetDigits();//reset lists of sdigits and digits
   Info("SD_D","Stop.");  
-}
-
-
-
-void OLD_SD_D()
-{
-  Info("SD_DOLD","Start.");  
-
-  rl->LoadSDigits();
-  
-  for(Int_t iEventN=0;iEventN<a->GetEventsPerRun();iEventN++){//events loop
-    al->GetEvent(iEventN);
-    
-    rl->MakeTree("D");r->MakeBranch("D"); //create TreeD with RICH branches 
-    r->ResetSDigits();r->ResetDigitsOld();//reset lists of sdigits and digits
-    rl->TreeS()->GetEntry(0);  
-    r->SDigits()->Sort();
-  
-    Int_t kBad=-101;
-    
-    Int_t tr[3],q[3],dig[5]; for(Int_t i=0;i<3;i++) tr[i]=q[i]=kBad;    for(Int_t i=0;i<5;i++) dig[i]=kBad;        
-    Int_t chamber=kBad,id=kBad,iNdigitsPerPad=kBad;//how many sdigits for a given pad
-        
-    for(Int_t i=0;i<r->SDigits()->GetEntries();i++){//sdigits loop (sorted)
-      AliRICHdigit *pSdig=(AliRICHdigit*)r->SDigits()->At(i);
-      if(pSdig->Id()==id){//still the same pad
-        iNdigitsPerPad++;
-        dig[2]+=pSdig->Q();//sum up qdc
-        if(iNdigitsPerPad<=3)
-          tr[iNdigitsPerPad-1]=pSdig->T(0);
-        else
-          Info("","More then 3 sdigits for the given pad");
-      }else{//new pad, add the pevious one
-        if(id!=kBad) r->AddDigitOld(chamber,tr,q,dig);
-        chamber=pSdig->C();dig[0]=pSdig->X();dig[1]=pSdig->Y();dig[2]=pSdig->Qdc();tr[0]=pSdig->T(0);id=pSdig->Id();
-        iNdigitsPerPad=1;tr[1]=tr[2]=kBad;
-      }
-    }//sdigits loop (sorted)
-    r->AddDigitOld(chamber,tr,q,dig);//add the last digit
-        
-    rl->TreeD()->Fill();  
-    rl->WriteDigits("OVERWRITE");
-  }//events loop
-  rl->UnloadSDigits();     rl->UnloadDigits();  
-  r->ResetSDigits();r->ResetDigitsOld();//reset lists of sdigits and digits
-  Info("SD_DOLD","Stop.");  
-}
+}//SD_D()
 //__________________________________________________________________________________________________
-void Show3()
+void Show()
 {  
   cout<<endl;
   al->LoadHeader();  al->LoadKinematics();
@@ -291,69 +324,6 @@ void Show3()
   cout<<endl;
 }//void Show()
 //__________________________________________________________________________________________________
-void ControlPlots()
-{  
-  Int_t iChamber = 1;
-  TH1F *pqclusterH1 = new TH1F("qclus","charge of clusters;Q (ADC);events",2000,0.,2000);
-
-    al->LoadHeader();  al->LoadKinematics();
-  
-  rl->LoadHits();  
-    Bool_t isSdigits=!rl->LoadSDigits();  
-      Bool_t isClusters=!rl->LoadRecPoints();
-        Bool_t isDigits=!rl->LoadDigits();//loaders
-  
-  for(Int_t iEventN=0;iEventN<a->GetEventsPerRun();iEventN++){//events loop
-    Int_t iNparticles=a->GetEvent(iEventN);
-    Int_t iNprims=rl->TreeH()->GetEntries();
-    
-    Int_t iTotalHits=0,iTotalCerenkovs=0,iTotalSpecials=0;
-    for(Int_t iPrimN=0;iPrimN<iNprims;iPrimN++){//prims loop
-      rl->TreeH()->GetEntry(iPrimN);      
-      iTotalHits+=r->Hits()->GetEntries();
-      iTotalCerenkovs+=r->Cerenkovs()->GetEntries();
-      iTotalSpecials+=r->Specials()->GetEntries();
-      TParticle *pPrim=al->Stack()->Particle(iPrimN);
-    }//prims loop
-    if(isSdigits){
-      rl->TreeS()->GetEntry(0);
-    }
-    if(isDigits){
-      rl->TreeD()->GetEntry(0);
-      for(int i=1;i<=7;i++);
-    }
-    if(isClusters){
-      rl->TreeR()->GetEntry(0);
-      for(Int_t iclus=0;iclus<r->Clusters(iChamber)->GetEntries();iclus++) {
-        pqclusterH1->Fill(((AliRICHcluster*)r->Clusters(iChamber)->At(iclus))->Q());
-      }
-    }
-    cout<<endl;
-  }//events loop
-  pqclusterH1->Draw();
-  rl->UnloadHits();  
-    if(isSdigits) rl->UnloadSDigits(); 
-      if(isDigits) rl->UnloadDigits(); 
-        if(isClusters) rl->UnloadRecPoints();
-  al->UnloadHeader();
-  al->UnloadKinematics();
-}//void Control√≤lots()
-//__________________________________________________________________________________________________
-void DebugOFF()
-{
-  Info("DebugOFF","");
-  a->SetDebug(0);
-  r->SetDebug(0);
-  AliLoader::SetDebug(0);
-}//void DebugOFF()
-
-void DebugON()
-{
-  Info("DebugON","");  
-  a->SetDebug(1);
-  r->SetDebug(1);
-  AliLoader::SetDebug(1);
-}//void DebugON()
 
 
 AliRun *a;
@@ -389,50 +359,6 @@ Bool_t ReadAlice()
   return kTRUE;
 }
 //__________________________________________________________________________________________________
-void GeoTest()
-{
-
-  TBRIK *pAliceBRIK=new TBRIK("aliceBRIK","ALICE mother volume","void",500,500,500);
-  TBRIK *pArmBRIK=new TBRIK("armBRIK","RICH arm1","void",pRICH->GetSizeX(),pRICH->GetSizeY(),pRICH->GetSizeZ());
-   
-   TNode *pAliceNode=new TNode("aliceNode","Mother volume","aliceBRIK");
-   pAliceNode->cd();
-
-// ARM 1 LEFT      
-   TRotation rot1;
-   TVector3  v1(0,pRICH->GetOffset(),0);
-   
-         
-   rot1.RotateX(pRICH->GetYZAngle()*kDegrad);        v1.RotateX(pRICH->GetYZAngle()*kDegrad);
-   rot1.RotateZ(pRICH->GetXYAngle()*kDegrad);        v1.RotateZ(pRICH->GetXYAngle()*kDegrad);
-   rot1.RotateZ(pRICH->GetRotAngle()*kDegrad);       v1.RotateZ(pRICH->GetRotAngle()*kDegrad);
-         
-   TRotMatrix *pArm1RotMatrix=new TRotMatrix("rotArm1","rotArm1",rot1.ThetaX()*kRaddeg, rot1.PhiX()*kRaddeg,
-                                                                 rot1.ThetaY()*kRaddeg, rot1.PhiY()*kRaddeg,
-                                                                 rot1.ThetaZ()*kRaddeg, rot1.PhiZ()*kRaddeg);
-
-   TNode *pArm1Node=new TNode("arm1Node","Left arm","armBRIK",v1.X(),v1.Y(),v1.Z(),"rotArm1");
-   arm1Node->SetLineColor(kRed);
-   
-// ARM 2 LEFT      
-   TRotation rot2;
-   TVector3  v2(0,pRICH->GetOffset(),0);
-   
-         
-   rot2.RotateX( pRICH->YZAngle()*kDegrad);        v2.RotateX(pRICH->GetYZAngle()*kDegrad);
-   rot2.RotateZ(-pRICH->XYAngle()*kDegrad);        v2.RotateZ(-pRICH->GetXYAngle()*kDegrad);
-   rot2.RotateZ( pRICH->RotAngle()*kDegrad);        v2.RotateZ(pRICH->GetRotAngle()*kDegrad);
-         
-   TRotMatrix *pArm2RotMatrix=new TRotMatrix("rotArm2","rotArm2",rot2.ThetaX()*kRaddeg, rot2.PhiX()*kRaddeg,
-                                                                 rot2.ThetaY()*kRaddeg, rot2.PhiY()*kRaddeg,
-                                                                 rot2.ThetaZ()*kRaddeg, rot2.PhiZ()*kRaddeg);
-
-   TNode *pArm2Node=new TNode("arm2Node","Left arm","armBRIK",v2.X(),v2.Y(),v2.Z(),"rotArm2");
-   arm2Node->SetLineColor(kBlue);
-   
-   aliceNode->Draw();
-}//void GeoTest()
-//__________________________________________________________________________________________________
 void PrintGeo(Float_t rotDeg=0)
 {
   AliRICHParam *p=new AliRICHParam;  
@@ -540,42 +466,6 @@ void TestResponse()
   pLeg->Draw();
 }//TestResponse()
 //__________________________________________________________________________________________________
-void TestDigitsOLD()
-{
-  Info("TestDigitsOLD","Creating test digits.");
-  rl->MakeTree("D");r->MakeBranch("D");
-
-
-  Int_t t[10];
-  Int_t c[10];
-  Int_t d[5];
-  t[0]=100;t[1]=200;t[2]=300;
-  c[0]=10;c[1]=20;c[2]=30;
-
-
-  d[0]=1;d[1]=1;d[2]=10;d[3]=3;d[4]=4;r->AddDigitOld(1,t,c,d);
-
-  d[0]=2;d[1]=2;d[2]=10;d[3]=3;d[4]=4;r->AddDigitOld(2,t,c,d);
-  d[0]=2;d[1]=3;d[2]=10;d[3]=3;d[4]=4;r->AddDigitOld(2,t,c,d);
-
-  d[0]=2;d[1]=2;d[2]=100;d[3]=3;d[4]=4;r->AddDigitOld(3,t,c,d);
-  d[0]=2;d[1]=3;d[2]= 50;d[3]=3;d[4]=4;r->AddDigitOld(3,t,c,d);
-  d[0]=2;d[1]=4;d[2]=200;d[3]=3;d[4]=4;r->AddDigitOld(3,t,c,d);
-
-  d[0]=2;d[1]=2;d[2]=100;d[3]=3;d[4]=4;r->AddDigitOld(6,t,c,d);
-  d[0]=2;d[1]=3;d[2]= 50;d[3]=3;d[4]=4;r->AddDigitOld(6,t,c,d);
-  d[0]=2;d[1]=4;d[2]=200;d[3]=3;d[4]=4;r->AddDigitOld(6,t,c,d);
-  d[0]=2;d[1]=5;d[2]= 50;d[3]=3;d[4]=4;r->AddDigitOld(6,t,c,d);
-  d[0]=2;d[1]=6;d[2]=300;d[3]=3;d[4]=4;r->AddDigitOld(6,t,c,d);
-  d[0]=2;d[1]=7;d[2]= 50;d[3]=3;d[4]=4;r->AddDigitOld(6,t,c,d);
-
-  rl->TreeD()->Fill();
-  rl->WriteDigits("OVERWRITE");
-  rl->UnloadDigits();
-  r->ResetDigitsOld();
-  Info("TestDigitsOLD","Stop.");
-}//void TestDigits()
-//__________________________________________________________________________________________________
 void TestSD()
 {
   Info("TestSD","Creating test sdigits.");
@@ -751,18 +641,14 @@ void menu()
   TControlBar *pMenu = new TControlBar("vertical","RICH main");
        
   if(ReadAlice()){//it's from file, reconstruct
-    pMenu->AddButton("hits->sdigits->digits","MainTrank()","Convert");
-    pMenu->AddButton("Debug ON",     "DebugON();",   "Switch debug on-off");   
-    pMenu->AddButton("Debug OFF",    "DebugOFF();",   "Switch debug on-off");   
+    pMenu->AddButton("hits->sdigits->digits->clusters","MainTrank()","Convert");
     
     pMenu->AddButton("hits->sdigits",    "H_SD()",       "Perform first phase converstion");
     pMenu->AddButton("sdigits->digits",  "SD_D()",       "Perform first phase converstion");
     pMenu->AddButton("digits->clusters", "D_C()",        "Perform first phase converstion");
 
-    pMenu->AddButton("OLD Show","Show3()","Shows the structure of events in files");
+    pMenu->AddButton("Show","Show()","Shows the structure of events in files");
     pMenu->AddButton("OLD specials->sdigits",          "OLD_S_SD()",       "Perform first phase converstion");
-    pMenu->AddButton("OLD sdigits->digits",         "OLD_SD_D()","Perform second phase converstion");
-    pMenu->AddButton("OLD digits->clusters",     "OLD_D_C()",  "Perform second phase converstion");
     
   }else{//it's aliroot, simulate
     pMenu->AddButton("Run",         "a->Run(1)",       "Process!");
@@ -772,9 +658,13 @@ void menu()
   pMenu->AddButton("Test submenu",    "TestMenu()",            "Shows test submenu");
   pMenu->AddButton("Browser",         "new TBrowser;",         "Start ROOT TBrowser");
   pMenu->AddButton("Display Fast",    "DisplFast()",           "Display Fast");
-  pMenu->AddButton("Control Plots",    "ControlPlots()",           "Control Plots");
+  pMenu->AddButton("Control Plots",   "ControlPlots()",        "Display some control histograms");
+  pMenu->AddButton("Debug ON",     "DebugON();",   "Switch debug on-off");   
+  pMenu->AddButton("Debug OFF",    "DebugOFF();",   "Switch debug on-off");   
   pMenu->AddButton("Quit",            ".q",                    "Close session");
   pMenu->Show();
   a=gAlice;//for manual manipulation convinience
 }//menu()
 //__________________________________________________________________________________________________
+void DebugOFF(){  Info("DebugOFF","");  a->SetDebug(0);  r->SetDebug(0);  AliLoader::SetDebug(0);}
+void DebugON() {  Info("DebugON","");   a->SetDebug(1);  r->SetDebug(1);  AliLoader::SetDebug(1);}