#define newnada_cxx #include "newnada.h" #include "TH2.h" #include "TStyle.h" #include "TCanvas.h" void newnada::Loop() { // In a Root session, you can do: // Root > .L newnada.C // Root > newnada t // Root > t.GetEntry(12); // Fill t data members with entry number 12 // Root > t.Show(); // Show values of entry 12 // Root > t.Show(16); // Read and show values of entry 16 // Root > t.Loop(); // Loop on all entries // // This is the loop skeleton // To read only selected branches, Insert statements like: // METHOD1: // fChain->SetBranchStatus("*",0); // disable all branches // fChain->SetBranchStatus("branchname",1); // activate branchname // METHOD2: replace line // fChain->GetEntry(i); // read all branches //by b_branchname->GetEntry(i); //read only this branch if (fChain == 0) return; // Define 1D Histogramms // Histograms for HC parameters : TH1F *ecal[3]; TH1F *eta[3]; TH1F *phi[3]; TH1F *lyr[3]; TH1F *nnad[3]; TH1F *pt[3]; // Histograms for calorimeter cells parameters TH1F *ecell=new TH1F("e_cal cell","e_cal cell",160,-10.,150.); TH1F *etacell=new TH1F("eta_cal cell","eta_cal cell",81,-40.5,40.5); TH1F *phicell=new TH1F("phi_cal cell","phi_cal cell",64,0.5,64.5); TH1F *lyrcell=new TH1F("lyr_cal cell","lyr_cal cell",25,0.5,25.5); TH1F *ncell=new TH1F("nb hc cell","nb cell",100,0.,9000.); TH1F *ptcell=new TH1F("pt_cal cell","p_tcal cell",58,-4.,25.); // Histograms for MissingET and ScalarET TH1F *etm[8]; TH1F *etmx[8]; TH1F *etmy[8]; TH1F *ets[8]; TH1F *setovermet[8]; TH1F *etmwithhc[8]; TH1F *etswithhc[8]; // Histograms for Jets TH1F *ptjet[2]; // Name them ... // HC char leset[500]; char nolayer[500]; char ecaln[300]; char etan[300]; char phin[300]; char lyrn[300]; char ptn[300]; char nnadn[300]; for (Int_t j=0; j<3;j++) { if (j == 0) sprintf(leset,"all NADA HC"); if (j == 1) sprintf(leset,"negative NADA HC"); if (j == 2) sprintf(leset,"positive NADA HC"); sprintf(ecaln,"E Cal ; %s",leset); sprintf(etan,"Eta ; %s",leset); sprintf(phin,"Phi ; %s",leset); sprintf(lyrn,"Layer ; %s",leset); sprintf(ptn,"Pt ; %s",leset); sprintf(nnadn,"N Nada cell ; %s",leset); ecal[j]=new TH1F(ecaln,ecaln,160,-10.,150.); eta[j]=new TH1F(etan,etan,81,-40.5,40.5); phi[j]=new TH1F(phin,phin,64,0.5,64.5); pt[j]=new TH1F(ptn,ptn,58,-4.,25.); lyr[j]=new TH1F(lyrn,lyrn,25,0.5,25.5); nnad[j]=new TH1F(nnadn,nnadn,21,0.,21.); } // cut for etmiss Float_t cutecal[8]; cutecal[0] = -1000; cutecal[1] = 0.00; cutecal[2] = 0.05; cutecal[3] = .1; cutecal[4] = 0.3; cutecal[5] = 0.5; cutecal[6] = 0.7; cutecal[7] = 1.; char etmcal[200]; char etmxcal[200]; char etmycal[200]; char etscal[200]; char setmetcal[200]; char etmcalwithhc[200]; char etscalwithhc[200]; for (Int_t i=0; i<8 ; i++) { char cute[20]; if (i==0) { sprintf(cute,"no cut"); } if (i > 0) { Float_t lecut = cutecal[i]; sprintf(cute,"%f",lecut); } sprintf(etscal,"SET - %s",cute); sprintf(etscalwithhc,"SET with HC - %s",cute); sprintf(setmetcal,"sqrt(SET)/MET %s",cute); sprintf(etmcal,"MET - %s",cute); sprintf(etmcalwithhc,"MET with HC - %s",cute); sprintf(etmxcal,"METx - %s",cute); sprintf(etmycal,"METy - %s",cute); // cout << "setcalstr" <GetEntries()); Int_t nbytes = 0, nb = 0; // cout << " nentries " << nentries << endl; Float_t lasomme=0; Float_t lasommejet=0; /////////////// Int_t tournicote=0; if (nentries<=1000) tournicote=nentries; if (nentries>1000) tournicote=1000; cout << " Will loop over " << tournicote << " events " << endl; for (Int_t jentry=0; jentryGetEntry(jentry); nbytes += nb; // cout << " on tournicote " << endl; // FILL HISTO WITH MET VARIABLES : /* etmMET->Fill(METOLD_MET); etmMETNE->Fill(METOLD_METNE); etmMETx->Fill(METOLD_MEx); etmMETNEx->Fill(METOLD_MExNE); etmMETy->Fill(METOLD_MEy); etmMETNEy->Fill(METOLD_MEyNE); setMET->Fill(METOLD_SET); setMETne->Fill(METOLD_SETNE); Float_t divi=0.; if (METOLD_MET != 0) { divi=sqrt(METOLD_SET)/METOLD_MET; setmetMETne->Fill(divi); } metvsset->Fill(METOLD_SET,METOLD_MET); metvssqrtset->Fill(sqrt(METOLD_SET),METOLD_MET); metvssetprof->Fill(METOLD_SET,METOLD_MET,1); metvssqrtsetprof->Fill(sqrt(METOLD_SET),METOLD_MET,1); */ // cout << " on attaque ETMISS" << endl; // // Et miss calculation : Initialization // 4 variables : i = x,y ; l = cut : no cut 0.0 0.05 0.1 0.3 0.5 0.7 1 ; j 0 : without HC ; 1 : with HC Float_t etmiss[3][8][2]; for (Int_t i=0; i<3;i++) { for (Int_t l=0; l<8;l++) { for (Int_t j=0; j<2;j++) { etmiss[i][l][j]=0.; } } } Float_t scaletmiss[8][2]; for (Int_t i=0; i<8;i++) { for (Int_t j=0; j<2;j++) { scaletmiss[i][j]=0; } } // cout << "ETMISS 1 " << endl; Int_t nbcal=0; for (Int_t calnum=0; calnumFill(CAL_e_cal[calnum]); etacell->Fill(CAL_ieta_cal[calnum]); phicell->Fill(CAL_iphi_cal[calnum]); ptcell->Fill(CAL_pt_cal[calnum]); lyrcell->Fill(CAL_ilyr_cal[calnum]); // cout << "ETMISS 2 " << endl; for (Int_t i=0; i<8;i++) { if (CAL_e_cal[calnum] > cutecal[i]) { etmiss[0][i][0]=etmiss[0][i][0]+CAL_pt_cal[calnum]*cos(CAL_iphi_cal[calnum]*2*pi/64.); etmiss[1][i][0]=etmiss[1][i][0]+CAL_pt_cal[calnum]*sin(CAL_iphi_cal[calnum]*2*pi/64.); scaletmiss[i][0]=scaletmiss[i][0]+(CAL_pt_cal[calnum]); } } // cout << "ETMISS 3 " << endl; } ncell->Fill(nbcal); // cout << "ETMISS 4 " << endl; for (Int_t cool=0; cool<8 ; cool++) { Float_t letoto=scaletmiss[cool][0]; ets[cool]->Fill(letoto); etmiss[2][cool][0] = sqrt(pow(etmiss[0][cool][0],2)+pow(etmiss[1][cool][0],2)); if (etmiss[2][cool][0] > 0.001) { etm[cool]->Fill(etmiss[2][cool][0]); etmx[cool]->Fill(-etmiss[0][cool][0]); etmy[cool]->Fill(-etmiss[1][cool][0]); Float_t ledivi=sqrt(scaletmiss[cool][0])/etmiss[2][cool][0]; setovermet[cool]->Fill(ledivi); } } metvsset0prof->Fill(scaletmiss[1][0],etmiss[2][1][0],1); metvssqrtset0prof->Fill(sqrt(scaletmiss[1][0]),etmiss[2][1][0],1); metvsset005prof->Fill(scaletmiss[2][0],etmiss[2][2][0],1); metvssqrtset005prof->Fill(sqrt(scaletmiss[2][0]),etmiss[2][2][0],1); metvsset01prof->Fill(scaletmiss[3][0],etmiss[2][3][0],1); metvssqrtset01prof->Fill(sqrt(scaletmiss[3][0]),etmiss[2][3][0],1); metvsset03prof->Fill(scaletmiss[4][0],etmiss[2][4][0],1); metvssqrtset03prof->Fill(sqrt(scaletmiss[4][0]),etmiss[2][4][0],1); for (Int_t i=0; i<8;i++) { etmiss[0][i][1]=etmiss[0][i][0]; etmiss[1][i][1]=etmiss[1][i][0]; scaletmiss[i][1]=scaletmiss[i][0]; } // cout << "ETMISS 7 " << endl; ///////////////////// // Turn on nada : ////////////////////// //loop on set : for (Int_t j=0; j<1;j++) { Int_t nnadpos=0; Int_t nnadneg=0; // cout << "on attaque nada " << endl; //loop on hot cell for (Int_t i=0; iFill(NADA_nnada[j]); ecal[0]->Fill(NADA_e_nad[i][j]); eta[0]->Fill(NADA_ieta_nad[i][j]); phi[0]->Fill(NADA_iphi_nad[i][j]); pt[0]->Fill(NADA_pt_nad[i][j]); lyr[0]->Fill(NADA_ilyr_nad[i][j]); if (NADA_e_nad[i][j] < 0 ) { nnadneg++; ecal[1]->Fill(NADA_e_nad[i][j]); eta[1]->Fill(NADA_ieta_nad[i][j]); phi[1]->Fill(NADA_iphi_nad[i][j]); pt[1]->Fill(NADA_pt_nad[i][j]); lyr[1]->Fill(NADA_ilyr_nad[i][j]); } else if (NADA_e_nad[i][j] > 0) { nnadpos++; ecal[2]->Fill(NADA_e_nad[i][j]); eta[2]->Fill(NADA_ieta_nad[i][j]); phi[2]->Fill(NADA_iphi_nad[i][j]); pt[2]->Fill(NADA_pt_nad[i][j]); lyr[2]->Fill(NADA_ilyr_nad[i][j]); } for (Int_t ind=0; ind<8;ind++) { if ( NADA_e_nad[i][j] > cutecal[ind]) { etmiss[0][ind][1]=etmiss[0][ind][1]+NADA_pt_nad[i][j]*cos(NADA_iphi_nad[i][j]*2*pi/64.); etmiss[1][ind][1]=etmiss[1][ind][1]+NADA_pt_nad[i][j]*sin(NADA_iphi_nad[i][j]*2*pi/64.); scaletmiss[ind][1]=scaletmiss[ind][1]+fabs(NADA_pt_nad[i][j]); } } } nnad[1]->Fill(nnadneg); nnad[2]->Fill(nnadpos); if (nnadneg+nnadpos != NADA_nnada[j] ) cout << " CA NE MARCHE PAS!" << endl; } for (Int_t deb=0; deb<8; deb++) { etmiss[2][deb][1] = sqrt(pow(etmiss[0][deb][1],2)+pow(etmiss[1][deb][1],2)); if (etmiss[2][deb][1] > 0.001) { etmwithhc[deb]->Fill(etmiss[2][deb][1]); } etswithhc[deb]->Fill(scaletmiss[deb][1]); } // cout << " ok ok 2 " << endl; } // cout << "hello" << endl; Float_t lenodurun = norun->GetMean(); char lerunnumber[30]; char combienevt[30]; sprintf(combienevt,"number of entries = %d",tournicote); sprintf(lerunnumber,"run number = %d",lenodurun); char somcal[100]; char somjet[100]; TH1F *lefond = new TH1F("info","info",50,0.,1.); ////////////////////////////// // Make the plots !!! // ////////////////////////////// cout << " make the plots" << endl; TCanvas *can = new TCanvas("can","test",600,800); can->SetFillColor(0); can->SetFillStyle(4000); // Define Postscript Int_t type = 111; TPostScript ps("Nada.ps",type); gStyle->SetStatW(0.3); gStyle->SetTextSize(1.2); ps->NewPage(); can->Range(0, 0, 10, 5); // p1=new TPaveLabel(3,0.5,8,1.5,lerunnumber); // p1->Draw("same"); p2=new TPaveLabel(3,3,8,4,combienevt); p2->Draw("same"); can.Update(); gStyle->SetOptStat(1111111); ps->NewPage(); can->Clear(); can->Divide(2,3); can->cd(1); gPad->SetLogy(); ecell->SetMinimum(0.8); ecell->SetLineWidth(2); ecell->Draw(); can->cd(2); gPad->SetLogy(); ptcell->SetMinimum(0.8); ptcell->SetLineWidth(2); ptcell->Draw(); can->cd(3); gPad->SetLogy(); etacell->SetMinimum(0.8); etacell->SetLineWidth(2); etacell->Draw(); can->cd(4); gPad->SetLogy(); phicell->SetMinimum(0.8); phicell->SetLineWidth(2); phicell->Draw(); can->cd(5); gPad->SetLogy(); lyrcell->SetMinimum(0.8); lyrcell->SetLineWidth(2); lyrcell->Draw(); can->cd(6); gPad->SetLogy(); ncell->SetMinimum(0.8); ncell->SetLineWidth(2); ncell->Draw(); can.Update(); // NADA cells 0 (all) 1 (negative) 2 (positive) for (Int_t set=0; set<3; set++) { ps->NewPage(); can->Clear(); can->Divide(2,3); for (Int_t ecran=0; ecran<6;ecran++) { Int_t ecranb=ecran+1; can->cd(ecranb); gStyle->SetOptStat(1111111); gStyle->SetStatW(0.5); gStyle->SetTextSize(1.2); gPad->SetLogy(); if (ecran == 0) { ecal[set]->SetMinimum(0.8); ecal[set]->SetLineWidth(2); ecal[set]->Draw(); } if (ecran == 1) { pt[set]->SetMinimum(0.8); pt[set]->SetLineWidth(2); pt[set]->Draw(); } if (ecran == 2) { eta[set]->SetMinimum(0.8); eta[set]->SetLineWidth(2); eta[set]->Draw(); } if (ecran == 3) { phi[set]->SetMinimum(0.8); phi[set]->SetLineWidth(2); phi[set]->Draw(); } if (ecran == 4) { lyr[set]->SetMinimum(0.8); lyr[set]->SetLineWidth(2); lyr[set]->Draw(); } if (ecran == 5) { nnad[set]->SetMinimum(0.8); nnad[set]->SetLineWidth(2); nnad[set]->Draw(); } } can.Update(); } // Draw etmiss Int_t ecrant; ps->NewPage(); can->Clear(); can->Divide(2,4); for (Int_t ecran=0; ecran<4; ecran++) { ecranb=2*ecran+1; Int_t ecranc=2*(ecran+1); if ( ecran >0 ) { if (ecran == 1) ecrant=0; if (ecran == 2) ecrant=3; if (ecran == 3) ecrant=4; can->cd(ecranc); gStyle->SetOptStat(1111111); gStyle->SetStatW(0.3); gStyle->SetTextSize(1.2); gPad->SetLogy(); etm[ecrant]->SetMinimum(0.8); etm[ecrant]->SetLineWidth(2); etm[ecrant]->Draw(); can->cd(ecranb); gStyle->SetOptStat(1111111); gStyle->SetStatW(0.3); gStyle->SetTextSize(1.2); gPad->SetLogy(); etmwithhc[ecrant]->SetMinimum(0.8); etmwithhc[ecrant]->SetLineWidth(2); etmwithhc[ecrant]->Draw(); } else if (ecran == 0) { can->cd(ecranb); gStyle->SetOptStat(1111111); gStyle->SetStatW(0.3); gStyle->SetTextSize(1.2); gPad->SetLogy(); etmMET->SetMinimum(0.8); etmMET->SetLineWidth(2); etmMET->Draw(); can->cd(ecranc); gStyle->SetOptStat(1111111); gStyle->SetStatW(0.3); gStyle->SetTextSize(1.2); gPad->SetLogy(); etmMETNE->SetMinimum(0.8); etmMETNE->SetLineWidth(2); etmMETNE->Draw(); } } can.Update(); ps->NewPage(); can->Clear(); can->Divide(2,4); for (Int_t ecran=0; ecran<4; ecran++) { ecranb=2*ecran+1; ecranc=2*(ecran+1); if (ecran == 0) ecrant=1; if (ecran == 1) ecrant=2; if (ecran == 2) ecrant=5; if (ecran == 3) ecrant=6; can->cd(ecranc); gStyle->SetOptStat(1111111); gStyle->SetStatW(0.3); gStyle->SetTextSize(1.2); gPad->SetLogy(); etm[ecrant]->SetMinimum(0.8); etm[ecrant]->SetLineWidth(2); etm[ecrant]->Draw(); can->cd(ecranb); gStyle->SetOptStat(1111111); gStyle->SetStatW(0.3); gStyle->SetTextSize(1.2); gPad->SetLogy(); etmwithhc[ecrant]->SetMinimum(0.8); etmwithhc[ecrant]->SetLineWidth(2); etmwithhc[ecrant]->Draw(); } can.Update(); /*// Draw etmiss Int_t ecrant; ps->NewPage(); can->Clear(); can->Divide(2,4); for (Int_t ecran=0; ecran<8; ecran++) { ecranb=ecran+1; can->cd(ecranb); gStyle->SetOptStat(1111111); gStyle->SetStatW(0.5); gStyle->SetTextSize(1.2); gPad->SetLogy(); etm[ecran]->SetMinimum(0.8); etm[ecran]->SetLineWidth(2); etm[ecran]->Draw(); } can.Update(); // Draw etmiss with HC to compare Int_t ecrant; ps->NewPage(); can->Clear(); can->Divide(2,4); for (Int_t ecran=0; ecran<8; ecran++) { ecranb=ecran+1; can->cd(ecranb); gStyle->SetOptStat(1111111); gStyle->SetStatW(0.5); gStyle->SetTextSize(1.2); gPad->SetLogy(); etmwithhc[ecran]->SetMinimum(0.8); etmwithhc[ecran]->SetLineWidth(2); etmwithhc[ecran]->Draw(); } can.Update(); */ // draw set ps->NewPage(); can->Clear(); can->Divide(2,4); for (Int_t ecran=0; ecran<4; ecran++) { ecranb=2*ecran+1; Int_t ecranc=2*(ecran+1); if (ecran>0 ) { if (ecran == 1) ecrant=0; if (ecran == 2) ecrant=3; if (ecran == 3) ecrant=4; can->cd(ecranc); gStyle->SetOptStat(1111111); gStyle->SetStatW(0.3); gStyle->SetTextSize(1.2); gPad->SetLogy(); ets[ecrant]->SetMinimum(0.8); ets[ecrant]->SetLineWidth(2); ets[ecrant]->Draw(); can->cd(ecranb); gStyle->SetOptStat(1111111); gStyle->SetStatW(0.3); gStyle->SetTextSize(1.2); gPad->SetLogy(); etswithhc[ecrant]->SetMinimum(0.8); etswithhc[ecrant]->SetLineWidth(2); etswithhc[ecrant]->Draw(); } else if (ecran == 0) { can->cd(ecranb); gStyle->SetOptStat(1111111); gStyle->SetStatW(0.3); gStyle->SetTextSize(1.2); gPad->SetLogy(); setMET->SetMinimum(0.8); setMET->SetLineWidth(2); setMET->Draw(); can->cd(ecranc); gStyle->SetOptStat(1111111); gStyle->SetStatW(0.3); gStyle->SetTextSize(1.2); gPad->SetLogy(); setMETne->SetMinimum(0.8); setMETne->SetLineWidth(2); setMETne->Draw(); } } can.Update(); ps->NewPage(); can->Clear(); can->Divide(2,4); for (Int_t ecran=0; ecran<4; ecran++) { ecranb=2*ecran+1; ecranc=2*(ecran+1); if (ecran == 0) ecrant=1; if (ecran == 1) ecrant=2; if (ecran == 2) ecrant=5; if (ecran == 3) ecrant=6; can->cd(ecranc); gStyle->SetOptStat(1111111); gStyle->SetStatW(0.3); gStyle->SetTextSize(1.2); gPad->SetLogy(); ets[ecrant]->SetMinimum(0.8); ets[ecrant]->SetLineWidth(2); ets[ecrant]->Draw(); can->cd(ecranb); gStyle->SetOptStat(1111111); gStyle->SetStatW(0.3); gStyle->SetTextSize(1.2); gPad->SetLogy(); etswithhc[ecrant]->SetMinimum(0.8); etswithhc[ecrant]->SetLineWidth(2); etswithhc[ecrant]->Draw(); } can.Update(); /*// draw set ps->NewPage(); can->Clear(); can->Divide(2,4); for (Int_t ecran=0; ecran<8;ecran++) { ecranb=ecran+1; can->cd(ecranb); gStyle->SetOptStat(1111111); gStyle->SetStatW(0.5); gStyle->SetTextSize(1.2); gPad->SetLogy(); ets[ecran]->SetMinimum(0.8); ets[ecran]->SetLineWidth(2); ets[ecran]->Draw(); } can.Update(); // draw set with HC to compare ps->NewPage(); can->Clear(); can->Divide(2,4); for (Int_t ecran=0; ecran<8;ecran++) { ecranb=ecran+1; can->cd(ecranb); gStyle->SetOptStat(1111111); gStyle->SetStatW(0.5); gStyle->SetTextSize(1.2); gPad->SetLogy(); etswithhc[ecran]->SetMinimum(0.8); etswithhc[ecran]->SetLineWidth(2); etswithhc[ecran]->Draw(); } can.Update(); */ // Draw etmX ps->NewPage(); can->Clear(); can->Divide(2,4); for (Int_t ecran=0; ecran<8;ecran++) { ecranb=ecran+1; can->cd(ecranb); gStyle->SetOptStat(1111111); gStyle->SetStatW(0.5); gStyle->SetTextSize(1.2); gPad->SetLogy(); etmx[ecran]->SetMinimum(0.8); etmx[ecran]->SetLineWidth(2); etmx[ecran]->Draw(); } can.Update(); // Draw etmY ps->NewPage(); can->Clear(); can->Divide(2,4); for (Int_t ecran=0; ecran<8;ecran++) { ecranb=ecran+1; can->cd(ecranb); gStyle->SetOptStat(1111111); gStyle->SetStatW(0.5); gStyle->SetTextSize(1.2); gPad->SetLogy(); etmy[ecran]->SetMinimum(0.8); etmy[ecran]->SetLineWidth(2); etmy[ecran]->Draw(); } can.Update(); // Draw set/met ps->NewPage(); can->Clear(); can->Divide(2,4); for (Int_t ecran=0; ecran<8;ecran++) { if (ecran<7) { ecranb=ecran+1; can->cd(ecranb); gStyle->SetOptStat(1111111); gStyle->SetStatW(0.5); gStyle->SetTextSize(1.2); gPad->SetLogy(); setovermet[ecran]->SetMinimum(0.8); setovermet[ecran]->SetLineWidth(2); setovermet[ecran]->Draw(); } if (ecran==7) { gStyle->SetOptStat(1111111); gStyle->SetStatW(0.3); gStyle->SetTextSize(1.2); gPad->SetLogy(); setmetMETne->SetMinimum(0.8); setmetMETne->SetLineWidth(2); setmetMETne->Draw(); } } can.Update(); //etmx officiel ps->NewPage(); can->Clear(); can->Divide(2,3); for (Int_t ecran=0; ecran<6;ecran++) { ecranb=ecran+1; can->cd(ecranb); gStyle->SetOptStat(1111111); gStyle->SetStatW(0.3); gStyle->SetTextSize(1.2); gPad->SetLogy(); if (ecran == 0) { etmMET->SetMinimum(0.8); etmMET->SetLineWidth(2); etmMET->Draw(); } if (ecran == 1) { etmMETNE->SetMinimum(0.8); etmMETNE->SetLineWidth(2); etmMETNE->Draw(); } if (ecran == 2) { etmMETx->SetMinimum(0.8); etmMETx->SetLineWidth(2); etmMETx->Draw(); } if (ecran == 3) { etmMETNEx->SetMinimum(0.8); etmMETNEx->SetLineWidth(2); etmMETNEx->Draw(); } if (ecran == 4) { etmMETy->SetMinimum(0.8); etmMETy->SetLineWidth(2); etmMETy->Draw(); } if (ecran == 5) { etmMETNEy->SetMinimum(0.8); etmMETNEy->SetLineWidth(2); etmMETNEy->Draw(); } } can.Update(); // met vs set ps->NewPage(); can->Clear(); can->Divide(1,2); gStyle->SetOptStat(1111111); gStyle->SetStatW(0.3); gStyle->SetTextSize(1.2); can->cd(1); metvsset->Draw("box"); can->cd(2); metvssqrtset->Draw("box"); can.Update(); ps->NewPage(); can->Clear(); can->Divide(1,2); gStyle->SetOptStat(1111); gStyle->SetStatW(0.15); gStyle->SetTextSize(1.); gStyle->SetOptFit(1111); can->cd(1); metvsset0prof->SetMinimum(0.01); metvsset0prof->SetLineWidth(2); metvsset0prof->Fit("pol1","","",30,169); can->cd(2); metvssqrtset0prof->SetLineWidth(2); metvssqrtset0prof->SetMinimum(0.01); metvssqrtset0prof->Fit("pol1","","",5,13); can.Update(); ps->NewPage(); can->Clear(); can->Divide(1,2); gStyle->SetOptStat(1111); gStyle->SetStatW(0.15); gStyle->SetTextSize(1.); gStyle->SetOptFit(1111); can->cd(1); metvsset005prof->SetMinimum(0.01); metvsset005prof->SetLineWidth(2); metvsset005prof->Fit("pol1","","",30,169); can->cd(2); metvssqrtset005prof->SetLineWidth(2); metvssqrtset005prof->SetMinimum(0.01); metvssqrtset005prof->Fit("pol1","","",5,13); can.Update(); ps->NewPage(); can->Clear(); can->Divide(1,2); gStyle->SetOptStat(1111); gStyle->SetStatW(0.15); gStyle->SetTextSize(1.); gStyle->SetOptFit(1111); can->cd(1); metvsset01prof->SetMinimum(0.01); metvsset01prof->SetLineWidth(2); metvsset01prof->Fit("pol1","","",30,169); can->cd(2); metvssqrtset01prof->SetLineWidth(2); metvssqrtset01prof->SetMinimum(0.01); metvssqrtset01prof->Fit("pol1","","",5,13); can.Update(); ps->NewPage(); can->Clear(); can->Divide(1,2); gStyle->SetOptStat(1111); gStyle->SetStatW(0.15); gStyle->SetTextSize(1.); gStyle->SetOptFit(1111); can->cd(1); metvsset03prof->SetMinimum(0.01); metvsset03prof->SetLineWidth(2); metvsset03prof->Fit("pol1","","",30,169); can->cd(2); metvssqrtset03prof->SetLineWidth(2); metvssqrtset03prof->SetMinimum(0.01); metvssqrtset03prof->Fit("pol1","","",5,13); can.Update(); ps->NewPage(); can->Clear(); can->Divide(1,2); gStyle->SetOptStat(1111); gStyle->SetStatW(0.15); gStyle->SetTextSize(1.); gStyle->SetOptFit(1111); can->cd(1); metvssetprof->SetMinimum(0.01); metvssetprof->SetLineWidth(2); metvssetprof->Fit("pol1","","",100,225); can->cd(2); metvssqrtsetprof->SetLineWidth(2); metvssqrtsetprof->SetMinimum(0.01); metvssqrtsetprof->Fit("pol1","","",10,15); can.Update(); ps.Close(); }