Increment the version number
[u/mrichter/AliRoot.git] / RICH / rMenu.C
CommitLineData
a77900f3 1Int_t giNevents;//should be global for menu->AddButton(...)
2
3void rMenu(Int_t iNevents=1)// How many events to generate, digitise etc.
4{
5 giNevents=iNevents;
6 cout<<giNevents<<" event(s) are requested\n";
7
8 gROOT->ProcessLine(".x loadlibs.C"); // load ALICE libraries if that are not yet loaded. see rich/loadlibs.C
9
10 TControlBar *menu = new TControlBar("vertical","RICH");
11
12 menu->AddButton("Help for RICH", "gSystem->Exec(\"less RICHHelp.txt\");", "Explains how to use RICH menus");
13 menu->AddButton("Run", "gAlice->Run(giNevents)","Process an Alice event - WARNING: Overwrites previous data file!");
14 menu->AddButton("Run Lego", ".x RICHRunLego.C","Special runs to generate the radl/absl lego plots");
15 menu->AddButton("Merge and Digitise", "MergeAndDigitise()","Merge with background file and digitise");
16 menu->AddButton("Clusterize Event", ".x RICHrawclusters.C(0,events-1)","Reconstruct clusters");
17 menu->AddButton("3D Hough Pat. Rec.", ".x RICHdetect.C(0,events-1)","Lisbon");
18 menu->AddButton("1D Hough Pat. Rec.", ".x RICHpatrec.C(0,events-1)","Bari");
19 menu->AddButton("Diagnostics", "Diagnostics()", "Miscellaneous diagnostics");
20 menu->AddButton("Display", ".x RICHdisplay.C","Display run");
21 menu->AddButton("Geometry Browser", "Gui()","Browse the GEANT geometry - WARNING: Overwrites previous data file!");
22 menu->AddButton("File Browser", "TBrowser new;","Browse data files");
23 menu->AddButton("Quit AliRoot", ".q","Close session");
24
25 menu->Show();
26}//void rmenu(
27
28void RICHInit(Int_t events)
29{
30 gAlice->Init("Config.C");
31 ((TGeant3*)gMC)->InitHIGZ();
32 gAlice->Run(events);
33}
34
35void Gui()
36{
37 gAlice->Init("Config.C");
38 ((TGeant3*)gMC)->InitHIGZ();
39 gROOT->ProcessLine(".x TGeant3GUI.C");
40}
41
42void MergeAndDigitise(Int_t iFirstEventN=0,Int_t iLastEventN=giNevents-1, Int_t merging=0)
43{
44 TFile *pFile = (TFile*)gROOT->GetListOfFiles()->FindObject("galice.root");
45 if(!pFile){
46 cout<<"MergeAndDigitise> Opening file galice.root\n";
47 pFile = new TFile("galice.root","UPDATE");
48 }
49
50 if(!gAlice) gAlice=(AliRun*)pFile->Get("gAlice");
51 cout<<"MergerAndDigitise> "<<gAlice->GetEvNumber()<<" events found\n";
52
53 AliRICHMerger* pRICHMerger = new AliRICHMerger();
54
55 pRICHMerger->SetMode(merging);
56 pRICHMerger->SetSignalEventNumber(0);
57 pRICHMerger->SetBackgroundEventNumber(0);
58 pRICHMerger->SetBackgroundFileName("bg.root");
59
60 AliRICH *pRICH= (AliRICH*) gAlice->GetDetector("RICH");
61 pRICH->Print();
62
63}//void MergeAndDigitise(Int_t evNumber1=0,Int_t evNumber2=0, Int_t merging=0)
64
65
66void Diagnostics()
67{
68 TControlBar *menu = new TControlBar("vertical","RICH diag");
69
70 menu->AddButton("Single Ring Hits",".x RICHpadtest.C(1,0,events-1","Hits in central region");
71 menu->AddButton("Single Ring Spectra",".x RICHpadtest.C(2,0,events-1","Photon spectra");
72 menu->AddButton("Single Ring Statistics",".x RICHpadtest.C(3,0,events-1","Production and clusters");
73 menu->AddButton("Single Ring Reconstruction",".x RICHpadtest.C(4,0,events-1","Generated and reconstructed values");
74 menu->AddButton("Single Ring Gain Variation",".x RICHgainvar.C(0,events-1","Gain variation along wires");
75 menu->AddButton("Full Event Hits",".x RICHpadtest.C(5,0,events-1","Hits in seven modules");
76 menu->AddButton("Full Event Spectra",".x RICHpadtestC.C","Individual particles' spectra and fluxes");
77 menu->AddButton("Full Event Occupancy",".x RICHoccupancy.C","Mean and per chamber occupancy");
78
79 menu->Show();
80}//void Diagnostics()