]> git.uio.no Git - u/mrichter/AliRoot.git/blob - MUON/MUONAnalysisAOD.C
Corrected some manu Id's in mapping for slat and updated the serial manu numbers
[u/mrichter/AliRoot.git] / MUON / MUONAnalysisAOD.C
1 #if !defined(__CINT__) || defined(__MAKECINT__)
2 // ROOT includes
3 #include <TSystem.h>
4 #include <Riostream.h>
5
6 #include <AliESD.h>
7
8 #include "AliAnalysis.h"
9 #include "AliAODRun.h"
10 #include "AliAOD.h"
11 #include "AliAODParticle.h"
12 #include "AliReaderESDTree.h"
13 #include "AliRunAnalysis.h"
14 #include "AliMuonAnalysis.h"
15 #endif
16
17
18 /////////////////////////////////////////////////////////////////////////////
19 // first version for analysing the invariant mass plot in the AOD framework
20 // since the framework is in progress, this macro may change as a consequence
21 // don't forget the include with ".includepath $ALICE_ROOT/ANALYSIS"
22 // if you compile this macro comment out 
23 // gSystem->Load("$(ALICE_ROOT)/lib/tgt_$(ALICE_TARGET)/libANALYSIS.so");
24 // and launch this command in Aliroot outside the macro
25 //
26 // Ch. Finck
27 /////////////////////////////////////////////////////////////////////////////
28
29 void analysisAOD(Int_t first = 0, Int_t last = 99999, const Char_t* esdfilename = "AliESDs.root")
30 {
31
32   gSystem->Load("$(ALICE_ROOT)/lib/tgt_$(ALICE_TARGET)/libANALYSIS.so");
33
34   AliVAODParticle::SetDebug(0);
35   AliRunAnalysis* analysis = new AliRunAnalysis();
36   
37   // set reader for ESD
38   AliReaderESDTree* reader = new AliReaderESDTree(esdfilename);
39   // active muon ESD reader
40   reader->SetReadMuon(kTRUE);
41   // disable central barrel (default = kTRUE)
42   reader->SetReadCentralBarrel(kFALSE);
43   // disable simulated data (not implemented yet)
44   reader->ReadSimulatedData(kFALSE);
45   // number of event to be read
46   reader->ReadEventsFromTo(first,last);
47
48   // set MUON analysis
49   AliMuonAnalysis* muon = new AliMuonAnalysis();
50   analysis->SetReader(reader);
51   
52   analysis->Add(muon);
53   analysis->Run();
54   delete analysis;
55 }