#include int xft_general(Char_t* filename="119632.hbk") { //Clear out variables on the stack (avoids much grief) gROOT->Reset(); gStyle->SetHistLineWidth(1); gStyle->SetPadGridX(true); gStyle->SetPadGridY(true); gStyle->SetLabelSize(0.05,"XY"); gStyle->SetTitleSize(0.05, "XY"); gStyle->SetTitleOffset(0.4, "XY"); gStyle->SetFuncColor(6); gStyle->SetFuncWidth(6.); //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_general.ps",111); //Open Canvas TCanvas *myc = new TCanvas("MyC","Test Canvas",700,700); //picture 1 //============ //XTC number //============ myc->Divide(1,4); ps->NewPage(); myc->cd(1); xftNHits->GetXaxis()->SetRange(0,140); xftNHits->Draw(); Int_t nent = xftNHits->GetEntries(); printf("\n Number of entries is %d",nent); myc->cd(2); xftNPixels->GetXaxis()->SetRange(0,300); xftNPixels->Draw(); nent = xftNPixels->GetEntries(); printf("\n Number of entries is %d",nent); myc->cd(3); xftNTracks->GetXaxis()->SetRange(0,150); xftNTracks->Draw(); nent = xftNTracks->GetEntries(); printf("\n Number of entries is %d",nent); myc->cd(4); offNTracks->GetXaxis()->SetRange(0,150); offNTracks->Draw(); nent = offNTracks->GetEntries(); printf("\n Number of entries is %d",nent); myc->Update(); char *ch = new char[1]; printf("Hit Enter to continue"); gets(ch); //----------------------------------------------------------------------------- ps->NewPage(); myc->Clear(); myc->Divide(1,4); myc->cd(1); xftAbsPhi->SetTitle("XFT tracks (fakes shaded in red)"); xftAbsPhi->SetXTitle("#phi (radians)"); xftAbsPhi->SetYTitle("XFT Tracks"); xftAbsPhi->Draw(); xftFakeAbsPhi->SetFillColor(2); xftFakeAbsPhi->Draw("same"); myc->cd(2); offPhi->SetTitle("Offline tracks (missed shaded in red)"); offPhi->SetXTitle("#phi (radians)"); offPhi->SetYTitle("L3 Tracks"); offPhi->Draw(); offPhiMissed->SetFillColor(2); offPhiMissed->Draw("same"); myc->cd(3); gPad->SetLogy(true); xftPtVal->SetTitle("XFT tracks (fakes shaded in red)"); xftPtVal->SetXTitle("XFT pt (GeV/c)"); xftPtVal->SetYTitle("XFT Tracks"); xftPtVal->GetXaxis()->SetRange(420,580); xftPtVal->Draw(); xftFakePtVal->SetFillColor(2); xftFakePtVal->Draw("same"); myc->cd(4); gPad->SetLogy(true); offPt->SetTitle("Offline tracks (missed shaded in red)"); offPt->SetXTitle("pt (GeV/c)"); offPt->SetYTitle("L3 Tracks"); offPt->GetXaxis()->SetRange(0,300); offPt->Draw(); offPtMissed->SetFillColor(2); offPtMissed->Draw("same"); myc->Update(); char *ch = new char[1]; printf("Hit Enter to continue"); gets(ch); //----------------------------------------------------------------------------- ps->NewPage(); myc->Clear(); myc->Divide(1,2); myc->cd(1); xftPtVal->GetXaxis()->SetRange(0,420); xftPtVal->Draw(); xftFakePtVal->SetFillColor(2); xftFakePtVal->Draw("same"); myc->Update(); myc->cd(2); xftPtVal->GetXaxis()->SetRange(580,1000); xftPtVal->Draw(); xftFakePtVal->SetFillColor(2); xftFakePtVal->Draw("same"); myc->Update(); char *ch = new char[1]; printf("Hit Enter to continue"); gets(ch); //----------------------------------------------------------------------------- ps->NewPage(); myc->Clear(); myc->Divide(1,6); myc->cd(1); offPt->GetXaxis()->SetRange(300,600); offPt->Draw(); offPtMissed->SetFillColor(2); offPtMissed->Draw("same"); myc->Update(); myc->cd(2); gPad->SetLogy(true); offPt->GetXaxis()->SetRange(600,900); offPt->Draw(); offPtMissed->SetFillColor(2); offPtMissed->Draw("same"); myc->Update(); myc->cd(3); gPad->SetLogy(true); offPt->GetXaxis()->SetRange(900,1200); offPt->Draw(); offPtMissed->SetFillColor(2); offPtMissed->Draw("same"); myc->Update(); myc->cd(4); offPt->GetXaxis()->SetRange(1200,1500); offPt->Draw(); offPtMissed->SetFillColor(2); offPtMissed->Draw("same"); myc->Update(); myc->cd(5); offPt->GetXaxis()->SetRange(1500,1800); offPt->Draw(); offPtMissed->SetFillColor(2); offPtMissed->Draw("same"); myc->Update(); myc->cd(6); offPt->GetXaxis()->SetRange(1800,2000); offPt->Draw(); offPtMissed->SetFillColor(2); offPtMissed->Draw("same"); myc->Update(); ps->Close(); char *ch = new char[1]; printf(" Hit Enter to continue \n"); gets(ch); return 0; }