]>
Commit | Line | Data |
---|---|---|
db910db9 | 1 | AliRun *a; AliStack *s; AliRunLoader *al; //globals for easy manual manipulations |
122efc54 | 2 | AliRICH *r; AliLoader *rl; |
8493d0aa | 3 | |
db910db9 | 4 | //++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ |
8493d0aa | 5 | Bool_t AliceRead() |
473cb33a | 6 | { |
8493d0aa | 7 | Info("ReadAlice","Tring to read ALICE from SIMULATED FILE..."); |
473cb33a | 8 | if(gAlice){ |
9 | delete gAlice->GetRunLoader(); | |
10 | delete gAlice; | |
11 | } | |
8493d0aa | 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()); | |
722b211e | 26 | GeomAlign(kTRUE); |
8493d0aa | 27 | RichGet(); |
28 | return kTRUE; //old session opened from file | |
29 | } | |
30 | }//AliceRead() | |
31 | //__________________________________________________________________________________________________ | |
722b211e | 32 | void GeomAlign(Bool_t isAlign) |
33 | { | |
34 | if(gGeoManager) delete gGeoManager; | |
35 | if(AliRICHParam::Instance()) delete AliRICHParam::Instance(); | |
36 | if(isAlign) | |
37 | TGeoManager::Import("geometry.root"); | |
38 | else | |
39 | TGeoManager::Import("misaligned_geometry.root"); | |
40 | AliRICHParam::Instance(); | |
41 | } | |
42 | //__________________________________________________________________________________________________ | |
8493d0aa | 43 | void AliceNew() |
44 | { | |
45 | Info("AliceNew","Init new session"); | |
46 | new AliRun("gAlice","Alice experiment system"); gAlice->Init(); a=gAlice; al=gAlice->GetRunLoader(); | |
47 | }//AliceNew() | |
48 | //__________________________________________________________________________________________________ | |
49 | void RichGet() | |
50 | { | |
db910db9 | 51 | if(!(r=(AliRICH*)al->GetAliRun()->GetDetector("RICH"))) Warning("RICH/menu.C::ReadAlice","No RICH in file"); |
52 | if(!(rl=al->GetDetectorLoader("RICH"))) Warning("RICH/menu.C::ReadAlice","No RICH loader in file"); | |
473cb33a | 53 | } |
8493d0aa | 54 | |
8493d0aa | 55 | //__________________________________________________________________________________________________ |
473cb33a | 56 | void RichMenu() |
8493d0aa | 57 | { |
58 | TControlBar *pMenu = new TControlBar("vertical","MAIN"); | |
473cb33a | 59 | |
8493d0aa | 60 | if(AliceRead()){//it's from file, show some info |
722b211e | 61 | pMenu->AddButton("Geometry Align OK " ,"GeomAlign(kTRUE);" , "Ideal Geometry Aligned"); |
62 | pMenu->AddButton("Geometry MisAligned SET" ,"GeomAlign(kFALSE);" , "Misaligned Geometry SET"); | |
122efc54 | 63 | pMenu->AddButton("Display single chambers" ,"r->Display();" , "Display Fast"); |
64 | pMenu->AddButton("Display ALL chambers" ,"r->DisplayEvent(0,0);" , "Display Fast"); | |
122efc54 | 65 | pMenu->AddButton("Recon with stack" ,"AliRICHReconstructor::CheckPR( )","Create RSR.root with ntuple hn"); |
01c81d9d | 66 | pMenu->AddButton("RichAna no Recon" ,"AliRICHReconstructor::RichAna(0,0,kFALSE)","Create RichAna.root with ntuple hn without PatRec"); |
67 | pMenu->AddButton("RichAna with Recon" ,"AliRICHReconstructor::RichAna(0,0,kTRUE )","Create RichAna.root with ntuple hn with PatRec"); | |
db910db9 | 68 | pMenu->AddButton("HITS Print" ,"h();" ,"To print hits: h()"); |
69 | pMenu->AddButton("HITS QA" ,"hqa()" ,"QA plots for hits: hqa()"); | |
01c81d9d | 70 | pMenu->AddButton("Print sdigits" ,"s();" ,"To print sdigits: s()"); |
71 | pMenu->AddButton("Print digits" ,"d();" ,"To print digits: d()"); | |
db910db9 | 72 | pMenu->AddButton("Clusters print" ,"c();" ,"To print clusters: c()"); |
73 | pMenu->AddButton("Clusters QA" ,"cqa();" ,"Clusters QA: cqa() or AliRICHReconstructor::CluQA(al)"); | |
74 | pMenu->AddButton("Print ESD" ,"e();" ,"To print ESD status"); | |
2a92c3fe | 75 | pMenu->AddButton("Print Matrix" ,"m();" ,"To print probability matrix"); |
01c81d9d | 76 | pMenu->AddButton("Print occupancy" ,"r->OccupancyPrint(-1);" ,"To print occupancy"); |
77 | pMenu->AddButton("Print event summary " ,"r->SummaryOfEvent();" ,"To print a summary of the event"); | |
473cb33a | 78 | }else{//it's aliroot, simulate |
79 | pMenu->AddButton("Debug ON", "DebugON();", "Switch debug on-off"); | |
8493d0aa | 80 | pMenu->AddButton("Debug OFF", "DebugOFF();", "Switch debug on-off"); |
db910db9 | 81 | pMenu->AddButton("Run", "a->Run(1)", "Process!"); |
473cb33a | 82 | } |
8493d0aa | 83 | pMenu->AddButton("Test segmentation" ,"rp->TestSeg()" ,"Test AliRICHParam segmentation methods" ); |
84 | pMenu->AddButton("Test response" ,"rp->TestResp()" ,"Test AliRICHParam response methods" ); | |
85 | pMenu->AddButton("Test transformation","rp->TestTrans()","Test AliRICHParam transformation methods" ); | |
122efc54 | 86 | pMenu->AddButton("Geo GUI" ,"geo();" ,"Shows geometry" ); |
87 | pMenu->AddButton("Debug ON" ,"AliLog::SetGlobalDebugLevel(AliLog::kDebug);" ,"Switch debug on" ); | |
88 | pMenu->AddButton("Debug OFF" ,"AliLog::SetGlobalDebugLevel(0);" ,"Switch debug off" ); | |
89 | pMenu->AddButton("Browser" ,"new TBrowser;" ,"Start ROOT TBrowser" ); | |
90 | pMenu->AddButton("Quit" ,".q" ,"Close session" ); | |
473cb33a | 91 | pMenu->Show(); |
92 | }//menu() | |
93 | //__________________________________________________________________________________________________ | |
94 | void DebugOFF(){ Info("DebugOFF",""); AliLog::SetGlobalDebugLevel(0);} | |
95 | void DebugON() { Info("DebugON",""); AliLog::SetGlobalDebugLevel(AliLog::kDebug);} | |
db910db9 | 96 | //void geo ( ) { gGeoManager->SetVisOption(0);gGeoManager->GetTopVolume()->Draw(); AliRICHParam::DrawAxis();} |
97 | void geo() { if(!gGeoManager) TGeoManager::Import("geometry.root");gGeoManager->GetTopVolume()->Draw();AliRICHParam::DrawAxis();} | |
98 | ||
122efc54 | 99 | void dis (Int_t evt=-1) {r->Display (evt);} //utility display |
100 | void dum ( ) {r->Dump ( );} //utility display | |
101 | ||
db910db9 | 102 | void h (Int_t evt=0 ) {r->HitPrint (evt);} //print hits for requested event |
103 | void hqa ( ) {r->HitQA ( );} //hits QA plots for all events | |
104 | ||
105 | void s (Int_t evt=0 ) {r->SDigPrint (evt);} //print sdigits for requested event | |
106 | ||
107 | void d (Int_t evt=0 ) {r->DigPrint (evt);} //print digits for requested event | |
108 | void dqa ( ) {AliRICHReconstructor::DigQA (al );} //digits QA plots for all events | |
122efc54 | 109 | |
122efc54 | 110 | |
db910db9 | 111 | void c (Int_t evt=0 ) {r->CluPrint (evt);} //print clusters for requested event |
112 | void cqa ( ) {AliRICHReconstructor::CluQA (al );} //clusters QA plots for all events | |
113 | void ct ( ) {AliRICHReconstructor::Test ( );} //test clusters by predifined list of digits | |
122efc54 | 114 | |
db910db9 | 115 | void t (Int_t evt=0 ) {AliRICHParam::Stack(evt);} |
116 | void tid (Int_t tid,Int_t evt=0) {AliRICHParam::Stack(evt,tid);} | |
117 | void e ( ) {AliRICHTracker::EsdPrint();} | |
2a92c3fe | 118 | void m (Double_t probCut=0.7 ) {AliRICHTracker::MatrixPrint(probCut);} |
122efc54 | 119 | |
db910db9 | 120 | Int_t nem (Int_t evt=0) {AliRICHParam::StackCount(kElectron ,evt);} //utility number of electrons |
121 | Int_t nep (Int_t evt=0) {AliRICHParam::StackCount(kPositron ,evt);} //utility number of positrons | |
122 | Int_t nmup(Int_t evt=0) {AliRICHParam::StackCount(kMuonPlus ,evt);} //utility number of positive muons | |
123 | Int_t nmum(Int_t evt=0) {AliRICHParam::StackCount(kMuonMinus ,evt);} //utility number of negative muons | |
124 | Int_t npi0(Int_t evt=0) {AliRICHParam::StackCount(kPi0 ,evt);} //utility number of neutral pions | |
125 | Int_t npip(Int_t evt=0) {AliRICHParam::StackCount(kPiPlus ,evt);} //utility number of positive pions | |
126 | Int_t npim(Int_t evt=0) {AliRICHParam::StackCount(kPiMinus ,evt);} //utility number of negative pions | |
127 | Int_t nk0 (Int_t evt=0) {AliRICHParam::StackCount(kK0 ,evt);} //utility number of neutral kaons | |
128 | Int_t nkp (Int_t evt=0) {AliRICHParam::StackCount(kKPlus ,evt);} //utility number of positive kaons | |
129 | Int_t nkm (Int_t evt=0) {AliRICHParam::StackCount(kKMinus ,evt);} //utility number of negative kaons | |
130 | Int_t npp (Int_t evt=0) {AliRICHParam::StackCount(kProton ,evt);} //utility number of protons | |
131 | Int_t npm (Int_t evt=0) {AliRICHParam::StackCount(kProtonBar ,evt);} //utility number of antiprotons |