Protection aginst 0 returned by rndm as argument to log function
[u/mrichter/AliRoot.git] / PWG0 / dNdEta / CreatedNdEta.C
CommitLineData
5fbd0b17 1// this macro combines the correction and the analysis and draws them
2
93b20362 3void CreatedNdEta(Bool_t correct = kTRUE, const Char_t* filename = "analysis_esd.root")
5fbd0b17 4{
5 gSystem->Load("libPWG0base");
6
7 dNdEtaCorrection* dNdEtaCorrection = 0;
8 if (correct)
9 {
10 dNdEtaCorrection = new dNdEtaCorrection();
11 dNdEtaCorrection->LoadHistograms("correction_map.root","dndeta_correction");
12 dNdEtaCorrection->RemoveEdges(2, 0, 2);
13 }
14
15 fdNdEtaAnalysis = new dNdEtaAnalysis("dndeta", "dndeta");
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
25 fdNdEtaAnalysis->Finish(dNdEtaCorrection);
26
27 fdNdEtaAnalysis->DrawHistograms();
28}
29
30