1 /**************************************************************************
2 * Copyright(c) 1998-1999, ALICE Experiment at CERN, All rights reserved. *
4 * Author: The ALICE Off-line Project. *
5 * Contributors are mentioned in the code where appropriate. *
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 **************************************************************************/
18 // Macro MUONTracker.C (TO BE COMPILED)
19 // for testing the C++ reconstruction code
20 // Output is using aliroot standard output MUON.Tracks.root
21 // The output is a TClonesArray of AliMUONTracks.
22 // Gines MARTINEZ, Subatech, sep 2003
24 #if !defined(__CINT__) || defined(__MAKECINT__)
25 #include <TClonesArray.h>
30 #include "AliMUONData.h"
31 #include "AliMUONEventReconstructor.h"
32 #include "AliMUONTrack.h"
33 #include "AliMUONTrackHit.h"
34 #include "AliMUONTrackParam.h"
37 void MUONESDTest (Text_t *FileName = "galice.root", Int_t FirstEvent = 0, Int_t LastEvent = 9999)
40 // Creating Run Loader and openning file containing Hits, Digits and RecPoints
41 AliRunLoader * RunLoader = AliRunLoader::Open(FileName,"Event","UPDATE");
42 if (RunLoader ==0x0) {
43 printf(">>> Error : Error Opening %s file \n",FileName);
46 // Loading AliRun master
47 if (RunLoader->GetAliRun() == 0x0) RunLoader->LoadgAlice();
48 gAlice = RunLoader->GetAliRun();
50 // Loading MUON subsystem
51 AliMUON * MUON = (AliMUON *) gAlice->GetDetector("MUON");
54 nevents = RunLoader->GetNumberOfEvents();
56 if (LastEvent>nevents) LastEvent=nevents;
59 for (Int_t event = FirstEvent; event < LastEvent; event++) {
60 AliESD *esd = new AliESD();
66 void MUONRecoTest (Text_t *FileName = "galice.root")
69 // Creating Run Loader and openning file containing Hits, Digits and RecPoints
70 AliRunLoader * RunLoader = AliRunLoader::Open(FileName,"Event","UPDATE");
71 if (RunLoader ==0x0) {
72 printf(">>> Error : Error Opening %s file \n",FileName);
75 // Loading AliRun master
76 if (RunLoader->GetAliRun() == 0x0) RunLoader->LoadgAlice();
77 gAlice = RunLoader->GetAliRun();
79 // Loading MUON subsystem
80 AliMUON * MUON = (AliMUON *) gAlice->GetDetector("MUON");