• 设为首页
  • 点击收藏
  • 手机版
    手机扫一扫访问
    迪恩网络手机版
  • 关注官方公众号
    微信扫一扫关注
    迪恩网络公众号

C++ TPaveStats类代码示例

原作者: [db:作者] 来自: [db:来源] 收藏 邀请

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



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

示例1: 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


示例2: fixStats

void fixStats()
{
  TH1* ratioHist = (TH1*) gROOT->FindObject("data");
  TPaveStats* stats = (TPaveStats*) ratioHist->FindObject("stats");
  if(stats)stats->SetTextSize(0.040209);
}
开发者ID:cms-analysis,项目名称:ZprimeDiLeptons,代码行数:6,代码来源:SamMacroModBinWidth.C


示例3: plot

// -----------------------------------------------------------------------------
// Create plots
void plot( std::string& path, 
	   std::string& type, 
	   std::string& sample, 
	   std::string& dir, 
	   std::string& histo,
	   double lumi,
	   bool scale ) {

  std::string canvas_name = histo + "_" + dir + "_" + type + "_" + sample;

  // Create canvas  
  TCanvas* canvas = new TCanvas(canvas_name.c_str(),"");
  canvas->SetFillColor(0);
  canvas->SetFrameBorderMode(0);
  canvas->SetFrameFillColor(0);
  canvas->SetTopMargin(0.10);
  canvas->SetBottomMargin(0.12);
  canvas->SetLeftMargin(0.12);
  canvas->SetRightMargin(0.15);

  // Retrieve histogram
  std::string file_name = path + type + "_" + sample + ".root";
  TFile* f =  new TFile(file_name.c_str(),"READ");
  TDirectory* d = (TDirectory*)f->Get(dir.c_str());
  TH2D* his = (TH1*)d->Get(histo.c_str());
  if ( !his ) return;

  //his->Rebin2D(2,2);

  if ( true ) { gPad->SetLogz(); }
  if ( scale ) his->Scale( lumi / 100. );
  his->SetMaximum(1.e4);
  his->SetMinimum(1.e-5);
  //his->SetMinimum( his->GetMinimum(1.e-12) );

//   his->SetMaximum( 20000. );
//   his->SetMinimum( 2.e-4 );

//   his->SetMaximum( 20000. );
//   his->SetMinimum( 20. );

  double xmin = his->GetXaxis()->GetXmin();
  double xmax = his->GetXaxis()->GetXmax();
  double ymin = his->GetYaxis()->GetXmin();
  double ymax = his->GetYaxis()->GetXmax();
  
  // Reset title
  std::string title = ";" + std::string(his->GetXaxis()->GetTitle()) + ";" + std::string(his->GetYaxis()->GetTitle());
  his->SetTitle(title.c_str());
  his->GetXaxis()->SetTitle("x_{2}");
  his->GetXaxis()->SetTitleOffset(1.2);
  his->GetYaxis()->SetTitle("x_{1}");
  his->GetYaxis()->SetTitleOffset(1.4);
  his->Draw("COLZ");
  gPad->Update();

  // Lumi
  if (1) { 
    std::stringstream ss;

    ss << "#int L dt = " << lumi << " pb^{-1}";
    double xpos = 0.05 * (xmax-xmin)+xmin;
    double ypos = 0.25 * (ymax-ymin)+ymin;
    TLatex* text1 = new TLatex(xpos,ypos,ss.str().c_str());
    text1->SetTextAlign(12); 
    text1->SetTextSize(0.035);
    text1->Draw();
  }

  // Jet type
  if (1) { 
    double xpos = 0.05 * (xmax-xmin)+xmin;
    double ypos = 0.15 * (ymax-ymin)+ymin;
    TText* text2 = new TText(xpos,ypos,type.c_str());
    text2->SetTextAlign(12); 
    text2->SetTextSize(0.035);
    text2->Draw();
  }

  // Sample
  if (1) {
    double xpos = 0.05 * (xmax-xmin)+xmin;
    double ypos = 0.10 * (ymax-ymin)+ymin;
    TText* text3 = new TText(xpos,ypos,sample.c_str());
    text3->SetTextAlign(12); 
    text3->SetTextSize(0.035);
    text3->Draw();
  }

  // Stats
  gStyle->SetOptStat("i");
  his->SetStats(1);
  TPaveStats* stats = (TPaveStats*)his->GetListOfFunctions()->FindObject("stats"); 
  std::string stats_pos = "br";
  if ( stats ) { 
    stats->SetFillColor(0);
    stats->SetLineColor(0); 
    stats->SetShadowColor(0); 
//.........这里部分代码省略.........
开发者ID:bainbrid,项目名称:usercode,代码行数:101,代码来源:plot_2d.C


示例4: SinglePi


//.........这里部分代码省略.........
     TCanvas *myc = new TCanvas("myc","",800,600);
     gStyle->SetOptStat(1111);

     if(i > 2) myc->SetLogy();
     
     f1_hist1[i]->SetStats(kTRUE);   // stat box  
     f2_hist1[i]->SetStats(kTRUE);  

     f1_hist1[i]->SetTitle("");
     f2_hist1[i]->SetTitle("");
     
     f1_hist1[i]->SetLineWidth(2); 
     f2_hist1[i]->SetLineWidth(2); 
     
     // diffferent histo colors and styles
     f1_hist1[i]->SetLineColor(41);
     f1_hist1[i]->SetLineStyle(1); 
     
     f2_hist1[i]->SetLineColor(43);
     f2_hist1[i]->SetLineStyle(2);  
     
     //Set maximum to the larger of the two
     if (f1_hist1[i]->GetMaximum() < f2_hist1[i]->GetMaximum()) f1_hist1[i]->SetMaximum(1.05 * f2_hist1[i]->GetMaximum());

     TLegend *leg = new TLegend(0.2, 0.91, 0.6, 0.99, "","brNDC");

     leg->SetBorderSize(2);
     //  leg->SetFillColor(51); // see new color definition above
     leg->SetFillStyle(1001); //
     leg->AddEntry(f1_hist1[i],"CMSSW_"+ref_vers,"l");
     leg->AddEntry(f2_hist1[i],"CMSSW_"+val_vers,"l");


     TPaveStats *ptstats = new TPaveStats(0.85,0.86,0.98,0.98,"brNDC");
     ptstats->SetTextColor(41);
     f1_hist1[i]->GetListOfFunctions()->Add(ptstats);
     ptstats->SetParent(f1_hist1[i]->GetListOfFunctions());
     TPaveStats *ptstats2 = new TPaveStats(0.85,0.74,0.98,0.86,"brNDC");
     ptstats2->SetTextColor(43);
     f2_hist1[i]->GetListOfFunctions()->Add(ptstats2);
     ptstats2->SetParent(f2_hist1[i]->GetListOfFunctions());
         
     f1_hist1[i]->Draw(""); // "stat"   
     f2_hist1[i]->Draw("histsames");   
     
     leg->Draw();   
     
     myc->SaveAs(label1[i]);

     if(myc) delete myc;
   }     


  //  Profiles
  for (int i = 0; i < Nprof; i++){

    TCanvas *myc = new TCanvas("myc","",800,600);

    bool skipHisto = false;
    if (fastsim && i>=6 && i<=8) skipHisto = true;

    if (!skipHisto) {
      f1_prof[i]->SetStats(kFALSE);   
      f2_prof[i]->SetStats(kFALSE); 
      
      f1_prof[i]->SetTitle("");
开发者ID:Andrej-CMS,项目名称:cmssw,代码行数:67,代码来源:SinglePi.C


示例5: many_plots2

void many_plots2(int first = 5808, int last = 11688, int mask = 0x801E)
{
	TH1D *h[12][2];
	int i, j;
	char str[64];
	TCanvas *cv[2];
	TPaveStats *st;
	float y, dy;
	
	gROOT->SetStyle("Plain");
	gStyle->SetOptStat(1000000);
	gStyle->SetOptFit();
	
	TFile *fRoot = new TFile("many_plots.root", "RECREATE");

	HPainter *p = new HPainter(mask, first, last);
	p->SetFile(fRoot);
	if (!p->IsOpen()) {
		printf("Something wrong with data files.\n");
		return;
	}
	
	TCut cVeto("gtFromVeto > 60");
	TCut cIso("(gtFromPrevious > 45 && gtToNext > 80 && EventsBetween == 0) || (gtFromPrevious == gtFromVeto)");
	TCut cX("PositronX[0] < 0 || (PositronX[0] > 2 && PositronX[0] < 94)");
	TCut cY("PositronX[1] < 0 || (PositronX[1] > 2 && PositronX[1] < 94)");
	TCut cZ("PositronX[2] > 3.5 && PositronX[2] < 95.5");
	TCut cXYZ = cX && cY && cZ;
	TCut cR("Distance < 100 && DistanceZ > -40 && DistanceZ < 40");
	TCut cT10("gtDiff > 1");
	TCut cT20("gtDiff > 2");
	TCut cT200("gtDiff < 20");						// strong cut
        TCut cGamma("AnnihilationEnergy < 1.5 && AnnihilationGammas < 9");
        TCut cPe("PositronEnergy > 1");
	TCut cXY("PositronX[0]>=0 && PositronX[1]>=0");
	TCut cN4("NeutronEnergy > 4 && NeutronHits >= 5");

	for (i=0; i<2; i++) {
		sprintf(str, "hR%d", i);
		h[0][i] = new TH1D(str, "Distance between positron and neutron;R, cm;mHz", 40, 0, 160);
		sprintf(str, "hRZ%d", i);
		h[1][i] = new TH1D(str, "Distance between positron and neutron, projection Z;R_{z}, cm;mHz", 100, -100, 100);
		sprintf(str, "hT%d", i);
		h[2][i] = new TH1D(str, "Time between positron and neutron;T, us;mHz", 50, 0, 50);
		sprintf(str, "hX%d", i);
		h[3][i] = new TH1D(str, "Positron vertex X;X, cm;mHz", 25, 0, 100);
		sprintf(str, "hY%d", i);
		h[4][i] = new TH1D(str, "Positron vertex Y;Y, cm;mHz", 25, 0, 100);
		sprintf(str, "hZ%d", i);
		h[5][i] = new TH1D(str, "Positron vertex Z;Z, cm;mHz", 100, 0, 100);
		sprintf(str, "hNE%d", i);
		h[6][i] = new TH1D(str, "Energy detected in neutron capture;E_{n}, MeV;mHz", 50, 0, 10);
		sprintf(str, "hNN%d", i);
		h[7][i] = new TH1D(str, "Number of hits in SiPM for neutron capture;N_{n};mHz", 20, 0, 20);
		sprintf(str, "hGE%d", i);
		h[8][i] = new TH1D(str, "Energy beyond positron cluster;E_{#gamma}, MeV;mHz", 15, 0, 3);
		sprintf(str, "hGN%d", i);
		h[9][i] = new TH1D(str, "Number of SiPM hits out of positron cluster;N_{#gamma};mHz", 10, 0, 10);
		sprintf(str, "hE%d", i);
		h[10][i] = new TH1D(str, "Positorn kinetic energy;E, MeV;mHz", 40, 0, 8);
		sprintf(str, "hEC%d", i);
		h[11][i] = new TH1D(str, "Positorn kinetic energy, strong background cuts;E, MeV;mHz", 40, 0, 8);
	}
	
	printf("Histograms are created\n");
	
	p->Project(h[0][0], "Distance", cVeto && cIso && cT20 && cGamma && cPe && cXYZ);
	p->Project(h[0][1], "Distance", !cVeto && cIso && cT20 && cGamma && cPe && cXYZ);
	printf("Distance.\n");
	p->Project(h[1][0], "DistanceZ", cVeto && cIso && cT20 && cGamma && cPe && cXYZ);
	p->Project(h[1][1], "DistanceZ", !cVeto && cIso && cT20 && cGamma && cPe && cXYZ);
	printf("DistanceZ.\n");
	p->Project(h[2][0], "gtDiff", cVeto && cIso && cT10 && cGamma && cPe && cXYZ && cR);
	p->Project(h[2][1], "gtDiff", !cVeto && cIso && cT10 && cGamma && cPe && cXYZ && cR);
	printf("gtDiff.\n");
	p->Project(h[3][0], "PositronX[0]+2", cVeto && cIso && cT20 && cGamma && cPe && cY && cZ && cR && "PositronX[0] >= 0");
	p->Project(h[3][1], "PositronX[0]+2", !cVeto && cIso && cT20 && cGamma && cPe && cY && cZ && cR && "PositronX[0] >= 0");
	printf("X.\n");
	p->Project(h[4][0], "PositronX[1]+2", cVeto && cIso && cT20 && cGamma && cPe && cX && cZ && cR && "PositronX[1] >= 0");
	p->Project(h[4][1], "PositronX[1]+2", !cVeto && cIso && cT20 && cGamma && cPe && cX && cZ && cR && "PositronX[1] >= 0");
	printf("Y.\n");
	p->Project(h[5][0], "PositronX[2]+0.5", cVeto && cIso && cT20 && cGamma && cPe && cX && cY && cR);
	p->Project(h[5][1], "PositronX[2]+0.5", !cVeto && cIso && cT20 && cGamma && cPe && cX && cY && cR);
	printf("Z.\n");
	p->Project(h[6][0], "NeutronEnergy", cVeto && cIso && cT20 && cGamma && cPe && cY && cZ && cR);
	p->Project(h[6][1], "NeutronEnergy", !cVeto && cIso && cT20 && cGamma && cPe && cY && cZ && cR);
	printf("NE.\n");
	p->Project(h[7][0], "NeutronHits", cVeto && cIso && cT20 && cGamma && cPe && cXYZ && cR);
	p->Project(h[7][1], "NeutronHits", !cVeto && cIso && cT20 && cGamma && cPe && cXYZ && cR);
	printf("NN.\n");
	p->Project(h[8][0], "AnnihilationEnergy", cVeto && cIso && cT20 && cPe && cXYZ && cR);
	p->Project(h[8][1], "AnnihilationEnergy", !cVeto && cIso && cT20 && cPe && cXYZ && cR);
	printf("AE.\n");
	p->Project(h[9][0], "AnnihilationGammas", cVeto && cIso && cT20 && cPe && cXYZ && cR);
	p->Project(h[9][1], "AnnihilationGammas", !cVeto && cIso && cT20 && cPe && cXYZ && cR);
	printf("AG.\n");
	p->Project(h[10][0], "PositronEnergy", cVeto && cIso && cT20 && cGamma && cPe && cXYZ && cR);
	p->Project(h[10][1], "PositronEnergy", !cVeto && cIso && cT20 && cGamma && cPe && cXYZ && cR);
	p->Project(h[11][0], "PositronEnergy", cVeto && cIso && cT20 && cGamma && cPe && cXYZ && cR && cN4 && cT200);
	p->Project(h[11][1], "PositronEnergy", !cVeto && cIso && cT20 && cGamma && cPe && cXYZ && cR && cN4 && cT200);
//.........这里部分代码省略.........
开发者ID:lab305itep,项目名称:digi,代码行数:101,代码来源:many_plots2.C


示例6: 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


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


鲜花

握手

雷人

路过

鸡蛋
该文章已有0人参与评论

请发表评论

全部评论

专题导读
上一篇:
C++ TPaveText类代码示例发布时间:2022-05-31
下一篇:
C++ TPaveLabel类代码示例发布时间:2022-05-31
热门推荐
阅读排行榜

扫描微信二维码

查看手机版网站

随时了解更新最新资讯

139-2527-9053

在线客服(服务时间 9:00~18:00)

在线QQ客服
地址:深圳市南山区西丽大学城创智工业园
电邮:jeky_zhao#qq.com
移动电话:139-2527-9053

Powered by 互联科技 X3.4© 2001-2213 极客世界.|Sitemap