#include int xft_occupancy(Char_t* filename="119632.hbk") { //Clear out variables on the stack (avoids much grief) gROOT->Reset(); gStyle->SetHistLineWidth(3); gStyle->SetPadGridX(true); gStyle->SetPadGridY(true); gStyle->SetLabelSize(0.07,"XY"); gStyle->SetTitleSize(0.15, "Y"); gStyle->SetTitleSize(0.1, "X"); gStyle->SetTitleOffset(0.3, "XY"); //Open histogram file cout << "filename is "<< filename << endl; TFile* f= new TFile(filename); //Open file in which to store pictures TPostScript *ps = new TPostScript("XFT_occupancy.ps",111); //Open Canvas TCanvas *myc = new TCanvas("MyC","Test Canvas",700,700); myc->Clear(); myc->Divide(1,6); myc->cd(1); SL1PixelChip->SetXTitle("#phi (radians)"); SL1PixelChip->SetYTitle("SL1 Pixels"); SL1PixelChip->Draw(""); SL1PixelCell->SetLineColor(4); SL1PixelCell->Draw("same"); myc->cd(2); SL2PixelChip->SetXTitle("#phi (radians)"); SL2PixelChip->SetYTitle("SL2 Pixels"); SL2PixelChip->Draw(""); SL2PixelCell->SetLineColor(4); SL2PixelCell->Draw("same"); myc->cd(3); SL3PixelChip->SetXTitle("#phi (radians)"); SL3PixelChip->SetYTitle("SL3 Pixels"); SL3PixelChip->Draw(""); SL3PixelCell->SetLineColor(4); SL3PixelCell->Draw("same"); myc->cd(4); SL4PixelChip->SetXTitle("#phi (radians)"); SL4PixelChip->SetYTitle("SL4 Pixels"); SL4PixelChip->Draw(""); SL4PixelCell->SetLineColor(4); SL4PixelCell->Draw("same"); myc->cd(5); xftAbsPhi->SetXTitle("#phi (radians)"); xftAbsPhi->SetYTitle("XFT tracks"); xftAbsPhi->Draw(""); xftFakeAbsPhi->SetLineColor(4); xftFakeAbsPhi->Draw("same"); myc->cd(6); offPhi->SetXTitle("#phi (radians)"); offPhi->SetYTitle("L3 tracks"); offPhi->SetLineColor(1); offPhi->Draw(""); offPhiFound->SetLineColor(4); offPhiFound->Draw("same"); myc->Update(); ps->NewPage(); char *ch = new char[1]; printf("Hit Enter to continue"); gets(ch); //----------------------------------------------------------------------------- myc->Clear(); myc->Divide(1,4); myc->cd(1); SL1PixelCell->SetXTitle("#phi (radians)"); SL1PixelCell->SetYTitle("SL1 Pixels"); SL1PixelCell->Draw(""); myc->cd(2); SL2PixelCell->SetXTitle("#phi (radians)"); SL2PixelCell->SetYTitle("SL2 Pixels"); SL2PixelCell->Draw(""); myc->cd(3); SL3PixelCell->SetXTitle("#phi (radians)"); SL3PixelCell->SetYTitle("SL3 Pixels"); SL3PixelCell->Draw(""); myc->cd(4); SL4PixelCell->SetXTitle("#phi (radians)"); SL4PixelCell->SetYTitle("SL4 Pixels"); SL4PixelCell->Draw(""); myc->Update(); ps->Close(); char *ch = new char[1]; printf(" Hit Enter to continue \n"); gets(ch); return 0; }