1 void AliITSLegoPlot(Float_t nchtheta, Float_t nchphi, const char *inFile = "galice.root") {
2 // macro to visualize the lego plots generated by gAlive->RunLego
5 TFile *file = (TFile*)gROOT->GetListOfFiles()->FindObject(inFile);
7 cerr<<"Can't open "<<inFile<<" !" << endl;
16 TCanvas *cradl = new TCanvas("cradl","radl",10,10,800,600);
17 cradl->SetTheta(theta);
19 TH2F *hradl = (TH2F*)file->Get("hradl");
20 hradl->SetStats(kFALSE);
21 hradl->GetXaxis()->SetTitle("Phi (degrees)");
22 hradl->GetYaxis()->SetTitle("Theta (degrees)");
23 hradl->SetFillColor(2);
24 hradl->SetContour(ncont);
28 TCanvas *cradlx = new TCanvas("cradl1","radl",50,50,800,600);
30 hradl_px->SetStats(kFALSE);
31 // hradl_px->SetOptLogY();
32 // hradl_px->SetMinimum(0.001);
33 // hradl_px->SetMaximum(1);
34 hradl_px->Scale(1./nchtheta);
35 hradl_px->GetXaxis()->SetTitle("Phi (degrees)");
36 hradl_px->GetYaxis()->SetTitle("X/X0");
38 // cout << "Average over Phi: " << hradl_px->GetSumOfWeights()/nchphi << " X/X0" << endl;
41 TCanvas *cradly = new TCanvas("cradl2","radl",100,100,800,600);
43 hradl_py->SetStats(kFALSE);
44 // hradl_py->SetOptLogY();
45 // hradl_py->SetMinimum(0.001);
46 // hradl_py->SetMaximum(1);
47 hradl_py->Scale(1./nchphi);
48 hradl_py->GetXaxis()->SetTitle("Theta (degrees)");
49 hradl_py->GetYaxis()->SetTitle("X/X0");
51 // cout << "Average over Theta: " << hradl_py->GetSumOfWeights()/nchtheta << " X/X0" << endl;
52 cout << "Average: " << hradl_py->GetSumOfWeights()/nchtheta << " X/X0" << endl;