本文整理汇总了C++中TCanvas::Range方法的典型用法代码示例。如果您正苦于以下问题:C++ TCanvas::Range方法的具体用法?C++ TCanvas::Range怎么用?C++ TCanvas::Range使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类TCanvas
的用法示例。
在下文中一共展示了TCanvas::Range方法的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: Drawing
void Drawing()
{
frodo *fr = frodo::instance();
fr->Y1.clear();
fr->X1.clear();
fr->Y2.clear();
fr->X2.clear();
fr->Y3.clear();
fr->X3.clear();
fr->Y4.clear();
fr->X4.clear();
fr->AllX.clear();
fr->AllY.clear();
//----------------------------------------------------------------------------------------------------
TCanvas *HBD = new TCanvas("HBD","HBD Event Display",0,0,700,700);
HBD->Range(-50000,-50000,50000,50000);
double Qx1,Qx2,Qx3,Qx4,Qy1,Qy2,Qy3,Qy4;
Qx1=Qx2=Qx3=Qx4=Qy1=Qy2=Qy3=Qy4=0;
for(unsigned int i=0; i<60; i++)
{
Qx1 += fr->J1_XStrips[i].Q();
Qx2 += fr->J2_XStrips[i].Q();
Qx3 += fr->J3_XStrips[i].Q();
Qx4 += fr->J4_XStrips[i].Q();
}
for(unsigned int i=0; i<60; i++)
{
Qy1 += fr->J1_YStrips[i].Q();
Qy2 += fr->J2_YStrips[i].Q();
Qy3 += fr->J3_YStrips[i].Q();
Qy4 += fr->J4_YStrips[i].Q();
}
double Qtot1 = Qx1+Qy1;
double Qtot2 = Qx2+Qy2;
double Qtot3 = Qx3+Qy3;
double Qtot4 = Qx4+Qy4;
//J1 section:-------------------------------------------------------------------
double X1 = -49100; //left
double Y1 = -1375; //bottom
double X2 = -1000; //right
double Y2 = -1075; //top
for(unsigned int i=0; i<60; i++)
{
double T = fr->J1_YStrips[i].Q();
//double Qfrac = exp(-T/20)*100;
double Qfrac = T/Qtot1*100;
if(Qfrac>0.04 && Qfrac<1)
{
fr->J1_YStrips[i].Draw(X1,Y1,X2,Y2,1);
HBD->Update();
fr->Y1.push_back(Coordinates(fr->J1_YStrips[i].YCenter()));
fr->AllY.push_back(Coordinates(fr->J1_YStrips[i].YCenter()));
}
else if(Qfrac>=1 && Qfrac<50)
{
int index = int (Qfrac);
fr->J1_YStrips[i].Draw(X1,Y1,X2,Y2,index);
HBD->Update();
fr->Y1.push_back(Coordinates(fr->J1_YStrips[i].YCenter()));
fr->AllY.push_back(Coordinates(fr->J1_YStrips[i].YCenter()));
}
else if(Qfrac>=50 && Qfrac<99.98)
{
//int index = int (Qfrac) - 49;
fr->J1_YStrips[i].Draw(X1,Y1,X2,Y2,2);
HBD->Update();
fr->Y1.push_back(Coordinates(fr->J1_YStrips[i].YCenter()));
fr->AllY.push_back(Coordinates(fr->J1_YStrips[i].YCenter()));
}
Y2 = Y1 - 500;
Y1 = Y2 - 300;
}
double x1 = -1900;
double y1 = -48975;
double x2 = -1200;
double y2 = -48675;
for(unsigned int j=0; j<60; j++)
{
double T = fr->J1_XStrips[j].Q();
//double Qfrac = exp(-T/20)*100;
double Qfrac = T/Qtot1*100;
if(Qfrac>0.04 && Qfrac<1)
{
fr->J1_XStrips[j].Draw(x1,y1,x2,y2,1);
HBD->Update();
//.........这里部分代码省略.........
示例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);
//.........这里部分代码省略.........
示例3: TracktoLCTYfull_2016B_June22all_sameYrange_fullIntegral_10k9k_lin
void TracktoLCTYfull_2016B_June22all_sameYrange_fullIntegral_10k9k_lin()
{
//=========Macro generated from canvas: TracktoLCTYfull/TracktoLCTYfull
//========= (Sat Aug 6 07:01:22 2016) by ROOT version6.06/01
TCanvas *TracktoLCTYfull = new TCanvas("TracktoLCTYfull", "TracktoLCTYfull",0,0,500,500);
gStyle->SetOptStat(0);
TracktoLCTYfull->SetHighLightColor(2);
TracktoLCTYfull->Range(-10000.5,-14.99438,-9995.5,134.9994);
TracktoLCTYfull->SetFillColor(0);
TracktoLCTYfull->SetBorderMode(0);
TracktoLCTYfull->SetBorderSize(2);
TracktoLCTYfull->SetFrameBorderMode(0);
TracktoLCTYfull->SetFrameBorderMode(0);
TH1D *TracktoLCTYfull_1__73 = new TH1D("TracktoLCTYfull_1__73","TracktoLCTYfull",100,-10000,-9996);
TracktoLCTYfull_1__73->SetBinContent(26,100);
TracktoLCTYfull_1__73->SetBinContent(101,26.00723);
TracktoLCTYfull_1__73->SetMinimum(0.005);
TracktoLCTYfull_1__73->SetMaximum(120);
TracktoLCTYfull_1__73->SetEntries(675802);
TracktoLCTYfull_1__73->SetStats(0);
Int_t ci; // for color index setting
TColor *color; // for color definition with alpha
ci = TColor::GetColor("#ff00ff");
TracktoLCTYfull_1__73->SetLineColor(ci);
ci = TColor::GetColor("#ff00ff");
TracktoLCTYfull_1__73->SetMarkerColor(ci);
TracktoLCTYfull_1__73->GetXaxis()->SetTitle("cm");
TracktoLCTYfull_1__73->GetYaxis()->SetTitle("scaled number of entries");
TracktoLCTYfull_1__73->Draw("H");
TLegend *leg = new TLegend(0.5,0.7,0.9,0.9,NULL,"brNDC");
leg->SetBorderSize(1);
leg->SetTextFont(62);
leg->SetTextSize(0.02);
leg->SetLineColor(1);
leg->SetLineStyle(1);
leg->SetLineWidth(1);
leg->SetFillColor(0);
leg->SetFillStyle(1001);
TLegendEntry *entry=leg->AddEntry("TracktoLCTYfull_1","ME11A: mean:-9999.0cm;RMS:0.0cm","l");
ci = TColor::GetColor("#ff00ff");
entry->SetLineColor(ci);
entry->SetLineStyle(1);
entry->SetLineWidth(1);
entry->SetMarkerColor(1);
entry->SetMarkerStyle(21);
entry->SetMarkerSize(1);
entry->SetTextFont(62);
entry=leg->AddEntry("TracktoLCTYfull_2","ME11B: mean:-9999.0cm;RMS:0.0cm","l");
ci = TColor::GetColor("#ff9999");
entry->SetLineColor(ci);
entry->SetLineStyle(1);
entry->SetLineWidth(1);
entry->SetMarkerColor(1);
entry->SetMarkerStyle(21);
entry->SetMarkerSize(1);
entry->SetTextFont(62);
entry=leg->AddEntry("TracktoLCTYfull_3","ME12+13: mean:-9999.0cm;RMS:0.0cm","l");
entry->SetLineColor(1);
entry->SetLineStyle(1);
entry->SetLineWidth(1);
entry->SetMarkerColor(1);
entry->SetMarkerStyle(21);
entry->SetMarkerSize(1);
entry->SetTextFont(62);
entry=leg->AddEntry("TracktoLCTYfull_4","ME2: mean:-9999.0cm;RMS:0.0cm","l");
ci = TColor::GetColor("#ff0000");
entry->SetLineColor(ci);
entry->SetLineStyle(1);
entry->SetLineWidth(1);
entry->SetMarkerColor(1);
entry->SetMarkerStyle(21);
entry->SetMarkerSize(1);
entry->SetTextFont(62);
entry=leg->AddEntry("TracktoLCTYfull_5","ME3: mean:-9999.0cm;RMS:0.0cm","l");
ci = TColor::GetColor("#00ff00");
entry->SetLineColor(ci);
entry->SetLineStyle(1);
entry->SetLineWidth(1);
entry->SetMarkerColor(1);
entry->SetMarkerStyle(21);
entry->SetMarkerSize(1);
entry->SetTextFont(62);
entry=leg->AddEntry("TracktoLCTYfull_6","ME4: mean:-9999.0cm;RMS:0.0cm","l");
ci = TColor::GetColor("#0000ff");
entry->SetLineColor(ci);
entry->SetLineStyle(1);
entry->SetLineWidth(1);
entry->SetMarkerColor(1);
entry->SetMarkerStyle(21);
entry->SetMarkerSize(1);
entry->SetTextFont(62);
//.........这里部分代码省略.........
开发者ID:senka,项目名称:CSC_eff_808,代码行数:101,代码来源:TracktoLCTYfull_2016B_June22all_sameYrange_fullIntegral_10k9k_lin.C
示例4: 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
示例5: 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
示例6: DarkSusy_mH_125_mGammaD_2000_cT_10_LHE_gammaD_Sorted_cT_Z_lab
void DarkSusy_mH_125_mGammaD_2000_cT_10_LHE_gammaD_Sorted_cT_Z_lab()
{
//=========Macro generated from canvas: cnv/cnv
//========= (Sun May 24 15:17:53 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.01342717,51.875,0.08985876);
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_Z_lab_dummy68 = new TH1F("h_gammaD_1_cT_Z_lab_dummy68","h_gammaD_1_cT_Z_lab_dummy",5,0,50);
h_gammaD_1_cT_Z_lab_dummy68->SetMaximum(0.08262875);
h_gammaD_1_cT_Z_lab_dummy68->SetLineStyle(0);
h_gammaD_1_cT_Z_lab_dummy68->SetMarkerStyle(20);
h_gammaD_1_cT_Z_lab_dummy68->GetXaxis()->SetTitle("L_{Z} of #gamma_{D} [mm]");
h_gammaD_1_cT_Z_lab_dummy68->GetXaxis()->SetLabelFont(42);
h_gammaD_1_cT_Z_lab_dummy68->GetXaxis()->SetLabelOffset(0.007);
h_gammaD_1_cT_Z_lab_dummy68->GetXaxis()->SetTitleSize(0.06);
h_gammaD_1_cT_Z_lab_dummy68->GetXaxis()->SetTitleOffset(0.95);
h_gammaD_1_cT_Z_lab_dummy68->GetXaxis()->SetTitleFont(42);
h_gammaD_1_cT_Z_lab_dummy68->GetYaxis()->SetTitle("Normalized Fraction of events / 10.0 mm");
h_gammaD_1_cT_Z_lab_dummy68->GetYaxis()->SetLabelFont(42);
h_gammaD_1_cT_Z_lab_dummy68->GetYaxis()->SetLabelOffset(0.007);
h_gammaD_1_cT_Z_lab_dummy68->GetYaxis()->SetTitleSize(0.05);
h_gammaD_1_cT_Z_lab_dummy68->GetYaxis()->SetTitleOffset(1.3);
h_gammaD_1_cT_Z_lab_dummy68->GetYaxis()->SetTitleFont(42);
h_gammaD_1_cT_Z_lab_dummy68->GetZaxis()->SetLabelFont(42);
h_gammaD_1_cT_Z_lab_dummy68->GetZaxis()->SetLabelOffset(0.007);
h_gammaD_1_cT_Z_lab_dummy68->GetZaxis()->SetTitleSize(0.06);
h_gammaD_1_cT_Z_lab_dummy68->GetZaxis()->SetTitleFont(42);
h_gammaD_1_cT_Z_lab_dummy68->Draw("");
TH1F *h_gammaD_1_cT_Z_lab69 = new TH1F("h_gammaD_1_cT_Z_lab69","h_gammaD_1_cT_Z_lab",5,0,50);
h_gammaD_1_cT_Z_lab69->SetBinContent(1,0.04371162);
h_gammaD_1_cT_Z_lab69->SetBinContent(2,0.02445529);
h_gammaD_1_cT_Z_lab69->SetBinContent(3,0.01502482);
h_gammaD_1_cT_Z_lab69->SetBinContent(4,0.01002103);
h_gammaD_1_cT_Z_lab69->SetBinContent(5,0.006787247);
h_gammaD_1_cT_Z_lab69->SetBinContent(6,0.03459914);
h_gammaD_1_cT_Z_lab69->SetEntries(79999);
Int_t ci; // for color index setting
TColor *color; // for color definition with alpha
ci = TColor::GetColor("#0000ff");
h_gammaD_1_cT_Z_lab69->SetLineColor(ci);
h_gammaD_1_cT_Z_lab69->SetLineWidth(2);
h_gammaD_1_cT_Z_lab69->SetMarkerStyle(20);
h_gammaD_1_cT_Z_lab69->GetXaxis()->SetLabelFont(42);
h_gammaD_1_cT_Z_lab69->GetXaxis()->SetLabelOffset(0.007);
h_gammaD_1_cT_Z_lab69->GetXaxis()->SetTitleSize(0.06);
h_gammaD_1_cT_Z_lab69->GetXaxis()->SetTitleOffset(0.95);
h_gammaD_1_cT_Z_lab69->GetXaxis()->SetTitleFont(42);
h_gammaD_1_cT_Z_lab69->GetYaxis()->SetLabelFont(42);
h_gammaD_1_cT_Z_lab69->GetYaxis()->SetLabelOffset(0.007);
h_gammaD_1_cT_Z_lab69->GetYaxis()->SetTitleSize(0.06);
h_gammaD_1_cT_Z_lab69->GetYaxis()->SetTitleOffset(1.3);
h_gammaD_1_cT_Z_lab69->GetYaxis()->SetTitleFont(42);
h_gammaD_1_cT_Z_lab69->GetZaxis()->SetLabelFont(42);
h_gammaD_1_cT_Z_lab69->GetZaxis()->SetLabelOffset(0.007);
h_gammaD_1_cT_Z_lab69->GetZaxis()->SetTitleSize(0.06);
h_gammaD_1_cT_Z_lab69->GetZaxis()->SetTitleFont(42);
h_gammaD_1_cT_Z_lab69->Draw("same");
TH1F *h_gammaD_2_cT_Z_lab70 = new TH1F("h_gammaD_2_cT_Z_lab70","h_gammaD_2_cT_Z_lab",5,0,50);
h_gammaD_2_cT_Z_lab70->SetBinContent(1,0.04590486);
h_gammaD_2_cT_Z_lab70->SetBinContent(2,0.02475454);
h_gammaD_2_cT_Z_lab70->SetBinContent(3,0.01457528);
h_gammaD_2_cT_Z_lab70->SetBinContent(4,0.008818965);
h_gammaD_2_cT_Z_lab70->SetBinContent(5,0.005946348);
h_gammaD_2_cT_Z_lab70->SetBinContent(6,0.02668493);
h_gammaD_2_cT_Z_lab70->SetEntries(79999);
ci = TColor::GetColor("#ff0000");
h_gammaD_2_cT_Z_lab70->SetLineColor(ci);
h_gammaD_2_cT_Z_lab70->SetLineWidth(2);
h_gammaD_2_cT_Z_lab70->SetMarkerStyle(20);
h_gammaD_2_cT_Z_lab70->GetXaxis()->SetLabelFont(42);
h_gammaD_2_cT_Z_lab70->GetXaxis()->SetLabelOffset(0.007);
h_gammaD_2_cT_Z_lab70->GetXaxis()->SetTitleSize(0.06);
h_gammaD_2_cT_Z_lab70->GetXaxis()->SetTitleOffset(0.95);
h_gammaD_2_cT_Z_lab70->GetXaxis()->SetTitleFont(42);
h_gammaD_2_cT_Z_lab70->GetYaxis()->SetLabelFont(42);
h_gammaD_2_cT_Z_lab70->GetYaxis()->SetLabelOffset(0.007);
h_gammaD_2_cT_Z_lab70->GetYaxis()->SetTitleSize(0.06);
h_gammaD_2_cT_Z_lab70->GetYaxis()->SetTitleOffset(1.3);
h_gammaD_2_cT_Z_lab70->GetYaxis()->SetTitleFont(42);
//.........这里部分代码省略.........
开发者ID:tahuang1991,项目名称:MuJetAnalysis,代码行数:101,代码来源:DarkSusy_mH_125_mGammaD_2000_cT_10_LHE_gammaD_Sorted_cT_Z_lab.C
示例7: 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
示例8: QMainWindow
NLSimpleGuiWindow::NLSimpleGuiWindow( NLSimple *model, QWidget *parent)
: QMainWindow(parent), ui(new Ui::NLSimpleGuiWindow), m_model(model),
m_ownsModel(model==NULL), m_fileName(""), m_equationPt(NULL),
m_programOptionsGui(NULL)
{
ui->setupUi(this);
if( !m_model ) openNewModel();
if( !m_model ) quit();
QMenu *fileMenu = ui->menuBar->addMenu( "&File" );
QAction *newAction = fileMenu->addAction( "&new model" );
QAction *openAction = fileMenu->addAction( "&open file" );
QAction *saveAction = fileMenu->addAction( "&save" );
QAction *saveAsAction = fileMenu->addAction( "save &as" );
QAction *quitAction = fileMenu->addAction( "&quit" );
connect( newAction, SIGNAL(triggered()), this, SLOT(openNewModel()) );
connect( openAction, SIGNAL(triggered()), this, SLOT(openExistingModel()) );
connect( saveAction, SIGNAL(triggered()), this, SLOT(saveModel()) );
connect( saveAsAction, SIGNAL(triggered()), this, SLOT(saveModelAs()) );
connect( quitAction, SIGNAL(triggered()), this, SLOT(quit()) );
TCanvas *can = ui->m_mathFormulaWidget->GetCanvas();
can->cd();
can->SetEditable( kTRUE );
m_equationPt = new TPaveText(0, 0, 1.0, 1.0, "NDC");
m_equationPt->SetBorderSize(0);
m_equationPt->SetTextAlign(12);
m_equationPt->Draw();
can->SetEditable( kFALSE );
can->Update();
//Add a button group so CLarke Error Grid buttons are mutually exclusive
m_clarkeButtonGroup = new QButtonGroup( this );
m_clarkeButtonGroup->addButton( ui->clarkCgmsVMeterRadioButton, 0 );
m_clarkeButtonGroup->addButton( ui->clarkePredVCGMSRadioButton, 1 );
ui->clarkCgmsVMeterRadioButton->setChecked(true);
connect( m_clarkeButtonGroup, SIGNAL(buttonClicked(int)),
this, SLOT(refreshClarkAnalysis()) );
//Make so Clarke Grid displays nice
can = ui->clarkeErrorGridWidget->GetCanvas();
can->cd();
can->Range(-45.17185,-46.4891,410.4746,410.6538);
can->SetFillColor(0);
can->SetBorderMode(0);
can->SetBorderSize(2);
can->SetRightMargin(0.031);
can->SetTopMargin(0.024);
can->SetFrameBorderMode(0);
QTabWidget *tw = ui->tabWidget;
tw->setTabText( tw->indexOf(ui->modelDisplyTab), "Display" );
tw->setTabText( tw->indexOf(ui->optionsTab), "Options" );
tw->setTabText( tw->indexOf(ui->clarkeGridTab), "Error Grid" );
tw->setTabText( tw->indexOf(ui->customEventsTab), "Custom Events" );
ui->endDisplayTime->setCalendarPopup(true);
ui->startDisplayTime->setCalendarPopup(true);
// ui->endDisplayTime->setDisplayFormat("MMM dd yy hh:mm AP");
// ui->startDisplayTime->setDisplayFormat("MMM dd yy hh:mm AP");
ui->tabWidget->setCurrentWidget(ui->customEventsTab);
m_customEventList = new QStandardItemModel(this/*ui->customEventLayout*/);
ui->customEventView->setModel(m_customEventList);
ui->customEventView->setShowGrid(false);
ui->customEventView->setAlternatingRowColors(true);
ui->customEventView->horizontalHeader()->setHidden(false);
connect( ui->geneticOptimizeButton, SIGNAL(clicked()), this, SLOT(doGeneticOptimization()) );
connect( ui->baysianFineTuneButton, SIGNAL(clicked()), this, SLOT(doMinuit2Fit()) );
connect( ui->addCgmsButton, SIGNAL(clicked()), this, SLOT(addCgmsData()) );
connect( ui->addMealDataButton, SIGNAL(clicked()), this, SLOT(addCarbData()) );
connect( ui->addMeterDataButton, SIGNAL(clicked()), this, SLOT(addMeterData()) );
connect( ui->addCustonDataBustom, SIGNAL(clicked()), this, SLOT(addCustomEventData()) );
connect( ui->redrawButton, SIGNAL(clicked()), this, SLOT(drawModel()) );
connect( ui->zoomIn, SIGNAL(clicked()), this, SLOT(zoomModelPreviewPlus()) );
connect( ui->zoomOut, SIGNAL(clicked()), this, SLOT(zoomModelPreviewMinus()) );
connect( ui->zoomIn, SIGNAL(clicked()), this, SLOT(zoomModelPreviewPlus()) );
connect( ui->endDisplayTime, SIGNAL(dateTimeChanged(QDateTime)), this, SLOT(checkDisplayTimeLimitsConsistency()) );
connect( ui->startDisplayTime, SIGNAL(dateTimeChanged(QDateTime)), this, SLOT(checkDisplayTimeLimitsConsistency()) );
connect( ui->endDisplayTime, SIGNAL(editingFinished()), this, SLOT(drawModel()) );
connect( ui->startDisplayTime, SIGNAL(editingFinished()), this, SLOT(drawModel()) );
connect( ui->addCustomEventButton, SIGNAL(clicked()), this, SLOT(addCustomEventDef()) );
connect( ui->deleteCustoEvenButton, SIGNAL(clicked()), this, SLOT(deleteCustomEventDef()) );
connect( ui->customEventView, SIGNAL(clicked(QModelIndex)), this, SLOT(drawSelectedCustomEvent()) );
init();
}//NLSimpleGuiWindow constructor
示例9: SegtoLCTXY_2016B_June22all_sameYrange_fullIntegral_10k9k_lin
void SegtoLCTXY_2016B_June22all_sameYrange_fullIntegral_10k9k_lin()
{
//=========Macro generated from canvas: SegtoLCTXY/SegtoLCTXY
//========= (Sat Aug 6 07:01:23 2016) by ROOT version6.06/01
TCanvas *SegtoLCTXY = new TCanvas("SegtoLCTXY", "SegtoLCTXY",0,0,500,500);
gStyle->SetOptStat(0);
SegtoLCTXY->SetHighLightColor(2);
SegtoLCTXY->Range(-6.125,-6.2275,45.125,56.2475);
SegtoLCTXY->SetFillColor(0);
SegtoLCTXY->SetBorderMode(0);
SegtoLCTXY->SetBorderSize(2);
SegtoLCTXY->SetFrameBorderMode(0);
SegtoLCTXY->SetFrameBorderMode(0);
TH1D *SegtoLCTXY_1__85 = new TH1D("SegtoLCTXY_1__85","SegtoLCTXY",100,-1,40);
SegtoLCTXY_1__85->SetBinContent(3,84.80773);
SegtoLCTXY_1__85->SetBinContent(4,4.770728);
SegtoLCTXY_1__85->SetBinContent(5,3.083512);
SegtoLCTXY_1__85->SetBinContent(6,2.259136);
SegtoLCTXY_1__85->SetBinContent(7,2.086507);
SegtoLCTXY_1__85->SetBinContent(8,0.5551299);
SegtoLCTXY_1__85->SetBinContent(9,0.2552041);
SegtoLCTXY_1__85->SetBinContent(10,0.1825503);
SegtoLCTXY_1__85->SetBinContent(11,0.171408);
SegtoLCTXY_1__85->SetBinContent(12,0.1286705);
SegtoLCTXY_1__85->SetBinContent(13,0.09341201);
SegtoLCTXY_1__85->SetBinContent(14,0.08776455);
SegtoLCTXY_1__85->SetBinContent(15,0.1098965);
SegtoLCTXY_1__85->SetBinContent(16,0.08196446);
SegtoLCTXY_1__85->SetBinContent(17,0.06944847);
SegtoLCTXY_1__85->SetBinContent(18,0.06517472);
SegtoLCTXY_1__85->SetBinContent(19,0.06883794);
SegtoLCTXY_1__85->SetBinContent(20,0.05067449);
SegtoLCTXY_1__85->SetBinContent(21,0.04685864);
SegtoLCTXY_1__85->SetBinContent(22,0.04853761);
SegtoLCTXY_1__85->SetBinContent(23,0.03953221);
SegtoLCTXY_1__85->SetBinContent(24,0.03663216);
SegtoLCTXY_1__85->SetBinContent(25,0.04319542);
SegtoLCTXY_1__85->SetBinContent(26,0.03876904);
SegtoLCTXY_1__85->SetBinContent(27,0.03312158);
SegtoLCTXY_1__85->SetBinContent(28,0.03144261);
SegtoLCTXY_1__85->SetBinContent(29,0.02991626);
SegtoLCTXY_1__85->SetBinContent(30,0.03602163);
SegtoLCTXY_1__85->SetBinContent(31,0.02671095);
SegtoLCTXY_1__85->SetBinContent(32,0.02045296);
SegtoLCTXY_1__85->SetBinContent(33,0.03037417);
SegtoLCTXY_1__85->SetBinContent(34,0.02579515);
SegtoLCTXY_1__85->SetBinContent(35,0.02503198);
SegtoLCTXY_1__85->SetBinContent(36,0.02640568);
SegtoLCTXY_1__85->SetBinContent(37,0.02167403);
SegtoLCTXY_1__85->SetBinContent(38,0.02075822);
SegtoLCTXY_1__85->SetBinContent(39,0.01831608);
SegtoLCTXY_1__85->SetBinContent(40,0.01831608);
SegtoLCTXY_1__85->SetBinContent(41,0.02045296);
SegtoLCTXY_1__85->SetBinContent(42,0.01831608);
SegtoLCTXY_1__85->SetBinContent(43,0.02030032);
SegtoLCTXY_1__85->SetBinContent(44,0.01846871);
SegtoLCTXY_1__85->SetBinContent(45,0.01587394);
SegtoLCTXY_1__85->SetBinContent(46,0.0157213);
SegtoLCTXY_1__85->SetBinContent(47,0.0148055);
SegtoLCTXY_1__85->SetBinContent(48,0.01678974);
SegtoLCTXY_1__85->SetBinContent(49,0.0148055);
SegtoLCTXY_1__85->SetBinContent(50,0.01419496);
SegtoLCTXY_1__85->SetBinContent(51,0.009768576);
SegtoLCTXY_1__85->SetBinContent(52,0.01327916);
SegtoLCTXY_1__85->SetBinContent(53,0.01083701);
SegtoLCTXY_1__85->SetBinContent(54,0.009768576);
SegtoLCTXY_1__85->SetBinContent(55,0.01175282);
SegtoLCTXY_1__85->SetBinContent(56,0.009005406);
SegtoLCTXY_1__85->SetBinContent(57,0.009615942);
SegtoLCTXY_1__85->SetBinContent(58,0.01098965);
SegtoLCTXY_1__85->SetBinContent(59,0.00839487);
SegtoLCTXY_1__85->SetBinContent(60,0.0076317);
SegtoLCTXY_1__85->SetBinContent(61,0.007173798);
SegtoLCTXY_1__85->SetBinContent(62,0.007326432);
SegtoLCTXY_1__85->SetBinContent(63,0.008547504);
SegtoLCTXY_1__85->SetBinContent(64,0.0076317);
SegtoLCTXY_1__85->SetBinContent(65,0.005800092);
SegtoLCTXY_1__85->SetBinContent(66,0.006715896);
SegtoLCTXY_1__85->SetBinContent(67,0.006410628);
SegtoLCTXY_1__85->SetBinContent(68,0.006257994);
SegtoLCTXY_1__85->SetBinContent(69,0.004884288);
SegtoLCTXY_1__85->SetBinContent(70,0.005647458);
SegtoLCTXY_1__85->SetBinContent(71,0.00610536);
SegtoLCTXY_1__85->SetBinContent(72,0.005952726);
SegtoLCTXY_1__85->SetBinContent(73,0.006257994);
SegtoLCTXY_1__85->SetBinContent(74,0.005647458);
SegtoLCTXY_1__85->SetBinContent(75,0.005647458);
SegtoLCTXY_1__85->SetBinContent(76,0.004121118);
SegtoLCTXY_1__85->SetBinContent(77,0.005800092);
SegtoLCTXY_1__85->SetBinContent(78,0.004731654);
SegtoLCTXY_1__85->SetBinContent(79,0.005189556);
SegtoLCTXY_1__85->SetBinContent(80,0.00381585);
SegtoLCTXY_1__85->SetBinContent(81,0.00381585);
SegtoLCTXY_1__85->SetBinContent(82,0.004731654);
SegtoLCTXY_1__85->SetBinContent(83,0.003510582);
SegtoLCTXY_1__85->SetBinContent(84,0.00228951);
SegtoLCTXY_1__85->SetBinContent(85,0.003663216);
SegtoLCTXY_1__85->SetBinContent(86,0.00305268);
SegtoLCTXY_1__85->SetBinContent(87,0.00305268);
//.........这里部分代码省略.........
开发者ID:senka,项目名称:CSC_eff_808,代码行数:101,代码来源:SegtoLCTXY_2016B_June22all_sameYrange_fullIntegral_10k9k_lin.C
示例10: TCanvas
plot()
{
//=========Macro generated from canvas: FigExample/FigExample
//========= (Thu Feb 11 11:37:37 2016) by ROOT version5.34/32
TCanvas *FigExample = new TCanvas("FigExample", "FigExample",1,23,1364,719);
gStyle->SetOptFit(1);
gStyle->SetOptStat(0);
gStyle->SetOptTitle(0);
FigExample->Range(-1158.419,-0.195,8561.764,1.43);
FigExample->SetFillColor(0);
FigExample->SetBorderMode(0);
FigExample->SetBorderSize(2);
FigExample->SetLeftMargin(0.12);
FigExample->SetRightMargin(0.04);
FigExample->SetTopMargin(0.08);
FigExample->SetBottomMargin(0.12);
FigExample->SetFrameFillStyle(0);
FigExample->SetFrameBorderMode(0);
FigExample->SetFrameFillStyle(0);
FigExample->SetFrameBorderMode(0);
TGraphErrors *gre = new TGraphErrors(11);
gre->SetName("Graph1");
gre->SetTitle("");
gre->SetFillColor(1);
gre->SetLineColor(4);
gre->SetMarkerColor(4);
gre->SetMarkerStyle(22);
gre->SetMarkerSize(1.5);
gre->SetPoint(0,8.892308,0.97914);
gre->SetPointError(0,0,0.00119056);
gre->SetPoint(1,10.38462,0.973453);
gre->SetPointError(1,0,0.00225169);
gre->SetPoint(2,23.53846,0.980456);
gre->SetPointError(2,0,0.00126418);
gre->SetPoint(3,43.84615,0.97976);
gre->SetPointError(3,0,0.001007);
gre->SetPoint(4,120.3077,0.971649);
gre->SetPointError(4,0,0.000816721);
gre->SetPoint(5,164.6154,0.970778);
gre->SetPointError(5,0,0.000914539);
gre->SetPoint(6,389.2308,0.953326);
gre->SetPointError(6,0,0.00131593);
gre->SetPoint(7,753.8462,0.942877);
gre->SetPointError(7,0,0.0019686);
gre->SetPoint(8,1266.154,0.914665);
gre->SetPointError(8,0,0.00283506);
gre->SetPoint(9,3400,0.867066);
gre->SetPointError(9,0,0.00370407);
gre->SetPoint(10,7430.769,0.807229);
gre->SetPointError(10,0,0.0060241);
TH1F *Graph_Graph_Graph116 = new TH1F("Graph_Graph_Graph116","",100,8.003077,8172.957);
Graph_Graph_Graph116->SetMinimum(0);
Graph_Graph_Graph116->SetMaximum(1.3);
Graph_Graph_Graph116->SetDirectory(0);
Graph_Graph_Graph116->SetStats(0);
Int_t ci; // for color index setting
TColor *color; // for color definition with alpha
ci = TColor::GetColor("#000099");
Graph_Graph_Graph116->SetLineColor(ci);
Graph_Graph_Graph116->SetLineStyle(0);
Graph_Graph_Graph116->SetMarkerStyle(20);
Graph_Graph_Graph116->GetXaxis()->SetTitle("Average rate ( N_{#mu}.s^{-1}.cm^{-2} )");
Graph_Graph_Graph116->GetXaxis()->CenterTitle(true);
Graph_Graph_Graph116->GetXaxis()->SetLabelFont(42);
Graph_Graph_Graph116->GetXaxis()->SetLabelOffset(0.01);
Graph_Graph_Graph116->GetXaxis()->SetLabelSize(0.05);
Graph_Graph_Graph116->GetXaxis()->SetTitleSize(0.05);
Graph_Graph_Graph116->GetXaxis()->SetTitleOffset(1.1);
Graph_Graph_Graph116->GetXaxis()->SetTitleFont(42);
Graph_Graph_Graph116->GetYaxis()->SetTitle("#mu detection efficiency");
Graph_Graph_Graph116->GetYaxis()->CenterTitle(true);
Graph_Graph_Graph116->GetYaxis()->SetLabelFont(42);
Graph_Graph_Graph116->GetYaxis()->SetLabelOffset(0.007);
Graph_Graph_Graph116->GetYaxis()->SetLabelSize(0.05);
Graph_Graph_Graph116->GetYaxis()->SetTitleSize(0.05);
Graph_Graph_Graph116->GetYaxis()->SetTitleOffset(0.9);
Graph_Graph_Graph116->GetYaxis()->SetTitleFont(42);
Graph_Graph_Graph116->GetZaxis()->SetLabelFont(42);
Graph_Graph_Graph116->GetZaxis()->SetLabelOffset(0.007);
Graph_Graph_Graph116->GetZaxis()->SetLabelSize(0.05);
Graph_Graph_Graph116->GetZaxis()->SetTitleSize(0.06);
Graph_Graph_Graph116->GetZaxis()->SetTitleFont(42);
gre->SetHistogram(Graph_Graph_Graph116);
gre->Draw("pa");
gre = new TGraphErrors(11);
gre->SetName("Graph3");
gre->SetTitle("");
gre->SetFillColor(1);
gre->SetLineColor(4);
gre->SetMarkerColor(4);
gre->SetMarkerStyle(23);
gre->SetMarkerSize(1.5);
gre->SetPoint(0,8.892308,0.945552);
gre->SetPointError(0,0,0.00222099);
gre->SetPoint(1,10.38462,0.937882);
//.........这里部分代码省略.........
示例11: limit
void limit()
{
//=========Macro generated from canvas: limit/limit
//========= (Thu Apr 27 14:38:33 2017) by ROOT version6.02/05
TCanvas *limit = new TCanvas("limit", "limit",0,0,600,600);
gStyle->SetOptFit(1);
gStyle->SetOptStat(0);
gStyle->SetOptTitle(0);
limit->SetHighLightColor(2);
limit->Range(0,0,1,1);
limit->SetFillColor(0);
limit->SetBorderMode(0);
limit->SetBorderSize(2);
limit->SetLeftMargin(0.16);
limit->SetRightMargin(0.04);
limit->SetTopMargin(0.06);
limit->SetBottomMargin(0.12);
limit->SetFrameFillStyle(0);
limit->SetFrameBorderMode(0);
// ------------>Primitives in pad: pad
TPad *pad = new TPad("pad", "pad",0,0,1,1);
pad->Draw();
pad->cd();
pad->Range(-59.99999,-2.046818,1565,15.01);
pad->SetFillColor(0);
pad->SetBorderMode(0);
pad->SetLogy();
pad->SetBorderSize(2);
pad->SetTickx(1);
pad->SetTicky(1);
pad->SetLeftMargin(0.16);
pad->SetRightMargin(0.04);
pad->SetTopMargin(0.06);
pad->SetBottomMargin(0.12);
pad->SetFrameFillStyle(0);
pad->SetFrameBorderMode(0);
pad->SetFrameFillStyle(0);
pad->SetFrameBorderMode(0);
TH1F *tmp01 = new TH1F("tmp01","Graph",100,200,1500);
tmp01->SetMinimum(0.);
tmp01->SetMaximum(13.98659);
tmp01->SetStats(0);
tmp01->SetLineStyle(0);
tmp01->SetMarkerStyle(20);
tmp01->GetXaxis()->SetTitle("m_{H} (GeV)");
tmp01->GetXaxis()->SetLabelFont(42);
tmp01->GetXaxis()->SetLabelOffset(0.01);
tmp01->GetXaxis()->SetTitleSize(0.05);
tmp01->GetXaxis()->SetTickLength(0.02);
tmp01->GetXaxis()->SetTitleOffset(1.08);
tmp01->GetXaxis()->SetTitleFont(42);
tmp01->GetYaxis()->SetTitle("95% CL limit on #sigma/#sigma_{SM}");
tmp01->GetYaxis()->SetLabelFont(42);
tmp01->GetYaxis()->SetLabelOffset(0.007);
tmp01->GetYaxis()->SetTitleSize(0.05);
tmp01->GetYaxis()->SetTickLength(0.02);
tmp01->GetYaxis()->SetTitleOffset(1.56);
tmp01->GetYaxis()->SetTitleFont(42);
tmp01->GetZaxis()->SetLabelFont(42);
tmp01->GetZaxis()->SetLabelOffset(0.007);
tmp01->GetZaxis()->SetTitleSize(0.05);
tmp01->GetZaxis()->SetTickLength(0.02);
tmp01->GetZaxis()->SetTitleFont(42);
tmp01->Draw("AXIS");
TH1F *tmp02 = new TH1F("tmp02","Graph",100,200,1500);
tmp02->SetMinimum(0);
tmp02->SetMaximum(13.98659);
tmp02->SetStats(0);
tmp02->SetLineStyle(0);
tmp02->SetMarkerStyle(20);
tmp02->GetXaxis()->SetTitle("m_{H} (GeV)");
tmp02->GetXaxis()->SetLabelFont(42);
tmp02->GetXaxis()->SetLabelOffset(0.01);
tmp02->GetXaxis()->SetTitleSize(0.05);
tmp02->GetXaxis()->SetTickLength(0.02);
tmp02->GetXaxis()->SetTitleOffset(1.08);
tmp02->GetXaxis()->SetTitleFont(42);
tmp02->GetYaxis()->SetTitle("95% CL limit on #sigma/#sigma_{SM}");
tmp02->GetYaxis()->SetLabelFont(42);
tmp02->GetYaxis()->SetLabelOffset(0.007);
tmp02->GetYaxis()->SetTitleSize(0.05);
tmp02->GetYaxis()->SetTickLength(0.02);
tmp02->GetYaxis()->SetTitleOffset(1.56);
tmp02->GetYaxis()->SetTitleFont(42);
tmp02->GetZaxis()->SetLabelFont(42);
tmp02->GetZaxis()->SetLabelOffset(0.007);
tmp02->GetZaxis()->SetTitleSize(0.05);
tmp02->GetZaxis()->SetTickLength(0.02);
tmp02->GetZaxis()->SetTitleFont(42);
tmp02->Draw("AXIGSAME");
Double_t Graph0_fx3001[27] = {
200,
250,
300,
350,
400,
//.........这里部分代码省略.........
示例12: TFile
void
Unfolded (
bool drawRatio = 1,
int differential = 0,
int nsel = 0,
int ReBin = 1,
TString XTitle = "p_{T,max}^{l} (GeV)",
TString units = "",
TString plotName = "data/XSLeadingPt_AN.root",
TString outputName = "WW_LeadingPt_final",
bool isLogY = false,
double lumi = 19.5
)
{
gInterpreter->ExecuteMacro("GoodStyle.C");
std::cout << "reading " << plotName << std::endl ;
TFile* file = new TFile(plotName, "read");
//---- prepare the object that is making the plots
//---- ---- ---- ---- ---- ---- ---- ---- ---- ----
std::cout << "setting up the plot object " << std::endl ;
TH1F* xsValue = (TH1F*) xsValue->Clone();
TH1F* xsValue_Powheg = (TH1F*) xsValue_Powheg->Clone();
TH1F* xsValue_Madgraph = (TH1F*) xsValue_Madgraph->Clone();
TH1F* xsValue_MCnlo = (TH1F*) xsValue_MCnlo->Clone();
TH1F* systHisto = (TH1F*) systHisto->Clone();
TCanvas* canvas ;
TPad *pad1, *pad2, *pad3, *pad4;
if (drawRatio) {
canvas = new TCanvas("wwxs", "wwxs", 600, 850);
gStyle->SetOptStat(0);
gStyle->SetOptTitle(0);
canvas->SetHighLightColor(2);
canvas->Range(0,0,1,1);
canvas->SetFillColor(0);
canvas->SetBorderMode(0);
canvas->SetBorderSize(2);
canvas->SetTickx(1);
canvas->SetTicky(1);
canvas->SetLeftMargin(0.16);
canvas->SetRightMargin(0.02);
canvas->SetTopMargin(0.05);
canvas->SetBottomMargin(0.13);
canvas->SetFrameFillStyle(0);
canvas->SetFrameBorderMode(0);
pad1 = new TPad("pad1", "pad1",0.01,0.55,0.99,0.99);
pad1->Draw();
pad1->cd();
pad1->Range(-147.2973,-5.811723,960.8108,2.535539);
pad1->SetFillColor(0);
pad1->SetBorderMode(0);
pad1->SetBorderSize(2);
pad1->SetLogy();
pad1->SetTickx(1);
pad1->SetTicky(1);
pad1->SetLeftMargin(0.16);
pad1->SetBottomMargin(0);
pad1->SetFrameFillStyle(0);
pad1->SetFrameBorderMode(0);
pad1->SetFrameFillStyle(0);
pad1->SetFrameBorderMode(0);
}
else {
canvas = new TCanvas("wwxs", "wwxs", 550, 550);
}
if (drawRatio) pad1->cd();
std::cout << " now plot " << std::endl;
//Plot Data
xsValue->SetLineWidth(1);
xsValue->SetMarkerSize(1.0);
int NBins = xsValue->GetNbinsX();
for(int i=1; i <NBins; i++) {
float err_stat = xsValue->GetBinError(i);
float err_syst = systHisto->GetBinError(i);
float err_total = sqrt(err_stat*err_stat + err_syst*err_syst);
xsValue->SetBinError(i, err_total);
}
//-- Plot Powheg
//.........这里部分代码省略.........
示例13: makePlot
void makePlot(TFile * f, TString name){
TProfile * p3 = ((TH2D*)f->Get("hFinalFPos"))->ProfileX();
p3->SetTitle("Linearity Check for F_{R}");
p3->GetYaxis()->SetTitle("F_{R} output");
p3->GetYaxis()->SetLabelFont(42);
p3->GetYaxis()->SetLabelSize(0.06);
p3->GetYaxis()->SetTitleSize(0.06);
p3->GetYaxis()->SetTitleOffset(0.48);
p3->GetYaxis()->SetTitleFont(42);
p3->GetXaxis()->SetTitle("nPEX");
p3->GetXaxis()->SetLabelFont(42);
p3->GetXaxis()->SetLabelOffset(0.006);
p3->GetXaxis()->SetLabelSize(0.06);
p3->GetXaxis()->SetTitleSize(0.06);
p3->GetXaxis()->SetTitleOffset(0.66);
p3->GetXaxis()->SetTitleFont(42);
TProfile * p2 = ((TH2D*)f->Get("hFinalF0"))->ProfileX();
p2->SetTitle("Linearity Check for F_{0}");
p2->GetYaxis()->SetTitle("F_{0} output");
p2->GetYaxis()->SetLabelFont(42);
p2->GetYaxis()->SetLabelSize(0.06);
p2->GetYaxis()->SetTitleSize(0.06);
p2->GetYaxis()->SetTitleOffset(0.48);
p2->GetYaxis()->SetTitleFont(42);
p2->GetXaxis()->SetTitle("F0 input");
p2->GetXaxis()->SetLabelFont(42);
p2->GetXaxis()->SetLabelOffset(0.006);
p2->GetXaxis()->SetLabelSize(0.06);
p2->GetXaxis()->SetTitleSize(0.06);
p2->GetXaxis()->SetTitleOffset(0.66);
p2->GetXaxis()->SetTitleFont(42);
TProfile * p1 = ((TH2D*)f->Get("hFinalFNeg"))->ProfileX();
p1->SetTitle("Linearity Check for F_{L}");
p1->GetYaxis()->SetTitle("F_{L} output");
p1->GetYaxis()->SetLabelFont(42);
p1->GetYaxis()->SetLabelSize(0.06);
p1->GetYaxis()->SetTitleSize(0.06);
p1->GetYaxis()->SetTitleOffset(0.48);
p1->GetYaxis()->SetTitleFont(42);
p1->GetXaxis()->SetTitle("FL input");
p1->GetXaxis()->SetLabelFont(42);
p1->GetXaxis()->SetLabelOffset(0.006);
p1->GetXaxis()->SetLabelSize(0.06);
p1->GetXaxis()->SetTitleSize(0.06);
p1->GetXaxis()->SetTitleOffset(0.66);
p1->GetXaxis()->SetTitleFont(42);
TCanvas *c = new TCanvas("c", "c",205,89,600,602);
c->Range(0,0,1,1);
c->SetFillColor(0);
c->SetBorderMode(0);
c->SetBorderSize(2);
c->SetLeftMargin(0.12);
c->SetRightMargin(0.01);
c->SetTopMargin(0.04);
c->SetFrameBorderMode(0);
c->Divide(1,3);
c->cd(1); p1->Draw();
c->cd(2); p2->Draw();
c->cd(3); p3->Draw();
c->SaveAs(name+".C");
}
示例14: picture2
void picture2()
{
//=========Macro generated from canvas: c/
//========= (Wed Jul 15 12:53:51 2015) by ROOT version6.04/00
TCanvas *c = new TCanvas("c", "",0,45,600,500);
c->SetHighLightColor(2);
c->Range(-150,-150,1350,150);
c->SetFillColor(0);
c->SetBorderMode(0);
c->SetBorderSize(2);
c->SetFrameBorderMode(0);
c->SetFrameBorderMode(0);
Double_t _fx11[1] = {
792.688};
Double_t _fy11[1] = {
20.02759};
TGraph *graph = new TGraph(1,_fx11,_fy11);
graph->SetName("");
graph->SetTitle("Event 2");
graph->SetFillColor(1);
Int_t ci; // for color index setting
TColor *color; // for color definition with alpha
ci = TColor::GetColor("#0000ff");
graph->SetMarkerColor(ci);
graph->SetMarkerStyle(20);
TH1F *Graph_Graph11 = new TH1F("Graph_Graph11","Event 2",100,0,1200);
Graph_Graph11->SetMinimum(-120);
Graph_Graph11->SetMaximum(120);
Graph_Graph11->SetDirectory(0);
Graph_Graph11->SetStats(0);
ci = TColor::GetColor("#000099");
Graph_Graph11->SetLineColor(ci);
Graph_Graph11->GetXaxis()->SetTitle("Z [cm]");
Graph_Graph11->GetXaxis()->SetLabelFont(42);
Graph_Graph11->GetXaxis()->SetLabelSize(0.035);
Graph_Graph11->GetXaxis()->SetTitleSize(0.035);
Graph_Graph11->GetXaxis()->SetTitleFont(42);
Graph_Graph11->GetYaxis()->SetTitle("Y [cm]");
Graph_Graph11->GetYaxis()->SetLabelFont(42);
Graph_Graph11->GetYaxis()->SetLabelSize(0.035);
Graph_Graph11->GetYaxis()->SetTitleSize(0.035);
Graph_Graph11->GetYaxis()->SetTitleFont(42);
Graph_Graph11->GetZaxis()->SetLabelFont(42);
Graph_Graph11->GetZaxis()->SetLabelSize(0.035);
Graph_Graph11->GetZaxis()->SetTitleSize(0.035);
Graph_Graph11->GetZaxis()->SetTitleFont(42);
graph->SetHistogram(Graph_Graph11);
graph->Draw("ap");
Double_t _fx12[1] = {
792.688};
Double_t _fy12[1] = {
20.02759};
graph = new TGraph(1,_fx12,_fy12);
graph->SetName("");
graph->SetTitle("Event 2");
graph->SetFillColor(1);
ci = TColor::GetColor("#0000ff");
graph->SetMarkerColor(ci);
graph->SetMarkerStyle(20);
TH1F *Graph_Graph_Graph1112 = new TH1F("Graph_Graph_Graph1112","Event 2",100,0,1200);
Graph_Graph_Graph1112->SetMinimum(-120);
Graph_Graph_Graph1112->SetMaximum(120);
Graph_Graph_Graph1112->SetDirectory(0);
Graph_Graph_Graph1112->SetStats(0);
ci = TColor::GetColor("#000099");
Graph_Graph_Graph1112->SetLineColor(ci);
Graph_Graph_Graph1112->GetXaxis()->SetTitle("Z [cm]");
Graph_Graph_Graph1112->GetXaxis()->SetLabelFont(42);
Graph_Graph_Graph1112->GetXaxis()->SetLabelSize(0.035);
Graph_Graph_Graph1112->GetXaxis()->SetTitleSize(0.035);
Graph_Graph_Graph1112->GetXaxis()->SetTitleFont(42);
Graph_Graph_Graph1112->GetYaxis()->SetTitle("Y [cm]");
Graph_Graph_Graph1112->GetYaxis()->SetLabelFont(42);
Graph_Graph_Graph1112->GetYaxis()->SetLabelSize(0.035);
Graph_Graph_Graph1112->GetYaxis()->SetTitleSize(0.035);
Graph_Graph_Graph1112->GetYaxis()->SetTitleFont(42);
Graph_Graph_Graph1112->GetZaxis()->SetLabelFont(42);
Graph_Graph_Graph1112->GetZaxis()->SetLabelSize(0.035);
Graph_Graph_Graph1112->GetZaxis()->SetTitleSize(0.035);
Graph_Graph_Graph1112->GetZaxis()->SetTitleFont(42);
graph->SetHistogram(Graph_Graph_Graph1112);
graph->Draw("p");
Double_t _fx13[1] = {
801.6865};
Double_t _fy13[1] = {
111.6076};
graph = new TGraph(1,_fx13,_fy13);
graph->SetName("");
graph->SetTitle("");
//.........这里部分代码省略.........
示例15: SegX_2016B_June22all_sameYrange_fullIntegral_10k9k
void SegX_2016B_June22all_sameYrange_fullIntegral_10k9k()
{
//=========Macro generated from canvas: SegX/SegX
//========= (Fri Aug 5 09:22:37 2016) by ROOT version6.06/01
TCanvas *SegX = new TCanvas("SegX", "SegX",0,0,500,500);
gStyle->SetOptStat(0);
SegX->SetHighLightColor(2);
SegX->Range(-125,-2.848556,125,2.626708);
SegX->SetFillColor(0);
SegX->SetBorderMode(0);
SegX->SetBorderSize(2);
SegX->SetLogy();
SegX->SetFrameBorderMode(0);
SegX->SetFrameBorderMode(0);
TH1D *SegX_1__19 = new TH1D("SegX_1__19","SegX",100,-100,100);
SegX_1__19->SetBinContent(0,399.7427);
SegX_1__19->SetBinContent(39,0.0007394809);
SegX_1__19->SetBinContent(40,0.01109221);
SegX_1__19->SetBinContent(41,0.02366339);
SegX_1__19->SetBinContent(42,0.04880574);
SegX_1__19->SetBinContent(43,0.09613251);
SegX_1__19->SetBinContent(44,0.5671818);
SegX_1__19->SetBinContent(45,1.913037);
SegX_1__19->SetBinContent(46,3.895585);
SegX_1__19->SetBinContent(47,8.348);
SegX_1__19->SetBinContent(48,11.60985);
SegX_1__19->SetBinContent(49,11.7363);
SegX_1__19->SetBinContent(50,12.04171);
SegX_1__19->SetBinContent(51,12.05058);
SegX_1__19->SetBinContent(52,11.89159);
SegX_1__19->SetBinContent(53,11.26081);
SegX_1__19->SetBinContent(54,8.149079);
SegX_1__19->SetBinContent(55,3.796495);
SegX_1__19->SetBinContent(56,1.839089);
SegX_1__19->SetBinContent(57,0.5302078);
SegX_1__19->SetBinContent(58,0.09835096);
SegX_1__19->SetBinContent(59,0.05472159);
SegX_1__19->SetBinContent(60,0.02292391);
SegX_1__19->SetBinContent(61,0.008873771);
SegX_1__19->SetBinContent(62,0.005176366);
SegX_1__19->SetMinimum(0.005);
SegX_1__19->SetMaximum(120);
SegX_1__19->SetEntries(675802);
SegX_1__19->SetStats(0);
Int_t ci; // for color index setting
TColor *color; // for color definition with alpha
ci = TColor::GetColor("#ff00ff");
SegX_1__19->SetLineColor(ci);
ci = TColor::GetColor("#ff00ff");
SegX_1__19->SetMarkerColor(ci);
SegX_1__19->GetXaxis()->SetTitle("cm");
SegX_1__19->GetYaxis()->SetTitle("scaled number of entries");
SegX_1__19->Draw("H");
TLegend *leg = new TLegend(0.5,0.7,0.9,0.9,NULL,"brNDC");
leg->SetBorderSize(1);
leg->SetTextFont(62);
leg->SetTextSize(0.02);
leg->SetLineColor(1);
leg->SetLineStyle(1);
leg->SetLineWidth(1);
leg->SetFillColor(0);
leg->SetFillStyle(1001);
TLegendEntry *entry=leg->AddEntry("SegX_1","ME11A: mean:-0.0cm;RMS:5.4cm","l");
ci = TColor::GetColor("#ff00ff");
entry->SetLineColor(ci);
entry->SetLineStyle(1);
entry->SetLineWidth(1);
entry->SetMarkerColor(1);
entry->SetMarkerStyle(21);
entry->SetMarkerSize(1);
entry->SetTextFont(62);
entry=leg->AddEntry("SegX_2","ME11B: mean:-0.1cm;RMS:8.4cm","l");
ci = TColor::GetColor("#ff9999");
entry->SetLineColor(ci);
entry->SetLineStyle(1);
entry->SetLineWidth(1);
entry->SetMarkerColor(1);
entry->SetMarkerStyle(21);
entry->SetMarkerSize(1);
entry->SetTextFont(62);
entry=leg->AddEntry("SegX_3","ME12+13: mean:-0.1cm;RMS:17.6cm","l");
entry->SetLineColor(1);
entry->SetLineStyle(1);
entry->SetLineWidth(1);
entry->SetMarkerColor(1);
entry->SetMarkerStyle(21);
entry->SetMarkerSize(1);
entry->SetTextFont(62);
entry=leg->AddEntry("SegX_4","ME2: mean:-0.1cm;RMS:23.2cm","l");
ci = TColor::GetColor("#ff0000");
entry->SetLineColor(ci);
entry->SetLineStyle(1);
entry->SetLineWidth(1);
//.........这里部分代码省略.........