当前位置: 首页>>代码示例>>C++>>正文


C++ TLegend::SetLineWidth方法代码示例

本文整理汇总了C++中TLegend::SetLineWidth方法的典型用法代码示例。如果您正苦于以下问题:C++ TLegend::SetLineWidth方法的具体用法?C++ TLegend::SetLineWidth怎么用?C++ TLegend::SetLineWidth使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在TLegend的用法示例。


在下文中一共展示了TLegend::SetLineWidth方法的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。

示例1: fitLMC_c070116_LL1_floathypparamsfixmusigma_nobkg

void fitLMC_c070116_LL1_floathypparamsfixmusigma_nobkg()
{
//=========Macro generated from canvas: c1/data fits
//=========  (Wed Jul  6 21:29:11 2016) by ROOT version6.06/02
   TCanvas *c1 = new TCanvas("c1", "data fits",0,0,1200,800);
   gStyle->SetOptStat(0);
   gStyle->SetOptTitle(0);
   c1->Range(0,0,1,1);
   c1->SetFillColor(0);
   c1->SetBorderMode(0);
   c1->SetBorderSize(2);
   c1->SetTickx(1);
   c1->SetTicky(1);
   c1->SetLeftMargin(0.14);
   c1->SetRightMargin(0.05);
   c1->SetTopMargin(0.05);
   c1->SetBottomMargin(0.16);
   c1->SetFrameLineWidth(2);
   c1->SetFrameBorderMode(0);
  
// ------------>Primitives in pad: pad2
   TPad *pad2 = new TPad("pad2", "pad2",0,0,1,0.3);
   pad2->Draw();
   pad2->cd();
   pad2->Range(3754.321,-26.4,6223.457,8.8);
   pad2->SetFillColor(0);
   pad2->SetBorderMode(0);
   pad2->SetBorderSize(2);
   pad2->SetTickx(1);
   pad2->SetTicky(1);
   pad2->SetLeftMargin(0.14);
   pad2->SetRightMargin(0.05);
   pad2->SetTopMargin(0);
   pad2->SetBottomMargin(0.5);
   pad2->SetFrameLineWidth(2);
   pad2->SetFrameBorderMode(0);
   pad2->SetFrameLineWidth(2);
   pad2->SetFrameBorderMode(0);
   
   TH1D *frame_3705430__1 = new TH1D("frame_3705430__1","",100,4100,6100);
   frame_3705430__1->SetBinContent(1,11.2676);
   frame_3705430__1->SetMinimum(-8.8);
   frame_3705430__1->SetMaximum(8.8);
   frame_3705430__1->SetEntries(1);
   frame_3705430__1->SetDirectory(0);
   frame_3705430__1->SetStats(0);
   frame_3705430__1->SetLineWidth(2);
   frame_3705430__1->SetMarkerStyle(20);
   frame_3705430__1->GetXaxis()->SetTitle("m(J/#psi #Lambda) (MeV)");
   frame_3705430__1->GetXaxis()->SetNdivisions(505);
   frame_3705430__1->GetXaxis()->SetLabelFont(132);
   frame_3705430__1->GetXaxis()->SetLabelOffset(0.01);
   frame_3705430__1->GetXaxis()->SetLabelSize(0.15);
   frame_3705430__1->GetXaxis()->SetTitleSize(0.2);
   frame_3705430__1->GetXaxis()->SetTitleOffset(1.1);
   frame_3705430__1->GetXaxis()->SetTitleFont(132);
   frame_3705430__1->GetYaxis()->SetTitle("Pull");
   frame_3705430__1->GetYaxis()->CenterTitle(true);
   frame_3705430__1->GetYaxis()->SetNdivisions(505);
   frame_3705430__1->GetYaxis()->SetLabelFont(132);
   frame_3705430__1->GetYaxis()->SetLabelOffset(0.01);
   frame_3705430__1->GetYaxis()->SetLabelSize(0.15);
   frame_3705430__1->GetYaxis()->SetTitleSize(0.15);
   frame_3705430__1->GetYaxis()->SetTitleOffset(0.45);
   frame_3705430__1->GetYaxis()->SetTitleFont(132);
   frame_3705430__1->GetZaxis()->SetLabelFont(132);
   frame_3705430__1->GetZaxis()->SetLabelSize(0.06);
   frame_3705430__1->GetZaxis()->SetTitleSize(0.072);
   frame_3705430__1->GetZaxis()->SetTitleOffset(1.2);
   frame_3705430__1->GetZaxis()->SetTitleFont(132);
   frame_3705430__1->Draw("FUNC");
   
   Double_t pull_Hist_curvetot_fx3001[87] = {
   4310,
   4330,
   4350,
   4370,
   4390,
   4410,
   4430,
   4450,
   4470,
   4490,
   4510,
   4530,
   4550,
   4570,
   4590,
   4610,
   4630,
   4650,
   4670,
   4690,
   4710,
   4730,
   4750,
   4770,
   4790,
   4810,
   4830,
//.........这里部分代码省略.........
开发者ID:goi42,项目名称:LbJpsipPi,代码行数:101,代码来源:fitLMC_c070116_LL1_floathypparamsfixmusigma_nobkg.C

示例2: DarkSusy_mH_125_mGammaD_2000_cT_10_LHE_Higgs_m

void DarkSusy_mH_125_mGammaD_2000_cT_10_LHE_Higgs_m()
{
//=========Macro generated from canvas: cnv/cnv
//=========  (Sun May 24 15:17:47 2015) by ROOT version6.02/05
   TCanvas *cnv = new TCanvas("cnv", "cnv",1,1,904,904);
   gStyle->SetOptFit(1);
   gStyle->SetOptStat(0);
   gStyle->SetOptTitle(0);
   cnv->SetHighLightColor(2);
   cnv->Range(1.784236,-0.24375,2.499296,1.63125);
   cnv->SetFillColor(0);
   cnv->SetBorderMode(0);
   cnv->SetBorderSize(2);
   cnv->SetLogx();
   cnv->SetTickx(1);
   cnv->SetTicky(1);
   cnv->SetLeftMargin(0.17);
   cnv->SetRightMargin(0.03);
   cnv->SetTopMargin(0.07);
   cnv->SetBottomMargin(0.13);
   cnv->SetFrameFillStyle(0);
   cnv->SetFrameBorderMode(0);
   cnv->SetFrameFillStyle(0);
   cnv->SetFrameBorderMode(0);
   
   TH1F *h_higgs_M_dummy9 = new TH1F("h_higgs_M_dummy9","h_higgs_M_dummy",220,80.5,300.5);
   h_higgs_M_dummy9->SetMaximum(1.5);
   h_higgs_M_dummy9->SetLineStyle(0);
   h_higgs_M_dummy9->SetMarkerStyle(20);
   h_higgs_M_dummy9->GetXaxis()->SetTitle("Mass of h [GeV]");
   h_higgs_M_dummy9->GetXaxis()->SetMoreLogLabels();
   h_higgs_M_dummy9->GetXaxis()->SetNdivisions(10);
   h_higgs_M_dummy9->GetXaxis()->SetLabelFont(42);
   h_higgs_M_dummy9->GetXaxis()->SetLabelOffset(0.007);
   h_higgs_M_dummy9->GetXaxis()->SetLabelSize(0.03);
   h_higgs_M_dummy9->GetXaxis()->SetTitleSize(0.06);
   h_higgs_M_dummy9->GetXaxis()->SetTitleOffset(0.95);
   h_higgs_M_dummy9->GetXaxis()->SetTitleFont(42);
   h_higgs_M_dummy9->GetYaxis()->SetTitle("Fraction of events / 1 GeV");
   h_higgs_M_dummy9->GetYaxis()->SetLabelFont(42);
   h_higgs_M_dummy9->GetYaxis()->SetLabelOffset(0.007);
   h_higgs_M_dummy9->GetYaxis()->SetTitleSize(0.06);
   h_higgs_M_dummy9->GetYaxis()->SetTitleOffset(1.35);
   h_higgs_M_dummy9->GetYaxis()->SetTitleFont(42);
   h_higgs_M_dummy9->GetZaxis()->SetLabelFont(42);
   h_higgs_M_dummy9->GetZaxis()->SetLabelOffset(0.007);
   h_higgs_M_dummy9->GetZaxis()->SetTitleSize(0.06);
   h_higgs_M_dummy9->GetZaxis()->SetTitleFont(42);
   h_higgs_M_dummy9->Draw("");
   
   TH1F *h_higgs_M_dummy10 = new TH1F("h_higgs_M_dummy10","h_higgs_M_dummy",220,80.5,300.5);
   h_higgs_M_dummy10->SetMaximum(1.5);
   h_higgs_M_dummy10->SetLineStyle(0);
   h_higgs_M_dummy10->SetMarkerStyle(20);
   h_higgs_M_dummy10->GetXaxis()->SetTitle("Mass of h [GeV]");
   h_higgs_M_dummy10->GetXaxis()->SetMoreLogLabels();
   h_higgs_M_dummy10->GetXaxis()->SetNdivisions(10);
   h_higgs_M_dummy10->GetXaxis()->SetLabelFont(42);
   h_higgs_M_dummy10->GetXaxis()->SetLabelOffset(0.007);
   h_higgs_M_dummy10->GetXaxis()->SetLabelSize(0.03);
   h_higgs_M_dummy10->GetXaxis()->SetTitleSize(0.06);
   h_higgs_M_dummy10->GetXaxis()->SetTitleOffset(0.95);
   h_higgs_M_dummy10->GetXaxis()->SetTitleFont(42);
   h_higgs_M_dummy10->GetYaxis()->SetTitle("Fraction of events / 1 GeV");
   h_higgs_M_dummy10->GetYaxis()->SetLabelFont(42);
   h_higgs_M_dummy10->GetYaxis()->SetLabelOffset(0.007);
   h_higgs_M_dummy10->GetYaxis()->SetTitleSize(0.06);
   h_higgs_M_dummy10->GetYaxis()->SetTitleOffset(1.35);
   h_higgs_M_dummy10->GetYaxis()->SetTitleFont(42);
   h_higgs_M_dummy10->GetZaxis()->SetLabelFont(42);
   h_higgs_M_dummy10->GetZaxis()->SetLabelOffset(0.007);
   h_higgs_M_dummy10->GetZaxis()->SetTitleSize(0.06);
   h_higgs_M_dummy10->GetZaxis()->SetTitleFont(42);
   h_higgs_M_dummy10->Draw("same");
   
   TH1F *h_higgs_M11 = new TH1F("h_higgs_M11","h_higgs_M",10,120.5,130.5);
   h_higgs_M11->SetBinContent(5,1);
   h_higgs_M11->SetBinError(5,0.003535556);
   h_higgs_M11->SetEntries(79999);
   h_higgs_M11->SetDirectory(0);

   Int_t ci;      // for color index setting
   TColor *color; // for color definition with alpha
   ci = TColor::GetColor("#0000ff");
   h_higgs_M11->SetLineColor(ci);
   h_higgs_M11->SetLineWidth(2);
   h_higgs_M11->SetMarkerStyle(20);
   h_higgs_M11->GetXaxis()->SetLabelFont(42);
   h_higgs_M11->GetXaxis()->SetLabelOffset(0.007);
   h_higgs_M11->GetXaxis()->SetTitleSize(0.06);
   h_higgs_M11->GetXaxis()->SetTitleOffset(0.95);
   h_higgs_M11->GetXaxis()->SetTitleFont(42);
   h_higgs_M11->GetYaxis()->SetLabelFont(42);
   h_higgs_M11->GetYaxis()->SetLabelOffset(0.007);
   h_higgs_M11->GetYaxis()->SetTitleSize(0.06);
   h_higgs_M11->GetYaxis()->SetTitleOffset(1.3);
   h_higgs_M11->GetYaxis()->SetTitleFont(42);
   h_higgs_M11->GetZaxis()->SetLabelFont(42);
   h_higgs_M11->GetZaxis()->SetLabelOffset(0.007);
   h_higgs_M11->GetZaxis()->SetTitleSize(0.06);
//.........这里部分代码省略.........
开发者ID:tahuang1991,项目名称:MuJetAnalysis,代码行数:101,代码来源:DarkSusy_mH_125_mGammaD_2000_cT_10_LHE_Higgs_m.C

示例3: InclusiveJets_2010_mcdataRatio

void InclusiveJets_2010_mcdataRatio(){

//general root settings
gROOT->SetStyle("Plain");
gStyle->SetOptStat(0); //get rid of statistics box

// to set the errors of the histograms to sqrt(sum of squares of weights)
TH1::SetDefaultSumw2() ;

//Ranges for plots
Float_t xmin=17.5 , ymin = 0.00001, xmax = 1684.0, ymax = 10000000000000000.;

//for the linecolor and linestyle
Int_t icol[8]={8,kViolet,7,4,12,46,6,7};
Int_t isty[8]={1,1,1,1,1,1,1,1};
Int_t imark[5] = {21,22,25,26,3};

//get the root files
TFile *f[3];
f[0] = new TFile("out_aida_40times900kevents_errorcut50/Z2MPIHADONbornkt5ktsupp250_errorcut.root");
f[1] = new TFile("out_aida_40times900kevents_errorcut50/Z2MPIHADOFFbornkt5ktsupp250_errorcut.root");
f[2] = new TFile("out_aida_40times900kevents_errorcut50/NOTUNEbornkt5ktsupp250_errorcut.root");

//get the Tgraph and convert into histo
TH1F _histotmp[6][3];
Int_t n = 3; //number of files
Int_t nh = 6; // number of histograms = number of y bins

for(const int ifile = 0; ifile < n; ifile++){

  _histotmp[0][ifile] = Gr2Hi((TGraph*) f[ifile]->Get("d01_x01_y01;1")); // |y| <0.5
  _histotmp[1][ifile] = Gr2Hi((TGraph*) f[ifile]->Get("d02_x01_y01;2")); // 0.5 < |y| < 1.0
  _histotmp[2][ifile] = Gr2Hi((TGraph*) f[ifile]->Get("d03_x01_y01;2")); // 1.0 < |y| < 1.5
  _histotmp[3][ifile] = Gr2Hi((TGraph*) f[ifile]->Get("d04_x01_y01;2")); // 1.5 < |y| < 2.0
  _histotmp[4][ifile] = Gr2Hi((TGraph*) f[ifile]->Get("d05_x01_y01;1")); // 2.0 < |y| < 2.5
  _histotmp[5][ifile] = Gr2Hi((TGraph*) f[ifile]->Get("d06_x01_y01;1")); // 2.5 < |y| < 3.0

  for(const int ihisto = 0; ihisto < nh; ihisto++){
    _histotmp[ihisto][ifile].SetName("");
  }
}

//change the histo so that I can plot it and do the ratio
 TH1F *_histo[6][3];

for(const int ifile = 0; ifile < n; ifile++){
  for(const int ihisto = 0; ihisto < nh; ihisto++){

    TH1F *_histo[ihisto][ifile]= (TH1F*)_histotmp[ihisto][ifile].Clone("");
/*
  _histo[ihisto][ifile]->Divide((TH1*)_histo[ihisto][1]);  //histo 0 / hsito 1
  TH1F *_ratio1[ihisto]= (TH1F*)_ratiotmp1[ihisto]->Clone("");
  _ratiotmp2[ihisto]->Divide((TH1*)_histo[ihisto][2]);  //histo 0 / hsito 2
  TH1F *_ratio2[ihisto]= (TH1F*)_ratiotmp2[ihisto]->Clone("");
*/
    _histo[ihisto][ifile]->SetLineWidth(2);
    _histo[ihisto][ifile]->SetLineColor(icol[ihisto]);
    _histo[ihisto][ifile]->SetMarkerStyle(2);
    _histo[ihisto][ifile]->SetMarkerColor(icol[ihisto]);

  }

//scale the histos that it fits in one histogram
_histo[0][ifile]->Scale(10000);
_histo[1][ifile]->Scale(1000);
_histo[2][ifile]->Scale(100);
_histo[3][ifile]->Scale(10);
_histo[4][ifile]->Scale(1);
}

//get the data 2010
//data =  new TFile("out_aida/CMS_2011_S9086218.root");

//TH1F _histodata1 = Gr2Hi((TGraph*)data->Get("d01_x01_y01;1")); // |y| <0.5
//TH1F _histodata2 = Gr2Hi((TGraph*)data->Get("d02_x01_y01;1")); // 0.5 < |y| < 1.0
//TH1F _histodata3 = Gr2Hi((TGraph*)data->Get("d03_x01_y01;1")); // 1.0 < |y| < 1.5
//TH1F _histodata4 = Gr2Hi((TGraph*)data->Get("d04_x01_y01;1")); // 1.5 < |y| < 2.0
//TH1F _histodata5 = Gr2Hi((TGraph*)data->Get("d05_x01_y01;1")); // 2.0 < |y| < 2.5
//TH1F _histodata6 = Gr2Hi((TGraph*)data->Get("d06_x01_y01;1")); // 2.5 < |y| < 3.0


   Double_t xAxis1[35] = {18, 21, 24, 28, 32, 37, 43, 49, 56, 64, 74, 84, 97, 114, 133, 153, 174, 196, 220, 245, 272, 300, 330, 362, 395, 430, 468, 507, 548, 592, 638, 686, 737, 846, 1684}; 

   TH1F *d01_x01_y01_histo = new TH1F("d01_x01_y01_histo","d01_x01_y01_histo",34, xAxis1);
   d01_x01_y01_histo->SetBinContent(1,1.97e+11);
   d01_x01_y01_histo->SetBinContent(2,1.02e+11);
   d01_x01_y01_histo->SetBinContent(3,5.14e+10);
   d01_x01_y01_histo->SetBinContent(4,2.66e+10);
   d01_x01_y01_histo->SetBinContent(5,1.38e+10);
   d01_x01_y01_histo->SetBinContent(6,6.53e+09);
   d01_x01_y01_histo->SetBinContent(7,3.35e+09);
   d01_x01_y01_histo->SetBinContent(8,1.8e+09);
   d01_x01_y01_histo->SetBinContent(9,9.2e+08);
   d01_x01_y01_histo->SetBinContent(10,4.66e+08);
   d01_x01_y01_histo->SetBinContent(11,2.37e+08);
   d01_x01_y01_histo->SetBinContent(12,1.18e+08);
   d01_x01_y01_histo->SetBinContent(13,5.43e+07);
   d01_x01_y01_histo->SetBinContent(14,2.39e+07);
   d01_x01_y01_histo->SetBinContent(15,1.08e+07);
   d01_x01_y01_histo->SetBinContent(16,5240000);
//.........这里部分代码省略.........
开发者ID:rkunnawa,项目名称:Powheg_NPC,代码行数:101,代码来源:InclusiveJets_2010_mcdataRatio.C

示例4: result_JES_akPu4PF_


//.........这里部分代码省略.........
   25};
   Double_t Graph_fey1003[4] = {
   0.01053149,
   0.005298861,
   0.004412705,
   0.002663901};
   gre = new TGraphErrors(4,Graph_fx1003,Graph_fy1003,Graph_fex1003,Graph_fey1003);
   gre->SetName("Graph");
   gre->SetTitle("some title_2");
   gre->SetFillColor(1);
   gre->SetFillStyle(0);
   gre->SetLineColor(3);
   gre->SetMarkerColor(3);
   
   TH1F *Graph_Graph1003 = new TH1F("Graph_Graph1003","some title_2",100,0,110);
   Graph_Graph1003->SetMinimum(0.9335092);
   Graph_Graph1003->SetMaximum(1.011502);
   Graph_Graph1003->SetDirectory(0);
   Graph_Graph1003->SetStats(0);

   ci = TColor::GetColor("#000099");
   Graph_Graph1003->SetLineColor(ci);
   Graph_Graph1003->GetXaxis()->SetLabelFont(42);
   Graph_Graph1003->GetXaxis()->SetLabelSize(0.035);
   Graph_Graph1003->GetXaxis()->SetTitleSize(0.035);
   Graph_Graph1003->GetXaxis()->SetTitleFont(42);
   Graph_Graph1003->GetYaxis()->SetLabelFont(42);
   Graph_Graph1003->GetYaxis()->SetLabelSize(0.035);
   Graph_Graph1003->GetYaxis()->SetTitleSize(0.035);
   Graph_Graph1003->GetYaxis()->SetTitleFont(42);
   Graph_Graph1003->GetZaxis()->SetLabelFont(42);
   Graph_Graph1003->GetZaxis()->SetLabelSize(0.035);
   Graph_Graph1003->GetZaxis()->SetTitleSize(0.035);
   Graph_Graph1003->GetZaxis()->SetTitleFont(42);
   gre->SetHistogram(Graph_Graph1003);
   
   multigraph->Add(gre,"");
   multigraph->Draw("AP");
   multigraph->GetXaxis()->SetTitle("Centrality");
   multigraph->GetXaxis()->SetLabelFont(42);
   multigraph->GetXaxis()->SetLabelSize(0.035);
   multigraph->GetXaxis()->SetTitleSize(0.035);
   multigraph->GetXaxis()->SetTitleFont(42);
   multigraph->GetYaxis()->SetTitle("#mu_{Reco./Gen.}");
   multigraph->GetYaxis()->SetLabelFont(42);
   multigraph->GetYaxis()->SetLabelSize(0.035);
   multigraph->GetYaxis()->SetTitleSize(0.035);
   multigraph->GetYaxis()->SetTitleFont(42);
   
   TLegend *leg = new TLegend(0.68,0.7,0.88,0.85,NULL,"brNDC");
   leg->SetBorderSize(0);
   leg->SetLineColor(1);
   leg->SetLineStyle(1);
   leg->SetLineWidth(1);
   leg->SetFillColor(0);
   leg->SetFillStyle(1001);
   TLegendEntry *entry=leg->AddEntry("Graph","allJets","l");
   entry->SetLineColor(1);
   entry->SetLineStyle(1);
   entry->SetLineWidth(1);
   entry->SetMarkerColor(1);
   entry->SetMarkerStyle(21);
   entry->SetMarkerSize(1);
   entry->SetTextFont(42);
   entry=leg->AddEntry("Graph","lightJets","l");
   entry->SetLineColor(2);
   entry->SetLineStyle(1);
   entry->SetLineWidth(1);
   entry->SetMarkerColor(1);
   entry->SetMarkerStyle(21);
   entry->SetMarkerSize(1);
   entry->SetTextFont(42);
   entry=leg->AddEntry("Graph","bJets","l");
   entry->SetLineColor(3);
   entry->SetLineStyle(1);
   entry->SetLineWidth(1);
   entry->SetMarkerColor(1);
   entry->SetMarkerStyle(21);
   entry->SetMarkerSize(1);
   entry->SetTextFont(42);
   leg->Draw();
   TLatex *   tex = new TLatex(0.25,0.7,"#bf{#color[2]{|#eta_{jet}|<2.0 &75<refpt<120}}");
tex->SetNDC();
   tex->SetTextFont(43);
   tex->SetTextSize(24);
   tex->SetLineWidth(2);
   tex->Draw();
   
   TPaveText *pt = new TPaveText(0.3750575,0.9365254,0.6249425,0.995,"blNDC");
   pt->SetName("title");
   pt->SetBorderSize(0);
   pt->SetFillColor(0);
   pt->SetFillStyle(0);
   pt->SetTextFont(42);
   AText = pt->AddText("JES_akPu4PF");
   pt->Draw();
   Can_result_0->Modified();
   Can_result_0->cd();
   Can_result_0->SetSelected(Can_result_0);
}
开发者ID:Jelov,项目名称:JetEnergy_SR,代码行数:101,代码来源:result_JES_akPu4PF_(refpt>+75+&&+refpt+<+120)&&(abs(refeta)<2)_Centrality.C

示例5: DarkSusy_mH_125_mGammaD_2000_cT_1000_LHE_nD_Eta


//.........这里部分代码省略.........
    h_nD_1_Eta41->SetBinError(76,0.0003156278);
    h_nD_1_Eta41->SetBinError(77,0.0003047886);
    h_nD_1_Eta41->SetBinError(78,0.0002868127);
    h_nD_1_Eta41->SetBinError(79,0.0002889855);
    h_nD_1_Eta41->SetBinError(80,0.0002652844);
    h_nD_1_Eta41->SetBinError(81,0.0002434586);
    h_nD_1_Eta41->SetBinError(82,0.000232954);
    h_nD_1_Eta41->SetBinError(83,0.0002191163);
    h_nD_1_Eta41->SetBinError(84,0.000195744);
    h_nD_1_Eta41->SetBinError(85,0.0001850664);
    h_nD_1_Eta41->SetBinError(86,0.0001687101);
    h_nD_1_Eta41->SetBinError(87,0.0001442219);
    h_nD_1_Eta41->SetBinError(88,0.0001479686);
    h_nD_1_Eta41->SetBinError(89,0.0001287533);
    h_nD_1_Eta41->SetBinError(90,0.0001090215);
    h_nD_1_Eta41->SetBinError(91,0.0001038795);
    h_nD_1_Eta41->SetBinError(92,8.481729e-05);
    h_nD_1_Eta41->SetBinError(93,7.606876e-05);
    h_nD_1_Eta41->SetBinError(94,7.183936e-05);
    h_nD_1_Eta41->SetBinError(95,6.617356e-05);
    h_nD_1_Eta41->SetBinError(96,5.156202e-05);
    h_nD_1_Eta41->SetBinError(97,4.679177e-05);
    h_nD_1_Eta41->SetBinError(98,3.308678e-05);
    h_nD_1_Eta41->SetBinError(99,2.796343e-05);
    h_nD_1_Eta41->SetBinError(100,3.063241e-05);
    h_nD_1_Eta41->SetBinError(101,3.954627e-05);
    h_nD_1_Eta41->SetEntries(79999);
    h_nD_1_Eta41->SetDirectory(0);

    Int_t ci;      // for color index setting
    TColor *color; // for color definition with alpha
    ci = TColor::GetColor("#0000ff");
    h_nD_1_Eta41->SetLineColor(ci);
    h_nD_1_Eta41->SetLineWidth(2);
    h_nD_1_Eta41->SetMarkerStyle(20);
    h_nD_1_Eta41->GetXaxis()->SetLabelFont(42);
    h_nD_1_Eta41->GetXaxis()->SetLabelOffset(0.007);
    h_nD_1_Eta41->GetXaxis()->SetTitleSize(0.06);
    h_nD_1_Eta41->GetXaxis()->SetTitleOffset(0.95);
    h_nD_1_Eta41->GetXaxis()->SetTitleFont(42);
    h_nD_1_Eta41->GetYaxis()->SetLabelFont(42);
    h_nD_1_Eta41->GetYaxis()->SetLabelOffset(0.007);
    h_nD_1_Eta41->GetYaxis()->SetTitleSize(0.06);
    h_nD_1_Eta41->GetYaxis()->SetTitleOffset(1.3);
    h_nD_1_Eta41->GetYaxis()->SetTitleFont(42);
    h_nD_1_Eta41->GetZaxis()->SetLabelFont(42);
    h_nD_1_Eta41->GetZaxis()->SetLabelOffset(0.007);
    h_nD_1_Eta41->GetZaxis()->SetTitleSize(0.06);
    h_nD_1_Eta41->GetZaxis()->SetTitleFont(42);
    h_nD_1_Eta41->Draw("SAMEHIST");

    TH1F *h_nD_2_Eta42 = new TH1F("h_nD_2_Eta42","h_nD_2_Eta",100,-5,5);
    h_nD_2_Eta42->SetBinContent(0,0.003041768);
    h_nD_2_Eta42->SetBinContent(1,0.0004524944);
    h_nD_2_Eta42->SetBinContent(2,0.0007038802);
    h_nD_2_Eta42->SetBinContent(3,0.0008924195);
    h_nD_2_Eta42->SetBinContent(4,0.0008170037);
    h_nD_2_Eta42->SetBinContent(5,0.001282067);
    h_nD_2_Eta42->SetBinContent(6,0.001382622);
    h_nD_2_Eta42->SetBinContent(7,0.001520884);
    h_nD_2_Eta42->SetBinContent(8,0.001897963);
    h_nD_2_Eta42->SetBinContent(9,0.002136779);
    h_nD_2_Eta42->SetBinContent(10,0.001960809);
    h_nD_2_Eta42->SetBinContent(11,0.002501288);
    h_nD_2_Eta42->SetBinContent(12,0.00263955);
    h_nD_2_Eta42->SetBinContent(13,0.003154891);
开发者ID:tahuang1991,项目名称:MuJetAnalysis,代码行数:67,代码来源:DarkSusy_mH_125_mGammaD_2000_cT_1000_LHE_nD_Eta.C

示例6: paraPull_alpha_EL_EFF_Iso_TotalCorrUncertainty_2TeV_2Lep_plots_All


//.........这里部分代码省略.........
        0,
        0,
        0,
        0,
        0,
        0,
        0,
        0
    };
    Double_t _fey1009[35] = {
        0,
        0,
        0.6107702,
        1.073131,
        1.266362,
        0.9365976,
        0.9916527,
        0.9863054,
        0.9267238,
        0.7691165,
        0.9864524,
        0.9937947,
        0.9917419,
        0.9970684,
        0.9817834,
        0.9376065,
        0.9926703,
        0.9925594,
        1.005011,
        0.9933467,
        0.9551198,
        0.9932276,
        0.9929662,
        0.9927806,
        0.9913159,
        0.9909915,
        1.097968,
        0.9870135,
        0.9931711,
        0.9930639,
        0.9855126,
        0.7540343,
        0.738039,
        0.9909039,
        0.7858475
    };
    TGraphErrors *gre = new TGraphErrors(35,_fx1009,_fy1009,_fex1009,_fey1009);
    gre->SetName("");
    gre->SetTitle("");
    gre->SetFillColor(1);
    gre->SetMarkerStyle(20);
    gre->SetMarkerSize(1.2);

    TH1F *Graph_Graph1009 = new TH1F("Graph_Graph1009","",100,0,35.75);
    Graph_Graph1009->SetMinimum(-1.802262);
    Graph_Graph1009->SetMaximum(2.167356);
    Graph_Graph1009->SetDirectory(0);
    Graph_Graph1009->SetStats(0);

    ci = TColor::GetColor("#000099");
    Graph_Graph1009->SetLineColor(ci);
    Graph_Graph1009->GetXaxis()->SetLabelFont(42);
    Graph_Graph1009->GetXaxis()->SetLabelSize(0.035);
    Graph_Graph1009->GetXaxis()->SetTitleSize(0.035);
    Graph_Graph1009->GetXaxis()->SetTitleFont(42);
    Graph_Graph1009->GetYaxis()->SetLabelFont(42);
    Graph_Graph1009->GetYaxis()->SetLabelSize(0.035);
    Graph_Graph1009->GetYaxis()->SetTitleSize(0.035);
    Graph_Graph1009->GetYaxis()->SetTitleFont(42);
    Graph_Graph1009->GetZaxis()->SetLabelFont(42);
    Graph_Graph1009->GetZaxis()->SetLabelSize(0.035);
    Graph_Graph1009->GetZaxis()->SetTitleSize(0.035);
    Graph_Graph1009->GetZaxis()->SetTitleFont(42);
    gre->SetHistogram(Graph_Graph1009);

    gre->Draw("p");

    TLegend *leg = new TLegend(0.1,0.4,0.4,0.95,NULL,"brNDC");
    leg->SetBorderSize(0);
    leg->SetTextFont(72);
    leg->SetTextSize(0.015);
    leg->SetLineColor(1);
    leg->SetLineStyle(1);
    leg->SetLineWidth(1);
    leg->SetFillColor(0);
    leg->SetFillStyle(0);
    leg->Draw();

    TPaveText *pt = new TPaveText(0.2068675,0.9341608,0.7931325,0.995,"blNDC");
    pt->SetName("title");
    pt->SetBorderSize(0);
    pt->SetFillColor(0);
    pt->SetFillStyle(0);
    pt->SetTextFont(42);
    TText *AText = pt->AddText("alpha_EL_EFF_Iso_TotalCorrUncertainty");
    pt->Draw();
    c1->Modified();
    c1->cd();
    c1->SetSelected(c1);
}
开发者ID:AlexanderMorton,项目名称:NP_Prun,代码行数:101,代码来源:paraPull_alpha_EL_EFF_Iso_TotalCorrUncertainty_2TeV_2Lep_plots_All.C

示例7: DisplayBackground

void DisplayBackground(){



 gROOT->SetStyle("Plain");
 gStyle->SetOptStat(0000);
 //gStyle->SetErrorX(0) 
 gStyle->SetPadGridX(0);
 gStyle->SetPadGridY(0);
 TCanvas * c = new TCanvas("c", "c", 700,700);
 c->SetTickx(1);
 c->SetTicky(1);

 c->SetFrameFillStyle(4000);
 c->SetFrameFillColor(0);
 c->cd();

   gStyle->SetPadGridX(0);
   gStyle->SetPadGridY(0);
   gROOT->SetStyle("Plain");


  double totalLuminosity=2190; // /pb
  
  double xsec_ttbar=831.76;
  double xsec_qcd[8]={27850000,1717000,351300,31630.,6802.,1206.,120.4,25.24};

  TFile *ttbar=new TFile("Histograms_TT_TuneCUETP8M1_13TeV-amcatnlo-pythia8_Skim.root"); 	
  /*std::vector<TFile*> qcd;
  qcd.push_back(new TFile ("Histograms_QCD_HT100to200_Skim.root"));
  qcd.push_back(new TFile("Histograms_QCD_HT200to300_Skim.root"));
  qcd.push_back(new TFile("Histograms_QCD_HT300to500_Skim.root"));
  qcd.push_back(new TFile("Histograms_QCD_HT500to700_Skim.root"));
  qcd.push_back(new TFile("Histograms_QCD_HT700to1000_Skim.root"));
  qcd.push_back(new TFile("Histograms_QCD_HT1000to1500_Skim.root"));
  qcd.push_back(new TFile("Histograms_QCD_HT1500to2000_Skim.root"));
  qcd.push_back(new TFile("Histograms_QCD_HT2000toInf_Skim.root"));



  double init_ttbar=((TH1F*)ttbar->Get("Count"))->GetBinContent(1);
  double init_qcd[8];

  double scale_qcd[8];
  double scale_ttbar=totalLuminosity*xsec_ttbar/init_ttbar;

  for(int l=0; l<8;l++){
	  init_qcd[l]=((TH1F*)qcd.at(l)->Get("Count"))->GetBinContent(1);
	  scale_qcd[l]=totalLuminosity*xsec_qcd[l]/init_qcd[l];

  }	


*/


  double init_ttbar=((TH1F*)ttbar->Get("Count"))->GetBinContent(1);
  double scale_ttbar=totalLuminosity*xsec_ttbar/init_ttbar;


  TH1F * h_bkg = new TH1F("h_bkg","h_bkg",  50, 0., 2000.);
  THStack hs("hs","test stacked histograms");
  hs.SetTitle("");
  //c->cd();
  TH1F* h_mX_SB_kinFit=(TH1F*)ttbar->Get("h_mX_SB_kinFit");	
  h_mX_SB_kinFit->Scale(scale_ttbar);
  h_mX_SB_kinFit->Rebin(40);	
  h_bkg->Add(h_mX_SB_kinFit);
  h_mX_SB_kinFit->SetLineColor(kBlue+1);
  h_mX_SB_kinFit->SetFillColor(kBlue+1);

  TLegend *leg = new TLegend(0.55625,0.7321654,0.8765625,0.8603839,NULL,"brNDC");
  leg->SetBorderSize(0);
  leg->SetTextSize(0.035);
  leg->SetTextFont(42);	
  leg->SetLineColor(1);
  leg->SetLineStyle(1);
  leg->SetLineWidth(2);
  leg->SetFillColor(0);
  leg->SetFillStyle(0);



  double integral =0 ;
  integral = integral + h_mX_SB_kinFit->Integral(0, 200);
  std::cout<< "integral tt " << integral<<std::endl;

  leg->AddEntry(h_mX_SB_kinFit, "t#bar{t} ", "f");

  h_mX_SB_kinFit->Draw("");
  hs.Add(h_mX_SB_kinFit,"hist");
/*  double integralQCD =0;
  for(int m=0; m<8;m++){
	  TH1F* h_mX_SB_kinFitQ=(TH1F*)qcd.at(m)->Get("h_mX_SB_kinFit");
	  h_mX_SB_kinFitQ->Scale(scale_qcd[m]);
	  h_mX_SB_kinFitQ->Rebin(40);
	  h_bkg->Add(h_mX_SB_kinFitQ);
	  h_mX_SB_kinFitQ->Draw("same");
	  h_mX_SB_kinFitQ->SetLineColor(kRed+1);
	  h_mX_SB_kinFitQ->SetFillColor(kRed+1);
//.........这里部分代码省略.........
开发者ID:fnechans,项目名称:HbbHbb_Run2,代码行数:101,代码来源:DisplayBackground.c

示例8: DarkSusy_mH_125_mGammaD_2000_cT_0_LHE_gammaD_M

void DarkSusy_mH_125_mGammaD_2000_cT_0_LHE_gammaD_M()
{
//=========Macro generated from canvas: cnv/cnv
//=========  (Sun May 24 15:19:47 2015) by ROOT version6.02/05
    TCanvas *cnv = new TCanvas("cnv", "cnv",1,1,904,904);
    gStyle->SetOptFit(1);
    gStyle->SetOptStat(0);
    gStyle->SetOptTitle(0);
    cnv->SetHighLightColor(2);
    cnv->Range(-1.526695,-0.2275,1.571513,1.5225);
    cnv->SetFillColor(0);
    cnv->SetBorderMode(0);
    cnv->SetBorderSize(2);
    cnv->SetLogx();
    cnv->SetTickx(1);
    cnv->SetTicky(1);
    cnv->SetLeftMargin(0.17);
    cnv->SetRightMargin(0.03);
    cnv->SetTopMargin(0.07);
    cnv->SetBottomMargin(0.13);
    cnv->SetFrameFillStyle(0);
    cnv->SetFrameBorderMode(0);
    cnv->SetFrameFillStyle(0);
    cnv->SetFrameBorderMode(0);

    TH1F *h_gammaD_1_M_dummy86 = new TH1F("h_gammaD_1_M_dummy86","h_gammaD_1_M_dummy",303,0.1,30.1);
    h_gammaD_1_M_dummy86->SetMaximum(1.4);
    h_gammaD_1_M_dummy86->SetLineStyle(0);
    h_gammaD_1_M_dummy86->SetMarkerStyle(20);
    h_gammaD_1_M_dummy86->GetXaxis()->SetTitle("Mass of #gamma_{D} [GeV]");
    h_gammaD_1_M_dummy86->GetXaxis()->SetLabelFont(42);
    h_gammaD_1_M_dummy86->GetXaxis()->SetLabelOffset(0.007);
    h_gammaD_1_M_dummy86->GetXaxis()->SetTitleSize(0.06);
    h_gammaD_1_M_dummy86->GetXaxis()->SetTitleOffset(0.95);
    h_gammaD_1_M_dummy86->GetXaxis()->SetTitleFont(42);
    h_gammaD_1_M_dummy86->GetYaxis()->SetTitle("Fraction of events / 0.1 GeV");
    h_gammaD_1_M_dummy86->GetYaxis()->SetLabelFont(42);
    h_gammaD_1_M_dummy86->GetYaxis()->SetLabelOffset(0.007);
    h_gammaD_1_M_dummy86->GetYaxis()->SetTitleSize(0.06);
    h_gammaD_1_M_dummy86->GetYaxis()->SetTitleOffset(1.35);
    h_gammaD_1_M_dummy86->GetYaxis()->SetTitleFont(42);
    h_gammaD_1_M_dummy86->GetZaxis()->SetLabelFont(42);
    h_gammaD_1_M_dummy86->GetZaxis()->SetLabelOffset(0.007);
    h_gammaD_1_M_dummy86->GetZaxis()->SetTitleSize(0.06);
    h_gammaD_1_M_dummy86->GetZaxis()->SetTitleFont(42);
    h_gammaD_1_M_dummy86->Draw("");

    TH1F *h_gammaD_1_M87 = new TH1F("h_gammaD_1_M87","h_gammaD_1_M",303,0.1,30.1);
    h_gammaD_1_M87->SetBinContent(201,1);
    h_gammaD_1_M87->SetBinError(201,0.002500016);
    h_gammaD_1_M87->SetEntries(159998);
    h_gammaD_1_M87->SetDirectory(0);

    Int_t ci;      // for color index setting
    TColor *color; // for color definition with alpha
    ci = TColor::GetColor("#0000ff");
    h_gammaD_1_M87->SetLineColor(ci);
    h_gammaD_1_M87->SetLineWidth(2);
    h_gammaD_1_M87->SetMarkerStyle(20);
    h_gammaD_1_M87->GetXaxis()->SetLabelFont(42);
    h_gammaD_1_M87->GetXaxis()->SetLabelOffset(0.007);
    h_gammaD_1_M87->GetXaxis()->SetTitleSize(0.06);
    h_gammaD_1_M87->GetXaxis()->SetTitleOffset(0.95);
    h_gammaD_1_M87->GetXaxis()->SetTitleFont(42);
    h_gammaD_1_M87->GetYaxis()->SetLabelFont(42);
    h_gammaD_1_M87->GetYaxis()->SetLabelOffset(0.007);
    h_gammaD_1_M87->GetYaxis()->SetTitleSize(0.06);
    h_gammaD_1_M87->GetYaxis()->SetTitleOffset(1.3);
    h_gammaD_1_M87->GetYaxis()->SetTitleFont(42);
    h_gammaD_1_M87->GetZaxis()->SetLabelFont(42);
    h_gammaD_1_M87->GetZaxis()->SetLabelOffset(0.007);
    h_gammaD_1_M87->GetZaxis()->SetTitleSize(0.06);
    h_gammaD_1_M87->GetZaxis()->SetTitleFont(42);
    h_gammaD_1_M87->Draw("SAMEHIST");

    TLegend *leg = new TLegend(0.4566667,0.82,0.7822222,0.9066667,NULL,"brNDC");
    leg->SetBorderSize(0);
    leg->SetTextSize(0.02777778);
    leg->SetLineColor(1);
    leg->SetLineStyle(1);
    leg->SetLineWidth(1);
    leg->SetFillColor(0);
    leg->SetFillStyle(0);
    TLegendEntry *entry=leg->AddEntry("NULL","#splitline{pp #rightarrow h #rightarrow 2n_{1} #rightarrow 2n_{D} + 2 #gamma_{D} #rightarrow 2n_{D} + 4#mu}{#splitline{m_{h} = 125 GeV, m_{n_{1}} = 50 GeV, m_{n_{D}} = 1 GeV}{m_{#gamma_{D}} = 20 GeV, c#tau_{#gamma_{D}} = 0 mm}}","h");
    entry->SetLineColor(1);
    entry->SetLineStyle(1);
    entry->SetLineWidth(1);
    entry->SetMarkerColor(1);
    entry->SetMarkerStyle(21);
    entry->SetMarkerSize(1);
    entry->SetTextFont(42);
    leg->Draw();

    leg = new TLegend(0.17,0.935,0.97,1,NULL,"brNDC");
    leg->SetBorderSize(0);
    leg->SetTextAlign(22);
    leg->SetTextSize(0.045);
    leg->SetLineColor(1);
    leg->SetLineStyle(1);
    leg->SetLineWidth(1);
//.........这里部分代码省略.........
开发者ID:tahuang1991,项目名称:MuJetAnalysis,代码行数:101,代码来源:DarkSusy_mH_125_mGammaD_2000_cT_0_LHE_gammaD_M.C

示例9: Plot

void Plotter::Plot(std::string filename) {

	gROOT->Reset();
	//gROOT->SetStyle("Plain");

	TStyle *MyStyle = new TStyle("MyStyle","My Root Styles");
  MyStyle->SetPaperSize(20,24);
	MyStyle->SetStatColor(0);
	MyStyle->SetCanvasColor(0);
	MyStyle->SetPadColor(0);
	MyStyle->SetPadBorderMode(0);
	MyStyle->SetCanvasBorderMode(0);
	MyStyle->SetFrameBorderMode(0);
	MyStyle->SetOptStat(0);
	MyStyle->SetStatBorderSize(2);
	MyStyle->SetOptTitle(0);
	MyStyle->SetPadTickX(1);
	MyStyle->SetPadTickY(1);
	MyStyle->SetPadBorderSize(2);
	MyStyle->SetPalette(51, 0);
	MyStyle->SetPadBottomMargin(0.15);
	MyStyle->SetPadTopMargin(0.05);
	MyStyle->SetPadLeftMargin(0.15);
	MyStyle->SetPadRightMargin(0.25);
	MyStyle->SetTitleColor(1);
	MyStyle->SetTitleFillColor(0);
	MyStyle->SetTitleFontSize(0.05);
	MyStyle->SetTitleBorderSize(0);
	MyStyle->SetLineWidth(1);
	MyStyle->SetHistLineWidth(3);
	MyStyle->SetLegendBorderSize(0);
	MyStyle->SetNdivisions(502, "x");
	MyStyle->SetMarkerSize(0.8);
	MyStyle->SetTickLength(0.03);
	MyStyle->SetTitleOffset(1.5, "x");
	MyStyle->SetTitleOffset(1.5, "y");
	MyStyle->SetTitleOffset(1.0, "z");
	MyStyle->SetLabelSize(0.05, "x");
	MyStyle->SetLabelSize(0.05, "y");
	MyStyle->SetLabelSize(0.05, "z");
	MyStyle->SetLabelOffset(0.03, "x");
	MyStyle->SetLabelOffset(0.03, "y");
	MyStyle->SetLabelOffset(0.03, "z");
	MyStyle->SetTitleSize(0.05, "x");
	MyStyle->SetTitleSize(0.05, "y");
	MyStyle->SetTitleSize(0.05, "z");
	gROOT->SetStyle("MyStyle");

	//gROOT->ForceStyle();

	bool DrawLog = false;

	for (int i = 0; i < N_histos; ++i) {

		THStack *hs;
		TLegend *l;

    int Nset = data.size() + bg.size() + signal.size();
    if (Nset > 20)
       Nset = 20.;
    l = new TLegend(0.76, 0.95 - 0.8 * Nset / 20., 1.0, 0.95);
    l->SetFillStyle(1001);
    l->SetFillColor(kWhite);
    l->SetLineColor(kWhite);
    l->SetLineWidth(2);

		if (bg.size() > 0) {

			hs = new THStack("hs", bg.at(0).at(i)->GetName());
			int j = 0;
			for (std::vector<std::vector<TH1F*> >::const_iterator it = bg.begin(); it != bg.end(); ++it) {

        TH1F *histogram = it->at(i);

				switch (j) {
               case 0:
                  histogram->SetFillColor(kRed);
                  break;
               case 1:
                  histogram->SetFillColor(kOrange);
                  break;
               case 2:
                  histogram->SetFillColor(kYellow);
                  break;
               case 3:
                  histogram->SetFillColor(kGreen);
                  break;
               case 4:
                  histogram->SetFillColor(kCyan);
                  break;
               case 5:
                  histogram->SetFillColor(kBlue);
                  break;
               case 6:
                  histogram->SetFillColor(kMagenta);
                  break;
               case 7:
                  histogram->SetFillColor(kGray);
                  break;
               case 8:
//.........这里部分代码省略.........
开发者ID:mxrguspxrt,项目名称:kbfi,代码行数:101,代码来源:Plotter.C

示例10: Final_av_Lambda_VarCoupling_40Percent

void Final_av_Lambda_VarCoupling_40Percent()
{
//=========Macro generated from canvas: c/c
//=========  (Sat Feb 27 17:06:04 2016) by ROOT version6.04/06
   TCanvas *c = new TCanvas("c", "c",0,0,800,700);
   c->SetHighLightColor(2);
   c->Range(-0.4813593,1.36281,3.148656,6.672724);
   c->SetFillColor(0);
   c->SetBorderMode(0);
   c->SetBorderSize(2);
   c->SetLogx();
   c->SetLogy();
   c->SetTickx(1);
   c->SetTicky(1);
   c->SetLeftMargin(0.12);
   c->SetRightMargin(0.04);
   c->SetTopMargin(0.07);
   c->SetBottomMargin(0.12);
   c->SetFrameBorderMode(0);
   c->SetFrameBorderMode(0);
   
   TMultiGraph *multigraph = new TMultiGraph();
   multigraph->SetName("");
   multigraph->SetTitle("");
   
   Double_t Graph_fx1[12] = {
   1,
   10,
   100,
   400,
   700,
   1000,
   1000,
   700,
   400,
   100,
   10,
   1};
   Double_t Graph_fy1[12] = {
   881.525,
   896.549,
   871.907,
   667.806,
   471.744,
   308.777,
   382.832,
   584.437,
   826.374,
   1079.16,
   1110.85,
   1092.23};
   TGraph *graph = new TGraph(12,Graph_fx1,Graph_fy1);
   graph->SetName("Graph");
   graph->SetTitle("");

   Int_t ci;      // for color index setting
   TColor *color; // for color definition with alpha
   ci = TColor::GetColor("#ffcc00");
   graph->SetFillColor(ci);

   ci = TColor::GetColor("#ff6666");
   graph->SetLineColor(ci);
   graph->SetLineWidth(3);
   
   TH1F *Graph_Graph1 = new TH1F("Graph_Graph1","",100,0.9,1099.9);
   Graph_Graph1->SetMinimum(228.5697);
   Graph_Graph1->SetMaximum(1191.057);
   Graph_Graph1->SetDirectory(0);
   Graph_Graph1->SetStats(0);

   ci = TColor::GetColor("#000099");
   Graph_Graph1->SetLineColor(ci);
   Graph_Graph1->GetXaxis()->SetLabelFont(42);
   Graph_Graph1->GetXaxis()->SetLabelSize(0.035);
   Graph_Graph1->GetXaxis()->SetTitleSize(0.035);
   Graph_Graph1->GetXaxis()->SetTitleFont(42);
   Graph_Graph1->GetYaxis()->SetLabelFont(42);
   Graph_Graph1->GetYaxis()->SetLabelSize(0.035);
   Graph_Graph1->GetYaxis()->SetTitleSize(0.035);
   Graph_Graph1->GetYaxis()->SetTitleFont(42);
   Graph_Graph1->GetZaxis()->SetLabelFont(42);
   Graph_Graph1->GetZaxis()->SetLabelSize(0.035);
   Graph_Graph1->GetZaxis()->SetTitleSize(0.035);
   Graph_Graph1->GetZaxis()->SetTitleFont(42);
   graph->SetHistogram(Graph_Graph1);
   
   multigraph->Add(graph,"");
   multigraph->Draw("af");
   multigraph->GetXaxis()->SetTitle("M_{#chi} (GeV)");
   multigraph->GetXaxis()->SetRange(0,96);
   multigraph->GetXaxis()->SetLabelFont(42);
   multigraph->GetXaxis()->SetTitleSize(0.05);
   multigraph->GetXaxis()->SetTitleOffset(1.1);
   multigraph->GetXaxis()->SetTitleFont(42);
   multigraph->GetYaxis()->SetTitle("#Lambda (GeV)");
   multigraph->GetYaxis()->SetLabelFont(42);
   multigraph->GetYaxis()->SetTitleSize(0.05);
   multigraph->GetYaxis()->SetTitleOffset(1.05);
   multigraph->GetYaxis()->SetTitleFont(42);
   
//.........这里部分代码省略.........
开发者ID:cmorgoth,项目名称:PhD-Thesis,代码行数:101,代码来源:Final_AV_Lambda_WithDD_vFeb25_2015_FR.C

示例11: trigTurnOnVsPt


//.........这里部分代码省略.........
  T_Empty->GetXaxis()->SetLabelOffset(0.01);
  T_Empty->GetYaxis()->SetLabelOffset(0.01);
  T_Empty->GetXaxis()->SetLabelSize(0.035);
 T_Empty->GetXaxis()->SetLabelFont(42);
 T_Empty->GetXaxis()->SetTitleSize(0.040);
 T_Empty->GetYaxis()->SetLabelSize(0.035);
 T_Empty->GetYaxis()->SetLabelFont(42);
 T_Empty->GetYaxis()->SetTitleSize(0.040);
T_Empty->GetXaxis()->SetTitleOffset(1.29);
 T_Empty->GetYaxis()->SetTitleOffset(1.39);
 T_Empty->GetXaxis()->SetTitleColor(1);
 T_Empty->GetYaxis()->SetTitleColor(1);
 T_Empty->GetXaxis()->SetNdivisions(10505);
 T_Empty->GetYaxis()->SetNdivisions(515);
 T_Empty->GetXaxis()->SetTitleFont(42);
 T_Empty->GetYaxis()->SetTitleFont(42);
	char hNAME[99];	
	sprintf(hNAME, "%ith Jet P_{T} (GeV)", i+1);	
			if (i==6) sprintf(hNAME, "HT");
			T_Empty->GetXaxis()->SetTitle(hNAME);	

			T_Empty->SetTitle(titlename[file].c_str());
 T_Empty->GetYaxis()->SetTitle(titlename[file].c_str());
 T_Empty->Draw("AXIS");
 
 if(i<2){
   T_Empty->GetXaxis()->SetRangeUser(50,800);}
 if(i>=2){
   T_Empty->GetXaxis()->SetRangeUser(50,200);
 }
 eff0->SetMarkerStyle(20);
 eff0->SetMarkerSize(1.0);
 eff0->SetMarkerColor(1);
 eff0->SetLineWidth(2);
 //eff1->SetMarkerStyle(21);
 //eff1->SetMarkerColor(2);
 //eff1->SetMarkerSize(0.75);
 //eff1->SetLineWidth(2);

 eff0->Draw("e1pZ");
		

 eff0->SetTitle(hNAME);
 eff0->SetName(hNAME);			

			eff0->Write();
//		ratio->Draw("E");
 //eff1->Draw("e1pZsame");
TLegend *leg = new TLegend(0.2560484,0.8877119,0.7560484,0.9872881,NULL,"brNDC");

 leg->SetTextFont(42);
 leg->SetTextSize(0.030);
 leg->SetLineColor(1);
 leg->SetLineStyle(1);
 leg->SetLineWidth(1);
 leg->SetFillStyle(1001);
 leg->AddEntry(eff0,titlename[file].c_str(),"");
 //leg->AddEntry(eff1,"Spring10 7 TeV MC","p");
 leg->SetBorderSize(0);
 leg->SetFillColor(0);
 leg->Draw();

TLatex* tex = new TLatex();
 tex->SetTextColor(1);
 tex->SetTextSize(0.030);
 tex->SetLineWidth(2);
开发者ID:clseitz,项目名称:usercode,代码行数:67,代码来源:trigTurnOnVsPt.C

示例12: fit1

void fit1()
{
//=========Macro generated from canvas: c1/data fits
//=========  (Wed Mar  9 00:43:22 2016) by ROOT version6.06/00
   TCanvas *c1 = new TCanvas("c1", "data fits",0,0,1200,800);
   gStyle->SetOptStat(0);
   gStyle->SetOptTitle(0);
   c1->Range(0,0,1,1);
   c1->SetFillColor(0);
   c1->SetBorderMode(0);
   c1->SetBorderSize(2);
   c1->SetTickx(1);
   c1->SetTicky(1);
   c1->SetLeftMargin(0.14);
   c1->SetRightMargin(0.05);
   c1->SetTopMargin(0.05);
   c1->SetBottomMargin(0.16);
   c1->SetFrameLineWidth(2);
   c1->SetFrameBorderMode(0);
  
// ------------>Primitives in pad: pad2
   TPad *pad2 = new TPad("pad2", "pad2",0,0,1,0.3);
   pad2->Draw();
   pad2->cd();
   pad2->Range(3754.321,-26.4,6223.457,8.8);
   pad2->SetFillColor(0);
   pad2->SetBorderMode(0);
   pad2->SetBorderSize(2);
   pad2->SetTickx(1);
   pad2->SetTicky(1);
   pad2->SetLeftMargin(0.14);
   pad2->SetRightMargin(0.05);
   pad2->SetTopMargin(0);
   pad2->SetBottomMargin(0.5);
   pad2->SetFrameLineWidth(2);
   pad2->SetFrameBorderMode(0);
   pad2->SetFrameLineWidth(2);
   pad2->SetFrameBorderMode(0);
   
   TH1D *frame_a63bf70__1 = new TH1D("frame_a63bf70__1","",100,4100,6100);
   frame_a63bf70__1->SetBinContent(1,269.9669);
   frame_a63bf70__1->SetMinimum(-8.8);
   frame_a63bf70__1->SetMaximum(8.8);
   frame_a63bf70__1->SetEntries(1);
   frame_a63bf70__1->SetDirectory(0);
   frame_a63bf70__1->SetStats(0);
   frame_a63bf70__1->SetLineWidth(2);
   frame_a63bf70__1->SetMarkerStyle(20);
   frame_a63bf70__1->GetXaxis()->SetTitle("m(J/#psi #Lambda) (MeV)");
   frame_a63bf70__1->GetXaxis()->SetNdivisions(505);
   frame_a63bf70__1->GetXaxis()->SetLabelFont(132);
   frame_a63bf70__1->GetXaxis()->SetLabelOffset(0.01);
   frame_a63bf70__1->GetXaxis()->SetLabelSize(0.15);
   frame_a63bf70__1->GetXaxis()->SetTitleSize(0.2);
   frame_a63bf70__1->GetXaxis()->SetTitleOffset(1.1);
   frame_a63bf70__1->GetXaxis()->SetTitleFont(132);
   frame_a63bf70__1->GetYaxis()->SetTitle("Pull");
   frame_a63bf70__1->GetYaxis()->CenterTitle(true);
   frame_a63bf70__1->GetYaxis()->SetNdivisions(505);
   frame_a63bf70__1->GetYaxis()->SetLabelFont(132);
   frame_a63bf70__1->GetYaxis()->SetLabelOffset(0.01);
   frame_a63bf70__1->GetYaxis()->SetLabelSize(0.15);
   frame_a63bf70__1->GetYaxis()->SetTitleSize(0.15);
   frame_a63bf70__1->GetYaxis()->SetTitleOffset(0.45);
   frame_a63bf70__1->GetYaxis()->SetTitleFont(132);
   frame_a63bf70__1->GetZaxis()->SetLabelFont(132);
   frame_a63bf70__1->GetZaxis()->SetLabelSize(0.06);
   frame_a63bf70__1->GetZaxis()->SetTitleSize(0.072);
   frame_a63bf70__1->GetZaxis()->SetTitleOffset(1.2);
   frame_a63bf70__1->GetZaxis()->SetTitleFont(132);
   frame_a63bf70__1->Draw("FUNC");
   
   Double_t pull_Hist_curvetot_fx3001[83] = {
   4310,
   4330,
   4350,
   4370,
   4390,
   4410,
   4430,
   4450,
   4470,
   4490,
   4510,
   4530,
   4550,
   4570,
   4590,
   4610,
   4630,
   4650,
   4670,
   4690,
   4710,
   4730,
   4750,
   4770,
   4790,
   4810,
   4830,
//.........这里部分代码省略.........
开发者ID:goi42,项目名称:LbJpsipPi,代码行数:101,代码来源:fitLst1.C

示例13: fitWMLL3testbkg

void fitWMLL3testbkg()
{
//=========Macro generated from canvas: c1/data fits
//=========  (Sat May  7 17:06:48 2016) by ROOT version6.06/02
   TCanvas *c1 = new TCanvas("c1", "data fits",0,0,1200,800);
   gStyle->SetOptStat(0);
   gStyle->SetOptTitle(0);
   c1->Range(0,0,1,1);
   c1->SetFillColor(0);
   c1->SetBorderMode(0);
   c1->SetBorderSize(2);
   c1->SetTickx(1);
   c1->SetTicky(1);
   c1->SetLeftMargin(0.14);
   c1->SetRightMargin(0.05);
   c1->SetTopMargin(0.05);
   c1->SetBottomMargin(0.16);
   c1->SetFrameLineWidth(2);
   c1->SetFrameBorderMode(0);
  
// ------------>Primitives in pad: pad2
   TPad *pad2 = new TPad("pad2", "pad2",0,0,1,0.3);
   pad2->Draw();
   pad2->cd();
   pad2->Range(230.8642,-26.4,724.6914,8.8);
   pad2->SetFillColor(0);
   pad2->SetBorderMode(0);
   pad2->SetBorderSize(2);
   pad2->SetTickx(1);
   pad2->SetTicky(1);
   pad2->SetLeftMargin(0.14);
   pad2->SetRightMargin(0.05);
   pad2->SetTopMargin(0);
   pad2->SetBottomMargin(0.5);
   pad2->SetFrameLineWidth(2);
   pad2->SetFrameBorderMode(0);
   pad2->SetFrameLineWidth(2);
   pad2->SetFrameBorderMode(0);
   
   TH1D *frame_41aab90__1 = new TH1D("frame_41aab90__1","",100,300,700);
   frame_41aab90__1->SetBinContent(1,3.66042);
   frame_41aab90__1->SetMinimum(-8.8);
   frame_41aab90__1->SetMaximum(8.8);
   frame_41aab90__1->SetEntries(1);
   frame_41aab90__1->SetDirectory(0);
   frame_41aab90__1->SetStats(0);
   frame_41aab90__1->SetLineWidth(2);
   frame_41aab90__1->SetMarkerStyle(20);
   frame_41aab90__1->GetXaxis()->SetTitle("m(#pi p#rightarrow#pi) (MeV)");
   frame_41aab90__1->GetXaxis()->SetNdivisions(505);
   frame_41aab90__1->GetXaxis()->SetLabelFont(132);
   frame_41aab90__1->GetXaxis()->SetLabelOffset(0.01);
   frame_41aab90__1->GetXaxis()->SetLabelSize(0.15);
   frame_41aab90__1->GetXaxis()->SetTitleSize(0.2);
   frame_41aab90__1->GetXaxis()->SetTitleOffset(1.1);
   frame_41aab90__1->GetXaxis()->SetTitleFont(132);
   frame_41aab90__1->GetYaxis()->SetTitle("Pull");
   frame_41aab90__1->GetYaxis()->CenterTitle(true);
   frame_41aab90__1->GetYaxis()->SetNdivisions(505);
   frame_41aab90__1->GetYaxis()->SetLabelFont(132);
   frame_41aab90__1->GetYaxis()->SetLabelOffset(0.01);
   frame_41aab90__1->GetYaxis()->SetLabelSize(0.15);
   frame_41aab90__1->GetYaxis()->SetTitleSize(0.15);
   frame_41aab90__1->GetYaxis()->SetTitleOffset(0.45);
   frame_41aab90__1->GetYaxis()->SetTitleFont(132);
   frame_41aab90__1->GetZaxis()->SetLabelFont(132);
   frame_41aab90__1->GetZaxis()->SetLabelSize(0.06);
   frame_41aab90__1->GetZaxis()->SetTitleSize(0.072);
   frame_41aab90__1->GetZaxis()->SetTitleOffset(1.2);
   frame_41aab90__1->GetZaxis()->SetTitleFont(132);
   frame_41aab90__1->Draw("FUNC");
   
   Double_t pull_Hist_curvetot_fx3001[35] = {
   322,
   326,
   330,
   334,
   338,
   342,
   346,
   350,
   354,
   358,
   362,
   366,
   370,
   374,
   378,
   382,
   386,
   390,
   394,
   398,
   402,
   406,
   410,
   414,
   418,
   422,
   426,
//.........这里部分代码省略.........
开发者ID:goi42,项目名称:LbJpsipPi,代码行数:101,代码来源:fitWMLL3testbkg.C

示例14: phimuphimet


//.........这里部分代码省略.........
   phimuphimet90->SetMarkerColor(ci);
   phimuphimet90->SetMarkerStyle(21);
   phimuphimet90->GetXaxis()->SetTitle("phimuphimet");
   phimuphimet90->GetXaxis()->SetLabelFont(42);
   phimuphimet90->GetXaxis()->SetLabelSize(0.035);
   phimuphimet90->GetXaxis()->SetTitleSize(0.035);
   phimuphimet90->GetXaxis()->SetTitleFont(42);
   phimuphimet90->GetYaxis()->SetTitle("Events/pb");
   phimuphimet90->GetYaxis()->SetLabelFont(42);
   phimuphimet90->GetYaxis()->SetLabelSize(0.035);
   phimuphimet90->GetYaxis()->SetTitleSize(0.035);
   phimuphimet90->GetYaxis()->SetTitleFont(42);
   phimuphimet90->GetZaxis()->SetLabelFont(42);
   phimuphimet90->GetZaxis()->SetLabelSize(0.035);
   phimuphimet90->GetZaxis()->SetTitleSize(0.035);
   phimuphimet90->GetZaxis()->SetTitleFont(42);
   phimuphimet->Add(phimuphimet,"");
   phimuphimet->Draw("nostack");
   
   TPaveText *pt = new TPaveText(0.3326724,0.9342857,0.6673276,0.995,"blNDC");
   pt->SetName("title");
   pt->SetBorderSize(0);
   pt->SetFillColor(0);
   pt->SetFillStyle(0);
   pt->SetTextFont(42);
   TText *AText = pt->AddText("phimuphimet");
   pt->Draw();
   
   TLegend *leg = new TLegend(0.54023,0.639881,0.938218,0.924107,NULL,"brNDC");
   leg->SetBorderSize(1);
   leg->SetTextSize(0.034965);
   leg->SetLineColor(1);
   leg->SetLineStyle(1);
   leg->SetLineWidth(1);
   leg->SetFillColor(0);
   leg->SetFillStyle(1001);
   TLegendEntry *entry=leg->AddEntry("phimuphimet","phimuphimet_QCD","lp");

   ci = TColor::GetColor("#00cc00");
   entry->SetLineColor(ci);
   entry->SetLineStyle(1);
   entry->SetLineWidth(1);

   ci = TColor::GetColor("#00cc00");
   entry->SetMarkerColor(ci);
   entry->SetMarkerStyle(22);
   entry->SetMarkerSize(1);
   entry->SetTextFont(42);
   entry=leg->AddEntry("phimuphimet","phimuphimet_WJetsToLNu","lp");

   ci = TColor::GetColor("#00ffff");
   entry->SetLineColor(ci);
   entry->SetLineStyle(1);
   entry->SetLineWidth(1);

   ci = TColor::GetColor("#00ffff");
   entry->SetMarkerColor(ci);
   entry->SetMarkerStyle(20);
   entry->SetMarkerSize(1);
   entry->SetTextFont(42);
   entry=leg->AddEntry("phimuphimet","phimuphimet_ZJetsToNuNu","lp");

   ci = TColor::GetColor("#ffcc00");
   entry->SetLineColor(ci);
   entry->SetLineStyle(1);
   entry->SetLineWidth(1);
开发者ID:delgadoandrea,项目名称:CMSSW_7_4_6_patch6,代码行数:67,代码来源:phimuphimet.C

示例15: cmsRAA


//.........这里部分代码省略.........
  phAxis->Draw("");
  
  // drawing order:
  // A)  stat boxes:
  pgRaaSyst_photon->Draw("2");
  pgRaaSyst_npjpsi->Draw("2");
  pgRaaSyst_h->Draw("2");
  pgRaaSyst_z->Draw("2");
  pgRaaSyst_w->Draw("2");
  pgRaaSyst_bjet->Draw("2");
  pgRaaSyst_jet->Draw("2");
  //nominal+stat
  // photon
  pgRaa_photon->Draw("P z");
  pgRaa_z->Draw("P z");
  pgRaa_w->Draw("P z");
  pgRaa_h->Draw("P z");
  pgRaa_npjpsi->Draw("P z");
  pgRaa_bjet->Draw("P z");
  pgRaa_jet->Draw("P z");

  TLine *line = new TLine(0.9,1,300,1);
  line->SetLineStyle(7);
  line->Draw();
  //box->Draw();
  // // legends and writings:

  TLegend *leg = new TLegend(0.05,0.87,0.39,0.95,NULL,"brNDC");
  leg->SetBorderSize(0);
  leg->SetTextFont(62);
  leg->SetTextSize(0.029);
  leg->SetLineColor(1);
  leg->SetLineStyle(1);
  leg->SetLineWidth(1);
  leg->SetFillColor(19);
  leg->SetFillStyle(0);
  //  TLegendEntry *entry=leg->AddEntry("hEtSIEIECorrected","CMS PRELIMINARY","");
  //    entry->SetLineWidth(1);
  //    entry=leg->AddEntry("hEtSIEIECorrected","PbPb #sqrt{s_{NN}} = 2.76 TeV","");
  //    entry=leg->AddEntry("hEtSIEIECorrected","","");
  //    entry=leg->AddEntry("hEtSIEIECorrected","#int L dt = 7-150 #mub^{-1}","");

  TLegendEntry *entry=leg->AddEntry("hEtSIEIECorrected","CMS  *PRELIMINARY  PbPb #sqrt{s_{NN}} = 2.76 TeV  #int L dt = 7-150 #mub^{-1}","");
  entry->SetLineWidth(1);
  
  

  // TAA
  // TAA only
  TLegend *leg_taa = new TLegend(0.15,0.5,0.5,0.55,NULL,"brNDC");
  leg_taa->SetBorderSize(0);
  leg_taa->SetTextFont(62);
  leg_taa->SetTextSize(0.028);
  leg_taa->SetLineColor(1);
  leg_taa->SetLineStyle(1);
  leg_taa->SetLineWidth(1);
  leg_taa->SetFillColor(19);
  leg_taa->SetFillStyle(0);
  TLegendEntry *entry_taa= leg_taa->AddEntry("general","T_{AA} uncertainty","f");
  entry_taa->SetFillColor(kGray+1);
  entry_taa->SetFillStyle(1001);
  entry_taa->SetLineColor(0);
  entry_taa->SetLineWidth(1);
  entry_taa->SetMarkerStyle(21);
  entry_taa->SetMarkerSize(1);
开发者ID:velicanu,项目名称:raazoo,代码行数:66,代码来源:cmsRAA.C


注:本文中的TLegend::SetLineWidth方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。