]> git.uio.no Git - u/mrichter/AliRoot.git/blobdiff - RICH/RichMenu.C
Max. angle in mag. field limited to 10deg.
[u/mrichter/AliRoot.git] / RICH / RichMenu.C
index ebc8827197dabbf979ca4980b563d57e501dca62..8c533c3728c9e9c6aa2dfaaccd3e5f6c31436fb8 100644 (file)
-//globals for easy manual manipulations
-AliRun *a;       
-AliRunLoader *al;
-AliLoader *rl;
-AliRICH *r;
-AliStack *s;
+AliRun *a;    AliStack *s;  AliRunLoader *al; //globals for easy manual manipulations
+AliRICH   *r; AliLoader    *rl;
 
-void ph(Int_t event=0)  {r->PrintHits(event);}    //utility print hits for 'event' event
-void ps(Int_t event=0)  {r->PrintSDigits(event);} //utility print sdigits
-void pd(Int_t event=0)  {r->PrintDigits(event);}  //utility print digits
-void pc(Int_t event=0)  {r->PrintClusters(event);}//utility print clusters
-void pt(Int_t event=0)  {r->PrintTracks(event);}  //utility print tracks
-Int_t ne(Int_t event=0)   {AliRICH::Nparticles(kElectron,event,al);} //utility number of electrons
-Int_t npi0(Int_t event=0) {AliRICH::Nparticles(kPi0,event,al);}      //utility number of electrons
-Int_t npip(Int_t event=0) {AliRICH::Nparticles(kPiPlus,event,al);}   //utility number of electrons
-Int_t npim(Int_t event=0) {AliRICH::Nparticles(kPiMinus,event,al);}  //utility number of electrons
-Int_t nk0(Int_t event=0)  {AliRICH::Nparticles(kK0,event,al);}       //utility number of electrons
-Int_t nkp(Int_t event=0)  {AliRICH::Nparticles(kKPlus,event,al);}    //utility number of electrons
-Int_t nkm(Int_t event=0)  {AliRICH::Nparticles(kKMinus,event,al);}   //utility number of electrons
-Int_t npp(Int_t event=0)  {AliRICH::Nparticles(kProton,event,al);}   //utility number of protons
-//__________________________________________________________________________________________________
-void pp(int tid)
+//++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
+void GeomAlign(Bool_t isAlign)
 {
-  if(!al) return;
-  al->LoadHeader();  al->LoadKinematics();
-  
-  if(tid<0||tid>=al->Stack()->GetNtrack())
-    cout<<"Valid tid number is 0-"<<al->Stack()->GetNtrack()-1<<" for this event.\n";
-  else
-    PrintParticleInfo(tid);
+  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 RichMenu()
+{   
+  TString status="Status: ";
+  if(gSystem->IsFileInIncludePath("galice.root")){
+    status+="galice.root found";
+    al=AliRunLoader::Open();                                                //try to open galice.root from current dir 
+    if(gAlice) delete gAlice;                                               //in case we execute this in aliroot delete default AliRun object 
+    al->LoadgAlice(); a=al->GetAliRun();                                    //take new AliRun object from galice.root   
+    rl=al->GetDetectorLoader("RICH");  r=(AliRICH*)a->GetDetector("RICH");  //get RICH object from galice.root
+    
+    status+=Form(" with %i event(s)",al->GetNumberOfEvents()); status+=(r)? " with RICH": " without RICH";
+  }else  
+    status+="No galice.root";
   
-  al->UnloadKinematics();  al->UnloadHeader();
+  TControlBar *pMenu = new TControlBar("horizontal",status.Data(),0,0);
+    pMenu->AddButton("                     ","","");
+    pMenu->AddButton(" General  "         ,"General()"  ,"general items which do not depend on any files");
+    pMenu->AddButton("                     ","","");
+    pMenu->AddButton(" Sim data "        ,"SimData()"  ,"items which expect to have simulated files"    );
+    pMenu->AddButton("                     ","","");
+    pMenu->AddButton(" Raw data "        ,"RawData()"  ,"items which expect to have raw files"          );
+    pMenu->AddButton("                     ","","");
+    pMenu->AddButton("Quit"            ,".q"         ,"close session"                                 );
+  pMenu->Show();
 }
-//__________________________________________________________________________________________________
-void PrintParticleInfo(int tid)
+//++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
+void General()
+{         
+  TControlBar *pMenu = new TControlBar("vertical","Sim data",60,50);  
+    pMenu->AddButton("Debug ON"           ,"don();"                    ,"Switch debug on-off"                        );   
+    pMenu->AddButton("Debug OFF"          ,"doff();"                   ,"Switch debug on-off"                        );   
+    pMenu->AddButton("Test segmentation"  ,"AliRICHParam::TestSeg();"  ,"Test AliRICHParam segmentation methods"     );
+    pMenu->AddButton("Test response"      ,"AliRICHParam::TestResp();" ,"Test AliRICHParam response methods"         );
+    pMenu->AddButton("Test transformation","AliRICHParam::TestTrans();","Test AliRICHParam transformation methods"   );
+    pMenu->AddButton("Geo GUI"            ,"geo();"                    ,"Shows geometry"                             ); 
+    pMenu->AddButton("Browser"            ,"new TBrowser;"             ,"Start ROOT TBrowser"                        );
+  pMenu->Show();  
+}//menu()
+//++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
+void SimData()
 {
-// Prints particle info for a given TID
-  TParticle *p=al->Stack()->Particle(tid);
-  cout<<p->GetName()<<"("<<tid<<")";
-  if(p->GetMother(0)!=-1){cout<<" from "; PrintParticleInfo(p->GetMother(0));}
-  else                   {cout<<endl;} 
-}    
-//__________________________________________________________________________________________________
-Int_t prim(Int_t tid)
+  TControlBar *pMenu = new TControlBar("vertical","Sim",190,50);  
+    pMenu->AddButton("Display single chambers"         ,"r->Display();"  , "Display Fast");
+    pMenu->AddButton("Display ALL chambers"            ,"r->DisplayEvent(0,0);"  , "Display Fast");
+    pMenu->AddButton("HITS Print"                      ,"h();"      ,"To print hits: h()");
+    pMenu->AddButton("HITS QA"                         ,"hqa()"     ,"QA plots for hits: hqa()");
+    pMenu->AddButton("Print sdigits"                   ,"s();"      ,"To print sdigits: s()");
+    pMenu->AddButton("Print digits"                    ,"d();"      ,"To print digits: d()");
+  pMenu->Show();         
+}
+//++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
+void RawData()
 {
-// Provides mother TID for the given TID
-  al->LoadHeader();  al->LoadKinematics();
-  
-  if(tid<0||tid>=al->Stack()->GetNtrack())
-    cout<<"Valid tid number is 0-"<<al->Stack()->GetNtrack()-1<<" for this event.\n";
-  else
-    while(1){
-      TParticle *p=al->Stack()->Particle(tid);
-      if(p->GetMother(0)==-1) break;
-      tid=p->GetMother(0);
-    }
-  
-  al->UnloadKinematics();  al->UnloadHeader();
-  return tid;
+  TControlBar *pMenu = new TControlBar("vertical","Raw",350,50);  
+    pMenu->AddButton("ESD print"                       ,"ep();"                  ,"To print ESD info: ep()"         );  
+    pMenu->AddButton("ESD QA"                          ,"eq();"                  ,"To draw ESD hists: eq()"         );  
+    pMenu->AddButton("Clusters print"                  ,"cp();"                  ,"To print clusters: cp()"         );  
+    pMenu->AddButton("Clusters QA"                     ,"cq();"                  ,"To draw clusters hists: cq()"    );  
+    pMenu->AddButton("Print Matrix"                    ,"mp();"                  ,"To print prob matrix: mp()"      );  
+    pMenu->AddButton("Print occupancy"                 ,"r->OccupancyPrint(-1);" ,"To print occupancy"              );  
+    pMenu->AddButton("Print event summary  "           ,"r->SummaryOfEvent();"   ,"To print a summary of the event" );  
+  pMenu->Show();         
 }
-
-//__________________________________________________________________________________________________
-void Show()
-{  
-  CreateHists();
-  Info("","\n\n\n");
-//load all trees  
-  al->LoadHeader(); 
-    al->LoadKinematics();  
-      Bool_t isHits=!rl->LoadHits();  
-        Bool_t isSdigits=!rl->LoadSDigits();  
-          Bool_t isDigits=!rl->LoadDigits();//loaders
-            Bool_t isClusters=!rl->LoadRecPoints();
-  
-  for(Int_t iEventN=0;iEventN<a->GetEventsPerRun();iEventN++){//events loop
-    Int_t iNparticles=al->Stack()->GetNtrack();
-    Int_t iNprims=al->Stack()->GetNprimary();
-    
-    Int_t iElectronCounter=0,iPositronCounter=0;    
-    Int_t iPiPlusCounter=0,iPiMinusCounter=0;    
-    Int_t iKPlusCounter=0,iKMinusCounter=0;    
-    Int_t iProtonCounter=0,iProtonBarCounter=0;    
-    Int_t nP=0;
-    Info("Show-STA"," %i particles to be read",iNparticles);
-    for(Int_t iParticleN=0;iParticleN<iNparticles;iParticleN++){//stack loop
-      TParticle *pPart=al->Stack()->Particle(iParticleN);
-      nP++;
-      if(nP%10000==0) Info("Show-STA"," %i particles read",nP);
-      switch(pPart->GetPdgCode()){
-        case kKPlus: iKPlusCounter++; break;
-        case kKMinus:iKMinusCounter++; break;
-        case kProton: iProtonCounter++; break;
-        case kProtonBar:iProtonBarCounter++; break;
-        case kElectron: iElectronCounter++; break;
-        case kPositron:iPositronCounter++; break;
-        case kPiPlus: iPiPlusCounter++; break;
-        case kPiMinus:iPiMinusCounter++; break;
-      }
-    }//stack loop
-    
-    Info("Show-STA","Evt %i->   %i particles %i primaries  %i e- %i e+",
-                     iEventN,   iNparticles,    iNprims,      iElectronCounter,      iPositronCounter);
-    Info("Show-STA","Evt %i->   %i particles %i primaries  %i p+ %i p-",
-                     iEventN,   iNparticles,    iNprims,      iPiPlusCounter,        iPiMinusCounter);
-    Info("Show-STA","Evt %i->   %i particles %i primaries  %i K+ %i K-",
-                     iEventN,   iNparticles,    iNprims,      iKPlusCounter,         iKMinusCounter);
-    Info("Show-STA","Evt %i->   %i particles %i primaries  %i p  %i pbar",
-                     iEventN,   iNparticles,    iNprims,      iProtonCounter,        iProtonBarCounter);
-    
-    Int_t iHitsCounter=0;
-    Int_t iNentries=rl->TreeH()->GetEntries();
-    for(Int_t iEntryN=0;iEntryN<iNentries;iEntryN++){//TreeH loop
-      rl->TreeH()->GetEntry(iEntryN);//get current entry (prim)          
-      
-      for(Int_t iHitN=0;iHitN<r->Hits()->GetEntries();iHitN++){//hits loop
-        iHitsCounter++;
-        AliRICHhit *pHit = (AliRICHhit*)r->Hits()->At(iHitN);//get current hit
-        TParticle *pPart=al->Stack()->Particle(pHit->GetTrack());//get stack particle which produced the current hit
-      }//hits loop
-      
-      if(iEntryN<7) Info("Show","Evt %i-> prim %4i has %4i hits from %s (,%7.2f,%7.2f)",
-                  iEventN,iEntryN, r->Hits()->GetEntries(), pPart->GetName(), pPart->Theta()*TMath::RadToDeg(),pPart->Phi()*TMath::RadToDeg());
-    }//TreeH loop
-    Info("Show-HIT","Evt %i->   %i particles %i primaries  %i entries in TreeH %i hits",
-                     iEventN,   iNparticles,    iNprims,      iNentries,         iHitsCounter);
-    
-    if(isSdigits){
-      rl->TreeS()->GetEntry(0);
-      Info("Show-SDI","Evt %i contains %5i sdigits",iEventN,r->SDigits()->GetEntries());
-    }
-    if(isDigits){
-      rl->TreeD()->GetEntry(0);
-      for(int i=1;i<=7;i++)
-        Info("Show-DIG","Evt %i chamber %i contains %5i digits",
-                                 iEventN,   i,           r->Digits(i)->GetEntries());
-    }else
-        Info("Show-DIG","There is no digits for this event");
-    if(isClusters){
-      rl->TreeR()->GetEntry(0);
-      for(int i=1;i<=7;i++)
-        Info("Show-CLU","Evt %i chamber %i contains %5i clusters",
-                                 iEventN,   i,           r->Clusters(i)->GetEntries());
-    }
-    cout<<endl;
-  }//events loop
-//unload all trees    
-  rl->UnloadHits();  
-    if(isSdigits) rl->UnloadSDigits(); 
-      if(isDigits) rl->UnloadDigits(); 
-        if(isClusters) rl->UnloadRecPoints();
-          al->UnloadHeader();
-            al->UnloadKinematics();
-  ShowHists();            
-}//void Show()
-//__________________________________________________________________________________________________
+//++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
 
 
+void doff(){  Printf("DebugOFF");  AliLog::SetGlobalDebugLevel(0);}
+void don() {  Printf("DebugON");   AliLog::SetGlobalDebugLevel(AliLog::kDebug);}
 
-Bool_t ReadAlice()
-{
-  Info("ReadAlice","Tring to read ALICE from SIMULATED FILE.");
-  if(gAlice){
-    delete gAlice->GetRunLoader();
-    delete gAlice;
-  }      
-  if(!(al=AliRunLoader::Open())){//if not possible to read from galice.root, then create the new session
-    gSystem->Exec("rm -rf *.root *.dat");
-    Error("menu.C::ReadAlice","galice.root broken, removing all this garbage then init new one");
-    new AliRun("gAlice","Alice experiment system");
-    AliLog::SetModuleDebugLevel("RICH",1);
-    gAlice->Init("Config.C");
-    r=(AliRICH*)gAlice->GetDetector("RICH");
-    a=gAlice; //for manual convinience
-    return kFALSE;
-  }
-  al->LoadgAlice();//before this gAlice is 0;
-  if(!gAlice) Fatal("menu.C::ReadAlice","No gAlice in file");
-  a=al->GetAliRun();//provides pointer to AliRun object
-//RICH      
-  if(!(r=(AliRICH*)gAlice->GetDetector("RICH"))) Warning("RICH/menu.C::ReadAlice","No RICH in file");
-  if(!(rl=al->GetLoader("RICHLoader")))          Warning("RICH/menu.C::ReadAlice","No RICH loader in file");        
-        
-  Info("ReadAlice","Run contains %i event(s)",gAlice->GetEventsPerRun());      
-  return kTRUE;
-}
-//__________________________________________________________________________________________________
-void TestMenu()
-{
-  TControlBar *pMenu = new TControlBar("vertical","RICH test");
-  pMenu->AddButton("Test segmentation"  ,"rp->TestSeg()"  ,"Test AliRICHParam segmentation methods");
-  pMenu->AddButton("Test response"      ,"rp->TestResp()" ,"Test AliRICHParam response methods");
-  pMenu->AddButton("Test transformation","rp->TestTrans()","Test AliRICHParam transformation methods");
-  pMenu->AddButton("Test opticals"      ,".x Opticals.h"  ,"Test optical properties");
-  pMenu->Show();  
-}//TestMenu()
-//__________________________________________________________________________________________________
-void RichMenu()
-{ 
-  TControlBar *pMenu = new TControlBar("vertical","RICH main");
-       
-  if(ReadAlice()){//it's from file, show some info
-    pMenu->AddButton("Show",            "Show()",             "Shows the structure of events in files");
-    pMenu->AddButton("Display Fast",    "AliRICHDisplFast *d = new AliRICHDisplFast(); d->Exec();",        "Display Fast");
-    pMenu->AddButton("Control Plots",   "ControlPlots()",     "Create some control histograms");
-    
-  }else{//it's aliroot, simulate
-    pMenu->AddButton("Debug ON",     "DebugON();",   "Switch debug on-off");   
-    pMenu->AddButton("Debug OFF",    "DebugOFF();",   "Switch debug on-off");   
-    pMenu->AddButton("Run",         "a->Run(1)",       "Process!");
-    pMenu->AddButton("Geo GUI",     "GeomGui()",       "Shows geometry"); 
-    pMenu->AddButton("Read RAW",    "ReadRaw()",       "Read a list of digits from test beam file"); 
-  }
-  pMenu->AddButton("Test submenu",    "TestMenu()",            "Shows test submenu");
-  pMenu->AddButton("Browser",         "new TBrowser;",         "Start ROOT TBrowser");
-  pMenu->AddButton("Quit",            ".q",                    "Close session");
-  pMenu->Show();
-}//menu()
-//__________________________________________________________________________________________________
-void DebugOFF(){  Info("DebugOFF","");  AliLog::SetGlobalDebugLevel(0);}
-void DebugON() {  Info("DebugON","");   AliLog::SetGlobalDebugLevel(AliLog::kDebug);}
-//__________________________________________________________________________________________________
-TObjArray * CreateHists(Double_t pcut=0.9)
-{
-  TH2F *pPosH2    =new TH2F("pos"   ,"Pos mixture",5,0,5, 9,0,9); pPosH2->SetStats(0);
-  TH2F *pNegH2    =new TH2F("neg"   ,"Neg mixture",5,0,5, 9,0,9); pNegH2->SetStats(0);
-  TH2F *pPosCutH2 =new TH2F("poscut",Form("Pos mixture with P>%4.2f GeV",pcut),5,0,5, 9,0,9); pPosCutH2->SetStats(0);
-  TH2F *pNegCutH2 =new TH2F("negcut",Form("Neg mixture with P>%4.2f GeV",pcut),5,0,5, 9,0,9); pNegCutH2->SetStats(0);
-  pPosH2->GetXaxis()->SetBinLabel(1,"e^{+}");        pNegH2->GetXaxis()->SetBinLabel(1,"e^{-}");  
-  pPosH2->GetXaxis()->SetBinLabel(2,"#mu^{+}");      pNegH2->GetXaxis()->SetBinLabel(2,"#mu^{-}");
-  pPosH2->GetXaxis()->SetBinLabel(3,"#pi^{+}");      pNegH2->GetXaxis()->SetBinLabel(3,"#pi^{-}");
-  pPosH2->GetXaxis()->SetBinLabel(4,"K^{+}");        pNegH2->GetXaxis()->SetBinLabel(4,"K^{-}");  
-  pPosH2->GetXaxis()->SetBinLabel(5,"p^{+}");        pNegH2->GetXaxis()->SetBinLabel(5,"p^{-}");  
+void geo()                {  if(!gGeoManager) TGeoManager::Import("geometry.root");gGeoManager->GetTopVolume()->Draw();AliRICHParam::DrawAxis();}
   
-  pPosCutH2->GetXaxis()->SetBinLabel(1,"e^{+}");     pNegCutH2->GetXaxis()->SetBinLabel(1,"e^{-}");  
-  pPosCutH2->GetXaxis()->SetBinLabel(2,"#mu^{+}");   pNegCutH2->GetXaxis()->SetBinLabel(2,"#mu^{-}");
-  pPosCutH2->GetXaxis()->SetBinLabel(3,"#pi^{+}");   pNegCutH2->GetXaxis()->SetBinLabel(3,"#pi^{-}");
-  pPosCutH2->GetXaxis()->SetBinLabel(4,"K^{+}");     pNegCutH2->GetXaxis()->SetBinLabel(4,"K^{-}");  
-  pPosCutH2->GetXaxis()->SetBinLabel(5,"p^{+}");     pNegCutH2->GetXaxis()->SetBinLabel(5,"p^{-}");  
-  
-  pPosH2->GetYaxis()->SetBinLabel(1,"ch1");          pNegH2->GetYaxis()->SetBinLabel(1,"ch1");  
-  pPosH2->GetYaxis()->SetBinLabel(2,"ch2");          pNegH2->GetYaxis()->SetBinLabel(2,"ch2");  
-  pPosH2->GetYaxis()->SetBinLabel(3,"ch3");          pNegH2->GetYaxis()->SetBinLabel(3,"ch3");  
-  pPosH2->GetYaxis()->SetBinLabel(4,"ch4");          pNegH2->GetYaxis()->SetBinLabel(4,"ch4");  
-  pPosH2->GetYaxis()->SetBinLabel(5,"ch5");          pNegH2->GetYaxis()->SetBinLabel(5,"ch5");  
-  pPosH2->GetYaxis()->SetBinLabel(6,"ch6");          pNegH2->GetYaxis()->SetBinLabel(6,"ch6");  
-  pPosH2->GetYaxis()->SetBinLabel(7,"ch7");          pNegH2->GetYaxis()->SetBinLabel(7,"ch7");  
-  pPosH2->GetYaxis()->SetBinLabel(8,"prim");         pNegH2->GetYaxis()->SetBinLabel(8,"prim");  
-  pPosH2->GetYaxis()->SetBinLabel(9,"tot");          pNegH2->GetYaxis()->SetBinLabel(9,"tot");  
+void di  (Int_t evt=-1         )   {r->Display      (evt);}                //utility display 
+void du  (                     )   {r->Dump         (   );}                //utility display 
 
-  pPosCutH2->GetYaxis()->SetBinLabel(1,"ch1");          pNegCutH2->GetYaxis()->SetBinLabel(1,"ch1");  
-  pPosCutH2->GetYaxis()->SetBinLabel(2,"ch2");          pNegCutH2->GetYaxis()->SetBinLabel(2,"ch2");  
-  pPosCutH2->GetYaxis()->SetBinLabel(3,"ch3");          pNegCutH2->GetYaxis()->SetBinLabel(3,"ch3");  
-  pPosCutH2->GetYaxis()->SetBinLabel(4,"ch4");          pNegCutH2->GetYaxis()->SetBinLabel(4,"ch4");  
-  pPosCutH2->GetYaxis()->SetBinLabel(5,"ch5");          pNegCutH2->GetYaxis()->SetBinLabel(5,"ch5");  
-  pPosCutH2->GetYaxis()->SetBinLabel(6,"ch6");          pNegCutH2->GetYaxis()->SetBinLabel(6,"ch6");  
-  pPosCutH2->GetYaxis()->SetBinLabel(7,"ch7");          pNegCutH2->GetYaxis()->SetBinLabel(7,"ch7");  
-  pPosCutH2->GetYaxis()->SetBinLabel(8,"prim");         pNegCutH2->GetYaxis()->SetBinLabel(8,"prim");  
-  pPosCutH2->GetYaxis()->SetBinLabel(9,"tot");          pNegCutH2->GetYaxis()->SetBinLabel(9,"tot");  
-  TObjArray *pOA=new TObjArray;
-  pOA->Add(pPosH2);pOA->Add(pNegH2);pOA->Add(pPosCutH2);pOA->Add(pNegCutH2);  
-  return pOA;
-}//ParticleContribs()
-//__________________________________________________________________________________________________
+void hp  (Int_t evt=0          )   {r->HitPrint  (evt);}   //print hits for requested event
+void hq  (                     )   {r->HitQA     (   );}   //hits QA plots for all events 
+void sp  (Int_t evt=0          )   {r->SDigPrint (evt);}   //print sdigits for requested event
+void sq  (Int_t evt=0          )   {r->SDigPrint (evt);}   //print sdigits for requested event
+void dp  (Int_t evt=0          )   {r->DigPrint  (evt);}   //print digits for requested event
+void dq  (                     )   {AliRICHReconstructor::DigQA     (al );}   //digits QA plots for all events
+void cp  (Int_t evt=0          )   {r->CluPrint  (evt);}                      //print clusters for requested event
+void cq  (                     )   {AliRICHReconstructor::CluQA     (al );}   //clusters QA plots for all events
+void ep  (                     )   {AliRICHTracker::EsdQA(1);} 
+void eq  (                     )   {AliRICHTracker::EsdQA();}                   
+void mp  (Double_t probCut=0.7 )   {AliRICHTracker::MatrixPrint(probCut);}                   
 
-void ShowHists()
-{
-  pC=new TCanvas("c1","Particle composition");
-  pC->Divide(2,2);
-  pC->cd(1);  pos->Draw("text"); gPad->SetGrid();
-  pC->cd(2);  neg->Draw("text"); gPad->SetGrid();
-  pC->cd(3);  poscut->Draw("text"); gPad->SetGrid();
-  pC->cd(4);  negcut->Draw("text"); gPad->SetGrid();
-}
 
-//__________________________________________________________________________________________________
-void GeomGui()
-{
-  if(gGeoManager){ 
-    gGeoManager->GetTopVolume()->Draw(); 
-    AliRICHParam::ShowAxis();
-  }else 
-    new G3GeometryGUI;
-}  
-//__________________________________________________________________________________________________
-void ControlPlots()
-{
-  r->ControlPlots();
-  new TBrowser;
-}
+void t   (Int_t evt=0          )   {AliRICHParam::Stack(evt);}    
+void tid (Int_t tid,Int_t evt=0)   {AliRICHParam::Stack(evt,tid);} 
+
+
+Int_t nem (Int_t evt=0) {AliRICHParam::StackCount(kElectron  ,evt);} //utility number of electrons
+Int_t nep (Int_t evt=0) {AliRICHParam::StackCount(kPositron  ,evt);} //utility number of positrons
+Int_t nmup(Int_t evt=0) {AliRICHParam::StackCount(kMuonPlus  ,evt);} //utility number of positive muons
+Int_t nmum(Int_t evt=0) {AliRICHParam::StackCount(kMuonMinus ,evt);} //utility number of negative muons
+Int_t npi0(Int_t evt=0) {AliRICHParam::StackCount(kPi0       ,evt);} //utility number of neutral pions 
+Int_t npip(Int_t evt=0) {AliRICHParam::StackCount(kPiPlus    ,evt);} //utility number of positive pions
+Int_t npim(Int_t evt=0) {AliRICHParam::StackCount(kPiMinus   ,evt);} //utility number of negative pions
+Int_t nk0 (Int_t evt=0) {AliRICHParam::StackCount(kK0        ,evt);} //utility number of neutral kaons
+Int_t nkp (Int_t evt=0) {AliRICHParam::StackCount(kKPlus     ,evt);} //utility number of positive kaons
+Int_t nkm (Int_t evt=0) {AliRICHParam::StackCount(kKMinus    ,evt);} //utility number of negative kaons
+Int_t npp (Int_t evt=0) {AliRICHParam::StackCount(kProton    ,evt);} //utility number of protons
+Int_t npm (Int_t evt=0) {AliRICHParam::StackCount(kProtonBar ,evt);} //utility number of antiprotons