minor changes to improve serializability
[u/mrichter/AliRoot.git] / PWG0 / dNdEta / CreatedNdEta.C
... / ...
CommitLineData
1// this macro combines the correction and the analysis and draws them
2
3void CreatedNdEta(Bool_t correct = kTRUE, const Char_t* filename = "analysis_esd.root", const char* object = "dndeta")
4{
5 gSystem->Load("libPWG0base");
6
7 AlidNdEtaCorrection* dNdEtaCorrection = 0;
8 if (correct)
9 {
10 dNdEtaCorrection = new AlidNdEtaCorrection("dndeta_correction", "dndeta_correction");
11 dNdEtaCorrection->LoadHistograms("correction_map.root","dndeta_correction");
12 //dNdEtaCorrection->RemoveEdges(2, 0, 2);
13 }
14
15 fdNdEtaAnalysis = new dNdEtaAnalysis(object, object);
16
17 TFile* file = TFile::Open(filename);
18 if (!file)
19 {
20 cout << "Error. File out.root not found" << endl;
21 return;
22 }
23 fdNdEtaAnalysis->LoadHistograms();
24
25 fdNdEtaAnalysis->Finish(dNdEtaCorrection, (correct) ? 0.3 : -1);
26
27 fdNdEtaAnalysis->DrawHistograms();
28}
29
30