]> git.uio.no Git - u/mrichter/AliRoot.git/blob - PWGGA/PHOSTasks/PHOS_PbPb/macros/QA/DrawQAFill.C
Updates to PHOSPi0Flow QA macros
[u/mrichter/AliRoot.git] / PWGGA / PHOSTasks / PHOS_PbPb / macros / QA / DrawQAFill.C
1 #include "TCanvas.h" // needed for some reason.
2
3 TFile* file;
4 const char* prefixToName = "imgsFill/";
5 const char* appendToName = ".pdf";
6 const int kNCents = 1;
7
8 void Draw(const char* name, const char* options = "", double yFrom=0., double yTo=-1.)
9 {
10   TH1* hist = ((TH1*)file->Get(name))->Clone();
11
12   if( yFrom < yTo )
13     hist->GetYaxis()->SetRangeUser(yFrom, yTo);
14
15   TCanvas* canv = new TCanvas;
16   //canv->SetGrid();
17   //hist->GetYaxis()->SetNdivisions(16);
18
19   if( TString(options).Contains("LINFIT") )
20     hist->Fit("pol0", "Q");
21
22   hist->DrawCopy(options);
23
24   canv->SaveAs(Form("%s%s%s", prefixToName, hist->GetName(), appendToName ));
25   delete hist;
26 }
27
28 void DrawQAFill()
29 {
30   gStyle->SetOptStat(0);
31   gStyle->SetOptFit(1);
32
33   file = TFile::Open("outputQAFill.root", "read");
34
35   Draw("grVtxZ10Cent", "", 0.7, 1.);
36   // Draw("grNCellsM1", "E");
37   // Draw("grNCellsM2");
38   // Draw("grNCellsM3");
39   // Draw("grECluster", "", 0.5, 0.7);
40   Draw("grNCluster", "", 0, 40);
41   Draw("grNTracks0", "", 0 , 12000);
42   // Draw("grNPhotAll_cen0", "", 0, 40);
43   // Draw("grNPhotAllcore_cen0", "", 0, 40);
44   // Draw("grNPhotAllwou_cen0", "", 0, 40);
45   // Draw("grNPhotDisp_cen0", "", 0, 40);
46   // Draw("grNPhotDisp2_cen0", "", 0, 40);
47   // Draw("grNPhotDispwou_cen0", "", 0, 40);
48   // Draw("grNPhotCPV_cen0", "", 0, 40);
49   // Draw("grNPhotCPV2_cen0", "", 0, 40);
50   // Draw("grNPhotBoth_cen0", "", 0, 40);
51   // Draw("grEnAll_cen0", "", 0.4, 0.7);
52   // Draw("grEnAllcore_cen0", "", 0.4, 0.7);
53   // Draw("grEnAllwou_cen0", "", 0.4, 0.7);
54   // Draw("grEnDisp_cen0", "", 0.4, 0.7);
55   // Draw("grEnDisp2_cen0", "", 0.4, 0.7);
56   // Draw("grEnDispcore_cen0", "", 0.4, 0.7);
57   // Draw("grEnDispwou_cen0", "", 0.4, 0.7);
58   // Draw("grEnCPV_cen0", "", 0.4, 0.7);
59   // Draw("grEnCPVcore_cen0", "", 0.4, 0.7);
60   // Draw("grEnCPV2_cen0", "", 0.4, 0.7);
61   // Draw("grEnBoth_cen0", "", 0.4, 0.7);
62   // Draw("grEnBothcore_cen0", "", 0.4, 0.7);
63
64
65   Draw("grMPi0", "LINFIT", 0.13, 0.15);
66   Draw("grWPi0", "LINFIT");
67   Draw("grNPi0", "LINFIT");
68
69   file->Close();
70 }