]> git.uio.no Git - u/mrichter/AliRoot.git/blob - MUON/MUONrecodisplay.C
Protection against wrong name added
[u/mrichter/AliRoot.git] / MUON / MUONrecodisplay.C
1 #include <iostream.h>
2
3 void MUONrecodisplay(Int_t evNumber=0)
4 {
5 ////////////////////////////////////////////////////////////////////
6 // The display pops up a context menu when the right-button is    //
7 //      clicked on the main pad. The following functions are available //
8 //      * SetDrawHits() - switches on or off Geant hits ;                               //
9 //      * CutMomentum() - displays only tracks within Pmin - Pmax       //
10 //      * ListTracks()  - prints ID and momentum info. for all                          //
11 //      tracks within momentum range Pmin,Pmax;                                                         //
12 //      * Highlight()   - shows only one selected reco. track                           //
13 //      and its best matching Geant track;                                                                              //
14 //      *UnHighlight()  - self explaining;                                                                              //
15 //      *SetDrawHits()  - switch on or off Geant hits                                                   //
16 ////////////////////////////////////////////////////////////////////
17    if (evNumber<0) return;
18
19
20 //Dynamically link some shared libs
21    if (gClassTable->GetID("AliRun") < 0) {
22       gROOT->LoadMacro("loadlibs.C");
23         loadlibs();
24    }
25     
26    
27 // Connect the Root Galice file containing ...
28     
29    TFile *galice_file = (TFile*)gROOT->GetListOfFiles()->FindObject("galice.root");
30    if (!galice_file) galice_file = new TFile("galice.root");
31    if (!galice_file) {
32       cout << "File galice.root not found\n";
33       return;
34    }
35      
36 // Get AliRun object from file or create it if not on file
37    if (!gAlice) {
38         gAlice = (AliRun*)galice_file->Get("gAlice");
39         if (gAlice) {
40          cout << "AliRun object found on file\n";
41       } else {
42          cout << "AliRun object not found on file !!!\n";
43          return;
44       }
45    }
46     
47    AliMUONRecoDisplay *display = new AliMUONRecoDisplay(evNumber);   
48
49    display->DisableDetector("ITS");
50    display->DisableDetector("TPC");
51    display->DisableDetector("TOF");
52    display->DisableDetector("RICH");
53    display->DisableDetector("ZDC");
54    display->DisableDetector("CASTOR");
55    display->DisableDetector("TRD");
56    display->DisableDetector("FMD");
57    display->DisableDetector("PHOS");
58    display->DisableDetector("PMD");
59
60    display->ShowNextEvent(0);
61
62 }