changed SM range, splitted plotting section
[u/mrichter/AliRoot.git] / HLT / EMCAL / macros / hlt_plot.C
1 void hlt_plot() {
2   
3   gStyle->SetPalette(1);
4   gStyle->SetOptStat("nemruo");
5
6   TFile *f = new TFile("histofile_local.root");  
7   TProfile2D *h[4];
8   TH2F *g[4];
9
10   TCanvas *c[3];
11
12   Char_t outname[256];
13
14   for (int i=0; i<4; i++) {
15     sprintf(outname, "can%d",i);
16     c[i]= new TCanvas(outname,"",0,0,600,400);
17     c[i]->Divide(2,2);    
18  }
19  
20   // TCanvas *c1 = new TCanvas("c1","",0,0,600,400);
21   // c1->Divide(2,2);
22
23   // TCanvas *c2 = new TCanvas("c2","",0,0,600,400);
24   // c2->Divide(2,2);
25
26   // TCanvas *c3 = new TCanvas("c3","",0,0,600,400);
27   // c3->Divide(2,2);
28   
29   
30   for (int i=0; i<4; i++) {
31
32     c[0]->cd(i+1);
33     h[i] = (TProfile2D*)f->Get(Form("fAmp%d", i));
34     h[i]->SetMaximum(1023);
35     cout << "fAmp" << i << "entries: " << h[i]->GetEntries()<<endl; 
36     h[i]->Draw("colz");
37
38     c[1]->cd(i+1);
39     h[i] = (TProfile2D*)f->Get(Form("fTime%d", i));
40     h[i]->SetMaximum(15);
41     cout << "fTime" << i << "entries: " << h[i]->GetEntries()<<endl;
42     h[i]->Draw("colz");
43     
44     c[2]->cd(i+1);
45     g[i] = (TH2F*)f->Get(Form("fAT%d", i));
46     cout << "fAT" << i << "entries: " << g[i]->GetEntries()<<endl;
47     g[i]->Draw("colz");
48
49
50     c[3]->cd(i+1);
51     g[i] = (TH2F*)f->Get(Form("fCellVsEne%d", i));
52     cout << "fCellVsEne" << i << "entries: " << g[i]->GetEntries()<<endl;
53     g[i]->Draw("colz");
54
55
56   }
57   
58   sprintf(outname, "fAmp.gif");
59   c[0]->SaveAs(outname);
60   
61   sprintf(outname, "fTime.gif");
62   c[1]->SaveAs(outname);
63
64   sprintf(outname, "fAT.gif");
65   c[2]->SaveAs(outname);
66
67   sprintf(outname, "fCellVsEne.gif");
68   c[3]->SaveAs(outname);
69
70
71
72  TCanvas *c4 = new TCanvas("c4","",0,0,600,400);
73  fCellEne->Draw();
74  fClusCellEne->SetLineColor(kRed);
75  fClusCellEne->Draw("same");
76  sprintf(outname, "ClusCellEne.gif");
77  c4->SaveAs(outname);
78
79 }