]> git.uio.no Git - u/mrichter/AliRoot.git/blame - MUON/MUONdisplay.C
Updated list of MUON libraries
[u/mrichter/AliRoot.git] / MUON / MUONdisplay.C
CommitLineData
7ddb761c 1/**************************************************************************
2 * Copyright(c) 1998-1999, ALICE Experiment at CERN, All rights reserved. *
3 * *
4 * Author: The ALICE Off-line Project. *
5 * Contributors are mentioned in the code where appropriate. *
6 * *
7 * Permission to use, copy, modify and distribute this software and its *
8 * documentation strictly for non-commercial purposes is hereby granted *
9 * without fee, provided that the above copyright notice appears in all *
10 * copies and that both the copyright notice and this permission notice *
11 * appear in the supporting documentation. The authors make no claims *
12 * about the suitability of this software for any purpose. It is *
13 * provided "as is" without express or implied warranty. *
14 **************************************************************************/
15
16
17#if !defined(__CINT__) || defined(__MAKECINT__)
18//#include "iostream.h"
19
20#include <TClassTable.h>
21#include <TClonesArray.h>
22#include <TFile.h>
23#include <TParticle.h>
24#include <TROOT.h>
25#include <TTree.h>
26
27#include "AliHeader.h"
28#include "AliRun.h"
29#include "AliRunLoader.h"
30#include "AliMagF.h"
31
32#include "AliMUON.h"
33#include "AliMUONDisplay.h"
34#endif
35
36
37
6b092dfc 38void MUONdisplay (Int_t nevent=0,
39 TString fileName="galice.root",
40 TString fileNameSim="galice_sim.root") {
7ddb761c 41
42 // set off mag field
43 AliMagF::SetReadField(kFALSE);
7985603c 44
45 // Getting runloader
6b092dfc 46 AliRunLoader * RunLoaderSim = AliRunLoader::Open(fileNameSim.Data(),"MUONFolderSim","READ");
47 if (RunLoaderSim == 0x0) {
c9d10ab5 48 Error("MUONdisplay","Inut file %s error!",fileName.Data());
7985603c 49 return;
50 }
6b092dfc 51 RunLoaderSim->LoadHeader();
52 RunLoaderSim->LoadKinematics("READ");
a897a37a 53
7ddb761c 54 // if (RunLoader->GetAliRun() == 0x0)
6b092dfc 55 RunLoaderSim->LoadgAlice();
56 gAlice = RunLoaderSim->GetAliRun();
7ddb761c 57
7985603c 58 // Getting MUONloader
6b092dfc 59 AliLoader * MUONLoaderSim = RunLoaderSim->GetLoader("MUONLoader");
60 MUONLoaderSim->LoadHits("READ");
61 MUONLoaderSim->LoadDigits("READ");
62
63 // Getting runloader
64 AliRunLoader * RunLoaderRec = AliRunLoader::Open(fileName.Data(),"MUONFolder","READ");
65 if (RunLoaderRec == 0x0) {
66 Error("MUONdisplay","Inut file %s error!",fileName.Data());
67 return;
68 }
69 AliLoader * MUONLoaderRec = RunLoaderRec->GetLoader("MUONLoader");
70 MUONLoaderRec->LoadRecPoints("READ");
71 MUONLoaderRec->LoadTracks("READ");
7985603c 72
7985603c 73
7ddb761c 74 // Create Event Display object
6b092dfc 75 AliMUONDisplay *muondisplay = new AliMUONDisplay(750, MUONLoaderSim, MUONLoaderRec);
fe4da5cc 76
7ddb761c 77 // Display first event
6b092dfc 78 RunLoaderSim->GetEvent(nevent);
79 RunLoaderRec->GetEvent(nevent);
7ddb761c 80 muondisplay->ShowNextEvent(0);
fe4da5cc 81}