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


C++ TCanvas::SetBorderMode方法代码示例

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


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

示例1: greyscale

void greyscale()
{
   TCanvas *c = new TCanvas("grey", "Grey Scale", 500, 500);
   c->SetBorderMode(0);

   Int_t   n = 200;   // tunable parameter
   Float_t n1 = 1./n;
   for (int i = 0; i < n; i++) {
      for (int j = 0; j < n; j++) {
         TBox *b = new TBox(n1*j, n1*(n-1-i), n1*(j+1), n1*(n-i));
         Float_t grey = Float_t(i*n+j)/(n*n);
         b->SetFillColor(TColor::GetColor(grey, grey, grey));
         b->Draw();
      }
   }
   TPad *p = new TPad("p","p",0.3, 0.3, 0.7,0.7);
   const char *guibackground = gEnv->GetValue("Gui.BackgroundColor", "");
   p->SetFillColor(TColor::GetColor(guibackground));
   p->Draw();
   p->cd();
   TText *t = new TText(0.5, 0.5, "GUI Background Color");
   t->SetTextAlign(22);
   t->SetTextSize(.09);
   t->Draw();

   c->SetEditable(kFALSE);
}
开发者ID:Y--,项目名称:root,代码行数:27,代码来源:greyscale.C

示例2: MakeCanvas

TCanvas* MakeCanvas(const char* name, const char *title, int dX, int dY)
{
  // Start with a canvas
  TCanvas *canvas = new TCanvas(name,title,0,0,dX,dY);
  // General overall stuff
  canvas->SetFillColor      (0);
  canvas->SetBorderMode     (0);
  canvas->SetBorderSize     (10);
  // Set margins to reasonable defaults
  canvas->SetLeftMargin     (0.20);
  canvas->SetRightMargin    (0.05);
  canvas->SetTopMargin      (0.08);
  canvas->SetBottomMargin   (0.15);
  // Setup a frame which makes sense
  canvas->SetFrameFillStyle (0);
  canvas->SetFrameLineStyle (0);
  canvas->SetFrameBorderMode(0);
  canvas->SetFrameBorderSize(10);
  canvas->SetFrameFillStyle (0);
  canvas->SetFrameLineStyle (0);
  canvas->SetFrameBorderMode(0);
  canvas->SetFrameBorderSize(10);

  return canvas;
}
开发者ID:gitytakahas,项目名称:YutaMemo,代码行数:25,代码来源:MyStyle.C

示例3: getaCanvas

// -----------------------------------------------------------------------------
//
TCanvas* getaCanvas(TString name,TDirectory* afile, bool log)
{
  afile->cd();
  TCanvas* aCanvas = new TCanvas(name);
  gStyle->SetOptFit(1);
  gStyle->SetOptStat(0);
  aCanvas->Range(-288.2483,-2.138147,1344.235,6.918939);
  aCanvas->SetFillColor(0);
  aCanvas->SetBorderMode(0);
  aCanvas->SetBorderSize(2);
  if ( log == true)aCanvas->SetLogy();
  aCanvas->SetLeftMargin(0.1765705);
  aCanvas->SetRightMargin(0.05772496);
  aCanvas->SetTopMargin(0.04778761);
  aCanvas->SetBottomMargin(0.1256637);
  aCanvas->SetFrameFillStyle(0);
  aCanvas->SetFrameLineWidth(2);
  aCanvas->SetFrameBorderMode(0);
  aCanvas->SetFrameFillStyle(0);
  aCanvas->SetFrameLineWidth(2);
  aCanvas->SetFrameBorderMode(0);
 
  
  return aCanvas;
}
开发者ID:bainbrid,项目名称:usercode,代码行数:27,代码来源:compare.C

示例4: setCanvasOptions

void setCanvasOptions(TCanvas& canvas)
{
  canvas.SetWindowSize(610,630);
  canvas.SetFillStyle(0);
  canvas.SetFillColor(0);
  canvas.SetGrid();
  canvas.SetBorderMode(0);
  canvas.SetFrameBorderMode(0);
  canvas.SetFrameBorderSize(1);
  canvas.SetFrameFillColor(0);
  canvas.SetFrameFillStyle(0);
  canvas.SetFrameLineColor(1);
  canvas.SetFrameLineStyle(1);
  canvas.SetFrameLineWidth(1);
  canvas.SetTopMargin(0.05);
  canvas.SetBottomMargin(0.13);
  canvas.SetLeftMargin(0.13);
  canvas.SetRightMargin(0.05);
  canvas.SetTickx(1);
  canvas.SetTicky(1);
  TH1F* frame = canvas.DrawFrame(0.0, 0.0, 5.0, 1.0);
  frame->GetXaxis()->SetTitle("#DeltaR_{tag-probe}");
  frame->GetYaxis()->SetTitle("Unit-normalized events per 0.1");
  frame->GetXaxis()->SetTitleColor(1);
  frame->GetYaxis()->SetTitleColor(1);
  frame->GetXaxis()->SetTitleFont(42);
  frame->GetYaxis()->SetTitleFont(42);
  frame->GetXaxis()->SetTitleSize(0.06);
  frame->GetYaxis()->SetTitleSize(0.06);
  frame->GetXaxis()->SetTitleOffset(0.9);
  frame->GetYaxis()->SetTitleOffset(1.05);
  frame->GetXaxis()->SetLabelColor(1);
  frame->GetYaxis()->SetLabelColor(1);
  frame->GetXaxis()->SetLabelFont(42);
  frame->GetYaxis()->SetLabelFont(42);
  frame->GetXaxis()->SetLabelSize(0.05);
  frame->GetXaxis()->SetLabelOffset(0.007);
  frame->GetYaxis()->SetLabelOffset(0.007);
  frame->GetXaxis()->SetAxisColor(1);
  frame->GetYaxis()->SetAxisColor(1);
  frame->GetXaxis()->SetDecimals(kTRUE);
  frame->GetYaxis()->SetDecimals(kTRUE);
  frame->GetXaxis()->SetTickLength(0.03);
  frame->GetYaxis()->SetTickLength(0.03);
  frame->GetXaxis()->SetNdivisions(510);
  frame->GetYaxis()->SetNdivisions(510);
}
开发者ID:rpyohay,项目名称:physics-tools,代码行数:47,代码来源:KinematicAnalysis.C

示例5: TCanvas

TCanvas *OverlayAnalysis::CreateCanvas(const std::string &canvasName, const std::string &canvasTitle) const
{
    TCanvas *pCanvas = new TCanvas(canvasName.c_str(), canvasTitle.c_str(), 200, 52, 700, 650);

    pCanvas->SetFillColor(0);
    pCanvas->SetBorderMode(0);
    pCanvas->SetBorderSize(2);
    pCanvas->SetTickx(1);
    pCanvas->SetTicky(1);
    pCanvas->SetLeftMargin(0.15);
    pCanvas->SetRightMargin(0.03);
    pCanvas->SetTopMargin(0.05);
    pCanvas->SetBottomMargin(0.14);
    pCanvas->SetFrameBorderMode(0);
    pCanvas->SetFrameBorderMode(0);

    return pCanvas;
}
开发者ID:ArborPFA,项目名称:SDHCALArborPFA,代码行数:18,代码来源:OverlayAnalysis.C

示例6: makeNiceCanvasByFracMargins

  TCanvas* makeNiceCanvasByFracMargins(Int_t pixelPerBin, Int_t nbinx, Int_t nbiny, Double_t top, Double_t bottom, Double_t left, Double_t right) {
  
  Int_t rubaX = 4; //determinato sperimentalmente                                                                          
  Int_t rubaY = 28; //determinato sperimentalmente                                                                                                        
  TString name = generateRandomName();

  Int_t plotBaseDimX = pixelPerBin*nbinx;
  Int_t plotBaseDimY = pixelPerBin*nbiny;
  Int_t XX = (Int_t)(plotBaseDimX/(1.-left-right));
  Int_t YY = (Int_t)(plotBaseDimY/(1.-top-bottom));
  TCanvas* can = new TCanvas(name,name,XX+rubaX,YY+rubaY);
  can->SetTopMargin(top);
  can->SetBottomMargin(bottom);
  can->SetRightMargin(right);
  can->SetLeftMargin(left);
  can->SetBorderMode(0);
  std::cout << "Nice canvas " << XX << " * " << YY << std::endl;
  return can;

}
开发者ID:GiacomoSguazzoni,项目名称:usercode,代码行数:20,代码来源:rootils.C

示例7: makeNiceCanvas

TCanvas* makeNiceCanvas(Int_t pixelPerBin, Int_t nbinx, Int_t nbiny, Int_t top, Int_t bottom, Int_t left, Int_t right) {
  
  Int_t rubaX = 4; //determinato sperimentalmente                                                                          
  Int_t rubaY = 28; //determinato sperimentalmente                                                                                                        
  TString name = generateRandomName();

  Int_t plotBaseDimX = pixelPerBin*nbinx;
  Int_t plotBaseDimY = pixelPerBin*nbiny;
  Int_t XX = (plotBaseDimX+left+right+rubaX);
  Int_t YY = (plotBaseDimY+top+bottom+rubaY);
  TCanvas* can = new TCanvas(name,name,XX,YY);
  can->SetTopMargin(1.*top/YY);
  can->SetBottomMargin(1.*bottom/YY);
  can->SetRightMargin(1.*right/XX);
  can->SetLeftMargin(1.*left/XX);
  can->SetBorderMode(0);
  std::cout << "Nice canvas " << XX << " * " << YY << std::endl;
  return can;

}
开发者ID:GiacomoSguazzoni,项目名称:usercode,代码行数:20,代码来源:arrowPlot.C

示例8: makeNiceCanvasByPixMargins

TCanvas* makeNiceCanvasByPixMargins(Int_t pixelPerBinX, Int_t pixelPerBinY, Int_t nbinx, Int_t nbiny, Int_t top, Int_t bottom, Int_t left, Int_t right) {
  
  Int_t rubaX = 4; //determinato sperimentalmente                                                                          
  Int_t rubaY = 28; //determinato sperimentalmente                                                                                                        

  TString name = generateRandomName();

  Int_t plotBaseDimX = pixelPerBinX*nbinx;
  Int_t plotBaseDimY = pixelPerBinY*nbiny;
  Int_t XX = (Int_t)(plotBaseDimX+left+right);
  Int_t YY = (Int_t)(plotBaseDimY+top+bottom);
  TCanvas* can = new TCanvas(name,name,XX+rubaX,YY+rubaY);
  can->SetTopMargin((1.*top)/(1.*YY));
  can->SetBottomMargin((1.*bottom)/(1.*YY));
  can->SetRightMargin(right/(1.*XX));
  can->SetLeftMargin(left/(1.*XX));
  can->SetBorderMode(0);
  std::cout << "Nice canvas " << XX << " * " << YY << " Margin: t " << can->GetTopMargin() << " b " << can->GetBottomMargin() << " l " << can->GetLeftMargin() << " r " << can->GetRightMargin() << std::endl;

  return can;

}
开发者ID:GiacomoSguazzoni,项目名称:usercode,代码行数:22,代码来源:rootils.C

示例9: createCanvas

// -----------------------------------------------------------------------------
//
TCanvas* createCanvas(std::string name,TDirectory* afile, bool log)
{
  afile->cd();
  TCanvas* aCanvas = new TCanvas(name.c_str());
  //gStyle->SetOptFit(1);
  //gStyle->SetOptStat("mr");
  //aCanvas->Range(-288.2483,-2.138147,1344.235,6.918939);
  aCanvas->SetFillColor(0);
  aCanvas->SetBorderMode(0);
  aCanvas->SetBorderSize(2);
  if ( log == true)aCanvas->SetLogy();
  aCanvas->SetLeftMargin(0.15);
  aCanvas->SetRightMargin(0.05);
  aCanvas->SetTopMargin(0.05);
  aCanvas->SetBottomMargin(0.12);
  aCanvas->SetFrameFillStyle(0);
  aCanvas->SetFrameLineWidth(2);
  aCanvas->SetFrameBorderMode(0);
  aCanvas->SetFrameFillStyle(0);
  aCanvas->SetFrameLineWidth(2);
  aCanvas->SetFrameBorderMode(0);
  
  return aCanvas;
}
开发者ID:bluejelibaby,项目名称:AnalysisV2,代码行数:26,代码来源:overlay.C

示例10: TCanvas

/** 
 * Draw final plot for QM2011
 * 
 * @param max 
 * 
 * @ingroup pwglf_forward_scripts
 */
void
dndeta_final(Double_t max=6)
{
  gStyle->SetOptTitle(0);
  gStyle->SetOptFit(0);
  gStyle->SetTitleFont(132, "xyz");
  gStyle->SetTitleSize(0.1, "xyz");
  gStyle->SetTitleOffset(0.4, "y");
  gStyle->SetTitleOffset(0.8, "x");
  gStyle->SetLabelFont(132, "xyz");
  gStyle->SetLabelSize(0.08, "xyz");
  gStyle->SetNdivisions(212, "x");
  gStyle->SetNdivisions(208, "y");
  gStyle->SetTextFont(132);
  gStyle->SetPadColor(0);
  gStyle->SetPadBorderMode(0);
  // gStyle->SetFillColor(0);
  // gStyle->SetFillStyle(0);
  
  TCanvas* c = new TCanvas("c", "c", 900, 900);
  c->SetFillColor(0);
  c->SetFillStyle(0);
  c->SetBorderSize(0);
  c->SetBorderMode(0);
  c->SetRightMargin(0.02);
  c->SetTopMargin(0.02);
  c->SetBottomMargin(0.15);
  c->Divide(1,3,0,0);
  
  // --- INEL --------------------------------------------------------
  TVirtualPad* p = c->cd(1);
  p->SetGridx();
  p->SetRightMargin(.01);
  THStack* inel     = new THStack("inel", "INEL");
  TLatex*  inelT    = new TLatex(1-p->GetRightMargin()-.01, 
				 1-p->GetTopMargin()-.01, 
				 "INEL");
  inelT->SetNDC();
  inelT->SetTextAlign(33);
  inelT->SetTextSize(0.12);
  TLegend* inelL    = new TLegend(.3, .02, .8, .4);
  inelL->SetBorderSize(0);
  inelL->SetNColumns(2);
  inelL->SetFillColor(0);
  inelL->SetFillStyle(0);
  TLegendEntry* e = inelL->AddEntry("d1", "Forward", "lp");
  e->SetMarkerColor(kRed+2);
  e->SetMarkerStyle(29);
  e = inelL->AddEntry("d2", "Central", "lp");
  e->SetMarkerColor(kMagenta+2);    
  e->SetMarkerStyle(29);
  e = inelL->AddEntry("d3", "Data", "lp");
  e->SetMarkerStyle(29);
  e = inelL->AddEntry("d4", "Mirrored data", "lp");
  e->SetMarkerStyle(30);
  e = inelL->AddEntry("d5", "Systematic error", "f");
  e->SetFillColor(kGray); 
  e->SetLineColor(kGray);
  e->SetLineWidth(0);
  e->SetFillStyle(3001);
  
  gROOT->LoadMacro("export_pp_0900GeV_INEL_m10p10cm_000100000ev.C");
  export_pp_0900GeV_INEL_m10p10cm_000100000ev(inel, inelL, 20);
  export_pp_0900GeV_INEL_m10p10cm_000100000ev(inel, inelL, 21);
  export_pp_0900GeV_INEL_m10p10cm_000100000ev(inel, inelL, 22);
  inel->Draw("nostack e1");
  inel->GetHistogram()->SetYTitle("#frac{1}{N}#frac{dN_{ch}}{d#eta}");
  inel->GetHistogram()->SetXTitle("#eta");
  inel->GetHistogram()->GetYaxis()->SetDecimals();
  inelL->Draw();
  inelT->Draw();

  // --- INEL>0 ------------------------------------------------------
  p = c->cd(2);
  p->SetGridx();
  p->SetRightMargin(.01);
  THStack* inelgt0     = new THStack("inelgt0", "INEL>0");
  TLatex*  inelgt0T    = new TLatex(1-p->GetRightMargin()-.01, 
				    1-p->GetTopMargin()-.01, 
				    "INEL>0");
  inelgt0T->SetNDC();
  inelgt0T->SetTextAlign(33);
  inelgt0T->SetTextSize(0.12);
  gROOT->LoadMacro("export_pp_0900GeV_INEL_m10p10cm_000100000ev.C");
  export_pp_0900GeV_INEL_m10p10cm_000100000ev(inelgt0, 0, 20);
  export_pp_0900GeV_INEL_m10p10cm_000100000ev(inelgt0, 0, 21);
  export_pp_0900GeV_INEL_m10p10cm_000100000ev(inelgt0, 0, 22);
  inelgt0->Draw("nostack e1");
  inelgt0->GetHistogram()->SetXTitle("#eta");
  inelgt0->GetHistogram()->GetYaxis()->SetDecimals();
  inelgt0T->Draw();

  // --- NSD ---------------------------------------------------------
//.........这里部分代码省略.........
开发者ID:ktf,项目名称:AliPhysics,代码行数:101,代码来源:dndeta_final.C

示例11: proj_npe_1

void proj_npe_1()
{
//=========Macro generated from canvas: c/
//=========  (Wed Jul 15 16:16:05 2015) by ROOT version6.04/00
   TCanvas *c = new TCanvas("c", "",0,45,600,500);
   c->SetHighLightColor(2);
   c->Range(-2655.754,-5.755,4350.289,51.795);
   c->SetFillColor(0);
   c->SetBorderMode(0);
   c->SetBorderSize(2);
   c->SetFrameBorderMode(0);
   c->SetFrameBorderMode(0);
   
   Double_t _fx2[39] = {
   -1488.08,
   -1403.181,
   -1178.164,
   -1033.78,
   -849.3154,
   -838.8983,
   -788.1957,
   -701.2156,
   -654.0264,
   -163.6875,
   1.142557,
   54.07047,
   256.5688,
   531.8203,
   632.5535,
   750.8472,
   835.9491,
   859.9519,
   970.3359,
   1013.975,
   1084.685,
   1488.872,
   1635.959,
   1867.579,
   1967.102,
   2022.346,
   2109.155,
   2234.388,
   2395.154,
   2415.658,
   2534.104,
   2547.086,
   2643.154,
   2683.775,
   2846.919,
   3002.304,
   3074.222,
   3131.044,
   3182.615};
   Double_t _fy2[39] = {
   2.55,
   2.3,
   2.55,
   2.7,
   2.4,
   2.65,
   2.75,
   2.5,
   2.4,
   2.45,
   42.05,
   2.55,
   2.6,
   2.6,
   2.85,
   2.7,
   2.55,
   2.6,
   2.6,
   2.6,
   2.55,
   2.25,
   2.65,
   2.6,
   2.55,
   2.25,
   2.55,
   2.45,
   2.65,
   2.65,
   2.65,
   2.6,
   2.6,
   2.35,
   2.55,
   2.15,
   2.45,
   2.75,
   2.3};
   TGraph *graph = new TGraph(39,_fx2,_fy2);
   graph->SetName("");
   graph->SetTitle("Event 1");
   graph->SetFillColor(1);

   Int_t ci;      // for color index setting
   TColor *color; // for color definition with alpha
//.........这里部分代码省略.........
开发者ID:nikihowe,项目名称:flash,代码行数:101,代码来源:proj_npe_1.C

示例12: Y_Resolution

void Y_Resolution()
{
//=========Macro generated from canvas: c/c
//=========  (Thu Sep 10 11:38:01 2015) by ROOT version6.03/03
   TCanvas *c = new TCanvas("c", "c",2119,55,800,700);
   c->SetHighLightColor(2);
   c->Range(-6.445783,-173.1333,5.60241,1269.644);
   c->SetFillColor(0);
   c->SetBorderMode(0);
   c->SetBorderSize(2);
   c->SetLeftMargin(0.12);
   c->SetRightMargin(0.05);
   c->SetTopMargin(0.07);
   c->SetBottomMargin(0.12);
   c->SetFrameBorderMode(0);
   c->SetFrameBorderMode(0);
   
   TH1F *histo__1 = new TH1F("histo__1","",40,-5,5);
   histo__1->SetBinContent(0,102);
   histo__1->SetBinContent(1,11);
   histo__1->SetBinContent(2,18);
   histo__1->SetBinContent(3,10);
   histo__1->SetBinContent(4,14);
   histo__1->SetBinContent(5,25);
   histo__1->SetBinContent(6,17);
   histo__1->SetBinContent(7,40);
   histo__1->SetBinContent(8,35);
   histo__1->SetBinContent(9,58);
   histo__1->SetBinContent(10,68);
   histo__1->SetBinContent(11,110);
   histo__1->SetBinContent(12,188);
   histo__1->SetBinContent(13,234);
   histo__1->SetBinContent(14,334);
   histo__1->SetBinContent(15,525);
   histo__1->SetBinContent(16,748);
   histo__1->SetBinContent(17,887);
   histo__1->SetBinContent(18,945);
   histo__1->SetBinContent(19,1051);
   histo__1->SetBinContent(20,1113);
   histo__1->SetBinContent(21,1062);
   histo__1->SetBinContent(22,979);
   histo__1->SetBinContent(23,820);
   histo__1->SetBinContent(24,744);
   histo__1->SetBinContent(25,583);
   histo__1->SetBinContent(26,437);
   histo__1->SetBinContent(27,342);
   histo__1->SetBinContent(28,238);
   histo__1->SetBinContent(29,177);
   histo__1->SetBinContent(30,100);
   histo__1->SetBinContent(31,93);
   histo__1->SetBinContent(32,62);
   histo__1->SetBinContent(33,34);
   histo__1->SetBinContent(34,35);
   histo__1->SetBinContent(35,48);
   histo__1->SetBinContent(36,26);
   histo__1->SetBinContent(37,30);
   histo__1->SetBinContent(38,24);
   histo__1->SetBinContent(39,24);
   histo__1->SetBinContent(40,17);
   histo__1->SetBinContent(41,175);
   histo__1->SetEntries(12583);
   histo__1->SetStats(0);
   
   TF1 *f1 = new TF1("f","[0]*(TMath::Erf((2*(x-[1])+[2])/([3]*TMath::Sqrt(8))) + TMath::Erf((2*([1]-x)+[2])/([3]*TMath::Sqrt(8))))",-2.5,2.5);
   f1->SetFillColor(19);
   f1->SetFillStyle(0);
   f1->SetLineColor(2);
   f1->SetLineWidth(2);
   f1->SetChisquare(44.0705);
   f1->SetNDF(16);
   f1->GetXaxis()->SetLabelFont(42);
   f1->GetXaxis()->SetLabelSize(0.035);
   f1->GetXaxis()->SetTitleSize(0.035);
   f1->GetXaxis()->SetTitleFont(42);
   f1->GetYaxis()->SetLabelFont(42);
   f1->GetYaxis()->SetLabelSize(0.035);
   f1->GetYaxis()->SetTitleSize(0.035);
   f1->GetYaxis()->SetTitleFont(42);
   f1->SetParameter(0,3532.064);
   f1->SetParError(0,3667.318);
   f1->SetParLimits(0,0,0);
   f1->SetParameter(1,-0.05520012);
   f1->SetParError(1,0.0108864);
   f1->SetParLimits(1,0,0);
   f1->SetParameter(2,0.4186987);
   f1->SetParError(2,0.4395014);
   f1->SetParLimits(2,0,0);
   f1->SetParameter(3,1.084631);
   f1->SetParError(3,0.01667116);
   f1->SetParLimits(3,0,0);
   histo__1->GetListOfFunctions()->Add(f1);

   Int_t ci;      // for color index setting
   TColor *color; // for color definition with alpha
   ci = TColor::GetColor("#000099");
   histo__1->SetLineColor(ci);
   histo__1->SetLineWidth(2);
   histo__1->GetXaxis()->SetTitle("Y [mm]");
   histo__1->GetXaxis()->SetLabelFont(42);
   histo__1->GetXaxis()->SetLabelSize(0.035);
//.........这里部分代码省略.........
开发者ID:CaltechPrecisionTiming,项目名称:ShowerTiming-8-12-2015,代码行数:101,代码来源:Y_Resolution_FloatTrigger.C

示例13: DarkSusy_mH_125_mGammaD_2000_cT_1000_LHE_nD_Eta

void DarkSusy_mH_125_mGammaD_2000_cT_1000_LHE_nD_Eta()
{
//=========Macro generated from canvas: cnv/cnv
//=========  (Sun May 24 15:18:59 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(-7.125,-0.006704923,5.375,0.04487141);
    cnv->SetFillColor(0);
    cnv->SetBorderMode(0);
    cnv->SetBorderSize(2);
    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_nD_1_Eta_dummy40 = new TH1F("h_nD_1_Eta_dummy40","h_nD_1_Eta_dummy",100,-5,5);
    h_nD_1_Eta_dummy40->SetMaximum(0.04126107);
    h_nD_1_Eta_dummy40->SetLineStyle(0);
    h_nD_1_Eta_dummy40->SetMarkerStyle(20);
    h_nD_1_Eta_dummy40->GetXaxis()->SetTitle("#eta of n_{D}");
    h_nD_1_Eta_dummy40->GetXaxis()->SetLabelFont(42);
    h_nD_1_Eta_dummy40->GetXaxis()->SetLabelOffset(0.007);
    h_nD_1_Eta_dummy40->GetXaxis()->SetTitleSize(0.06);
    h_nD_1_Eta_dummy40->GetXaxis()->SetTitleOffset(0.95);
    h_nD_1_Eta_dummy40->GetXaxis()->SetTitleFont(42);
    h_nD_1_Eta_dummy40->GetYaxis()->SetTitle("Fraction of events / 0.1");
    h_nD_1_Eta_dummy40->GetYaxis()->SetLabelFont(42);
    h_nD_1_Eta_dummy40->GetYaxis()->SetLabelOffset(0.007);
    h_nD_1_Eta_dummy40->GetYaxis()->SetTitleSize(0.06);
    h_nD_1_Eta_dummy40->GetYaxis()->SetTitleOffset(1.35);
    h_nD_1_Eta_dummy40->GetYaxis()->SetTitleFont(42);
    h_nD_1_Eta_dummy40->GetZaxis()->SetLabelFont(42);
    h_nD_1_Eta_dummy40->GetZaxis()->SetLabelOffset(0.007);
    h_nD_1_Eta_dummy40->GetZaxis()->SetTitleSize(0.06);
    h_nD_1_Eta_dummy40->GetZaxis()->SetTitleFont(42);
    h_nD_1_Eta_dummy40->Draw("");

    TH1F *h_nD_1_Eta41 = new TH1F("h_nD_1_Eta41","h_nD_1_Eta",100,-5,5);
    h_nD_1_Eta41->SetBinContent(0,0.0003126407);
    h_nD_1_Eta41->SetBinContent(1,2.501126e-05);
    h_nD_1_Eta41->SetBinContent(2,7.503376e-05);
    h_nD_1_Eta41->SetBinContent(3,0.0001125506);
    h_nD_1_Eta41->SetBinContent(4,0.0001875844);
    h_nD_1_Eta41->SetBinContent(5,0.0003251463);
    h_nD_1_Eta41->SetBinContent(6,0.0002376069);
    h_nD_1_Eta41->SetBinContent(7,0.0003251463);
    h_nD_1_Eta41->SetBinContent(8,0.0006002701);
    h_nD_1_Eta41->SetBinContent(9,0.0006753039);
    h_nD_1_Eta41->SetBinContent(10,0.0007128208);
    h_nD_1_Eta41->SetBinContent(11,0.001012956);
    h_nD_1_Eta41->SetBinContent(12,0.001250563);
    h_nD_1_Eta41->SetBinContent(13,0.001525687);
    h_nD_1_Eta41->SetBinContent(14,0.002038417);
    h_nD_1_Eta41->SetBinContent(15,0.002588665);
    h_nD_1_Eta41->SetBinContent(16,0.002876294);
    h_nD_1_Eta41->SetBinContent(17,0.003339003);
    h_nD_1_Eta41->SetBinContent(18,0.00337652);
    h_nD_1_Eta41->SetBinContent(19,0.004477015);
    h_nD_1_Eta41->SetBinContent(20,0.004789656);
    h_nD_1_Eta41->SetBinContent(21,0.005327397);
    h_nD_1_Eta41->SetBinContent(22,0.006277825);
    h_nD_1_Eta41->SetBinContent(23,0.006928117);
    h_nD_1_Eta41->SetBinContent(24,0.00766595);
    h_nD_1_Eta41->SetBinContent(25,0.008403782);
    h_nD_1_Eta41->SetBinContent(26,0.00946676);
    h_nD_1_Eta41->SetBinContent(27,0.0104422);
    h_nD_1_Eta41->SetBinContent(28,0.01049222);
    h_nD_1_Eta41->SetBinContent(29,0.01164274);
    h_nD_1_Eta41->SetBinContent(30,0.01228053);
    h_nD_1_Eta41->SetBinContent(31,0.01398129);
    h_nD_1_Eta41->SetBinContent(32,0.01323095);
    h_nD_1_Eta41->SetBinContent(33,0.01480666);
    h_nD_1_Eta41->SetBinContent(34,0.01516933);
    h_nD_1_Eta41->SetBinContent(35,0.01584463);
    h_nD_1_Eta41->SetBinContent(36,0.01779551);
    h_nD_1_Eta41->SetBinContent(37,0.0177705);
    h_nD_1_Eta41->SetBinContent(38,0.01783302);
    h_nD_1_Eta41->SetBinContent(39,0.01923366);
    h_nD_1_Eta41->SetBinContent(40,0.01908359);
    h_nD_1_Eta41->SetBinContent(41,0.02024661);
    h_nD_1_Eta41->SetBinContent(42,0.0204342);
    h_nD_1_Eta41->SetBinContent(43,0.02080936);
    h_nD_1_Eta41->SetBinContent(44,0.02142214);
    h_nD_1_Eta41->SetBinContent(45,0.02122205);
    h_nD_1_Eta41->SetBinContent(46,0.0220099);
    h_nD_1_Eta41->SetBinContent(47,0.02263519);
    h_nD_1_Eta41->SetBinContent(48,0.02238507);
    h_nD_1_Eta41->SetBinContent(49,0.02150968);
    h_nD_1_Eta41->SetBinContent(50,0.02217248);
    h_nD_1_Eta41->SetBinContent(51,0.02292282);
    h_nD_1_Eta41->SetBinContent(52,0.02263519);
//.........这里部分代码省略.........
开发者ID:tahuang1991,项目名称:MuJetAnalysis,代码行数:101,代码来源:DarkSusy_mH_125_mGammaD_2000_cT_1000_LHE_nD_Eta.C

示例14: DarkSusy_mH_125_mGammaD_2000_cT_100_LHE_gammaD_Phi

void DarkSusy_mH_125_mGammaD_2000_cT_100_LHE_gammaD_Phi()
{
//=========Macro generated from canvas: cnv/cnv
//=========  (Sun May 24 15:18:26 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(-5.7,-0.00509322,4.3,0.03408539);
   cnv->SetFillColor(0);
   cnv->SetBorderMode(0);
   cnv->SetBorderSize(2);
   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_Phi_dummy80 = new TH1F("h_gammaD_1_Phi_dummy80","h_gammaD_1_Phi_dummy",80,-4,4);
   h_gammaD_1_Phi_dummy80->SetMaximum(0.03134289);
   h_gammaD_1_Phi_dummy80->SetLineStyle(0);
   h_gammaD_1_Phi_dummy80->SetMarkerStyle(20);
   h_gammaD_1_Phi_dummy80->GetXaxis()->SetTitle("#phi of #gamma_{D} [rad]");
   h_gammaD_1_Phi_dummy80->GetXaxis()->SetLabelFont(42);
   h_gammaD_1_Phi_dummy80->GetXaxis()->SetLabelOffset(0.007);
   h_gammaD_1_Phi_dummy80->GetXaxis()->SetTitleSize(0.06);
   h_gammaD_1_Phi_dummy80->GetXaxis()->SetTitleOffset(0.95);
   h_gammaD_1_Phi_dummy80->GetXaxis()->SetTitleFont(42);
   h_gammaD_1_Phi_dummy80->GetYaxis()->SetTitle("Fraction of events / 0.1 rad");
   h_gammaD_1_Phi_dummy80->GetYaxis()->SetLabelFont(42);
   h_gammaD_1_Phi_dummy80->GetYaxis()->SetLabelOffset(0.007);
   h_gammaD_1_Phi_dummy80->GetYaxis()->SetTitleSize(0.06);
   h_gammaD_1_Phi_dummy80->GetYaxis()->SetTitleOffset(1.35);
   h_gammaD_1_Phi_dummy80->GetYaxis()->SetTitleFont(42);
   h_gammaD_1_Phi_dummy80->GetZaxis()->SetLabelFont(42);
   h_gammaD_1_Phi_dummy80->GetZaxis()->SetLabelOffset(0.007);
   h_gammaD_1_Phi_dummy80->GetZaxis()->SetTitleSize(0.06);
   h_gammaD_1_Phi_dummy80->GetZaxis()->SetTitleFont(42);
   h_gammaD_1_Phi_dummy80->Draw("");
   
   TH1F *h_gammaD_1_Phi81 = new TH1F("h_gammaD_1_Phi81","h_gammaD_1_Phi",80,-4,4);
   h_gammaD_1_Phi81->SetBinContent(9,0.006925086);
   h_gammaD_1_Phi81->SetBinContent(10,0.01741272);
   h_gammaD_1_Phi81->SetBinContent(11,0.01686271);
   h_gammaD_1_Phi81->SetBinContent(12,0.0160377);
   h_gammaD_1_Phi81->SetBinContent(13,0.01707521);
   h_gammaD_1_Phi81->SetBinContent(14,0.01660021);
   h_gammaD_1_Phi81->SetBinContent(15,0.01686271);
   h_gammaD_1_Phi81->SetBinContent(16,0.0161002);
   h_gammaD_1_Phi81->SetBinContent(17,0.0160127);
   h_gammaD_1_Phi81->SetBinContent(18,0.01698771);
   h_gammaD_1_Phi81->SetBinContent(19,0.0159127);
   h_gammaD_1_Phi81->SetBinContent(20,0.0160377);
   h_gammaD_1_Phi81->SetBinContent(21,0.0160252);
   h_gammaD_1_Phi81->SetBinContent(22,0.0162752);
   h_gammaD_1_Phi81->SetBinContent(23,0.0158877);
   h_gammaD_1_Phi81->SetBinContent(24,0.0161627);
   h_gammaD_1_Phi81->SetBinContent(25,0.01555019);
   h_gammaD_1_Phi81->SetBinContent(26,0.0159502);
   h_gammaD_1_Phi81->SetBinContent(27,0.0161252);
   h_gammaD_1_Phi81->SetBinContent(28,0.0158502);
   h_gammaD_1_Phi81->SetBinContent(29,0.01641271);
   h_gammaD_1_Phi81->SetBinContent(30,0.0161877);
   h_gammaD_1_Phi81->SetBinContent(31,0.01667521);
   h_gammaD_1_Phi81->SetBinContent(32,0.0156127);
   h_gammaD_1_Phi81->SetBinContent(33,0.01521269);
   h_gammaD_1_Phi81->SetBinContent(34,0.0158377);
   h_gammaD_1_Phi81->SetBinContent(35,0.0156252);
   h_gammaD_1_Phi81->SetBinContent(36,0.0157127);
   h_gammaD_1_Phi81->SetBinContent(37,0.01526269);
   h_gammaD_1_Phi81->SetBinContent(38,0.0162752);
   h_gammaD_1_Phi81->SetBinContent(39,0.01507519);
   h_gammaD_1_Phi81->SetBinContent(40,0.0158002);
   h_gammaD_1_Phi81->SetBinContent(41,0.01682521);
   h_gammaD_1_Phi81->SetBinContent(42,0.01663771);
   h_gammaD_1_Phi81->SetBinContent(43,0.0160752);
   h_gammaD_1_Phi81->SetBinContent(44,0.01547519);
   h_gammaD_1_Phi81->SetBinContent(45,0.01653771);
   h_gammaD_1_Phi81->SetBinContent(46,0.0163377);
   h_gammaD_1_Phi81->SetBinContent(47,0.0157627);
   h_gammaD_1_Phi81->SetBinContent(48,0.0159002);
   h_gammaD_1_Phi81->SetBinContent(49,0.01653771);
   h_gammaD_1_Phi81->SetBinContent(50,0.0157002);
   h_gammaD_1_Phi81->SetBinContent(51,0.0160877);
   h_gammaD_1_Phi81->SetBinContent(52,0.0157377);
   h_gammaD_1_Phi81->SetBinContent(53,0.01538769);
   h_gammaD_1_Phi81->SetBinContent(54,0.0163627);
   h_gammaD_1_Phi81->SetBinContent(55,0.01515019);
   h_gammaD_1_Phi81->SetBinContent(56,0.0163377);
   h_gammaD_1_Phi81->SetBinContent(57,0.01542519);
   h_gammaD_1_Phi81->SetBinContent(58,0.01475018);
   h_gammaD_1_Phi81->SetBinContent(59,0.01462518);
   h_gammaD_1_Phi81->SetBinContent(60,0.01502519);
   h_gammaD_1_Phi81->SetBinContent(61,0.0156252);
//.........这里部分代码省略.........
开发者ID:tahuang1991,项目名称:MuJetAnalysis,代码行数:101,代码来源:DarkSusy_mH_125_mGammaD_2000_cT_100_LHE_gammaD_Phi.C

示例15: DarkSusy_mH_125_mGammaD_2000_cT_10_LHE_gammaD_L_Z

void DarkSusy_mH_125_mGammaD_2000_cT_10_LHE_gammaD_L_Z()
{
//=========Macro generated from canvas: cnv/cnv
//=========  (Sun May 24 15:17:52 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(-10.625,-0.01311612,51.875,0.08777715);
   cnv->SetFillColor(0);
   cnv->SetBorderMode(0);
   cnv->SetBorderSize(2);
   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_cT_Z_lab_dummy57 = new TH1F("h_gammaD_cT_Z_lab_dummy57","h_gammaD_cT_Z_lab_dummy",5,0,50);
   h_gammaD_cT_Z_lab_dummy57->SetMaximum(0.08071462);
   h_gammaD_cT_Z_lab_dummy57->SetLineStyle(0);
   h_gammaD_cT_Z_lab_dummy57->SetMarkerStyle(20);
   h_gammaD_cT_Z_lab_dummy57->GetXaxis()->SetTitle("L_{Z} of #gamma_{D} [mm]");
   h_gammaD_cT_Z_lab_dummy57->GetXaxis()->SetLabelFont(42);
   h_gammaD_cT_Z_lab_dummy57->GetXaxis()->SetLabelOffset(0.007);
   h_gammaD_cT_Z_lab_dummy57->GetXaxis()->SetTitleSize(0.06);
   h_gammaD_cT_Z_lab_dummy57->GetXaxis()->SetTitleOffset(0.95);
   h_gammaD_cT_Z_lab_dummy57->GetXaxis()->SetTitleFont(42);
   h_gammaD_cT_Z_lab_dummy57->GetYaxis()->SetTitle("Normalized Fraction of events / 10.0 mm");
   h_gammaD_cT_Z_lab_dummy57->GetYaxis()->SetLabelFont(42);
   h_gammaD_cT_Z_lab_dummy57->GetYaxis()->SetLabelOffset(0.007);
   h_gammaD_cT_Z_lab_dummy57->GetYaxis()->SetTitleSize(0.05);
   h_gammaD_cT_Z_lab_dummy57->GetYaxis()->SetTitleOffset(1.3);
   h_gammaD_cT_Z_lab_dummy57->GetYaxis()->SetTitleFont(42);
   h_gammaD_cT_Z_lab_dummy57->GetZaxis()->SetLabelFont(42);
   h_gammaD_cT_Z_lab_dummy57->GetZaxis()->SetLabelOffset(0.007);
   h_gammaD_cT_Z_lab_dummy57->GetZaxis()->SetTitleSize(0.06);
   h_gammaD_cT_Z_lab_dummy57->GetZaxis()->SetTitleFont(42);
   h_gammaD_cT_Z_lab_dummy57->Draw("");
   
   TH1F *h_gammaD_cT_Z_lab58 = new TH1F("h_gammaD_cT_Z_lab58","h_gammaD_cT_Z_lab",5,0,50);
   h_gammaD_cT_Z_lab58->SetBinContent(1,0.04484145);
   h_gammaD_cT_Z_lab58->SetBinContent(2,0.02460945);
   h_gammaD_cT_Z_lab58->SetBinContent(3,0.01479324);
   h_gammaD_cT_Z_lab58->SetBinContent(4,0.009401793);
   h_gammaD_cT_Z_lab58->SetBinContent(5,0.006354062);
   h_gammaD_cT_Z_lab58->SetBinContent(6,0.03052218);
   h_gammaD_cT_Z_lab58->SetEntries(159998);

   Int_t ci;      // for color index setting
   TColor *color; // for color definition with alpha
   ci = TColor::GetColor("#0000ff");
   h_gammaD_cT_Z_lab58->SetLineColor(ci);
   h_gammaD_cT_Z_lab58->SetLineWidth(2);
   h_gammaD_cT_Z_lab58->SetMarkerStyle(20);
   h_gammaD_cT_Z_lab58->GetXaxis()->SetTitle("L_{z} of #gamma_{D} [mm]");
   h_gammaD_cT_Z_lab58->GetXaxis()->SetLabelFont(42);
   h_gammaD_cT_Z_lab58->GetXaxis()->SetLabelOffset(0.007);
   h_gammaD_cT_Z_lab58->GetXaxis()->SetTitleSize(0.06);
   h_gammaD_cT_Z_lab58->GetXaxis()->SetTitleOffset(0.95);
   h_gammaD_cT_Z_lab58->GetXaxis()->SetTitleFont(42);
   h_gammaD_cT_Z_lab58->GetYaxis()->SetTitle("Events");
   h_gammaD_cT_Z_lab58->GetYaxis()->SetLabelFont(42);
   h_gammaD_cT_Z_lab58->GetYaxis()->SetLabelOffset(0.007);
   h_gammaD_cT_Z_lab58->GetYaxis()->SetTitleSize(0.06);
   h_gammaD_cT_Z_lab58->GetYaxis()->SetTitleOffset(1.5);
   h_gammaD_cT_Z_lab58->GetYaxis()->SetTitleFont(42);
   h_gammaD_cT_Z_lab58->GetZaxis()->SetLabelFont(42);
   h_gammaD_cT_Z_lab58->GetZaxis()->SetLabelOffset(0.007);
   h_gammaD_cT_Z_lab58->GetZaxis()->SetTitleSize(0.06);
   h_gammaD_cT_Z_lab58->GetZaxis()->SetTitleFont(42);
   h_gammaD_cT_Z_lab58->Draw("same");
   
   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}} = 10 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);
//.........这里部分代码省略.........
开发者ID:tahuang1991,项目名称:MuJetAnalysis,代码行数:101,代码来源:DarkSusy_mH_125_mGammaD_2000_cT_10_LHE_gammaD_L_Z.C


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