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


C++ TMultiGraph::SetName方法代码示例

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


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

示例1: DrawMap

void ExpManager::DrawMap(TString NameTitle, double xmin, double xmax, double ymin, double ymax, double zmin, double zmax) {

    TMultiGraph *mg = new TMultiGraph();
    
    //Draw a cross
    TGraphErrors *frame = new TGraphErrors(); //= new TGraph2DErrors(np, x_array, y_array, bz_array, ex, ey, ez);
    frame->SetPoint(0,+0,+100);
    frame->SetPoint(1,+0,-100);
    frame->SetPoint(2,0,0); 
    frame->SetPoint(3,-100,0); 
    frame->SetPoint(4,+100,0);
    frame->SetPoint(5,+0,+0); 
    frame->SetPoint(6,+0,-100);
    frame->SetMarkerColor(kWhite);
    frame->SetDrawOption("ap");
    
    //Draw the map 
    TGraphErrors *fGraph = new TGraphErrors(); //= new TGraph2DErrors(np, x_array, y_array, bz_array, ex, ey, ez);
    fGraph->SetMarkerSize(1.2);
    fGraph->SetMarkerStyle(20);
    fGraph->SetMarkerColor(kBlue);
    fGraph->SetLineColor(kBlue);
    fGraph->SetLineWidth(1);
    //fGraph->SetDrawOption("ap");
    
    int graph_counter = 0 ; 
   for (unsigned i=0; i< fExpY.size(); i++)   {
        if( (fExpX.at(i) >= xmin && fExpX.at(i) <= xmax) && (fExpY.at(i) >= ymin && fExpY.at(i) <= ymax) && (fExpZ.at(i) >= zmin && fExpZ.at(i) <= zmax) ) {
            fGraph->SetPoint(graph_counter,fExpX.at(i),fExpY.at(i));    
            fGraph->SetPointError(graph_counter,fExpXErr.at(i),fExpYErr.at(i)); 
            graph_counter++;
        } 
   }

    //fGraph->Write();
    mg->SetTitle(NameTitle+Form(" Map : %.2f < X < %.2f mm    %.2f < Y < %.2f mm    %.2f < Z < %.2f mm;X (mm);Y (mm)",xmin,xmax,ymin,ymax,zmin,zmax));
    mg->SetName(NameTitle+Form("_Map__X_%.2f_%.2fmm__Y_%.2f_%.2fmm__Z_%.2f_%.2fmm",xmin,xmax,ymin,ymax,zmin,zmax));
    mg->Add(frame); 
    mg->Add(fGraph);
    mg->Write();
}
开发者ID:moukaddam,项目名称:LensMapper,代码行数:41,代码来源:ExpManager.cpp

示例2: result_JES_akPu4PF_

void result_JES_akPu4PF_(refpt> 75 && refpt < 120)&&(abs(refeta)<2)_Centrality()
{
//=========Macro generated from canvas: Can_result_0/
//=========  (Mon Apr 18 02:39:41 2016) by ROOT version6.02/13
   TCanvas *Can_result_0 = new TCanvas("Can_result_0", "",18,40,700,500);
   gStyle->SetOptFit(1);
   Can_result_0->Range(-18.75,0.9236134,118.75,1.043845);
   Can_result_0->SetFillColor(0);
   Can_result_0->SetBorderMode(0);
   Can_result_0->SetBorderSize(2);
   Can_result_0->SetFrameBorderMode(0);
   Can_result_0->SetFrameBorderMode(0);
   
   TMultiGraph *multigraph = new TMultiGraph();
   multigraph->SetName("name");
   multigraph->SetTitle("JES_akPu4PF");
   
   Double_t Graph_fx1001[4] = {
   5,
   20,
   40,
   75};
   Double_t Graph_fy1001[4] = {
   1.025461,
   0.982262,
   0.9644553,
   0.970611};
   Double_t Graph_fex1001[4] = {
   5,
   10,
   10,
   25};
   Double_t Graph_fey1001[4] = {
   0.001598024,
   0.0009318739,
   0.0008002418,
   0.0004502591};
   TGraphErrors *gre = new TGraphErrors(4,Graph_fx1001,Graph_fy1001,Graph_fex1001,Graph_fey1001);
   gre->SetName("Graph");
   gre->SetTitle("some title_0");
   gre->SetFillColor(1);
   gre->SetFillStyle(0);
   
   TH1F *Graph_Graph1001 = new TH1F("Graph_Graph1001","some title_0",100,0,110);
   Graph_Graph1001->SetMinimum(0.9573146);
   Graph_Graph1001->SetMaximum(1.0334);
   Graph_Graph1001->SetDirectory(0);
   Graph_Graph1001->SetStats(0);

   Int_t ci;      // for color index setting
   TColor *color; // for color definition with alpha
   ci = TColor::GetColor("#000099");
   Graph_Graph1001->SetLineColor(ci);
   Graph_Graph1001->GetXaxis()->SetLabelFont(42);
   Graph_Graph1001->GetXaxis()->SetLabelSize(0.035);
   Graph_Graph1001->GetXaxis()->SetTitleSize(0.035);
   Graph_Graph1001->GetXaxis()->SetTitleFont(42);
   Graph_Graph1001->GetYaxis()->SetLabelFont(42);
   Graph_Graph1001->GetYaxis()->SetLabelSize(0.035);
   Graph_Graph1001->GetYaxis()->SetTitleSize(0.035);
   Graph_Graph1001->GetYaxis()->SetTitleFont(42);
   Graph_Graph1001->GetZaxis()->SetLabelFont(42);
   Graph_Graph1001->GetZaxis()->SetLabelSize(0.035);
   Graph_Graph1001->GetZaxis()->SetTitleSize(0.035);
   Graph_Graph1001->GetZaxis()->SetTitleFont(42);
   gre->SetHistogram(Graph_Graph1001);
   
   multigraph->Add(gre,"");
   
   Double_t Graph_fx1002[4] = {
   5,
   20,
   40,
   75};
   Double_t Graph_fy1002[4] = {
   1.025808,
   0.9823451,
   0.964104,
   0.9707841};
   Double_t Graph_fex1002[4] = {
   5,
   10,
   10,
   25};
   Double_t Graph_fey1002[4] = {
   0.001641175,
   0.0009556419,
   0.0008206184,
   0.000461058};
   gre = new TGraphErrors(4,Graph_fx1002,Graph_fy1002,Graph_fex1002,Graph_fey1002);
   gre->SetName("Graph");
   gre->SetTitle("some title_1");
   gre->SetFillColor(1);
   gre->SetFillStyle(0);
   gre->SetLineColor(2);
   gre->SetMarkerColor(2);
   
   TH1F *Graph_Graph1002 = new TH1F("Graph_Graph1002","some title_1",100,0,110);
   Graph_Graph1002->SetMinimum(0.9568668);
   Graph_Graph1002->SetMaximum(1.033866);
//.........这里部分代码省略.........
开发者ID:Jelov,项目名称:JetEnergy_SR,代码行数:101,代码来源:result_JES_akPu4PF_(refpt>+75+&&+refpt+<+120)&&(abs(refeta)<2)_Centrality.C

示例3: Final_av_Lambda_VarCoupling_40Percent

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

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

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

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

示例4: BSA_InCoherent_t

void BSA_InCoherent_t()
{
//=========Macro generated from canvas: c17/Incoherent channe
//=========  (Tue Aug 21 12:00:26 2018) by ROOT version6.09/01
   TCanvas *c17 = new TCanvas("c17", "Incoherent channe",0,0,1200,400);
   gStyle->SetOptFit(1);
   c17->Range(0,0,1,1);
   c17->SetFillColor(0);
   c17->SetBorderMode(0);
   c17->SetBorderSize(2);
   c17->SetLeftMargin(0.025);
   c17->SetRightMargin(0.02325581);
   c17->SetFrameBorderMode(0);
  
// ------------>Primitives in pad: c17_1
   TPad *c17_1 = new TPad("c17_1", "Incoherent channe_1",0,0,0.262936,0.9);
   c17_1->Draw();
   c17_1->cd();
   c17_1->Range(-32.86883,-0.4888889,353.6809,0.4);
   c17_1->SetFillColor(0);
   c17_1->SetBorderMode(0);
   c17_1->SetBorderSize(2);
   c17_1->SetGridx();
   c17_1->SetGridy();
   c17_1->SetRightMargin(0);
   c17_1->SetTopMargin(0);
   c17_1->SetFrameBorderMode(0);
   c17_1->SetFrameBorderMode(0);
   
   TMultiGraph *multigraph = new TMultiGraph();
   multigraph->SetName("");
   multigraph->SetTitle("0.05<-t<0.21 [GeV^{2}/c^{2}]");
   
   Double_t Graph_fx1154[9] = {
   21.59954,
   59.03178,
   96.06391,
   141.7703,
   179.2242,
   222.8541,
   259.5793,
   303.38,
   337.8675};
   Double_t Graph_fy1154[9] = {
   0.1020231,
   0.03114899,
   0.2309077,
   0.1341245,
   0.01684177,
   -0.1267998,
   -0.2824572,
   -0.2260703,
   -0.0186068};
   Double_t Graph_fex1154[9] = {
   0,
   0,
   0,
   0,
   0,
   0,
   0,
   0,
   0};
   Double_t Graph_fey1154[9] = {
   0.04242532,
   0.05165487,
   0.05483741,
   0.07646672,
   0.1006626,
   0.09089962,
   0.05905575,
   0.04462244,
   0.05521722};
   TGraphErrors *gre = new TGraphErrors(9,Graph_fx1154,Graph_fy1154,Graph_fex1154,Graph_fey1154);
   gre->SetName("Graph");
   gre->SetTitle("Graph");
   gre->SetFillColor(1);

   Int_t ci;      // for color index setting
   TColor *color; // for color definition with alpha
   ci = TColor::GetColor("#00ff00");
   gre->SetMarkerColor(ci);
   gre->SetMarkerStyle(21);
   
   TH1F *Graph_Graph1154 = new TH1F("Graph_Graph1154","Graph",100,0,369.4943);
   Graph_Graph1154->SetMinimum(-0.4042387);
   Graph_Graph1154->SetMaximum(0.3484709);
   Graph_Graph1154->SetDirectory(0);
   Graph_Graph1154->SetStats(0);

   ci = TColor::GetColor("#000099");
   Graph_Graph1154->SetLineColor(ci);
   Graph_Graph1154->GetXaxis()->SetLabelFont(42);
   Graph_Graph1154->GetXaxis()->SetLabelSize(0.035);
   Graph_Graph1154->GetXaxis()->SetTitleSize(0.035);
   Graph_Graph1154->GetXaxis()->SetTitleFont(42);
   Graph_Graph1154->GetYaxis()->SetLabelFont(42);
   Graph_Graph1154->GetYaxis()->SetLabelSize(0.035);
   Graph_Graph1154->GetYaxis()->SetTitleSize(0.035);
   Graph_Graph1154->GetYaxis()->SetTitleFont(42);
//.........这里部分代码省略.........
开发者ID:Hattawy,项目名称:He-DVCS-Analysis-note-v2,代码行数:101,代码来源:BSA_InCoherent_t.C

示例5: Pythia8_Dijet30_result_JER_akPu4PF_

void Pythia8_Dijet30_result_JER_akPu4PF_(abs(refeta)<2)&&(hiBin>60)_refpt()
{
//=========Macro generated from canvas: Can_result_3/
//=========  (Mon Apr 18 03:09:33 2016) by ROOT version6.02/13
   TCanvas *Can_result_3 = new TCanvas("Can_result_3", "",18,40,700,500);
   gStyle->SetOptFit(1);
   Can_result_3->Range(-2.301397,-0.01150186,237.5545,0.3828568);
   Can_result_3->SetFillColor(0);
   Can_result_3->SetBorderMode(0);
   Can_result_3->SetBorderSize(2);
   Can_result_3->SetFrameBorderMode(0);
   Can_result_3->SetFrameBorderMode(0);
   
   TMultiGraph *multigraph = new TMultiGraph();
   multigraph->SetName("name");
   multigraph->SetTitle("JER_akPu4PF");
   
   Double_t Graph_fx1007[11] = {
   45,
   55,
   65,
   75,
   85,
   95,
   105,
   115,
   130,
   150,
   180};
   Double_t Graph_fy1007[11] = {
   0.1976721,
   0.1639212,
   0.1562002,
   0.1480066,
   0.1479035,
   0.1333827,
   0.1160421,
   0.1205967,
   0.1105508,
   0.08141581,
   0.09210746};
   Double_t Graph_fex1007[11] = {
   5,
   5,
   5,
   5,
   5,
   5,
   5,
   5,
   10,
   10,
   20};
   Double_t Graph_fey1007[11] = {
   0.001003849,
   0.001317066,
   0.001658995,
   0.002251738,
   0.003095601,
   0.004152981,
   0.005688263,
   0.008277583,
   0.006320737,
   0.01258781,
   0.01599127};
   TGraphErrors *gre = new TGraphErrors(11,Graph_fx1007,Graph_fy1007,Graph_fex1007,Graph_fey1007);
   gre->SetName("Graph");
   gre->SetTitle("some title_0");
   gre->SetFillColor(1);
   gre->SetFillStyle(0);
   
   TH1F *Graph_Graph1007 = new TH1F("Graph_Graph1007","some title_0",100,24,216);
   Graph_Graph1007->SetMinimum(0.0558432);
   Graph_Graph1007->SetMaximum(0.2116608);
   Graph_Graph1007->SetDirectory(0);
   Graph_Graph1007->SetStats(0);

   Int_t ci;      // for color index setting
   TColor *color; // for color definition with alpha
   ci = TColor::GetColor("#000099");
   Graph_Graph1007->SetLineColor(ci);
   Graph_Graph1007->GetXaxis()->SetLabelFont(42);
   Graph_Graph1007->GetXaxis()->SetLabelSize(0.035);
   Graph_Graph1007->GetXaxis()->SetTitleSize(0.035);
   Graph_Graph1007->GetXaxis()->SetTitleFont(42);
   Graph_Graph1007->GetYaxis()->SetLabelFont(42);
   Graph_Graph1007->GetYaxis()->SetLabelSize(0.035);
   Graph_Graph1007->GetYaxis()->SetTitleSize(0.035);
   Graph_Graph1007->GetYaxis()->SetTitleFont(42);
   Graph_Graph1007->GetZaxis()->SetLabelFont(42);
   Graph_Graph1007->GetZaxis()->SetLabelSize(0.035);
   Graph_Graph1007->GetZaxis()->SetTitleSize(0.035);
   Graph_Graph1007->GetZaxis()->SetTitleFont(42);
   gre->SetHistogram(Graph_Graph1007);
   
   multigraph->Add(gre,"");
   
   Double_t Graph_fx1008[10] = {
   33.60148,
   40.66353,
//.........这里部分代码省略.........
开发者ID:Jelov,项目名称:JetEnergy_SR,代码行数:101,代码来源:Pythia8_Dijet30_result_JER_akPu4PF_(abs(refeta)<2)&&(hiBin>60)_refpt.C

示例6: Pythia8_Dijet30_result_JER_akPu4PF_

void Pythia8_Dijet30_result_JER_akPu4PF_((abs(refeta)<2)&&(hiBin>60))&&(refpt>30)_refeta()
{
//=========Macro generated from canvas: Can_result_3/
//=========  (Mon Apr 18 04:08:04 2016) by ROOT version6.02/13
   TCanvas *Can_result_3 = new TCanvas("Can_result_3", "",18,40,700,500);
   gStyle->SetOptFit(1);
   Can_result_3->Range(-2.75,0.1715425,2.75,0.2926317);
   Can_result_3->SetFillColor(0);
   Can_result_3->SetBorderMode(0);
   Can_result_3->SetBorderSize(2);
   Can_result_3->SetFrameBorderMode(0);
   Can_result_3->SetFrameBorderMode(0);
   
   TMultiGraph *multigraph = new TMultiGraph();
   multigraph->SetName("name");
   multigraph->SetTitle("JER_akPu4PF");
   
   Double_t Graph_fx1007[9] = {
   -1.8,
   -1.4,
   -1,
   -0.6,
   -0.2,
   0.2,
   0.6,
   1,
   1.6};
   Double_t Graph_fy1007[9] = {
   0.2213775,
   0.2313726,
   0.212349,
   0.1992318,
   0.2015521,
   0.2047929,
   0.2065286,
   0.2141753,
   0.2298097};
   Double_t Graph_fex1007[9] = {
   0.2,
   0.2,
   0.2,
   0.2,
   0.2,
   0.2,
   0.2,
   0.2,
   0.4};
   Double_t Graph_fey1007[9] = {
   0.001529502,
   0.001378741,
   0.001274153,
   0.001286487,
   0.00132694,
   0.001354738,
   0.001397823,
   0.001305814,
   0.001034891};
   TGraphErrors *gre = new TGraphErrors(9,Graph_fx1007,Graph_fy1007,Graph_fex1007,Graph_fey1007);
   gre->SetName("Graph");
   gre->SetTitle("some title_0");
   gre->SetFillColor(1);
   gre->SetFillStyle(0);
   
   TH1F *Graph_Graph1007 = new TH1F("Graph_Graph1007","some title_0",100,-2.4,2.4);
   Graph_Graph1007->SetMinimum(0.1944648);
   Graph_Graph1007->SetMaximum(0.236232);
   Graph_Graph1007->SetDirectory(0);
   Graph_Graph1007->SetStats(0);

   Int_t ci;      // for color index setting
   TColor *color; // for color definition with alpha
   ci = TColor::GetColor("#000099");
   Graph_Graph1007->SetLineColor(ci);
   Graph_Graph1007->GetXaxis()->SetLabelFont(42);
   Graph_Graph1007->GetXaxis()->SetLabelSize(0.035);
   Graph_Graph1007->GetXaxis()->SetTitleSize(0.035);
   Graph_Graph1007->GetXaxis()->SetTitleFont(42);
   Graph_Graph1007->GetYaxis()->SetLabelFont(42);
   Graph_Graph1007->GetYaxis()->SetLabelSize(0.035);
   Graph_Graph1007->GetYaxis()->SetTitleSize(0.035);
   Graph_Graph1007->GetYaxis()->SetTitleFont(42);
   Graph_Graph1007->GetZaxis()->SetLabelFont(42);
   Graph_Graph1007->GetZaxis()->SetLabelSize(0.035);
   Graph_Graph1007->GetZaxis()->SetTitleSize(0.035);
   Graph_Graph1007->GetZaxis()->SetTitleFont(42);
   gre->SetHistogram(Graph_Graph1007);
   
   multigraph->Add(gre,"");
   
   Double_t Graph_fx1008[20] = {
   -1.9,
   -1.7,
   -1.5,
   -1.2,
   -0.9,
   -0.7,
   -0.5,
   -0.3,
   -0.1,
   0.1,
//.........这里部分代码省略.........
开发者ID:Jelov,项目名称:JetEnergy_SR,代码行数:101,代码来源:Pythia8_Dijet30_result_JER_akPu4PF_((abs(refeta)<2)&&(hiBin>60))&&(refpt>30)_refeta.C

示例7: EfficiencyByEta_vs_Lz

void EfficiencyByEta_vs_Lz()
{
//=========Macro generated from canvas: eta_lz/eta_lz
//=========  (Tue Apr  5 09:30:27 2016) by ROOT version6.02/05
   TCanvas *eta_lz = new TCanvas("eta_lz", "eta_lz",0,0,700,500);
   eta_lz->Range(-6.5625,-0.125,41.5625,1.125);
   eta_lz->SetFillColor(0);
   eta_lz->SetBorderMode(0);
   eta_lz->SetBorderSize(2);
   eta_lz->SetFrameBorderMode(0);
   eta_lz->SetFrameBorderMode(0);
   
   TMultiGraph *multigraph = new TMultiGraph();
   multigraph->SetName("");
   multigraph->SetTitle("");
   
   Double_t divide_num_LEp8_1D_A0_LZ_by_den_LEp8_1D_A0_LZ_fx3001[10] = {
   1,
   3,
   5,
   7,
   9,
   11,
   14,
   17,
   19,
   22.5};
   Double_t divide_num_LEp8_1D_A0_LZ_by_den_LEp8_1D_A0_LZ_fy3001[10] = {
   0.9255743,
   0.887184,
   0.8789174,
   0.8852085,
   0.8950226,
   0.8479381,
   0.7993119,
   0.7869822,
   0.7105263,
   0.5384615};
   Double_t divide_num_LEp8_1D_A0_LZ_by_den_LEp8_1D_A0_LZ_felx3001[10] = {
   1,
   1,
   1,
   1,
   1,
   1,
   2,
   1,
   1,
   2.5};
   Double_t divide_num_LEp8_1D_A0_LZ_by_den_LEp8_1D_A0_LZ_fely3001[10] = {
   0.001481033,
   0.00433367,
   0.006472957,
   0.00813138,
   0.01004846,
   0.01400104,
   0.0144885,
   0.03622352,
   0.06131092,
   0.1720041};
   Double_t divide_num_LEp8_1D_A0_LZ_by_den_LEp8_1D_A0_LZ_fehx3001[10] = {
   1,
   1,
   1,
   1,
   1,
   1,
   2,
   1,
   1,
   2.5};
   Double_t divide_num_LEp8_1D_A0_LZ_by_den_LEp8_1D_A0_LZ_fehy3001[10] = {
   0.00145469,
   0.00419584,
   0.006195321,
   0.007675046,
   0.009298784,
   0.01306018,
   0.01377348,
   0.03252222,
   0.05512412,
   0.1648473};
   TGraphAsymmErrors *grae = new TGraphAsymmErrors(10,divide_num_LEp8_1D_A0_LZ_by_den_LEp8_1D_A0_LZ_fx3001,divide_num_LEp8_1D_A0_LZ_by_den_LEp8_1D_A0_LZ_fy3001,divide_num_LEp8_1D_A0_LZ_by_den_LEp8_1D_A0_LZ_felx3001,divide_num_LEp8_1D_A0_LZ_by_den_LEp8_1D_A0_LZ_fehx3001,divide_num_LEp8_1D_A0_LZ_by_den_LEp8_1D_A0_LZ_fely3001,divide_num_LEp8_1D_A0_LZ_by_den_LEp8_1D_A0_LZ_fehy3001);
   grae->SetName("divide_num_LEp8_1D_A0_LZ_by_den_LEp8_1D_A0_LZ");
   grae->SetTitle("num_LEp8_1D_A0_LZ");

   Int_t ci;      // for color index setting
   TColor *color; // for color definition with alpha
   ci = TColor::GetColor("#ff0000");
   grae->SetLineColor(ci);

   ci = TColor::GetColor("#ff0000");
   grae->SetMarkerColor(ci);
   grae->SetMarkerStyle(2);
   
   TH1F *Graph_divide_num_LEp8_1D_A0_LZ_by_den_LEp8_1D_A0_LZ3001 = new TH1F("Graph_divide_num_LEp8_1D_A0_LZ_by_den_LEp8_1D_A0_LZ3001","num_LEp8_1D_A0_LZ",100,0,27.5);
   Graph_divide_num_LEp8_1D_A0_LZ_by_den_LEp8_1D_A0_LZ3001->SetMinimum(0.3104003);
   Graph_divide_num_LEp8_1D_A0_LZ_by_den_LEp8_1D_A0_LZ3001->SetMaximum(0.9830861);
   Graph_divide_num_LEp8_1D_A0_LZ_by_den_LEp8_1D_A0_LZ3001->SetDirectory(0);
   Graph_divide_num_LEp8_1D_A0_LZ_by_den_LEp8_1D_A0_LZ3001->SetStats(0);
//.........这里部分代码省略.........
开发者ID:cms-tamu,项目名称:MuJetAnalysis,代码行数:101,代码来源:EfficiencyByEta_vs_Lz.C

示例8: EfficiencyByEta_vs_Lz

void EfficiencyByEta_vs_Lz()
{
//=========Macro generated from canvas: eta_lz/eta_lz
//=========  (Thu Oct 29 10:19:05 2015) by ROOT version6.02/05
   TCanvas *eta_lz = new TCanvas("eta_lz", "eta_lz",1123,69,700,500);
   eta_lz->Range(-15,-0.125,95,1.125);
   eta_lz->SetFillColor(0);
   eta_lz->SetBorderMode(0);
   eta_lz->SetBorderSize(2);
   eta_lz->SetFrameBorderMode(0);
   eta_lz->SetFrameBorderMode(0);
   
   TMultiGraph *multigraph = new TMultiGraph();
   multigraph->SetName("");
   multigraph->SetTitle("");
   
   Double_t divide_num_LEp8_1D_A0_LZ_by_den_LEp8_1D_A0_LZ_fx3001[17] = {
   1,
   3,
   5,
   7,
   9,
   11,
   14,
   17,
   19,
   22.5,
   27.5,
   32.5,
   37.5,
   42.5,
   47.5,
   55,
   70};
   Double_t divide_num_LEp8_1D_A0_LZ_by_den_LEp8_1D_A0_LZ_fy3001[17] = {
   0.8207681,
   0.7183406,
   0.6823529,
   0.6296296,
   0.6016949,
   0.5540541,
   0.4752187,
   0.3962264,
   0.4306569,
   0.4033898,
   0.2211982,
   0.2352941,
   0.1679389,
   0.1630435,
   0,
   0,
   0};
   Double_t divide_num_LEp8_1D_A0_LZ_by_den_LEp8_1D_A0_LZ_felx3001[17] = {
   1,
   1,
   1,
   1,
   1,
   1,
   2,
   1,
   1,
   2.5,
   2.5,
   2.5,
   2.5,
   2.5,
   2.5,
   5,
   10};
   Double_t divide_num_LEp8_1D_A0_LZ_by_den_LEp8_1D_A0_LZ_fely3001[17] = {
   0.01564874,
   0.02258889,
   0.02724798,
   0.03011546,
   0.03436919,
   0.03578772,
   0.02830245,
   0.04109258,
   0.04522796,
   0.02985828,
   0.0290375,
   0.03208442,
   0.03356904,
   0.03963993,
   0,
   0,
   0};
   Double_t divide_num_LEp8_1D_A0_LZ_by_den_LEp8_1D_A0_LZ_fehx3001[17] = {
   1,
   1,
   1,
   1,
   1,
   1,
   2,
   1,
   1,
   2.5,
   2.5,
//.........这里部分代码省略.........
开发者ID:cms-tamu,项目名称:MuJetAnalysis,代码行数:101,代码来源:EfficiencyByEta_vs_Lz.C

示例9: BSA_InCoherent_xB

void BSA_InCoherent_xB()
{
//=========Macro generated from canvas: c16/Incoherent channe
//=========  (Tue Aug 21 12:00:25 2018) by ROOT version6.09/01
   TCanvas *c16 = new TCanvas("c16", "Incoherent channe",0,0,1200,400);
   gStyle->SetOptFit(1);
   c16->Range(0,0,1,1);
   c16->SetFillColor(0);
   c16->SetBorderMode(0);
   c16->SetBorderSize(2);
   c16->SetLeftMargin(0.025);
   c16->SetRightMargin(0.02325581);
   c16->SetFrameBorderMode(0);
  
// ------------>Primitives in pad: c16_1
   TPad *c16_1 = new TPad("c16_1", "Incoherent channe_1",0,0,0.262936,0.9);
   c16_1->Draw();
   c16_1->cd();
   c16_1->Range(-29.34641,-0.4888889,350.2581,0.4);
   c16_1->SetFillColor(0);
   c16_1->SetBorderMode(0);
   c16_1->SetBorderSize(2);
   c16_1->SetGridx();
   c16_1->SetGridy();
   c16_1->SetRightMargin(0);
   c16_1->SetTopMargin(0);
   c16_1->SetFrameBorderMode(0);
   c16_1->SetFrameBorderMode(0);
   
   TMultiGraph *multigraph = new TMultiGraph();
   multigraph->SetName("");
   multigraph->SetTitle("0.12<x_{B}<0.21 ");
   
   Double_t Graph_fx1134[9] = {
   24.14331,
   62.70082,
   96.14623,
   141.7289,
   180.8857,
   220.5862,
   258.7856,
   303.3336,
   334.7288};
   Double_t Graph_fy1134[9] = {
   0.1330996,
   -0.03883743,
   0.1388413,
   0.2120595,
   0.03749243,
   -0.09129921,
   -0.1273289,
   -0.1643618,
   0.03103783};
   Double_t Graph_fex1134[9] = {
   0,
   0,
   0,
   0,
   0,
   0,
   0,
   0,
   0};
   Double_t Graph_fey1134[9] = {
   0.07077824,
   0.06445297,
   0.05939535,
   0.06833722,
   0.08559024,
   0.08401363,
   0.06136237,
   0.05845869,
   0.08718727};
   TGraphErrors *gre = new TGraphErrors(9,Graph_fx1134,Graph_fy1134,Graph_fex1134,Graph_fey1134);
   gre->SetName("Graph");
   gre->SetTitle("Graph");
   gre->SetFillColor(1);

   Int_t ci;      // for color index setting
   TColor *color; // for color definition with alpha
   ci = TColor::GetColor("#00ff00");
   gre->SetMarkerColor(ci);
   gre->SetMarkerStyle(21);
   
   TH1F *Graph_Graph1134 = new TH1F("Graph_Graph1134","Graph",100,0,365.7873);
   Graph_Graph1134->SetMinimum(-0.2731422);
   Graph_Graph1134->SetMaximum(0.3307184);
   Graph_Graph1134->SetDirectory(0);
   Graph_Graph1134->SetStats(0);

   ci = TColor::GetColor("#000099");
   Graph_Graph1134->SetLineColor(ci);
   Graph_Graph1134->GetXaxis()->SetLabelFont(42);
   Graph_Graph1134->GetXaxis()->SetLabelSize(0.035);
   Graph_Graph1134->GetXaxis()->SetTitleSize(0.035);
   Graph_Graph1134->GetXaxis()->SetTitleFont(42);
   Graph_Graph1134->GetYaxis()->SetLabelFont(42);
   Graph_Graph1134->GetYaxis()->SetLabelSize(0.035);
   Graph_Graph1134->GetYaxis()->SetTitleSize(0.035);
   Graph_Graph1134->GetYaxis()->SetTitleFont(42);
//.........这里部分代码省略.........
开发者ID:Hattawy,项目名称:He-DVCS-Analysis-note-v2,代码行数:101,代码来源:BSA_InCoherent_xB.C

示例10: main


//.........这里部分代码省略.........
      for(int w=0; w<window_size; w++) tmpTraceStat[w] = Abs(TraceZP[a-START+(i)*NoChannels][w]);
      if(v==0){ tmp1_mean = Mean(window_size,tmpTraceStat); tmp1_rms = RMS(window_size,tmpTraceStat);}
      if(v==1){ tmp2_mean = Mean(window_size,tmpTraceStat); tmp2_rms = RMS(window_size,tmpTraceStat);}
      printf("%s:%s\t%d\t\t%.2f\t%.2f",channel_profiles.antenna_pos, channel_profiles.polarisation, window_size,
       Mean(window_size,tmpTraceStat), RMS(window_size,tmpTraceStat));
      if(v==0) cout << "\t\t";
    }
    cout << endl;
    
    d_mean[event.channel_profile_id-min_channel_id][i] = (tmp1_mean-tmp2_mean)/tmp1_mean;
     d_rms[event.channel_profile_id-min_channel_id][i] = (tmp1_rms-tmp2_rms)/tmp1_rms;
        d_RMS_with[event.channel_profile_id-min_channel_id][i] = tmp2_rms;
     d_RMS_without[event.channel_profile_id-min_channel_id][i] = tmp1_rms;

    //be sure to have the original data
    for(int j=tmp_start; j<tmp_stop; j++) tmpTrace[j-tmp_start] = (event.trace[j] & 0x0fff);
    
    timer[event.channel_profile_id-min_channel_id][i].Start();

    if(i!=0)RFISuppressionMedian(window_size, tmpTrace, tmpTrace);
    for(int j=0; j<window_size; j++) tmpTraceSpec[j] = tmpTrace[j];    
    TraceFFT(window_size , tmpTraceSpec , spectrum[a-START+(i)*NoChannels] , phase, rawfft);
    ZeroPaddingFFT(window_size, tmpTrace, NoZeros, TraceZP[a-START+(i)*NoChannels]);

    timer[event.channel_profile_id-min_channel_id][i].Stop();
    
    sprintf(name,"can%03i_ws%i",a-START+(i)*NoChannels,window_size);
    gWin[a-START+(i)*NoChannels] = new TGraph(New_window_size, TimeFFTZP, TraceZP[a-START+(i)*NoChannels]);
    gWin[a-START+(i)*NoChannels]->SetTitle(title);
    gWin[a-START+(i)*NoChannels]->GetXaxis()->SetTitle(" time #upoint 12.5 / ns");
    gWin[a-START+(i)*NoChannels]->GetYaxis()->SetTitle(" ADC value ");
    canWin[a-START+(i)*NoChannels] = new TCanvas();
    canWin[a-START+(i)*NoChannels]->SetTitle(name);
    canWin[a-START+(i)*NoChannels]->SetName(name);

    sprintf(name,"spec%03i_ws%i",a-START+(i)*NoChannels,window_size);
    gSpec[a-START+(i)*NoChannels] = new TGraph(window_size/2, freq, spectrum[a-START+(i)*NoChannels]);
    gSpec[a-START+(i)*NoChannels]->SetTitle(title);
    gSpec[a-START+(i)*NoChannels]->GetXaxis()->SetTitle(" frequency / MHz ");
    gSpec[a-START+(i)*NoChannels]->GetYaxis()->SetTitle(" Amp ");
    canSpec[a-START+(i)*NoChannels] = new TCanvas();
    canSpec[a-START+(i)*NoChannels]->SetTitle(name);
    canSpec[a-START+(i)*NoChannels]->SetName(name);
    
   } //end over START STOP
  }//end for over kwindwo_size

  if(debug) cout << "end of loop over kwindow_size" << endl;
  
  TMultiGraph *mg = new TMultiGraph();
  mg->SetTitle("optimal window size");
  mg->SetName("mg");
  TLegend leg = TLegend(0.87,0.7,0.99,0.99);

  TMultiGraph *mg3 = new TMultiGraph();
  mg3->SetTitle("optimal window size");
  mg3->SetName("mg3");
  TLegend leg3 = TLegend(0.655779, 0.807692, 0.981156, 0.972028);
  
  for(int i=0; i<NoChannels; i++){
   sprintf(name,"gd_mean%02i",i+min_channel_id);
   gd_mean[i] = new TGraph(kwindow_size+1, d_ws, d_mean[i]);
   gd_mean[i]->SetTitle(name);
   gd_mean[i]->SetName(name);
   gd_mean[i]->SetLineColor(i+1);   
   gd_mean[i]->SetLineWidth(2);
开发者ID:lbaehren,项目名称:lofarsoft,代码行数:67,代码来源:OptWindowSize.cpp


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