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


C++ TPaveStats::SetTextAlign方法代码示例

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


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

示例1: main

int main(int argc, char** argv){
//=========Macro generated from canvas: Canvas_1/Canvas_1
//=========  (Wed Aug 27 23:28:50 2014) by ROOT version5.34/04
   TCanvas *Canvas_1 = new TCanvas("Canvas_1", "Canvas_1",258,73,1243,811);
   Canvas_1->Range(-0.0625,-0.0625,0.0625,0.0625);
   Canvas_1->SetFillColor(0);
   Canvas_1->SetBorderMode(0);
   Canvas_1->SetBorderSize(2);
   Canvas_1->SetFrameBorderMode(0);
   Canvas_1->SetFrameBorderMode(0);
   
   TFile f(argv[1],"r");
   TH2F *h1 = (TH2F*)f.Get("h2dir/h4");
/*  
   TPaletteAxis *palette = new TPaletteAxis(0.050625,-0.05,0.05625,0.05,h1);
palette->SetLabelColor(1);
palette->SetLabelFont(42);
palette->SetLabelOffset(0.005);
palette->SetLabelSize(0.035);
palette->SetTitleOffset(1);
palette->SetTitleSize(0.035);
   palette->SetFillColor(100);
   palette->SetFillStyle(1001);
   h1->GetListOfFunctions()->Add(palette,"br");
*/
   
   TPaveStats *ptstats = new TPaveStats(0.700565,0.6608696,0.9007264,0.9006211,"brNDC");
   ptstats->SetName("stats");
   ptstats->SetBorderSize(1);
   ptstats->SetFillColor(0);
   ptstats->SetTextAlign(12);
   ptstats->SetTextFont(42);
   TText *text = ptstats->AddText("h1");
   text->SetTextSize(0.03676191);
   text = ptstats->AddText("Entries = 101    ");
   text = ptstats->AddText("Mean x = -0.0003512");
   text = ptstats->AddText("Mean y = -0.0003318");
   text = ptstats->AddText("RMS x = 0.01432");
   text = ptstats->AddText("RMS y = 0.01428");
   ptstats->SetOptStat(1111);
   ptstats->SetOptFit(0);
   ptstats->Draw();
   h1->GetListOfFunctions()->Add(ptstats);
   ptstats->SetParent(h1);

   Int_t ci;   // for color index setting
   ci = TColor::GetColor("#000099");
   h1->SetLineColor(ci);
   h1->GetXaxis()->SetTitle("mm");
   h1->GetXaxis()->SetLabelFont(42);
   h1->GetXaxis()->SetLabelSize(0.035);
   h1->GetXaxis()->SetTitleSize(0.035);
   h1->GetXaxis()->SetTitleFont(42);
   h1->GetYaxis()->SetTitle("mm");
   h1->GetYaxis()->SetLabelFont(42);
   h1->GetYaxis()->SetLabelSize(0.035);
   h1->GetYaxis()->SetTitleSize(0.035);
   h1->GetYaxis()->SetTitleFont(42);
   h1->GetZaxis()->SetLabelFont(42);
   h1->GetZaxis()->SetLabelSize(0.035);
   h1->GetZaxis()->SetTitleSize(0.035);
   h1->GetZaxis()->SetTitleFont(42);
   h1->Draw("COLZ ");
   
   TPaveText *pt = new TPaveText(0.1594915,0.9368634,0.8405085,0.995,"blNDC");
   pt->SetName("title");
   pt->SetBorderSize(0);
   pt->SetFillColor(0);
   pt->SetFillStyle(0);
   pt->SetTextFont(42);
   text = pt->AddText("2D Energy deposit distribution at z=-25um");
   pt->Draw();
   Canvas_1->Modified();
   Canvas_1->cd();
   Canvas_1->SetSelected(Canvas_1);
   std::cout<<argv[1]<<std::endl;
   Canvas_1->SaveAs(TString(argv[1])+"35#.png");
}
开发者ID:Eslam-Moustafa-Ramadan,项目名称:GEM,代码行数:78,代码来源:Canvas_4.C

示例2: c


//.........这里部分代码省略.........
   hist__1__1->SetBinContent(56,4531);
   hist__1__1->SetBinContent(57,4598);
   hist__1__1->SetBinContent(58,4456);
   hist__1__1->SetBinContent(59,4341);
   hist__1__1->SetBinContent(60,4654);
   hist__1__1->SetBinContent(61,4672);
   hist__1__1->SetBinContent(62,4511);
   hist__1__1->SetBinContent(63,4446);
   hist__1__1->SetBinContent(64,4356);
   hist__1__1->SetBinContent(65,4380);
   hist__1__1->SetBinContent(66,4383);
   hist__1__1->SetBinContent(67,4469);
   hist__1__1->SetBinContent(68,4606);
   hist__1__1->SetBinContent(69,4563);
   hist__1__1->SetBinContent(70,4413);
   hist__1__1->SetBinContent(71,4701);
   hist__1__1->SetBinContent(72,4643);
   hist__1__1->SetBinContent(73,4427);
   hist__1__1->SetBinContent(74,3933);
   hist__1__1->SetBinContent(75,3939);
   hist__1__1->SetBinContent(76,4093);
   hist__1__1->SetBinContent(77,3913);
   hist__1__1->SetBinContent(78,4026);
   hist__1__1->SetBinContent(79,3843);
   hist__1__1->SetBinContent(80,3641);
   hist__1__1->SetBinContent(81,3916);
   hist__1__1->SetBinContent(82,4042);
   hist__1__1->SetBinContent(83,3798);
   hist__1__1->SetBinContent(84,3601);
   hist__1__1->SetBinContent(85,3249);
   hist__1__1->SetBinContent(86,3146);
   hist__1__1->SetBinContent(87,3199);
   hist__1__1->SetBinContent(88,3035);
   hist__1__1->SetBinContent(89,3021);
   hist__1__1->SetBinContent(90,2861);
   hist__1__1->SetBinContent(91,2848);
   hist__1__1->SetBinContent(92,2819);
   hist__1__1->SetBinContent(93,2744);
   hist__1__1->SetBinContent(94,2542);
   hist__1__1->SetBinContent(95,2198);
   hist__1__1->SetBinContent(96,1717);
   hist__1__1->SetBinContent(97,1743);
   hist__1__1->SetBinContent(98,1585);
   hist__1__1->SetBinContent(99,1504);
   hist__1__1->SetBinContent(100,1475);
   hist__1__1->SetBinContent(101,12137);
   hist__1__1->SetEntries(397426);
   
   TPaveStats *ptstats = new TPaveStats(0.78,0.775,0.98,0.935,"brNDC");
   ptstats->SetName("stats");
   ptstats->SetBorderSize(1);
   ptstats->SetFillColor(0);
   ptstats->SetTextAlign(12);
   ptstats->SetTextFont(42);
   TText *AText = ptstats->AddText("hist__1");
   AText->SetTextSize(0.0368);
   AText = ptstats->AddText("Entries = 397426 ");
   AText = ptstats->AddText("Mean  = -0.08411");
   AText = ptstats->AddText("Std Dev   =  66.16");
   ptstats->SetOptStat(1111);
   ptstats->SetOptFit(0);
   ptstats->Draw();
   hist__1__1->GetListOfFunctions()->Add(ptstats);
   ptstats->SetParent(hist__1__1);

   Int_t ci;      // for color index setting
   TColor *color; // for color definition with alpha
   ci = 926;
   color = new TColor(ci, 0, 0, 1, " ", 0.273);
   hist__1__1->SetFillColor(ci);
   hist__1__1->SetLineColor(4);
   hist__1__1->SetLineWidth(2);
   hist__1__1->GetXaxis()->SetTitle("#DeltaY [cm]");
   hist__1__1->GetXaxis()->SetLabelFont(42);
   hist__1__1->GetXaxis()->SetLabelSize(0.05);
   hist__1__1->GetXaxis()->SetTitleSize(0.05);
   hist__1__1->GetXaxis()->SetTitleOffset(0.93);
   hist__1__1->GetXaxis()->SetTitleFont(22);
   hist__1__1->GetYaxis()->SetLabelFont(42);
   hist__1__1->GetYaxis()->SetLabelSize(0.05);
   hist__1__1->GetYaxis()->SetTitleSize(0.035);
   hist__1__1->GetYaxis()->SetTitleFont(42);
   hist__1__1->GetZaxis()->SetLabelFont(42);
   hist__1__1->GetZaxis()->SetLabelSize(0.035);
   hist__1__1->GetZaxis()->SetTitleSize(0.035);
   hist__1__1->GetZaxis()->SetTitleFont(42);
   hist__1__1->Draw("");
   
   TPaveText *pt = new TPaveText(0.15,0.9368947,0.85,0.995,"blNDC");
   pt->SetName("title");
   pt->SetBorderSize(0);
   pt->SetFillColor(0);
   pt->SetFillStyle(0);
   pt->SetTextFont(42);
   AText = pt->AddText("Difference in PMT-constructed position and mc-truth start position");
   pt->Draw();
   c->Modified();
   c->cd();
   c->SetSelected(c);
}
开发者ID:nikihowe,项目名称:flash,代码行数:101,代码来源:c.C

示例3: hw1

int hw1(){
  //define landau formula
  TF1* myf = new TF1("mylandau",landauf,-3,10,3);
  myf->SetParameters(1.0,2,1);

  //get ready to initial hist
  /*
  const int num = 3;
  string histvName[num] = {"ld_1e2","ld_1e3","ld_1e4"};
  string histvTitle[num] = {"Landau 100 entris","Landau 1000 entris","Landau 10000 entris"};
  int histEntries[num] = {100,1000,10000};

  //new hist and fill them
  TCanvas* canvas = new TCanvas("myc","HW1",800,600);
  TMultiGraph* mg = new TMultiGraph();
  for(int i = 0;i<num;i++){
    TH1F* tmp=new TH1F(histvName[i].c_str(),histvTitle[i].c_str(),100,-3,10);
    tmp->FillRandom("mylandau",histEntries[i]);
  }

  gDirectory->Get(histvName[2])->Draw("e");
  gDirectory->Get(histvName[1])->Draw("esame");
  gDirectory->Get(histvName[0])->Draw("esame");
  */
  TCanvas* canvas = new TCanvas("myc","HW1",800,600);

  TH1F* h1 = new TH1F("h1","Landau 100 entries",15,-3,10);
  TH1F* h2 = new TH1F("h2","Landau 1000 entries",60,-3,10);
  TH1F* h3 = new TH1F("h3","Landau 10000 entries",200,-3,10);
  h1->FillRandom("mylandau",100);
  h2->FillRandom("mylandau",1000);
  h3->FillRandom("mylandau",10000);
  h3->GetXaxis()->SetTitle("x");
  h3->GetXaxis()->CenterTitle(true);
  h3->GetYaxis()->SetTitle("Entries");
  h3->GetYaxis()->CenterTitle(true);
  h3->SetStats(kFALSE);

  TF1* fit3 = new TF1("fit3",landauf,-3,10,3);
  fit3->SetParameters(1.0,2,1);
  h3->SetMarkerColor(kRed);
  h3->SetLineColor(kRed);
  fit3->SetLineColor(kRed+2);
  h3->Fit("fit3","q","e");

  TF1* fit2 = new TF1("fit2",landauf,-3,10,3);
  fit2->SetParameters(1.0,2,1);
  h2->SetMarkerColor(kBlue);
  h2->SetLineColor(kBlue);
  fit2->SetLineColor(kBlue+2);
  h2->Fit("fit2","q","esame");

  TF1* fit1 = new TF1("fit1",landauf,-3,10,3);
  fit1->SetParameters(1.0,2,1);
  h1->SetMarkerColor(kGreen);
  h1->SetLineColor(kGreen);
  fit1->SetLineColor(kGreen+2);
  h1->Fit("fit1","q","esame");

  double h1M = h1->GetMean();
  double h1R = h1->GetRMS();
  double h1S = h1->GetSkewness();
  double h2M = h2->GetMean();
  double h2R = h2->GetRMS();
  double h2S = h2->GetSkewness();
  double h3M = h3->GetMean();
  double h3R = h3->GetRMS();
  double h3S = h3->GetSkewness();

  cout<<setprecision(4);
  cout<<"+----+--------+--------+--------+"<<endl;
  cout<<"|hist|  Mean  |  RMS   |skewness|"<<endl;
  cout<<"+----+--------+--------+--------+"<<endl;
  cout<<"+  1 |"<<setw(8)<<h1M<<"|"<<setw(8)<<h1R<<"|"<<setw(8)<<h1S<<"|"<<endl;
  cout<<"+----+--------+--------+--------+"<<endl;
  cout<<"+  2 |"<<setw(8)<<h2M<<"|"<<setw(8)<<h2R<<"|"<<setw(8)<<h2S<<"|"<<endl;
  cout<<"+----+--------+--------+--------+"<<endl;
  cout<<"+  3 |"<<setw(8)<<h3M<<"|"<<setw(8)<<h3R<<"|"<<setw(8)<<h3S<<"|"<<endl;
  cout<<"+----+--------+--------+--------+"<<endl;

  TPaveStats *ptstats = new TPaveStats(0.5747126,0.6334746,0.9353448,0.934322,"brNDC");
  ptstats->SetName("stats");
  ptstats->SetBorderSize(1);
  ptstats->SetFillColor(0);
  ptstats->SetLineWidth(2);
  ptstats->SetTextAlign(12);
  ptstats->SetTextFont(132);
  ptstats->AddText(" hist   Mean     RMS    skewness ");
  ostringstream os;
  cout<<setprecision(4);
  os<<"   1  "<<setw(8)<<h1M<<" "<<setw(8)<<h1R<<" "<<setw(8)<<h1S<<" ";
  ptstats->AddText(os.str().c_str());
  os.str(string());
  os<<"   2  "<<setw(8)<<h2M<<" "<<setw(8)<<h2R<<" "<<setw(8)<<h2S<<" ";
  ptstats->AddText(os.str().c_str());
  os.str(string());
  os<<"   3  "<<setw(8)<<h3M<<" "<<setw(8)<<h3R<<" "<<setw(8)<<h3S<<" ";
  ptstats->AddText(os.str().c_str());
  ptstats->SetOptStat(0);
  ptstats->SetOptFit(111);
//.........这里部分代码省略.........
开发者ID:DingXuefeng,项目名称:hw1,代码行数:101,代码来源:hw1.C

示例4: JetEtaBC

void JetEtaBC(void){
    std::cout << "Hellowww!!" << std::endl;
    
    TFile *file1;
    file1 = TFile::Open("PF_second.root");
    TH1F* f1 = (TH1F*)file1->FindObjectAny("JetEtaBC");

    TFile *file2;
    file2 = TFile::Open("PAT_second.root");
    TH1F* f2 = (TH1F*)file2->FindObjectAny("JetEtaBC");

    TFile *file3;
    file3 = TFile::Open("PF_IC5_Jets_Corrected.root");
    TH1F* f3 = (TH1F*)file3->FindObjectAny("JetEtaBC");

    TFile *file4;
    file4 = TFile::Open("PF_ak5_tot.root");
    TH1F* f4 = (TH1F*)file4->FindObjectAny("JetEtaBC");

    TCanvas *c1 = new TCanvas("canvas","Plotting Canvas",150,10,990,660);
    c1->Range(-0.1486535,-622.7141,1.350808,5500.641);
    c1->SetFillColor(0);
    c1->SetBorderSize(2);
    c1->SetLogy();
    c1->SetTickx(1);
    c1->SetTicky(1);

    f1->SetStats(kFALSE);
    f4->GetXaxis()->SetTitle("#eta");
    f4->GetXaxis()->SetLabelFont(42);
    f4->GetXaxis()->SetTitleFont(42);
    f4->GetYaxis()->SetTitle("Events");
    f4->GetYaxis()->SetLabelFont(42);
    f4->GetYaxis()->SetTitleOffset(1.19);
    f4->GetYaxis()->SetTitleFont(42);
    f4->SetLineWidth(4);
    f1->SetLineColor(1);

    f2->SetStats(kFALSE);
    f2->SetLineColor(2);
    f2->SetLineWidth(3);

    f3->SetStats(kFALSE);
    f3->SetLineColor(3);
    f3->SetLineWidth(2);

    f4->SetStats(kFALSE);
    f4->SetLineColor(4);
    f1->SetLineWidth(1);
    
    int entries = f1->GetEntries();
    double mean =  f1->GetMean();
    double RMS =  f1->GetRMS();

    int entries1 = f2->GetEntries();
    double mean1 =  f2->GetMean();
    double RMS1 =  f2->GetRMS();

    int entries2 = f3->GetEntries();
    double mean2 =  f3->GetMean();
    double RMS2 =  f3->GetRMS();

    int entries3 = f4->GetEntries();
    double mean3 =  f4->GetMean();
    double RMS3 =  f4->GetRMS();

    TPaveStats *ptstats = new TPaveStats(0.8314943,0.7488136,0.9926437,0.8877119,"brNDC");
    ptstats->SetName("stats");
    ptstats->SetBorderSize(1);
    ptstats->SetFillColor(0);
    ptstats->SetTextAlign(12);
    ptstats->SetTextFont(42);
    ptstats->SetTextColor(1);

    TPaveStats *ptstats1 = new TPaveStats(0.8314943,0.5988136,0.9926437,0.7377119,"brNDC");
    ptstats1->SetName("stats");
    ptstats1->SetBorderSize(1);
    ptstats1->SetFillColor(0);
    ptstats1->SetTextAlign(12);
    ptstats1->SetTextFont(42);
    ptstats1->SetTextColor(2);

    TPaveStats *ptstats2 = new TPaveStats(0.8314943,0.4488136,0.9926437,0.5877119,"brNDC");
    ptstats2->SetName("stats");
    ptstats2->SetBorderSize(1);
    ptstats2->SetFillColor(0);
    ptstats2->SetTextAlign(12);
    ptstats2->SetTextFont(42);
    ptstats2->SetTextColor(3);

    TPaveStats *ptstats3 = new TPaveStats(0.8314943,0.2988136,0.9926437,0.4377119,"brNDC");
    ptstats3->SetName("stats");
    ptstats3->SetBorderSize(1);
    ptstats3->SetFillColor(0);
    ptstats3->SetTextAlign(12);
    ptstats3->SetTextFont(42);
    ptstats3->SetTextColor(4);

    #include <sstream>
    std::string s,s1,s2;
//.........这里部分代码省略.........
开发者ID:aocampor,项目名称:usercode,代码行数:101,代码来源:JetEtaBC.C

示例5: plot_PbPb_fit_ratio_eff

void plot_PbPb_fit_ratio_eff()
{
//=========Macro generated from canvas: Fit/Fit on Efficiency Ratio
//=========  (Mon Aug 29 17:39:14 2016) by ROOT version6.02/10
   TCanvas *Fit = new TCanvas("Fit", "Fit on Efficiency Ratio",0,0,800,500);
   gStyle->SetOptFit(1);
   Fit->Range(1.625,-0.3125,55.375,2.8125);
   Fit->SetFillColor(0);
   Fit->SetBorderMode(0);
   Fit->SetBorderSize(2);
   Fit->SetFrameBorderMode(0);
   Fit->SetFrameBorderMode(0);
   Double_t xAxis1[6] = {7, 10, 15, 20, 30, 50}; 
   
   TH1D *PbPb_fit1 = new TH1D("PbPb_fit1","",5, xAxis1);
   PbPb_fit1->SetBinContent(1,0.8304669);
   PbPb_fit1->SetBinContent(2,0.8392248);
   PbPb_fit1->SetBinContent(3,0.8551938);
   PbPb_fit1->SetBinContent(4,0.8559738);
   PbPb_fit1->SetBinContent(5,0.8749088);
   PbPb_fit1->SetBinError(1,0.06688803);
   PbPb_fit1->SetBinError(2,0.03626477);
   PbPb_fit1->SetBinError(3,0.03301156);
   PbPb_fit1->SetBinError(4,0.02217037);
   PbPb_fit1->SetBinError(5,0.01963207);
   PbPb_fit1->SetMinimum(0);
   PbPb_fit1->SetMaximum(2.5);
   PbPb_fit1->SetEntries(2335.214);
   
   TF1 *myfit1 = new TF1("myfit","pow(10,[0]+[1]*x+x*x*[2])+pow(10,[3]*x*x+[4]*x*x*x+[5])",2,100);
   myfit1->SetFillColor(19);
   myfit1->SetFillStyle(0);
   myfit1->SetMarkerStyle(20);
   myfit1->SetLineColor(2);
   myfit1->SetLineWidth(2);
   myfit1->SetChisquare(5.134234e-08);
   myfit1->SetNDF(0);
   myfit1->GetXaxis()->SetLabelFont(42);
   myfit1->GetXaxis()->SetLabelSize(0.035);
   myfit1->GetXaxis()->SetTitleSize(0.035);
   myfit1->GetXaxis()->SetTitleFont(42);
   myfit1->GetYaxis()->SetLabelFont(42);
   myfit1->GetYaxis()->SetLabelSize(0.035);
   myfit1->GetYaxis()->SetTitleSize(0.035);
   myfit1->GetYaxis()->SetTitleFont(42);
   myfit1->SetParameter(0,-0.1325891);
   myfit1->SetParError(0,0.07303413);
   myfit1->SetParLimits(0,0,0);
   myfit1->SetParameter(1,-0.004821085);
   myfit1->SetParError(1,0.00252747);
   myfit1->SetParLimits(1,0,0);
   myfit1->SetParameter(2,0.0001629026);
   myfit1->SetParError(2,6.139007e-05);
   myfit1->SetParLimits(2,0,0);
   myfit1->SetParameter(3,0.001400688);
   myfit1->SetParError(3,0.0009400359);
   myfit1->SetParLimits(3,0,0);
   myfit1->SetParameter(4,-4.985927e-05);
   myfit1->SetParError(4,3.268586e-05);
   myfit1->SetParLimits(4,0,0);
   myfit1->SetParameter(5,-0.9198558);
   myfit1->SetParError(5,0.3015603);
   myfit1->SetParLimits(5,0,0);
   PbPb_fit1->GetListOfFunctions()->Add(myfit1);
   
   TPaveStats *ptstats = new TPaveStats(0.558,0.6,0.9,0.9,"brNDC");
   ptstats->SetName("stats");
   ptstats->SetBorderSize(1);
   ptstats->SetFillColor(0);
   ptstats->SetTextAlign(12);
   ptstats->SetTextFont(42);
   TText *AText = ptstats->AddText("PbPb_fit");
   AText->SetTextSize(0.01971428);
   AText = ptstats->AddText("Entries = 2335   ");
   AText = ptstats->AddText("Mean  =  20.89");
   AText = ptstats->AddText("RMS   =  11.16");
   AText = ptstats->AddText("Underflow =      0");
   AText = ptstats->AddText("Overflow  =      0");
   AText = ptstats->AddText("Integral =  4.256");
   AText = ptstats->AddText("#chi^{2} / ndf = 5.134e-08 / 0");
   AText = ptstats->AddText("p0       = -0.1326 #pm 0.0730 ");
   AText = ptstats->AddText("p1       = -0.004821 #pm 0.002527 ");
   AText = ptstats->AddText("p2       = 0.0001629 #pm 0.0000614 ");
   AText = ptstats->AddText("p3       = 0.001401 #pm 0.000940 ");
   AText = ptstats->AddText("p4       = -4.986e-05 #pm 3.269e-05 ");
   AText = ptstats->AddText("p5       = -0.9199 #pm 0.3016 ");
   ptstats->SetOptStat(1111111);
   ptstats->SetOptFit(111);
   ptstats->Draw();
   PbPb_fit1->GetListOfFunctions()->Add(ptstats);
   ptstats->SetParent(PbPb_fit1);

   Int_t ci;      // for color index setting
   TColor *color; // for color definition with alpha
   ci = TColor::GetColor("#000099");
   PbPb_fit1->SetLineColor(ci);
   PbPb_fit1->SetMarkerStyle(20);
   PbPb_fit1->GetXaxis()->SetTitle("Gen p_{T}(GeV)");
   PbPb_fit1->GetXaxis()->CenterTitle(true);
   PbPb_fit1->GetXaxis()->SetLabelFont(42);
//.........这里部分代码省略.........
开发者ID:boundino,项目名称:BntupleRunII,代码行数:101,代码来源:plot_PbPb_fit_ratio_eff.C

示例6: BSA_InCoherent_t


//.........这里部分代码省略.........
   Graph_Graph1154->GetZaxis()->SetLabelSize(0.035);
   Graph_Graph1154->GetZaxis()->SetTitleSize(0.035);
   Graph_Graph1154->GetZaxis()->SetTitleFont(42);
   gre->SetHistogram(Graph_Graph1154);
   
   
   TF1 *myfit1155 = new TF1("myfit","[0]*sin(x*3.1416/180.0)/(1 + [1]*cos(x*3.1416/180.0))",0,369.4943);
   myfit1155->SetFillColor(19);
   myfit1155->SetFillStyle(0);
   myfit1155->SetLineColor(2);
   myfit1155->SetLineWidth(2);
   myfit1155->SetChisquare(12.03234);
   myfit1155->SetNDF(7);
   myfit1155->GetXaxis()->SetLabelFont(42);
   myfit1155->GetXaxis()->SetLabelSize(0.035);
   myfit1155->GetXaxis()->SetTitleSize(0.035);
   myfit1155->GetXaxis()->SetTitleFont(42);
   myfit1155->GetYaxis()->SetLabelFont(42);
   myfit1155->GetYaxis()->SetLabelSize(0.035);
   myfit1155->GetYaxis()->SetTitleSize(0.035);
   myfit1155->GetYaxis()->SetTitleFont(42);
   myfit1155->SetParameter(0,0.2160608);
   myfit1155->SetParError(0,0.02670852);
   myfit1155->SetParLimits(0,0,0);
   myfit1155->SetParameter(1,0.2378828);
   myfit1155->SetParError(1,0.2292802);
   myfit1155->SetParLimits(1,0,0);
   gre->GetListOfFunctions()->Add(myfit1155);
   
   TPaveStats *ptstats = new TPaveStats(0.27,0.74,0.9,0.9,"brNDC");
   ptstats->SetName("stats");
   ptstats->SetBorderSize(1);
   ptstats->SetFillColor(0);
   ptstats->SetTextAlign(12);
   ptstats->SetTextFont(42);
   TText *AText = ptstats->AddText("#chi^{2} / ndf = 12.03 / 7");
   AText = ptstats->AddText("p0       = 0.2161 #pm 0.02671 ");
   AText = ptstats->AddText("p1       = 0.2379 #pm 0.2293 ");
   ptstats->SetOptStat(0);
   ptstats->SetOptFit(111);
   ptstats->Draw();
   gre->GetListOfFunctions()->Add(ptstats);
   ptstats->SetParent(gre->GetListOfFunctions());
   multigraph->Add(gre,"");
   multigraph->Draw("AP");
   multigraph->GetXaxis()->SetTitle("#phi [deg.]");
   multigraph->GetXaxis()->SetLabelFont(42);
   multigraph->GetXaxis()->SetLabelSize(0.035);
   multigraph->GetXaxis()->SetTitleSize(0.035);
   multigraph->GetXaxis()->SetTitleFont(42);
   multigraph->GetYaxis()->SetTitle("A_{LU}");
   multigraph->GetYaxis()->SetLabelFont(42);
   multigraph->GetYaxis()->SetLabelSize(0.035);
   multigraph->GetYaxis()->SetTitleSize(0.035);
   multigraph->GetYaxis()->SetTitleFont(42);
     gPad->Modified();  
   multigraph->GetYaxis()->SetRangeUser(-0.35, 0.35);  




   TPaveText *pt = new TPaveText(0.2292451,0.9268996,0.7707549,0.995,"blNDC");
   pt->SetName("title");
   pt->SetBorderSize(0);
   pt->SetFillColor(0);
   pt->SetFillStyle(0);
开发者ID:Hattawy,项目名称:He-DVCS-Analysis-note-v2,代码行数:67,代码来源:BSA_InCoherent_t.C

示例7: x_dist_cuts


//.........这里部分代码省略.........
   hist__1->SetBinContent(52,13155);
   hist__1->SetBinContent(53,10318);
   hist__1->SetBinContent(54,7953);
   hist__1->SetBinContent(55,6143);
   hist__1->SetBinContent(56,4420);
   hist__1->SetBinContent(57,3422);
   hist__1->SetBinContent(58,2687);
   hist__1->SetBinContent(59,2027);
   hist__1->SetBinContent(60,1643);
   hist__1->SetBinContent(61,1359);
   hist__1->SetBinContent(62,1189);
   hist__1->SetBinContent(63,1057);
   hist__1->SetBinContent(64,929);
   hist__1->SetBinContent(65,840);
   hist__1->SetBinContent(66,792);
   hist__1->SetBinContent(67,759);
   hist__1->SetBinContent(68,719);
   hist__1->SetBinContent(69,673);
   hist__1->SetBinContent(70,702);
   hist__1->SetBinContent(71,769);
   hist__1->SetBinContent(72,693);
   hist__1->SetBinContent(73,728);
   hist__1->SetBinContent(74,719);
   hist__1->SetBinContent(75,698);
   hist__1->SetBinContent(76,729);
   hist__1->SetBinContent(77,695);
   hist__1->SetBinContent(78,732);
   hist__1->SetBinContent(79,692);
   hist__1->SetBinContent(80,620);
   hist__1->SetBinContent(81,592);
   hist__1->SetBinContent(82,525);
   hist__1->SetBinContent(83,463);
   hist__1->SetBinContent(84,407);
   hist__1->SetBinContent(85,357);
   hist__1->SetBinContent(86,300);
   hist__1->SetBinContent(87,229);
   hist__1->SetBinContent(88,192);
   hist__1->SetBinContent(89,154);
   hist__1->SetBinContent(90,113);
   hist__1->SetBinContent(91,123);
   hist__1->SetBinContent(92,73);
   hist__1->SetBinContent(93,55);
   hist__1->SetBinContent(94,41);
   hist__1->SetBinContent(95,27);
   hist__1->SetBinContent(96,27);
   hist__1->SetBinContent(97,18);
   hist__1->SetBinContent(98,14);
   hist__1->SetBinContent(99,8);
   hist__1->SetBinContent(100,11);
   hist__1->SetBinContent(101,55);
   hist__1->SetEntries(173117);
   
   TPaveStats *ptstats = new TPaveStats(0.78,0.775,0.98,0.935,"brNDC");
   ptstats->SetName("stats");
   ptstats->SetBorderSize(1);
   ptstats->SetFillColor(0);
   ptstats->SetTextAlign(12);
   ptstats->SetTextFont(42);
   TText *AText = ptstats->AddText("hist");
   AText->SetTextSize(0.0368);
   AText = ptstats->AddText("Entries = 173117 ");
   AText = ptstats->AddText("Mean  = 0.6933");
   AText = ptstats->AddText("Std Dev   =  34.33");
   ptstats->SetOptStat(1111);
   ptstats->SetOptFit(0);
   ptstats->Draw();
   hist__1->GetListOfFunctions()->Add(ptstats);
   ptstats->SetParent(hist__1);

   Int_t ci;      // for color index setting
   TColor *color; // for color definition with alpha
   ci = TColor::GetColor("#000099");
   hist__1->SetLineColor(ci);
   hist__1->GetXaxis()->SetTitle("#DeltaZ [cm]");
   hist__1->GetXaxis()->SetLabelFont(42);
   hist__1->GetXaxis()->SetLabelSize(0.035);
   hist__1->GetXaxis()->SetTitleSize(0.035);
   hist__1->GetXaxis()->SetTitleFont(42);
   hist__1->GetYaxis()->SetLabelFont(42);
   hist__1->GetYaxis()->SetLabelSize(0.035);
   hist__1->GetYaxis()->SetTitleSize(0.035);
   hist__1->GetYaxis()->SetTitleFont(42);
   hist__1->GetZaxis()->SetLabelFont(42);
   hist__1->GetZaxis()->SetLabelSize(0.035);
   hist__1->GetZaxis()->SetTitleSize(0.035);
   hist__1->GetZaxis()->SetTitleFont(42);
   hist__1->Draw("");
   
   TPaveText *pt = new TPaveText(0.3779599,0.9368947,0.6220401,0.995,"blNDC");
   pt->SetName("title");
   pt->SetBorderSize(0);
   pt->SetFillColor(0);
   pt->SetFillStyle(0);
   pt->SetTextFont(42);
   AText = pt->AddText("Worry Later");
   pt->Draw();
   c->Modified();
   c->cd();
   c->SetSelected(c);
}
开发者ID:nikihowe,项目名称:flash,代码行数:101,代码来源:x_dist_cuts.C

示例8: BSA_InCoherent_xB


//.........这里部分代码省略.........
   Graph_Graph1134->GetZaxis()->SetLabelSize(0.035);
   Graph_Graph1134->GetZaxis()->SetTitleSize(0.035);
   Graph_Graph1134->GetZaxis()->SetTitleFont(42);
   gre->SetHistogram(Graph_Graph1134);
   
   
   TF1 *myfit1135 = new TF1("myfit","[0]*sin(x*3.1416/180.0)/(1 + [1]*cos(x*3.1416/180.0))",0,365.7873);
   myfit1135->SetFillColor(19);
   myfit1135->SetFillStyle(0);
   myfit1135->SetLineColor(2);
   myfit1135->SetLineWidth(2);
   myfit1135->SetChisquare(10.13595);
   myfit1135->SetNDF(7);
   myfit1135->GetXaxis()->SetLabelFont(42);
   myfit1135->GetXaxis()->SetLabelSize(0.035);
   myfit1135->GetXaxis()->SetTitleSize(0.035);
   myfit1135->GetXaxis()->SetTitleFont(42);
   myfit1135->GetYaxis()->SetLabelFont(42);
   myfit1135->GetYaxis()->SetLabelSize(0.035);
   myfit1135->GetYaxis()->SetTitleSize(0.035);
   myfit1135->GetYaxis()->SetTitleFont(42);
   myfit1135->SetParameter(0,0.1205343);
   myfit1135->SetParError(0,0.03387604);
   myfit1135->SetParLimits(0,0,0);
   myfit1135->SetParameter(1,0.6858633);
   myfit1135->SetParError(1,0.2646153);
   myfit1135->SetParLimits(1,0,0);
   gre->GetListOfFunctions()->Add(myfit1135);
   
   TPaveStats *ptstats = new TPaveStats(0.27,0.74,0.9,0.9,"brNDC");
   ptstats->SetName("stats");
   ptstats->SetBorderSize(1);
   ptstats->SetFillColor(0);
   ptstats->SetTextAlign(12);
   ptstats->SetTextFont(42);
   TText *AText = ptstats->AddText("#chi^{2} / ndf = 10.14 / 7");
   AText = ptstats->AddText("p0       = 0.1205 #pm 0.03388 ");
   AText = ptstats->AddText("p1       = 0.6859 #pm 0.2646 ");
   ptstats->SetOptStat(0);
   ptstats->SetOptFit(111);
   ptstats->Draw();
   gre->GetListOfFunctions()->Add(ptstats);
   ptstats->SetParent(gre->GetListOfFunctions());
   multigraph->Add(gre,"");
   multigraph->Draw("AP");
   multigraph->GetXaxis()->SetTitle("#phi [deg.]");
   multigraph->GetXaxis()->SetLabelFont(42);
   multigraph->GetXaxis()->SetLabelSize(0.035);
   multigraph->GetXaxis()->SetTitleSize(0.035);
   multigraph->GetXaxis()->SetTitleFont(42);
   multigraph->GetYaxis()->SetTitle("A_{LU}");
   multigraph->GetYaxis()->SetLabelFont(42);
   multigraph->GetYaxis()->SetLabelSize(0.035);
   multigraph->GetYaxis()->SetTitleSize(0.035);
   multigraph->GetYaxis()->SetTitleFont(42);
     gPad->Modified();  
   multigraph->GetYaxis()->SetRangeUser(-0.35, 0.35);  




   c16_1->Modified();
   c16->cd();
  
// ------------>Primitives in pad: c16_2
   TPad *c16_2 = new TPad("c16_2", "Incoherent channe_2",0.262936,0,0.5008721,0.9);
开发者ID:Hattawy,项目名称:He-DVCS-Analysis-note-v2,代码行数:67,代码来源:BSA_InCoherent_xB.C

示例9: TCanvas


//.........这里部分代码省略.........
   hist__1->SetBinContent(52,17962);
   hist__1->SetBinContent(53,14130);
   hist__1->SetBinContent(54,10947);
   hist__1->SetBinContent(55,8303);
   hist__1->SetBinContent(56,6081);
   hist__1->SetBinContent(57,4643);
   hist__1->SetBinContent(58,3602);
   hist__1->SetBinContent(59,2825);
   hist__1->SetBinContent(60,2235);
   hist__1->SetBinContent(61,1955);
   hist__1->SetBinContent(62,1716);
   hist__1->SetBinContent(63,1461);
   hist__1->SetBinContent(64,1266);
   hist__1->SetBinContent(65,1191);
   hist__1->SetBinContent(66,1098);
   hist__1->SetBinContent(67,1054);
   hist__1->SetBinContent(68,999);
   hist__1->SetBinContent(69,957);
   hist__1->SetBinContent(70,982);
   hist__1->SetBinContent(71,980);
   hist__1->SetBinContent(72,932);
   hist__1->SetBinContent(73,910);
   hist__1->SetBinContent(74,873);
   hist__1->SetBinContent(75,812);
   hist__1->SetBinContent(76,785);
   hist__1->SetBinContent(77,748);
   hist__1->SetBinContent(78,649);
   hist__1->SetBinContent(79,593);
   hist__1->SetBinContent(80,459);
   hist__1->SetBinContent(81,400);
   hist__1->SetBinContent(82,321);
   hist__1->SetBinContent(83,244);
   hist__1->SetBinContent(84,198);
   hist__1->SetBinContent(85,180);
   hist__1->SetBinContent(86,147);
   hist__1->SetBinContent(87,93);
   hist__1->SetBinContent(88,73);
   hist__1->SetBinContent(89,50);
   hist__1->SetBinContent(90,43);
   hist__1->SetBinContent(91,37);
   hist__1->SetBinContent(92,22);
   hist__1->SetBinContent(93,15);
   hist__1->SetBinContent(94,10);
   hist__1->SetBinContent(95,7);
   hist__1->SetBinContent(96,7);
   hist__1->SetBinContent(97,3);
   hist__1->SetBinContent(98,2);
   hist__1->SetBinContent(99,3);
   hist__1->SetBinContent(100,3);
   hist__1->SetBinContent(101,28);
   hist__1->SetEntries(227323);
   
   TPaveStats *ptstats = new TPaveStats(0.78,0.775,0.98,0.935,"brNDC");
   ptstats->SetName("stats");
   ptstats->SetBorderSize(1);
   ptstats->SetFillColor(0);
   ptstats->SetTextAlign(12);
   ptstats->SetTextFont(42);
   TText *AText = ptstats->AddText("hist");
   AText->SetTextSize(0.0368);
   AText = ptstats->AddText("Entries = 227323 ");
   AText = ptstats->AddText("Mean  = 0.5797");
   AText = ptstats->AddText("Std Dev   =  28.66");
   ptstats->SetOptStat(1111);
   ptstats->SetOptFit(0);
   ptstats->Draw();
   hist__1->GetListOfFunctions()->Add(ptstats);
   ptstats->SetParent(hist__1);

   Int_t ci;      // for color index setting
   TColor *color; // for color definition with alpha
   ci = TColor::GetColor("#000099");
   hist__1->SetLineColor(ci);
   hist__1->GetXaxis()->SetTitle("#DeltaZ [cm]");
   hist__1->GetXaxis()->SetLabelFont(42);
   hist__1->GetXaxis()->SetLabelSize(0.035);
   hist__1->GetXaxis()->SetTitleSize(0.035);
   hist__1->GetXaxis()->SetTitleFont(42);
   hist__1->GetYaxis()->SetLabelFont(42);
   hist__1->GetYaxis()->SetLabelSize(0.035);
   hist__1->GetYaxis()->SetTitleSize(0.035);
   hist__1->GetYaxis()->SetTitleFont(42);
   hist__1->GetZaxis()->SetLabelFont(42);
   hist__1->GetZaxis()->SetLabelSize(0.035);
   hist__1->GetZaxis()->SetTitleSize(0.035);
   hist__1->GetZaxis()->SetTitleFont(42);
   hist__1->Draw("");
   
   TPaveText *pt = new TPaveText(0.3779599,0.9368947,0.6220401,0.995,"blNDC");
   pt->SetName("title");
   pt->SetBorderSize(0);
   pt->SetFillColor(0);
   pt->SetFillStyle(0);
   pt->SetTextFont(42);
   AText = pt->AddText("Worry Later");
   pt->Draw();
   c->Modified();
   c->cd();
   c->SetSelected(c);
}
开发者ID:nikihowe,项目名称:flash,代码行数:101,代码来源:yz-plane-length.C

示例10: QCDHT_cutflow_weighted

void QCDHT_cutflow_weighted()
{
//=========Macro generated from canvas: c1/c1
//=========  (Wed Feb 24 17:48:49 2016) by ROOT version6.02/05
   TCanvas *c1 = new TCanvas("c1", "c1",65,52,700,500);
   c1->Range(-1.25,-2351156,16.25,2.11604e+07);
   c1->SetFillColor(0);
   c1->SetBorderMode(0);
   c1->SetBorderSize(2);
   c1->SetFrameBorderMode(0);
   c1->SetFrameBorderMode(0);
   
   TH1D *cutflow1 = new TH1D("cutflow1","cut flow",14,0.5,14.5);
   cutflow1->SetBinContent(1,1.791357e+07);
   cutflow1->SetBinContent(2,1.791357e+07);
   cutflow1->SetBinContent(3,1.482016e+07);
   cutflow1->SetBinContent(4,1.397007e+07);
   cutflow1->SetBinContent(5,8159947);
   cutflow1->SetBinContent(6,1368453);
   cutflow1->SetBinContent(7,12035.83);
   cutflow1->SetBinContent(8,10653.79);
   cutflow1->SetBinContent(9,4100.401);
   cutflow1->SetBinContent(10,4323.004);
   cutflow1->SetBinContent(11,1820.803);
   cutflow1->SetBinContent(12,374.2397);
   cutflow1->SetBinContent(13,35.33991);
   cutflow1->SetBinContent(14,214.6597);
   cutflow1->SetEntries(1.137194e+08);
   
   TPaveStats *ptstats = new TPaveStats(0.78,0.775,0.98,0.935,"brNDC");
   ptstats->SetName("stats");
   ptstats->SetBorderSize(1);
   ptstats->SetFillColor(0);
   ptstats->SetTextAlign(12);
   ptstats->SetTextFont(42);
   TText *AText = ptstats->AddText("cutflow");
   AText->SetTextSize(0.0368);
   AText = ptstats->AddText("Entries =   1.137194e+08");
   AText = ptstats->AddText("Mean  =      0");
   AText = ptstats->AddText("RMS   =      0");
   ptstats->SetOptStat(1111);
   ptstats->SetOptFit(0);
   ptstats->Draw();
   cutflow1->GetListOfFunctions()->Add(ptstats);
   ptstats->SetParent(cutflow1);

   Int_t ci;      // for color index setting
   TColor *color; // for color definition with alpha
   ci = TColor::GetColor("#000099");
   cutflow1->SetLineColor(ci);
   cutflow1->GetXaxis()->SetBinLabel(1,"All");
   cutflow1->GetXaxis()->SetBinLabel(2,"Trigger");
   cutflow1->GetXaxis()->SetBinLabel(3,"p_{T}");
   cutflow1->GetXaxis()->SetBinLabel(4,"|#eta|");
   cutflow1->GetXaxis()->SetBinLabel(5,"|#Delta#eta|");
   cutflow1->GetXaxis()->SetBinLabel(6,"M(jet_{0},jet(1))");
   cutflow1->GetXaxis()->SetBinLabel(7,"M(jets)");
   cutflow1->GetXaxis()->SetBinLabel(8,"#tau_{21}");
   cutflow1->GetXaxis()->SetBinLabel(9,"0b");
   cutflow1->GetXaxis()->SetBinLabel(10,"1b");
   cutflow1->GetXaxis()->SetBinLabel(11,"2b");
   cutflow1->GetXaxis()->SetBinLabel(12,"3b");
   cutflow1->GetXaxis()->SetBinLabel(13,"4b");
   cutflow1->GetXaxis()->SetBinLabel(14,"3b+HPHP");
   cutflow1->GetXaxis()->SetLabelFont(42);
   cutflow1->GetXaxis()->SetLabelSize(0.035);
   cutflow1->GetXaxis()->SetTitleSize(0.035);
   cutflow1->GetXaxis()->SetTitleFont(42);
   cutflow1->GetYaxis()->SetLabelFont(42);
   cutflow1->GetYaxis()->SetLabelSize(0.035);
   cutflow1->GetYaxis()->SetTitleSize(0.035);
   cutflow1->GetYaxis()->SetTitleFont(42);
   cutflow1->GetZaxis()->SetLabelFont(42);
   cutflow1->GetZaxis()->SetLabelSize(0.035);
   cutflow1->GetZaxis()->SetTitleSize(0.035);
   cutflow1->GetZaxis()->SetTitleFont(42);
   cutflow1->Draw("");
   
   TPaveText *pt = new TPaveText(0.4246264,0.94,0.5753736,0.995,"blNDC");
   pt->SetName("title");
   pt->SetBorderSize(0);
   pt->SetFillColor(0);
   pt->SetFillStyle(0);
   pt->SetTextFont(42);
   AText = pt->AddText("cut flow");
   pt->Draw();
   c1->Modified();
   c1->cd();
   c1->SetSelected(c1);
}
开发者ID:CMS-HHVH-RUNII,项目名称:HH4b,代码行数:90,代码来源:QCDHT_cutflow_weighted.C

示例11: initial_z_diff


//.........这里部分代码省略.........
   hist__1->SetBinContent(52,21828);
   hist__1->SetBinContent(53,17254);
   hist__1->SetBinContent(54,13388);
   hist__1->SetBinContent(55,10171);
   hist__1->SetBinContent(56,7452);
   hist__1->SetBinContent(57,5752);
   hist__1->SetBinContent(58,4452);
   hist__1->SetBinContent(59,3522);
   hist__1->SetBinContent(60,2826);
   hist__1->SetBinContent(61,2449);
   hist__1->SetBinContent(62,2170);
   hist__1->SetBinContent(63,1855);
   hist__1->SetBinContent(64,1635);
   hist__1->SetBinContent(65,1515);
   hist__1->SetBinContent(66,1393);
   hist__1->SetBinContent(67,1344);
   hist__1->SetBinContent(68,1279);
   hist__1->SetBinContent(69,1232);
   hist__1->SetBinContent(70,1248);
   hist__1->SetBinContent(71,1277);
   hist__1->SetBinContent(72,1226);
   hist__1->SetBinContent(73,1247);
   hist__1->SetBinContent(74,1229);
   hist__1->SetBinContent(75,1187);
   hist__1->SetBinContent(76,1265);
   hist__1->SetBinContent(77,1253);
   hist__1->SetBinContent(78,1269);
   hist__1->SetBinContent(79,1210);
   hist__1->SetBinContent(80,1055);
   hist__1->SetBinContent(81,914);
   hist__1->SetBinContent(82,761);
   hist__1->SetBinContent(83,632);
   hist__1->SetBinContent(84,515);
   hist__1->SetBinContent(85,450);
   hist__1->SetBinContent(86,356);
   hist__1->SetBinContent(87,264);
   hist__1->SetBinContent(88,227);
   hist__1->SetBinContent(89,176);
   hist__1->SetBinContent(90,127);
   hist__1->SetBinContent(91,134);
   hist__1->SetBinContent(92,85);
   hist__1->SetBinContent(93,60);
   hist__1->SetBinContent(94,47);
   hist__1->SetBinContent(95,29);
   hist__1->SetBinContent(96,31);
   hist__1->SetBinContent(97,18);
   hist__1->SetBinContent(98,14);
   hist__1->SetBinContent(99,12);
   hist__1->SetBinContent(100,12);
   hist__1->SetBinContent(101,63);
   hist__1->SetEntries(289897);
   
   TPaveStats *ptstats = new TPaveStats(0.78,0.775,0.98,0.935,"brNDC");
   ptstats->SetName("stats");
   ptstats->SetBorderSize(1);
   ptstats->SetFillColor(0);
   ptstats->SetTextAlign(12);
   ptstats->SetTextFont(42);
   TText *AText = ptstats->AddText("hist");
   AText->SetTextSize(0.0368);
   AText = ptstats->AddText("Entries = 289897 ");
   AText = ptstats->AddText("Mean  = 0.6888");
   AText = ptstats->AddText("Std Dev   =  33.12");
   ptstats->SetOptStat(1111);
   ptstats->SetOptFit(0);
   ptstats->Draw();
   hist__1->GetListOfFunctions()->Add(ptstats);
   ptstats->SetParent(hist__1);

   Int_t ci;      // for color index setting
   TColor *color; // for color definition with alpha
   ci = TColor::GetColor("#000099");
   hist__1->SetLineColor(ci);
   hist__1->GetXaxis()->SetTitle("#DeltaZ [cm]");
   hist__1->GetXaxis()->SetLabelFont(42);
   hist__1->GetXaxis()->SetLabelSize(0.035);
   hist__1->GetXaxis()->SetTitleSize(0.035);
   hist__1->GetXaxis()->SetTitleFont(42);
   hist__1->GetYaxis()->SetLabelFont(42);
   hist__1->GetYaxis()->SetLabelSize(0.035);
   hist__1->GetYaxis()->SetTitleSize(0.035);
   hist__1->GetYaxis()->SetTitleFont(42);
   hist__1->GetZaxis()->SetLabelFont(42);
   hist__1->GetZaxis()->SetLabelSize(0.035);
   hist__1->GetZaxis()->SetTitleSize(0.035);
   hist__1->GetZaxis()->SetTitleFont(42);
   hist__1->Draw("");
   
   TPaveText *pt = new TPaveText(0.15,0.9368947,0.85,0.995,"blNDC");
   pt->SetName("title");
   pt->SetBorderSize(0);
   pt->SetFillColor(0);
   pt->SetFillStyle(0);
   pt->SetTextFont(42);
   AText = pt->AddText("Difference in PMT-constructed position and mc-truth start position");
   pt->Draw();
   c->Modified();
   c->cd();
   c->SetSelected(c);
}
开发者ID:nikihowe,项目名称:flash,代码行数:101,代码来源:initial_z_diff.C

示例12: initPtSpectrum


//.........这里部分代码省略.........
   h11->SetBinError(441,2.36857e-07);
   h11->SetBinError(442,2.59463e-07);
   h11->SetBinError(443,1.05926e-07);
   h11->SetBinError(444,2.36857e-07);
   h11->SetBinError(445,1.98169e-07);
   h11->SetBinError(446,1.83468e-07);
   h11->SetBinError(447,2.36857e-07);
   h11->SetBinError(448,2.90089e-07);
   h11->SetBinError(449,2.48417e-07);
   h11->SetBinError(450,2.11851e-07);
   h11->SetBinError(451,1.49801e-07);
   h11->SetBinError(452,1.29732e-07);
   h11->SetBinError(453,1.67483e-07);
   h11->SetBinError(454,1.98169e-07);
   h11->SetBinError(455,1.67483e-07);
   h11->SetBinError(456,1.67483e-07);
   h11->SetBinError(457,1.05926e-07);
   h11->SetBinError(458,2.70058e-07);
   h11->SetBinError(459,1.98169e-07);
   h11->SetBinError(460,1.98169e-07);
   h11->SetBinError(461,1.49801e-07);
   h11->SetBinError(462,1.83468e-07);
   h11->SetBinError(463,1.05926e-07);
   h11->SetBinError(464,1.49801e-07);
   h11->SetBinError(465,1.67483e-07);
   h11->SetBinError(466,1.98169e-07);
   h11->SetBinError(467,1.83468e-07);
   h11->SetBinError(468,1.29732e-07);
   h11->SetBinError(469,1.67483e-07);
   h11->SetBinError(470,2.36857e-07);
   h11->SetBinError(471,2.11851e-07);
   h11->SetBinError(472,2.11851e-07);
   h11->SetBinError(473,1.49801e-07);
   h11->SetBinError(474,2.11851e-07);
   h11->SetBinError(475,1.83468e-07);
   h11->SetBinError(476,1.98169e-07);
   h11->SetBinError(477,1.67483e-07);
   h11->SetBinError(478,1.49801e-07);
   h11->SetBinError(479,1.83468e-07);
   h11->SetBinError(480,1.83468e-07);
   h11->SetBinError(481,1.83468e-07);
   h11->SetBinError(482,1.49801e-07);
   h11->SetBinError(483,1.98169e-07);
   h11->SetBinError(484,1.29732e-07);
   h11->SetBinError(485,1.83468e-07);
   h11->SetBinError(486,7.49007e-08);
   h11->SetBinError(487,1.49801e-07);
   h11->SetBinError(488,1.49801e-07);
   h11->SetBinError(489,1.67483e-07);
   h11->SetBinError(490,1.67483e-07);
   h11->SetBinError(491,2.11851e-07);
   h11->SetBinError(492,1.83468e-07);
   h11->SetBinError(493,1.83468e-07);
   h11->SetBinError(494,1.29732e-07);
   h11->SetBinError(495,1.49801e-07);
   h11->SetBinError(496,1.98169e-07);
   h11->SetBinError(497,1.05926e-07);
   h11->SetBinError(498,1.67483e-07);
   h11->SetBinError(499,1.29732e-07);
   h11->SetBinError(500,2.11851e-07);
   h11->SetBinError(501,1.38718e-06);
   h11->SetEntries(3.17523e+06);
   
   TPaveStats *ptstats = new TPaveStats(0.78,0.775,0.98,0.935,"brNDC");
   ptstats->SetName("stats");
   ptstats->SetBorderSize(1);
   ptstats->SetFillColor(0);
   ptstats->SetTextAlign(12);
   ptstats->SetTextFont(42);
   TText *AText = ptstats->AddText("h1");
   AText->SetTextSize(0.0368);
   AText = ptstats->AddText("Entries = 3175226");
   AText = ptstats->AddText("Mean  =  22.48");
   AText = ptstats->AddText("RMS   =  27.23");
   ptstats->SetOptStat(1111);
   ptstats->SetOptFit(0);
//   ptstats->Draw();
   h11->GetListOfFunctions()->Add(ptstats);
   ptstats->SetParent(h11);
/*
   Int_t ci;      // for color index setting
   TColor *color; // for color definition with alpha
   ci = TColor::GetColor("#000099");
   h11->SetLineColor(ci);
   h11->GetXaxis()->SetLabelFont(42);
   h11->GetXaxis()->SetLabelSize(0.035);
   h11->GetXaxis()->SetTitleSize(0.035);
   h11->GetXaxis()->SetTitleFont(42);
   h11->GetYaxis()->SetLabelFont(42);
   h11->GetYaxis()->SetLabelSize(0.035);
   h11->GetYaxis()->SetTitleSize(0.035);
   h11->GetYaxis()->SetTitleFont(42);
   h11->GetZaxis()->SetLabelFont(42);
   h11->GetZaxis()->SetLabelSize(0.035);
   h11->GetZaxis()->SetTitleSize(0.035);
   h11->GetZaxis()->SetTitleFont(42);
   h11->Draw("");
*/
   h_ptSpectrum = h11;
}
开发者ID:theofil,项目名称:NoRoadsLeft,代码行数:101,代码来源:initPtSpectrum.C


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