Esempio n. 1
0
void PlotPoints(){
	GetAllMasses();
  TCanvas *c1 = new TCanvas("c1","MassPlot",200,10,700,500);
  c1 -> DrawFrame(0, 0, 850, 600);
	TGraph *MassPlot = new TGraph(StopMass.size(), (float*) &StopMass[0], (float*) &NeutralinoMass[0]);
  MassPlot->SetMarkerStyle(20);
  MassPlot->SetMarkerSize(1.1);
  MassPlot->SetMarkerColor(2);
  MassPlot->Draw("P");
  TLatex Title = TLatex(); Title.DrawLatexNDC(.40, .94, "Mass Points");
  TLatex Xaxis = TLatex(); Xaxis.DrawLatexNDC(0.65, 0.03, "Stop Mass [GeV]");
  TLatex Yaxis = TLatex(); Yaxis.SetTextAngle(90); Yaxis.DrawLatexNDC(0.03, 0.31, "Neutralino Mass [GeV]");
  c1 -> Print(outputdir + "MassPoints.pdf", "pdf");
  c1 -> Print(outputdir + "MassPoints.png", "png");
}
Esempio n. 2
0
int main() {
  ic::Plot::SetHTTStyle();

  std::string dir="/vols/cms04/pjd12/invcmssws/CMSSW_7_1_5/src/HiggsAnalysis/CombinedLimit/exocombcards/";

  std::vector<Scan> scans;
  //  scans.push_back({"higgsCombinefullScan.MultiDimFit.mH125.root", "Observed", 1, nullptr});
  //  scans.push_back({"higgsCombineexpected.MultiDimFit.mH125.root", "Exp. for SM H", 32, nullptr});
//   scans.push_back({"higgsCombinenoBBBScan.MultiDimFit.mH125.root", "no bbb syst.", 38, nullptr});
  scans.push_back({dir+"higgsCombineCombExp.MultiDimFit.mH125.root", "Exp. for SM H", 1, nullptr});
  scans.push_back({dir+"higgsCombineCombObs.MultiDimFit.mH125.root", "Obs. for SM H", 1, nullptr});

  TCanvas c1("canvas","canvas");

  std::vector<TLine *> lines;


  TLegend *leg = new TLegend(0.65,0.75,0.9,0.9,"","brNDC");

  unsigned counter = 0;
  for (auto & sc : scans) {
    TFile f1(sc.file.c_str());
    TTree *t1 = dynamic_cast<TTree*>(f1.Get("limit"));
    double best1 = 0.0;
    TString res;
    sc.gr = new TGraph(ExtractGraph(t1, best1));
    if(counter==1){
      auto x1 = GetCrossings(*(sc.gr), 1.0);
      auto x2 = GetCrossings(*(sc.gr), 3.84);
      lines.push_back(new TLine(x1[0],0,x1[0],1.0));
      lines.back()->SetLineColor(2);
      lines.back()->SetLineWidth(2);
      lines.push_back(new TLine(x2[0],0,x2[0],3.84));
      lines.back()->SetLineColor(2);
      lines.back()->SetLineWidth(2);
    }
    sc.gr->SetLineColor(sc.color);
    sc.gr->SetLineWidth(3);
    sc.gr->Draw(counter ? "LSAME" : "AL");
    TString leg_text = "#splitline{"+sc.label+"}{"+res+"}";
    leg->AddEntry(sc.gr, leg_text, "L");
    counter++;
  }
  // c1.cd();
  // // g1.Print();
  // g1.SetLineColor(1);
  // g1.SetLineWidth(2);
  // // g1.SetMarkerColor(7);
  // g1.Draw("AC");
  scans[0].gr->SetMaximum(9);
  scans[0].gr->SetMinimum(0.);
  scans[0].gr->GetXaxis()->SetRangeUser(0., 0.9);
  scans[0].gr->GetXaxis()->SetTitle("BR_{inv}");
  scans[0].gr->GetXaxis()->SetTitleOffset(1.1);
  scans[0].gr->GetXaxis()->SetNdivisions(1005,true);
  scans[0].gr->GetXaxis()->SetLabelSize(0.05);
  scans[0].gr->GetYaxis()->SetLabelSize(0.05);
  scans[0].gr->GetXaxis()->SetLabelOffset(0.02);
  scans[0].gr->GetYaxis()->SetLabelOffset(0.02);
  scans[0].gr->GetYaxis()->SetTitle("-2 #Delta ln L");
  scans[0].gr->SetLineStyle(2);
  scans[0].gr->SetLineColor(1);
  leg->SetBorderSize(1);
  leg->SetTextFont(42);
  leg->SetTextSize(0.03);
  leg->SetLineColor(1);
  leg->SetLineStyle(1);
  leg->SetLineWidth(1);
  leg->SetFillColor(0);
  leg->SetFillStyle(1001);
  leg->Draw();
  lines.push_back(new TLine(0.,1,0.9,1.0));
  lines.back()->SetLineColor(2);
  lines.push_back(new TLine(0.,3.84,0.9,3.84));
  lines.back()->SetLineColor(2);
  //  for (auto l : lines) l->Draw();

  DrawCMSLogoTest(&c1,"CMS","preliminary",10);

  TLatex lat = TLatex();
  lat.SetNDC();
  lat.SetTextSize(0.04);                                                                                                                                    
  lat.SetTextFont(42);

  TLatex lat2 = TLatex();
  lat2.SetNDC();
  lat2.SetTextSize(0.03);
  lat2.SetTextFont(42);

  lat.DrawLatex(0.2,0.73,"Combination of all");
  lat.DrawLatex(0.2,0.68,"H#rightarrow inv. channels");


  c1.Update();
  c1.SaveAs("scan.pdf");
  return 0;
}
	MISTAG_RATE_SubtractTTBAR->SetMarkerStyle(20);
	MISTAG_RATE_SubtractTTBAR->SetMarkerColor(1);
	MISTAG_RATE_SubtractTTBAR->SetLineColor(1);
	MISTAG_RATE_NoSubtractTTBAR->SetMarkerStyle(20);
	MISTAG_RATE_NoSubtractTTBAR->SetMarkerColor(kRed);
	MISTAG_RATE_NoSubtractTTBAR->SetLineColor(kRed);
	
	
	MISTAG_RATE_SubtractTTBAR->Draw();
	MISTAG_RATE_NoSubtractTTBAR->Draw("same");
	MISTAG_RATE_NoSubtractTTBAR->SetMarkerColor(kRed);
	MISTAG_RATE_SubtractTTBAR   ->SetName("MISTAG_MU_REVERSE_SUB_TTBAR");
    	c1000->SetLogx(1);
	MISTAG_RATE_SubtractTTBAR->GetXaxis()->SetMoreLogLabels(1);
	MISTAG_RATE_SubtractTTBAR->GetXaxis()->SetNoExponent(1);
	prelim = TLatex();
    	prelim.SetNDC();
        prelim.DrawLatex( 0.5, 0.91, "#scale[0.8]{CMS Preliminary, 8 TeV, 7.3 fb^{-1}}" );
        //prelim.DrawLatex( 0.5, 0.91, "#scale[0.8]{Mistag Rate from QCD MC}" );
    
        c1000->SaveAs("mistag_plot_PAS.pdf");


  
    	TFile *Out;
	Out = new TFile("mistag_type12_oneB.root","RECREATE");  //MISTAG_4p7fb
	Out->cd();
	
	MISTAG_RATE_SubtractTTBAR->Write();
	
	Out->ls();