]> git.uio.no Git - u/mrichter/AliRoot.git/blame_incremental - RICH/RichMenu.C
Changes to compile dateStream
[u/mrichter/AliRoot.git] / RICH / RichMenu.C
... / ...
CommitLineData
1AliRun *a; AliStack *s; AliRunLoader *al; //globals for easy manual manipulations
2AliRICH *r; AliLoader *rl;
3
4//++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
5Bool_t AliceRead()
6{
7 Info("ReadAlice","Tring to read ALICE from SIMULATED FILE...");
8 if(gAlice){
9 delete gAlice->GetRunLoader();
10 delete gAlice;
11 }
12
13 if(gSystem->Exec("ls galice.root>/dev/null")==256){//there is no galice.root in current directory
14 AliceNew();
15 RichGet();
16 return kFALSE; //new session
17 }else{
18 if(!(al=AliRunLoader::Open())){//if not possible to read from galice.root, then remove grabage and reinvoke AliceRead()
19 gSystem->Exec("rm -rf *.root *.dat");
20 AliceRead();
21 }
22 al->LoadgAlice();//before this gAlice is 0;
23 if(!gAlice) Fatal("menu.C::ReadAlice","No gAlice in file");
24 a=al->GetAliRun();//provides pointer to AliRun object
25 Info("AliceRead","Run contains %i event(s)",a->GetEventsPerRun());
26 RichGet();
27 return kTRUE; //old session opened from file
28 }
29}//AliceRead()
30//__________________________________________________________________________________________________
31void AliceNew()
32{
33 Info("AliceNew","Init new session");
34 new AliRun("gAlice","Alice experiment system"); gAlice->Init(); a=gAlice; al=gAlice->GetRunLoader();
35}//AliceNew()
36//__________________________________________________________________________________________________
37void RichGet()
38{
39 if(!(r=(AliRICH*)al->GetAliRun()->GetDetector("RICH"))) Warning("RICH/menu.C::ReadAlice","No RICH in file");
40 if(!(rl=al->GetDetectorLoader("RICH"))) Warning("RICH/menu.C::ReadAlice","No RICH loader in file");
41}
42
43//__________________________________________________________________________________________________
44void RichMenu()
45{
46 TControlBar *pMenu = new TControlBar("vertical","MAIN");
47
48 if(AliceRead()){//it's from file, show some info
49 pMenu->AddButton("Display single chambers" ,"r->Display();" , "Display Fast");
50 pMenu->AddButton("Display ALL chambers" ,"r->DisplayEvent(0,0);" , "Display Fast");
51 pMenu->AddButton("Recon with stack" ,"AliRICHReconstructor::CheckPR( )","Create RSR.root with ntuple hn");
52 pMenu->AddButton("RichAna no Recon" ,"AliRICHReconstructor::RichAna(0,0,kFALSE)","Create RichAna.root with ntuple hn without PatRec");
53 pMenu->AddButton("RichAna with Recon" ,"AliRICHReconstructor::RichAna(0,0,kTRUE )","Create RichAna.root with ntuple hn with PatRec");
54 pMenu->AddButton("HITS Print" ,"h();" ,"To print hits: h()");
55 pMenu->AddButton("HITS QA" ,"hqa()" ,"QA plots for hits: hqa()");
56 pMenu->AddButton("Print sdigits" ,"s();" ,"To print sdigits: s()");
57 pMenu->AddButton("Print digits" ,"d();" ,"To print digits: d()");
58 pMenu->AddButton("Clusters print" ,"c();" ,"To print clusters: c()");
59 pMenu->AddButton("Clusters QA" ,"cqa();" ,"Clusters QA: cqa() or AliRICHReconstructor::CluQA(al)");
60 pMenu->AddButton("Print ESD" ,"e();" ,"To print ESD status");
61 pMenu->AddButton("Print Matrix" ,"m();" ,"To print probability matrix");
62 pMenu->AddButton("Print occupancy" ,"r->OccupancyPrint(-1);" ,"To print occupancy");
63 pMenu->AddButton("Print event summary " ,"r->SummaryOfEvent();" ,"To print a summary of the event");
64 }else{//it's aliroot, simulate
65 pMenu->AddButton("Debug ON", "DebugON();", "Switch debug on-off");
66 pMenu->AddButton("Debug OFF", "DebugOFF();", "Switch debug on-off");
67 pMenu->AddButton("Run", "a->Run(1)", "Process!");
68 }
69 pMenu->AddButton("Test segmentation" ,"rp->TestSeg()" ,"Test AliRICHParam segmentation methods" );
70 pMenu->AddButton("Test response" ,"rp->TestResp()" ,"Test AliRICHParam response methods" );
71 pMenu->AddButton("Test transformation","rp->TestTrans()","Test AliRICHParam transformation methods" );
72 pMenu->AddButton("Geo GUI" ,"geo();" ,"Shows geometry" );
73 pMenu->AddButton("Debug ON" ,"AliLog::SetGlobalDebugLevel(AliLog::kDebug);" ,"Switch debug on" );
74 pMenu->AddButton("Debug OFF" ,"AliLog::SetGlobalDebugLevel(0);" ,"Switch debug off" );
75 pMenu->AddButton("Browser" ,"new TBrowser;" ,"Start ROOT TBrowser" );
76 pMenu->AddButton("Quit" ,".q" ,"Close session" );
77 pMenu->Show();
78}//menu()
79//__________________________________________________________________________________________________
80void DebugOFF(){ Info("DebugOFF",""); AliLog::SetGlobalDebugLevel(0);}
81void DebugON() { Info("DebugON",""); AliLog::SetGlobalDebugLevel(AliLog::kDebug);}
82//void geo ( ) { gGeoManager->SetVisOption(0);gGeoManager->GetTopVolume()->Draw(); AliRICHParam::DrawAxis();}
83void geo() { if(!gGeoManager) TGeoManager::Import("geometry.root");gGeoManager->GetTopVolume()->Draw();AliRICHParam::DrawAxis();}
84
85void dis (Int_t evt=-1) {r->Display (evt);} //utility display
86void dum ( ) {r->Dump ( );} //utility display
87
88void h (Int_t evt=0 ) {r->HitPrint (evt);} //print hits for requested event
89void hqa ( ) {r->HitQA ( );} //hits QA plots for all events
90
91void s (Int_t evt=0 ) {r->SDigPrint (evt);} //print sdigits for requested event
92
93void d (Int_t evt=0 ) {r->DigPrint (evt);} //print digits for requested event
94void dqa ( ) {AliRICHReconstructor::DigQA (al );} //digits QA plots for all events
95
96
97void c (Int_t evt=0 ) {r->CluPrint (evt);} //print clusters for requested event
98void cqa ( ) {AliRICHReconstructor::CluQA (al );} //clusters QA plots for all events
99void ct ( ) {AliRICHReconstructor::Test ( );} //test clusters by predifined list of digits
100
101void t (Int_t evt=0 ) {AliRICHParam::Stack(evt);}
102void tid (Int_t tid,Int_t evt=0) {AliRICHParam::Stack(evt,tid);}
103void e ( ) {AliRICHTracker::EsdPrint();}
104void m (Double_t probCut=0.7 ) {AliRICHTracker::MatrixPrint(probCut);}
105
106Int_t nem (Int_t evt=0) {AliRICHParam::StackCount(kElectron ,evt);} //utility number of electrons
107Int_t nep (Int_t evt=0) {AliRICHParam::StackCount(kPositron ,evt);} //utility number of positrons
108Int_t nmup(Int_t evt=0) {AliRICHParam::StackCount(kMuonPlus ,evt);} //utility number of positive muons
109Int_t nmum(Int_t evt=0) {AliRICHParam::StackCount(kMuonMinus ,evt);} //utility number of negative muons
110Int_t npi0(Int_t evt=0) {AliRICHParam::StackCount(kPi0 ,evt);} //utility number of neutral pions
111Int_t npip(Int_t evt=0) {AliRICHParam::StackCount(kPiPlus ,evt);} //utility number of positive pions
112Int_t npim(Int_t evt=0) {AliRICHParam::StackCount(kPiMinus ,evt);} //utility number of negative pions
113Int_t nk0 (Int_t evt=0) {AliRICHParam::StackCount(kK0 ,evt);} //utility number of neutral kaons
114Int_t nkp (Int_t evt=0) {AliRICHParam::StackCount(kKPlus ,evt);} //utility number of positive kaons
115Int_t nkm (Int_t evt=0) {AliRICHParam::StackCount(kKMinus ,evt);} //utility number of negative kaons
116Int_t npp (Int_t evt=0) {AliRICHParam::StackCount(kProton ,evt);} //utility number of protons
117Int_t npm (Int_t evt=0) {AliRICHParam::StackCount(kProtonBar ,evt);} //utility number of antiprotons