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