#include int xft_hits(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_hits.ps",111); //Open Canvas TCanvas *myc = new TCanvas("MyC","Test Canvas",700,700); //picture 1 //============ //XTC hits //============ ps->NewPage(); myc->Divide(2,2); cellsPrompt0->SetTitle("Prompt hit occupancy for cells"); myc->cd(1); cellsPrompt0->Draw(); myc->cd(2); cellsPrompt1->Draw(); myc->cd(3); cellsPrompt2->Draw(); myc->cd(4); cellsPrompt3->Draw(); myc->Update(); char *ch = new char[1]; printf("Hit Enter to continue"); gets(ch); //----------------------------------------------------------------------------- ps->NewPage(); myc->Clear(); myc->Divide(2,2); cellsDelayed0->SetTitle("Delayed hit occupancy for cells"); myc->cd(1); cellsDelayed0->Draw(); myc->cd(2); cellsDelayed1->Draw(); myc->cd(3); cellsDelayed2->Draw(); myc->cd(4); cellsDelayed3->Draw(); myc->Update(); char *ch = new char[1]; printf("Hit Enter to continue"); gets(ch); //----------------------------------------------------------------------------- ps->NewPage(); myc->Clear(); myc->Divide(2,2); cellsPD0->SetTitle("PD hit occupancy for cells"); myc->cd(1); cellsPD0->Draw(); myc->cd(2); cellsPD1->Draw(); myc->cd(3); cellsPD2->Draw(); myc->cd(4); cellsPD3->Draw(); myc->Update(); char *ch = new char[1]; printf("Hit Enter to continue"); gets(ch); //----------------------------------------------------------------------------- ps->NewPage(); myc->Clear(); myc->Divide(2,2); wiresPrompt0->SetTitle("Prompt hit occupancy for wires"); myc->cd(1); wiresPrompt0->Draw(); myc->cd(2); wiresPrompt1->Draw(); myc->cd(3); wiresPrompt2->Draw(); myc->cd(4); wiresPrompt3->Draw(); myc->Update(); char *ch = new char[1]; printf("Hit Enter to continue"); gets(ch); //----------------------------------------------------------------------------- ps->NewPage(); myc->Clear(); myc->Divide(2,2); wiresDelayed0->SetTitle("Delayed hit occupancy for wires"); myc->cd(1); wiresDelayed0->Draw(); myc->cd(2); wiresDelayed1->Draw(); myc->cd(3); wiresDelayed2->Draw(); myc->cd(4); wiresDelayed3->Draw(); myc->Update(); char *ch = new char[1]; printf("Hit Enter to continue"); gets(ch); //----------------------------------------------------------------------------- ps->NewPage(); myc->Clear(); myc->Divide(2,2); wiresPD0->SetTitle("PD hit occupancy for wires"); myc->cd(1); wiresPD0->Draw(); myc->cd(2); wiresPD1->Draw(); myc->cd(3); wiresPD2->Draw(); myc->cd(4); wiresPD3->Draw(); myc->Update(); char *ch = new char[1]; printf("Hit Enter to continue"); gets(ch); //----------------------------------------------------------------------------- ps->NewPage(); myc->Clear(); myc->Divide(2,2); //============= // For L3 tracks, extrapolate track through superlayers/wires and try to match to XTC hits //============= cellsFound0->SetTitle("Found XTC hit in this cell"); myc->cd(1); cellsFound0->Draw(); myc->cd(2); cellsFound1->Draw(); myc->cd(3); cellsFound2->Draw(); myc->cd(4); cellsFound3->Draw(); myc->Update(); char *ch = new char[1]; printf("Hit Enter to continue"); gets(ch); //----------------------------------------------------------------------------- ps->NewPage(); myc->Clear(); myc->Divide(2,2); cellsMissed0->SetTitle("Missed XTC hit in this cell"); myc->cd(1); cellsMissed0->Draw(); myc->cd(2); cellsMissed1->Draw(); myc->cd(3); cellsMissed2->Draw(); myc->cd(4); cellsMissed3->Draw(); myc->Update(); char *ch = new char[1]; printf("Hit Enter to continue"); gets(ch); //----------------------------------------------------------------------------- ps->NewPage(); myc->Clear(); myc->Divide(2,2); wiresMissed0->SetTitle("Missed XTC hit on this wire"); myc->cd(1); wiresMissed0->Draw(); myc->cd(2); wiresMissed1->Draw(); myc->cd(3); wiresMissed2->Draw(); myc->cd(4); wiresMissed3->Draw(); myc->Update(); char *ch = new char[1]; printf("Hit Enter to continue"); gets(ch); //----------------------------------------------------------------------------- ps->NewPage(); myc->Clear(); myc->Divide(2,2); //============================= // Count number of XTC hits on wires in a superlayer, taking middle Sl cell as position //============================= foundHits0->SetTitle("Number of found XTC hits vs SL cell"); myc->cd(1); foundHits0->Draw(); myc->cd(2); foundHits1->Draw(); myc->cd(3); foundHits2->Draw(); myc->cd(4); foundHits3->Draw(); myc->Update(); char *ch = new char[1]; printf("Hit Enter to continue"); gets(ch); //----------------------------------------------------------------------------- ps->NewPage(); myc->Clear(); myc->Divide(2,2); foundHitsIso0->SetTitle("Isolated tracks - Number of found XTC hits vs SL cell"); myc->cd(1); foundHitsIso0->Draw(); myc->cd(2); foundHitsIso1->Draw(); myc->cd(3); foundHitsIso2->Draw(); myc->cd(4); foundHitsIso3->Draw(); myc->Update(); char *ch = new char[1]; printf("Hit Enter to continue"); gets(ch); //----------------------------------------------------------------------------- ps->NewPage(); myc->Clear(); myc->Divide(2,2); foundHitsIsoUM0->SetTitle("Isolated MISSED tracks - Number of XTC hits vs SL cell"); myc->cd(1); foundHitsIsoUM0->Draw(); myc->cd(2); foundHitsIsoUM1->Draw(); myc->cd(3); foundHitsIsoUM2->Draw(); myc->cd(4); foundHitsIsoUM3->Draw(); myc->Update(); char *ch = new char[1]; printf("Hit Enter to continue"); gets(ch); //----------------------------------------------------------------------------- ps->NewPage(); myc->Clear(); myc->Divide(1,3); foundHits0->ProfileX("foundHits0_px"); foundHitsIso0->ProfileX("foundHitsIso0_px"); foundHitsIsoUM0->ProfileX("foundHitsIsoUM0_px"); myc->cd(1); foundHits0_px->Draw(); myc->cd(2); foundHitsIso0_px->Draw(); myc->cd(3); foundHitsIsoUM0_px->Draw(); myc->Update(); char *ch = new char[1]; printf("Hit Enter to continue"); gets(ch); //----------------------------------------------------------------------------- ps->NewPage(); myc->Clear(); myc->Divide(1,3); foundHits1->ProfileX("foundHits1_px"); foundHitsIso1->ProfileX("foundHitsIso1_px"); foundHitsIsoUM1->ProfileX("foundHitsIsoUM1_px"); myc->cd(1); foundHits1_px->Draw(); myc->cd(2); foundHitsIso1_px->Draw(); myc->cd(3); foundHitsIsoUM1_px->Draw(); myc->Update(); char *ch = new char[1]; printf("Hit Enter to continue"); gets(ch); //----------------------------------------------------------------------------- ps->NewPage(); myc->Clear(); myc->Divide(1,3); foundHits2->ProfileX("foundHits2_px"); foundHitsIso2->ProfileX("foundHitsIso2_px"); foundHitsIsoUM2->ProfileX("foundHitsIsoUM2_px"); myc->cd(1); foundHits2_px->Draw(); myc->cd(2); foundHitsIso2_px->Draw(); myc->cd(3); foundHitsIsoUM2_px->Draw(); myc->Update(); char *ch = new char[1]; printf("Hit Enter to continue"); gets(ch); //----------------------------------------------------------------------------- ps->NewPage(); myc->Clear(); myc->Divide(1,3); foundHits3->ProfileX("foundHits3_px"); foundHitsIso3->ProfileX("foundHitsIso3_px"); foundHitsIsoUM3->ProfileX("foundHitsIsoUM3_px"); myc->cd(1); foundHits3_px->Draw(); myc->cd(2); foundHitsIso3_px->Draw(); myc->cd(3); foundHitsIsoUM3_px->Draw(); myc->Update(); ps->Close(); char *ch = new char[1]; printf(" Hit Enter to continue \n"); gets(ch); return 0; }