1 #include "TCanvas.h" // needed for some reason.
4 const char* prefixToName = "imgsFill/";
5 const char* appendToName = ".pdf";
8 void Draw(const char* name, const char* options = "", double yFrom=0., double yTo=-1.)
10 TH1* hist = ((TH1*)file->Get(name))->Clone();
13 hist->GetYaxis()->SetRangeUser(yFrom, yTo);
15 TCanvas* canv = new TCanvas;
17 //hist->GetYaxis()->SetNdivisions(16);
19 if( TString(options).Contains("LINFIT") )
20 hist->Fit("pol0", "Q");
22 hist->DrawCopy(options);
24 canv->SaveAs(Form("%s%s%s", prefixToName, hist->GetName(), appendToName ));
30 gStyle->SetOptStat(0);
33 file = TFile::Open("outputQAFill.root", "read");
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);
65 Draw("grMPi0", "LINFIT", 0.13, 0.15);
66 Draw("grWPi0", "LINFIT");
67 Draw("grNPi0", "LINFIT");