1 // option 1 : idres=114 if j/psi
2 // idres=116 if upsilon
4 // option 2 : ireadgeant=1 if geant hits
5 // ireadgeant=0 if space points
7 // option 3 : ibgr=1 if upsilon+background (option 3 usefull only for geant hits)
8 // ibgr=0 if no background
10 void MUONtestzaza (Int_t evNumber1=0, Int_t evNumber2=99, Int_t idres=116, Int_t ireadgeant=1, Int_t ibgr=0)
12 /////////////////////////////////////////////////////////////////////////
13 // This macro is a small example of a ROOT macro
14 // illustrating how to read the output of GALICE
15 // and do some analysis.
17 /////////////////////////////////////////////////////////////////////////
19 // Dynamically link some shared libs
21 if (gClassTable->GetID("AliRun") < 0) {
22 gROOT->LoadMacro("loadlibs.C");
25 // Connect the Root Galice file containing Geometry, Kine and Hits
27 TFile *file = (TFile*)gROOT->GetListOfFiles()->FindObject("galice.root");
30 printf("\n Creating galice.root \n");
31 file = new TFile("galice.root");
32 } else { printf("\n galice.root found in file list");
36 // Get AliRun object from file or create it if not on file
38 gAlice = (AliRun*)(file->Get("gAlice"));
39 if (gAlice) printf("AliRun object found on file\n");
41 printf("\n create new gAlice object");
42 gAlice = new AliRun("gAlice","Alice test program");
53 AliMUON *MUON = (AliMUON*) gAlice->GetModule("MUON");
55 Int_t nparticles = gAlice->GetEvent(evNumber1);
56 if (nparticles <= 0) return;
57 MUON->Init(seff,sb0,sbl3);
63 for (Int_t nev= evNumber1; nev<= evNumber2; nev++)
65 printf("nev=%d\n",nev);
66 if (nev != evNumber1) Int_t nparticles = gAlice->GetEvent(nev);
67 if (nev < evNumber1) continue;
68 if (nparticles <= 0) return;
70 if (ireadgeant==1 && ibgr==1) {
71 if (inev_bgd==nev_bgd) inev_bgd=0;
72 MUON->Reconst(ifit,idebug,inev_bgd,nev,idres,ireadgeant,"Add","galice_bgr.root");
76 MUON->Reconst(ifit,idebug,inev_bgd,nev,idres,ireadgeant,"rien1","rien2");