// // Pibero Djawotho // Indiana University // July 31, 2006 // void PlotPhotons(const Char_t* filename = "g.root") { TFile* file = new TFile(filename); assert(file && !file->IsZombie()); gStyle->SetOptLogz(); gStyle->SetPalette(1, 0); gStyle->SetOptStat(11); TCanvas* c1 = new TCanvas("c1", "c1", 375, 500); TH2* hResidualSumMax = (TH2*)file->Get("hResidualSumMax"); TF1* fResidualCut = new TF1("fResidualCut", "pol5", 0, 1000); fResidualCut->SetParameters(30, 1, 0, 0, 0, 2e-6); hResidualSumMax->GetListOfFunctions()->Add(fResidualCut); hResidualSumMax->Draw("colz"); c1->Print("hResidualSumMax.png"); TCanvas* c2 = new TCanvas("c2","c2", 375, 375); TH2* hXYphotons = (TH2*)file->Get("hXYphotons"); hXYphotons->Draw("colz"); c2->Print("hXYphotons.png"); TCanvas* c3 = new TCanvas("c3", "c3", 375, 375); TH2* hXYpions = (TH2*)file->Get("hXYpions"); hXYpions->Draw("colz"); c3->Print("hXYpions.png"); TCanvas* c5 = new TCanvas("c5", "c5", 375, 375); gStyle->SetOptStat(111111); TH1* hDeltaXY = (TH1*)file->Get("hDeltaXY"); hDeltaXY->Draw("colz"); c5->Print("hDeltaXY.png"); TCanvas* c4 = new TCanvas("c4", "c4", 375, 375); gStyle->SetOptStat(110011); TH1* hYieldFit = (TH1*)file->Get("hYieldFit"); hYieldFit->Draw(); c4->Print("hYieldFit.png"); TH1* hSigmaFit = (TH1*)file->Get("hSigmaFit"); hSigmaFit->Draw(); c4->Print("hSigmaFit.png"); TH1* hUfit = (TH1*)file->Get("hUfit"); hUfit->Draw(); c4->Print("hUfit.png"); TH1* hVfit = (TH1*)file->Get("hVfit"); hVfit->Draw(); c4->Print("hVfit.png"); TH1* hDeltaU = (TH1*)file->Get("hDeltaU"); hDeltaU->Draw(); hDeltaU->Fit("gaus"); hDeltaU->GetFunction("gaus")->SetLineColor(kRed); c4->Print("hDeltaU.png"); TH1* hDeltaV = (TH1*)file->Get("hDeltaV"); hDeltaV->Draw(); hDeltaV->Fit("gaus"); hDeltaV->GetFunction("gaus")->SetLineColor(kRed); c4->Print("hDeltaV.png"); TH1* hChi2 = (TH1*)file->Get("hChi2"); hChi2->Draw(); c4->Print("hChi2.png"); }