本文整理汇总了C++中TCanvas::SetBorderSize方法的典型用法代码示例。如果您正苦于以下问题:C++ TCanvas::SetBorderSize方法的具体用法?C++ TCanvas::SetBorderSize怎么用?C++ TCanvas::SetBorderSize使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类TCanvas
的用法示例。
在下文中一共展示了TCanvas::SetBorderSize方法的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: TCanvas
TCanvas *plotmean()
{
TCanvas *cWork = new TCanvas("cWork", "plots",200,10,700,750);
cWork->Divide(3,6, 0.002, 0.002);
cWork->SetFillColor(10);
cWork->SetFillStyle(4000);
cWork->SetBorderSize(1);
for( int i = 0; i < 3*6; ++i )
{
cWork->cd(i+1)->SetFillColor(10);
cWork->cd(i+1)->SetFillStyle(4000);
cWork->cd(i+1)->SetBorderSize(1);
}
plotmean(cWork, 1, "JP", "L");
plotmean(cWork, 2, "JP", "M");
plotmean(cWork, 3, "JP", "T");
plotmean(cWork, 4, "JBP", "L");
plotmean(cWork, 5, "JBP", "M");
plotmean(cWork, 6, "JBP", "T");
plotmean(cWork, 7, "CSV", "L");
plotmean(cWork, 8, "CSV", "M");
plotmean(cWork, 9, "CSV", "T");
plotmean(cWork, 10, "TCHE", "L");
plotmean(cWork, 11, "TCHE", "M");
plotmean(cWork, 14, "TCHP", "M");
plotmean(cWork, 15, "TCHP", "T");
plotmean(cWork, 17, "SSVHE", "M");
plotmean(cWork, 18, "SSVHP", "T");
return cWork;
}
示例2: 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;
}
示例3: 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;
}
示例4: showGraph
void showGraph(double canvasSizeX, double canvasSizeY,
TGraph* graph,
bool useLogScaleX, double xMin, double xMax, const std::string& xAxisTitle, double xAxisOffset,
bool useLogScaleY, double yMin, double yMax, const std::string& yAxisTitle, double yAxisOffset,
const std::string& outputFileName)
{
TCanvas* canvas = new TCanvas("canvas", "canvas", canvasSizeX, canvasSizeY);
canvas->SetFillColor(10);
canvas->SetBorderSize(2);
canvas->SetTopMargin(0.05);
canvas->SetLeftMargin(0.19);
canvas->SetBottomMargin(0.19);
canvas->SetRightMargin(0.05);
canvas->SetLogx(useLogScaleX);
canvas->SetLogy(useLogScaleY);
TH1* dummyHistogram = new TH1D("dummyHistogram", "dummyHistogram", 10, xMin, xMax);
dummyHistogram->SetTitle("");
dummyHistogram->SetStats(false);
dummyHistogram->SetMinimum(yMin);
dummyHistogram->SetMaximum(yMax);
dummyHistogram->Draw("axis");
TAxis* xAxis = dummyHistogram->GetXaxis();
xAxis->SetTitle(xAxisTitle.data());
xAxis->SetTitleOffset(xAxisOffset);
xAxis->SetTitleSize(0.065);
xAxis->SetLabelSize(0.055);
xAxis->SetLabelOffset(0.01);
xAxis->SetTickLength(0.055);
xAxis->SetNdivisions(505);
TAxis* yAxis = dummyHistogram->GetYaxis();
yAxis->SetTitle(yAxisTitle.data());
yAxis->SetTitleOffset(yAxisOffset);
yAxis->SetTitleSize(0.070);
yAxis->SetLabelSize(0.055);
yAxis->SetLabelOffset(0.01);
yAxis->SetTickLength(0.055);
yAxis->SetNdivisions(505);
graph->SetMarkerColor(1);
graph->SetLineColor(1);
graph->Draw("p");
canvas->Update();
size_t idx = outputFileName.find_last_of('.');
std::string outputFileName_plot = std::string(outputFileName, 0, idx);
if ( useLogScaleY ) outputFileName_plot.append("_log");
else outputFileName_plot.append("_linear");
if ( idx != std::string::npos ) canvas->Print(std::string(outputFileName_plot).append(std::string(outputFileName, idx)).data());
canvas->Print(std::string(outputFileName_plot).append(".png").data());
//canvas->Print(std::string(outputFileName_plot).append(".pdf").data());
//canvas->Print(std::string(outputFileName_plot).append(".root").data());
delete dummyHistogram;
delete canvas;
}
示例5: showHistograms
void showHistograms(double canvasSizeX, double canvasSizeY,
TH1* histogram,
double xMin, double xMax, const std::string& xAxisTitle, double xAxisOffset,
bool useLogScale, double yMin, double yMax, const std::string& yAxisTitle, double yAxisOffset,
const std::string& outputFileName)
{
TCanvas* canvas = new TCanvas("canvas", "canvas", canvasSizeX, canvasSizeY);
canvas->SetFillColor(10);
canvas->SetBorderSize(2);
canvas->SetLeftMargin(0.15);
canvas->SetBottomMargin(0.15);
canvas->SetLogy(useLogScale);
histogram->SetTitle("");
histogram->SetStats(true);
histogram->SetMinimum(yMin);
histogram->SetMaximum(yMax);
histogram->SetLineColor(1);
histogram->SetLineWidth(2);
histogram->SetMarkerColor(1);
histogram->SetMarkerStyle(20);
histogram->SetMarkerSize(1.5);
histogram->Draw("hist");
TAxis* xAxis = histogram->GetXaxis();
xAxis->SetRangeUser(xMin, xMax);
xAxis->SetTitle(xAxisTitle.data());
xAxis->SetTitleSize(0.060);
xAxis->SetTitleOffset(xAxisOffset);
xAxis->SetLabelSize(0.050);
xAxis->SetNdivisions(505);
TAxis* yAxis = histogram->GetYaxis();
yAxis->SetTitle(yAxisTitle.data());
yAxis->SetTitleSize(0.060);
yAxis->SetTitleOffset(yAxisOffset);
yAxis->SetLabelSize(0.050);
yAxis->SetNdivisions(505);
canvas->Update();
size_t idx = outputFileName.find_last_of('.');
std::string outputFileName_plot = std::string(outputFileName, 0, idx);
if ( useLogScale ) outputFileName_plot.append("_log");
else outputFileName_plot.append("_linear");
if ( idx != std::string::npos ) canvas->Print(std::string(outputFileName_plot).append(std::string(outputFileName, idx)).data());
//canvas->Print(std::string(outputFileName_plot).append(".png").data());
canvas->Print(std::string(outputFileName_plot).append(".pdf").data());
//canvas->Print(std::string(outputFileName_plot).append(".root").data());
delete canvas;
}
示例6: drawtext
TCanvas * font()
{
TCanvas *Tf = new TCanvas("Tf", "Tf",0,0,500,700);
Tf->Range(0,0,1,1);
Tf->SetBorderSize(2);
Tf->SetFrameFillColor(0);
double y = 0.95;
for (int f = 12; f<=152; f+=10) {
if (f!=142) drawtext(0.02,y, f,"ABCDEFGH abcdefgh 0123456789 @#$");
else drawtext(0.02,y, f,"ABCD efgh 01234 @#$");
y -= 0.065;
}
return Tf;
}
示例7: showHistogram1d
void showHistogram1d(TH1* histogram,
const std::string& xAxisTitle,
Float_t* genX,
const std::string& outputFileName)
{
TCanvas* canvas = new TCanvas("canvas", "canvas", 800, 600);
canvas->SetFillColor(10);
canvas->SetBorderSize(2);
canvas->SetTopMargin(0.10);
canvas->SetLeftMargin(0.16);
canvas->SetRightMargin(0.14);
canvas->SetBottomMargin(0.12);
TAxis* xAxis = histogram->GetXaxis();
xAxis->SetTitle(xAxisTitle.data());
xAxis->SetTitleOffset(1.15);
TAxis* yAxis = histogram->GetYaxis();
yAxis->SetTitle("Sampling Points");
yAxis->SetTitleOffset(1.60);
histogram->SetLineColor(1);
histogram->SetLineWidth(2);
histogram->SetMarkerColor(1);
histogram->SetMarkerStyle(20);
histogram->Draw("e1p");
TMarker* genMarker = 0;
if ( genX ) {
genMarker = new TMarker(*genX, 0.10, 34);
genMarker->SetMarkerColor(1);
genMarker->SetMarkerSize(2);
genMarker->Draw();
}
canvas->Update();
size_t idx = outputFileName.find_last_of('.');
std::string outputFileName_plot = std::string(outputFileName, 0, idx);
if ( idx != std::string::npos ) canvas->Print(std::string(outputFileName_plot).append(std::string(outputFileName, idx)).data());
canvas->Print(std::string(outputFileName_plot).append(".png").data());
canvas->Print(std::string(outputFileName_plot).append(".pdf").data());
canvas->Print(std::string(outputFileName_plot).append(".root").data());
delete genMarker;
delete canvas;
}
示例8: 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;
}
示例9: first
void first() {
TCanvas *nut = new TCanvas("nut", "FirstSession",100,10,700,900);
nut->Range(0,0,20,24);
nut->SetFillColor(10);
nut->SetBorderSize(2);
TPaveLabel *pl = new TPaveLabel(3,22,17,23.7,
"My first ROOT interactive session","br");
pl->SetFillColor(18);
pl->Draw();
TText t(0,0,"a");
t.SetTextFont(62);
t.SetTextSize(0.025);
t.SetTextAlign(12);
t.DrawText(2,20.3,"ROOT is based on CINT, a powerful C/C++ interpreter.");
t.DrawText(2,19.3,"Blocks of lines can be entered within {...}.");
t.DrawText(2,18.3,"Previous typed lines can be recalled.");
t.SetTextFont(72);
t.SetTextSize(0.026);
t.DrawText(3,17,"Root > float x=5; float y=7;");
t.DrawText(3,16,"Root > x*sqrt(y)");
t.DrawText(3,14,
"Root > for (int i=2;i<7;i++) printf(\"sqrt(%d) = %f\\n\",i,sqrt(i));");
t.DrawText(3,10,"Root > TF1 f1(\"f1\",\"sin(x)/x\",0,10)");
t.DrawText(3, 9,"Root > f1.Draw()");
t.SetTextFont(81);
t.SetTextSize(0.018);
t.DrawText(4,15,"(float) 13.2288f");
t.DrawText(4,13.3,"sqrt(2) = 1.414214");
t.DrawText(4,12.7,"sqrt(3) = 1.732051");
t.DrawText(4,12.1,"sqrt(4) = 2.000000");
t.DrawText(4,11.5,"sqrt(5) = 2.236068");
t.DrawText(4,10.9,"sqrt(6) = 2.449490");
TPad *pad = new TPad("pad","pad",.2,.05,.8,.35);
pad->Draw();
pad->cd();
pad->SetGrid();
TF1 *f1 = new TF1("f1","sin(x)/x",0,10);
f1->Draw();
}
示例10: validateTauFakeRateKNN
void validateTauFakeRateKNN()
{
TCanvas* canvas = new TCanvas("canvas", "canvas", 1, 1, 800, 600);
canvas->SetFillColor(10);
canvas->SetBorderSize(2);
canvas->SetLogy();
TString inputFilePath = "/data2/friis/FakeRatesHPSXCheck_V2/fakerate_ewkTauIdHPSloose_WplusJets_data_jetNoEta20FullVal/train";
//TString inputFilePath = "/data2/friis/FakeRatesHPSXCheck_V2/fakerate_ewkTauIdHPSloose_PPmuX_data_jetNoEta20FullVal/train";
TString inputFileName = "train_FakeRateMethod_output.root";
TFile* file = TFile::Open(TString(inputFilePath).Append("/").Append(inputFileName));
TString testTreeName = "TestTree";
TTree* testTree = (TTree*)file->Get(testTreeName);
std::string ptName = "Pt";
std::string etaName = "AbsEta";
//--- Check if fake-rates are parametrized by jetPt or tau Pt
if ( testTree->GetBranch("JetPt") ) {
std::cout << "Using Jet variables" << std::endl;
ptName = "JetPt";
etaName = "AbsJetEta";
}
makePlot(canvas, "validateTauFakeRateKNN_WplusJets_JetPt.png", testTree, ptName, 10, 0., 100.);
makePlot(canvas, "validateTauFakeRateKNN_WplusJets_JetEta.png", testTree, etaName, 10, -2.5, +2.5);
makePlot(canvas, "validateTauFakeRateKNN_WplusJets_JetRadius.png", testTree, "JetWidth", 10, -0.01, 0.51);
//makePlot(canvas, "validateTauFakeRateKNN_QCD_JetPt.png", testTree, ptName, 10, 0., 100.);
//makePlot(canvas, "validateTauFakeRateKNN_QCD_JetEta.png", testTree, etaName, 10, -2.5, +2.5);
//makePlot(canvas, "validateTauFakeRateKNN_QCD_JetRadius.png", testTree, "JetWidth", 10, -0.01, 0.51);
delete file;
delete canvas;
}
示例11: 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;
}
示例12: 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
示例13: DarkSusy_mH_125_mGammaD_2000_cT_10_LHE_dimuon_p
void DarkSusy_mH_125_mGammaD_2000_cT_10_LHE_dimuon_p()
{
//=========Macro generated from canvas: cnv/cnv
//========= (Sun May 24 15:17:57 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(-21.25,-0.006229087,103.75,0.04168697);
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_dimuon_1_p_dummy132 = new TH1F("h_dimuon_1_p_dummy132","h_dimuon_1_p_dummy",100,0,100);
h_dimuon_1_p_dummy132->SetMaximum(0.03833284);
h_dimuon_1_p_dummy132->SetLineStyle(0);
h_dimuon_1_p_dummy132->SetMarkerStyle(20);
h_dimuon_1_p_dummy132->GetXaxis()->SetTitle("p of #mu#mu [GeV]");
h_dimuon_1_p_dummy132->GetXaxis()->SetLabelFont(42);
h_dimuon_1_p_dummy132->GetXaxis()->SetLabelOffset(0.007);
h_dimuon_1_p_dummy132->GetXaxis()->SetTitleSize(0.06);
h_dimuon_1_p_dummy132->GetXaxis()->SetTitleOffset(0.95);
h_dimuon_1_p_dummy132->GetXaxis()->SetTitleFont(42);
h_dimuon_1_p_dummy132->GetYaxis()->SetTitle("Fraction of events / 1 GeV");
h_dimuon_1_p_dummy132->GetYaxis()->SetLabelFont(42);
h_dimuon_1_p_dummy132->GetYaxis()->SetLabelOffset(0.007);
h_dimuon_1_p_dummy132->GetYaxis()->SetTitleSize(0.06);
h_dimuon_1_p_dummy132->GetYaxis()->SetTitleOffset(1.35);
h_dimuon_1_p_dummy132->GetYaxis()->SetTitleFont(42);
h_dimuon_1_p_dummy132->GetZaxis()->SetLabelFont(42);
h_dimuon_1_p_dummy132->GetZaxis()->SetLabelOffset(0.007);
h_dimuon_1_p_dummy132->GetZaxis()->SetTitleSize(0.06);
h_dimuon_1_p_dummy132->GetZaxis()->SetTitleFont(42);
h_dimuon_1_p_dummy132->Draw("");
TH1F *h_dimuon_1_p133 = new TH1F("h_dimuon_1_p133","h_dimuon_1_p",101,0,101);
h_dimuon_1_p133->SetBinContent(4,3.64385e-05);
h_dimuon_1_p133->SetBinContent(5,0.000145754);
h_dimuon_1_p133->SetBinContent(6,0.0002004118);
h_dimuon_1_p133->SetBinContent(7,0.0004008235);
h_dimuon_1_p133->SetBinContent(8,0.0006012353);
h_dimuon_1_p133->SetBinContent(9,0.0009656203);
h_dimuon_1_p133->SetBinContent(10,0.001657952);
h_dimuon_1_p133->SetBinContent(11,0.001967679);
h_dimuon_1_p133->SetBinContent(12,0.002477818);
h_dimuon_1_p133->SetBinContent(13,0.003206588);
h_dimuon_1_p133->SetBinContent(14,0.00413577);
h_dimuon_1_p133->SetBinContent(15,0.004700567);
h_dimuon_1_p133->SetBinContent(16,0.005283582);
h_dimuon_1_p133->SetBinContent(17,0.006832219);
h_dimuon_1_p133->SetBinContent(18,0.007816059);
h_dimuon_1_p133->SetBinContent(19,0.008052909);
h_dimuon_1_p133->SetBinContent(20,0.009437571);
h_dimuon_1_p133->SetBinContent(21,0.01118662);
h_dimuon_1_p133->SetBinContent(22,0.01244375);
h_dimuon_1_p133->SetBinContent(23,0.01186073);
h_dimuon_1_p133->SetBinContent(24,0.01373732);
h_dimuon_1_p133->SetBinContent(25,0.01473937);
h_dimuon_1_p133->SetBinContent(26,0.01512198);
h_dimuon_1_p133->SetBinContent(27,0.01619691);
h_dimuon_1_p133->SetBinContent(28,0.01687103);
h_dimuon_1_p133->SetBinContent(29,0.01738117);
h_dimuon_1_p133->SetBinContent(30,0.01690746);
h_dimuon_1_p133->SetBinContent(31,0.01783665);
h_dimuon_1_p133->SetBinContent(32,0.01896624);
h_dimuon_1_p133->SetBinContent(33,0.01947638);
h_dimuon_1_p133->SetBinContent(34,0.02062419);
h_dimuon_1_p133->SetBinContent(35,0.01967679);
h_dimuon_1_p133->SetBinContent(36,0.0210068);
h_dimuon_1_p133->SetBinContent(37,0.02217283);
h_dimuon_1_p133->SetBinContent(38,0.02055131);
h_dimuon_1_p133->SetBinContent(39,0.0208246);
h_dimuon_1_p133->SetBinContent(40,0.02208173);
h_dimuon_1_p133->SetBinContent(41,0.02321132);
h_dimuon_1_p133->SetBinContent(42,0.02208173);
h_dimuon_1_p133->SetBinContent(43,0.02133474);
h_dimuon_1_p133->SetBinContent(44,0.02189954);
h_dimuon_1_p133->SetBinContent(45,0.02020515);
h_dimuon_1_p133->SetBinContent(46,0.01984076);
h_dimuon_1_p133->SetBinContent(47,0.01860186);
h_dimuon_1_p133->SetBinContent(48,0.01734473);
h_dimuon_1_p133->SetBinContent(49,0.01747226);
h_dimuon_1_p133->SetBinContent(50,0.01475759);
h_dimuon_1_p133->SetBinContent(51,0.01444787);
h_dimuon_1_p133->SetBinContent(52,0.01415636);
h_dimuon_1_p133->SetBinContent(53,0.01381019);
h_dimuon_1_p133->SetBinContent(54,0.0126806);
h_dimuon_1_p133->SetBinContent(55,0.01191539);
h_dimuon_1_p133->SetBinContent(56,0.01129594);
//.........这里部分代码省略.........
开发者ID:tahuang1991,项目名称:MuJetAnalysis,代码行数:101,代码来源:DarkSusy_mH_125_mGammaD_2000_cT_10_LHE_dimuon_p.C
示例14: 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
示例15: DarkSusy_mH_125_mGammaD_2000_cT_10_LHE_gammaD_Sorted_cT_XY_lab
void DarkSusy_mH_125_mGammaD_2000_cT_10_LHE_gammaD_Sorted_cT_XY_lab()
{
//=========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.01611139,51.875,0.1078224);
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_cT_XY_lab_dummy65 = new TH1F("h_gammaD_1_cT_XY_lab_dummy65","h_gammaD_1_cT_XY_lab_dummy",5,0,50);
h_gammaD_1_cT_XY_lab_dummy65->SetMaximum(0.09914702);
h_gammaD_1_cT_XY_lab_dummy65->SetLineStyle(0);
h_gammaD_1_cT_XY_lab_dummy65->SetMarkerStyle(20);
h_gammaD_1_cT_XY_lab_dummy65->GetXaxis()->SetTitle("L_{XY} of #gamma_{D} [mm]");
h_gammaD_1_cT_XY_lab_dummy65->GetXaxis()->SetLabelFont(42);
h_gammaD_1_cT_XY_lab_dummy65->GetXaxis()->SetLabelOffset(0.007);
h_gammaD_1_cT_XY_lab_dummy65->GetXaxis()->SetTitleSize(0.06);
h_gammaD_1_cT_XY_lab_dummy65->GetXaxis()->SetTitleOffset(0.95);
h_gammaD_1_cT_XY_lab_dummy65->GetXaxis()->SetTitleFont(42);
h_gammaD_1_cT_XY_lab_dummy65->GetYaxis()->SetTitle("Normalized Fraction of events / 10.0 mm");
h_gammaD_1_cT_XY_lab_dummy65->GetYaxis()->SetLabelFont(42);
h_gammaD_1_cT_XY_lab_dummy65->GetYaxis()->SetLabelOffset(0.007);
h_gammaD_1_cT_XY_lab_dummy65->GetYaxis()->SetTitleSize(0.05);
h_gammaD_1_cT_XY_lab_dummy65->GetYaxis()->SetTitleOffset(1.3);
h_gammaD_1_cT_XY_lab_dummy65->GetYaxis()->SetTitleFont(42);
h_gammaD_1_cT_XY_lab_dummy65->GetZaxis()->SetLabelFont(42);
h_gammaD_1_cT_XY_lab_dummy65->GetZaxis()->SetLabelOffset(0.007);
h_gammaD_1_cT_XY_lab_dummy65->GetZaxis()->SetTitleSize(0.06);
h_gammaD_1_cT_XY_lab_dummy65->GetZaxis()->SetTitleFont(42);
h_gammaD_1_cT_XY_lab_dummy65->Draw("");
TH1F *h_gammaD_1_cT_XY_lab66 = new TH1F("h_gammaD_1_cT_XY_lab66","h_gammaD_1_cT_XY_lab",5,0,50);
h_gammaD_1_cT_XY_lab66->SetBinContent(1,0.04698479);
h_gammaD_1_cT_XY_lab66->SetBinContent(2,0.02564764);
h_gammaD_1_cT_XY_lab66->SetBinContent(3,0.01450027);
h_gammaD_1_cT_XY_lab66->SetBinContent(4,0.008138182);
h_gammaD_1_cT_XY_lab66->SetBinContent(5,0.004729106);
h_gammaD_1_cT_XY_lab66->SetBinContent(6,0.006992016);
h_gammaD_1_cT_XY_lab66->SetEntries(79999);
Int_t ci; // for color index setting
TColor *color; // for color definition with alpha
ci = TColor::GetColor("#0000ff");
h_gammaD_1_cT_XY_lab66->SetLineColor(ci);
h_gammaD_1_cT_XY_lab66->SetLineWidth(2);
h_gammaD_1_cT_XY_lab66->SetMarkerStyle(20);
h_gammaD_1_cT_XY_lab66->GetXaxis()->SetLabelFont(42);
h_gammaD_1_cT_XY_lab66->GetXaxis()->SetLabelOffset(0.007);
h_gammaD_1_cT_XY_lab66->GetXaxis()->SetTitleSize(0.06);
h_gammaD_1_cT_XY_lab66->GetXaxis()->SetTitleOffset(0.95);
h_gammaD_1_cT_XY_lab66->GetXaxis()->SetTitleFont(42);
h_gammaD_1_cT_XY_lab66->GetYaxis()->SetLabelFont(42);
h_gammaD_1_cT_XY_lab66->GetYaxis()->SetLabelOffset(0.007);
h_gammaD_1_cT_XY_lab66->GetYaxis()->SetTitleSize(0.06);
h_gammaD_1_cT_XY_lab66->GetYaxis()->SetTitleOffset(1.3);
h_gammaD_1_cT_XY_lab66->GetYaxis()->SetTitleFont(42);
h_gammaD_1_cT_XY_lab66->GetZaxis()->SetLabelFont(42);
h_gammaD_1_cT_XY_lab66->GetZaxis()->SetLabelOffset(0.007);
h_gammaD_1_cT_XY_lab66->GetZaxis()->SetTitleSize(0.06);
h_gammaD_1_cT_XY_lab66->GetZaxis()->SetTitleFont(42);
h_gammaD_1_cT_XY_lab66->Draw("same");
TH1F *h_gammaD_2_cT_XY_lab67 = new TH1F("h_gammaD_2_cT_XY_lab67","h_gammaD_2_cT_XY_lab",5,0,50);
h_gammaD_2_cT_XY_lab67->SetBinContent(1,0.05508168);
h_gammaD_2_cT_XY_lab67->SetBinContent(2,0.02481173);
h_gammaD_2_cT_XY_lab67->SetBinContent(3,0.01176736);
h_gammaD_2_cT_XY_lab67->SetBinContent(4,0.00563072);
h_gammaD_2_cT_XY_lab67->SetBinContent(5,0.002708513);
h_gammaD_2_cT_XY_lab67->SetBinContent(6,0.002983999);
h_gammaD_2_cT_XY_lab67->SetEntries(79999);
ci = TColor::GetColor("#ff0000");
h_gammaD_2_cT_XY_lab67->SetLineColor(ci);
h_gammaD_2_cT_XY_lab67->SetLineWidth(2);
h_gammaD_2_cT_XY_lab67->SetMarkerStyle(20);
h_gammaD_2_cT_XY_lab67->GetXaxis()->SetLabelFont(42);
h_gammaD_2_cT_XY_lab67->GetXaxis()->SetLabelOffset(0.007);
h_gammaD_2_cT_XY_lab67->GetXaxis()->SetTitleSize(0.06);
h_gammaD_2_cT_XY_lab67->GetXaxis()->SetTitleOffset(0.95);
h_gammaD_2_cT_XY_lab67->GetXaxis()->SetTitleFont(42);
h_gammaD_2_cT_XY_lab67->GetYaxis()->SetLabelFont(42);
h_gammaD_2_cT_XY_lab67->GetYaxis()->SetLabelOffset(0.007);
h_gammaD_2_cT_XY_lab67->GetYaxis()->SetTitleSize(0.06);
h_gammaD_2_cT_XY_lab67->GetYaxis()->SetTitleOffset(1.3);
h_gammaD_2_cT_XY_lab67->GetYaxis()->SetTitleFont(42);
//.........这里部分代码省略.........
开发者ID:tahuang1991,项目名称:MuJetAnalysis,代码行数:101,代码来源:DarkSusy_mH_125_mGammaD_2000_cT_10_LHE_gammaD_Sorted_cT_XY_lab.C