Store in ESD mip Q as pTrk->SetRICHnclusters(100000*Q+nphots)
[u/mrichter/AliRoot.git] / RICH / RichMenu.C
db910db9 1AliRun *a; AliStack *s; AliRunLoader *al; //globals for easy manual manipulations
122efc54 2AliRICH *r; AliLoader *rl;
8493d0aa 3
db910db9 4//++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
722b211e 5void GeomAlign(Bool_t isAlign)
7 if(gGeoManager) delete gGeoManager;
8 if(AliRICHParam::Instance()) delete AliRICHParam::Instance();
9a221675 9 if(isAlign) TGeoManager::Import("geometry.root");
10 else TGeoManager::Import("misaligned_geometry.root");
722b211e 11 AliRICHParam::Instance();
9a221675 13//++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
473cb33a 14void RichMenu()
8493d0aa 15{
9a221675 16 TString status="Status: ";
17 if(gSystem->IsFileInIncludePath("galice.root")){
18 status+="galice.root found";
19 al=AliRunLoader::Open(); //try to open galice.root from current dir
20 if(gAlice) delete gAlice; //in case we execute this in aliroot delete default AliRun object
21 al->LoadgAlice(); a=al->GetAliRun(); //take new AliRun object from galice.root
22 rl=al->GetDetectorLoader("RICH"); r=(AliRICH*)a->GetDetector("RICH"); //get RICH object from galice.root
24 status+=Form(" with %i event(s)",al->GetNumberOfEvents()); status+=(r)? " with RICH": " without RICH";
25 }else
26 status+="No galice.root";
28 TControlBar *pMenu = new TControlBar("horizontal",status.Data(),0,0);
29 pMenu->AddButton(" ","","");
30 pMenu->AddButton(" General " ,"General()" ,"general items which do not depend on any files");
31 pMenu->AddButton(" ","","");
32 pMenu->AddButton(" Sim data " ,"SimData()" ,"items which expect to have simulated files" );
33 pMenu->AddButton(" ","","");
34 pMenu->AddButton(" Raw data " ,"RawData()" ,"items which expect to have raw files" );
35 pMenu->AddButton(" ","","");
36 pMenu->AddButton("Quit" ,".q" ,"close session" );
37 pMenu->Show();
40void General()
42 TControlBar *pMenu = new TControlBar("vertical","Sim data",60,50);
43 pMenu->AddButton("Debug ON" ,"don();" ,"Switch debug on-off" );
44 pMenu->AddButton("Debug OFF" ,"doff();" ,"Switch debug on-off" );
45 pMenu->AddButton("Test segmentation" ,"AliRICHParam::TestSeg();" ,"Test AliRICHParam segmentation methods" );
46 pMenu->AddButton("Test response" ,"AliRICHParam::TestResp();" ,"Test AliRICHParam response methods" );
47 pMenu->AddButton("Test transformation","AliRICHParam::TestTrans();","Test AliRICHParam transformation methods" );
48 pMenu->AddButton("Geo GUI" ,"geo();" ,"Shows geometry" );
49 pMenu->AddButton("Browser" ,"new TBrowser;" ,"Start ROOT TBrowser" );
50 pMenu->Show();
53void SimData()
55 TControlBar *pMenu = new TControlBar("vertical","Sim",190,50);
122efc54 56 pMenu->AddButton("Display single chambers" ,"r->Display();" , "Display Fast");
57 pMenu->AddButton("Display ALL chambers" ,"r->DisplayEvent(0,0);" , "Display Fast");
db910db9 58 pMenu->AddButton("HITS Print" ,"h();" ,"To print hits: h()");
59 pMenu->AddButton("HITS QA" ,"hqa()" ,"QA plots for hits: hqa()");
01c81d9d 60 pMenu->AddButton("Print sdigits" ,"s();" ,"To print sdigits: s()");
61 pMenu->AddButton("Print digits" ,"d();" ,"To print digits: d()");
9a221675 62 pMenu->Show();
65void RawData()
67 TControlBar *pMenu = new TControlBar("vertical","Raw",350,50);
68 pMenu->AddButton("ESD print" ,"ep();" ,"To print ESD info: ep()" );
69 pMenu->AddButton("ESD QA" ,"eq();" ,"To draw ESD hists: eq()" );
70 pMenu->AddButton("Clusters print" ,"cp();" ,"To print clusters: cp()" );
71 pMenu->AddButton("Clusters QA" ,"cq();" ,"To draw clusters hists: cq()" );
72 pMenu->AddButton("Print Matrix" ,"mp();" ,"To print prob matrix: mp()" );
73 pMenu->AddButton("Print occupancy" ,"r->OccupancyPrint(-1);" ,"To print occupancy" );
74 pMenu->AddButton("Print event summary " ,"r->SummaryOfEvent();" ,"To print a summary of the event" );
75 pMenu->Show();
122efc54 78
db910db9 79
9a221675 80void doff(){ Printf("DebugOFF"); AliLog::SetGlobalDebugLevel(0);}
81void don() { Printf("DebugON"); AliLog::SetGlobalDebugLevel(AliLog::kDebug);}
db910db9 82
9a221675 83void geo() { if(!gGeoManager) TGeoManager::Import("geometry.root");gGeoManager->GetTopVolume()->Draw();AliRICHParam::DrawAxis();}
85void di (Int_t evt=-1 ) {r->Display (evt);} //utility display
86void du ( ) {r->Dump ( );} //utility display
122efc54 87
9a221675 88void hp (Int_t evt=0 ) {r->HitPrint (evt);} //print hits for requested event
89void hq ( ) {r->HitQA ( );} //hits QA plots for all events
90void sp (Int_t evt=0 ) {r->SDigPrint (evt);} //print sdigits for requested event
91void sq (Int_t evt=0 ) {r->SDigPrint (evt);} //print sdigits for requested event
92void dp (Int_t evt=0 ) {r->DigPrint (evt);} //print digits for requested event
93void dq ( ) {AliRICHReconstructor::DigQA (al );} //digits QA plots for all events
94void cp (Int_t evt=0 ) {r->CluPrint (evt);} //print clusters for requested event
95void cq ( ) {AliRICHReconstructor::CluQA (al );} //clusters QA plots for all events
96void ep ( ) {AliRICHTracker::EsdQA(1);}
97void eq ( ) {AliRICHTracker::EsdQA();}
98void mp (Double_t probCut=0.7 ) {AliRICHTracker::MatrixPrint(probCut);}
122efc54 99
db910db9 101void t (Int_t evt=0 ) {AliRICHParam::Stack(evt);}
102void tid (Int_t tid,Int_t evt=0) {AliRICHParam::Stack(evt,tid);}
9a221675 103
122efc54 104
db910db9 105Int_t nem (Int_t evt=0) {AliRICHParam::StackCount(kElectron ,evt);} //utility number of electrons
106Int_t nep (Int_t evt=0) {AliRICHParam::StackCount(kPositron ,evt);} //utility number of positrons
107Int_t nmup(Int_t evt=0) {AliRICHParam::StackCount(kMuonPlus ,evt);} //utility number of positive muons
108Int_t nmum(Int_t evt=0) {AliRICHParam::StackCount(kMuonMinus ,evt);} //utility number of negative muons
109Int_t npi0(Int_t evt=0) {AliRICHParam::StackCount(kPi0 ,evt);} //utility number of neutral pions
110Int_t npip(Int_t evt=0) {AliRICHParam::StackCount(kPiPlus ,evt);} //utility number of positive pions
111Int_t npim(Int_t evt=0) {AliRICHParam::StackCount(kPiMinus ,evt);} //utility number of negative pions
112Int_t nk0 (Int_t evt=0) {AliRICHParam::StackCount(kK0 ,evt);} //utility number of neutral kaons
113Int_t nkp (Int_t evt=0) {AliRICHParam::StackCount(kKPlus ,evt);} //utility number of positive kaons
114Int_t nkm (Int_t evt=0) {AliRICHParam::StackCount(kKMinus ,evt);} //utility number of negative kaons
115Int_t npp (Int_t evt=0) {AliRICHParam::StackCount(kProton ,evt);} //utility number of protons
116Int_t npm (Int_t evt=0) {AliRICHParam::StackCount(kProtonBar ,evt);} //utility number of antiprotons