X-Git-Url: http://git.uio.no/git/?a=blobdiff_plain;f=MUON%2FMUONmassPlot_ESD.C;h=85a96086e5720bbe09f94c381b6de9076c9806f9;hb=01413742066dfbda8e7b63cd6774cef829515ae5;hp=dfecc1d6a0e583854f2ebde87b8adc2c8be5b6eb;hpb=22ccc301830030c79561e58f6a0cf62f073b8d05;p=u%2Fmrichter%2FAliRoot.git diff --git a/MUON/MUONmassPlot_ESD.C b/MUON/MUONmassPlot_ESD.C index dfecc1d6a0e..85a96086e57 100644 --- a/MUON/MUONmassPlot_ESD.C +++ b/MUON/MUONmassPlot_ESD.C @@ -11,6 +11,7 @@ #include "TTree.h" #include #include +#include // STEER includes #include "AliRun.h" @@ -20,7 +21,8 @@ #include "AliLoader.h" #include "AliStack.h" #include "AliMagFMaps.h" -#include "AliESD.h" +#include "AliESDEvent.h" +#include "AliESDVertex.h" #include "AliTracker.h" // MUON includes @@ -62,7 +64,7 @@ // Add parameters and histograms for analysis -Bool_t MUONmassPlot(Int_t ExtrapToVertex = -1, char* geoFilename = "geometry.root", char* filename = "galice.root", +Bool_t MUONmassPlot(char* filename = "galice_sim.root", Int_t ExtrapToVertex = -1, char* geoFilename = "geometry.root", Int_t FirstEvent = 0, Int_t LastEvent = 10000, char* esdFileName = "AliESDs.root", Int_t ResType = 553, Float_t Chi2Cut = 100., Float_t PtCutMin = 1., Float_t PtCutMax = 10000., Float_t massMin = 9.17,Float_t massMax = 9.77) @@ -151,12 +153,13 @@ Bool_t MUONmassPlot(Int_t ExtrapToVertex = -1, char* geoFilename = "geometry.roo Error("MUONmass_ESD", "getting run loader from file %s failed", filename); return kFALSE; } - +/* + runLoader->LoadgAlice(); if (!gAlice) { Error("MUONmass_ESD", "no galice object found"); return kFALSE; } - +*/ // open the ESD file TFile* esdFile = TFile::Open(esdFileName); @@ -165,14 +168,14 @@ Bool_t MUONmassPlot(Int_t ExtrapToVertex = -1, char* geoFilename = "geometry.roo return kFALSE; } - AliESD* esd = new AliESD(); + AliESDEvent* esd = new AliESDEvent(); TTree* tree = (TTree*) esdFile->Get("esdTree"); if (!tree) { Error("CheckESD", "no ESD tree found"); return kFALSE; } - tree->SetBranchAddress("ESD", &esd); - +// tree->SetBranchAddress("ESD", &esd); + esd->ReadFromTree(tree); runLoader->LoadHeader();