void plot_ratio (void) { // // plot the ratio of response to LED between prototype and pre-production assemblies // including non-linearity corrections // // #include #include gROOT->Reset(); //TTree *Bfield = (TTree *) gROOT->FindObject("Bfield"); gStyle->SetPalette(1,0); gStyle->SetOptStat(kFALSE); gStyle->SetOptFit(kTRUE); gStyle->SetOptFit(1111); gStyle->SetPadRightMargin(0.15); gStyle->SetPadLeftMargin(0.15); gStyle->SetPadBottomMargin(0.15); gStyle->SetFillColor(0); // char string[256]; char filename[80]; Int_t j,jj; #define npts 4; Double_t Vprep_D[npts]={337,676,569,867}; Double_t Vprot_D[npts]={893,1599,979,1830}; Double_t Vprep_U[npts]={464,1346,1397,1794}; Double_t Vprot_U[npts]={936,2440,2246,3350}; Double_t Vprep_Dcorr[npts]; Double_t Vprot_Dcorr[npts]; Double_t Vprep_Ucorr[npts]; Double_t Vprot_Ucorr[npts]; Double_t Ratio_D[npts]; Double_t Ratio_U[npts]; Double_t meanD=0; Double_t meanU=0; for (j=0;jSetBorderMode(0); c1->SetFillColor(0); c1->SetGridx(); c1->SetGridy(); TLegend *leg = new TLegend(0.15,0.70,0.50,0.95); leg->AddEntry(ratioD,"Ratio V(prototype)/V(pre-production)","p"); ratioD->GetXaxis()->SetRangeUser(0.,5.); ratioD->SetMarkerColor(4); ratioD->SetMarkerStyle(21); ratioD->Draw("Ap"); leg->Draw(); sprintf(filename,"plot_ratio_c1.eps"); c1->SaveAs(filename); sprintf(filename,"plot_ratio_c1.png"); c1->SaveAs(filename); }