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


C++ TProfile::GetName方法代码示例

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


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

示例1: printRes

void
HistoCompare::PVCompute(TProfile * oldHisto , TProfile * newHisto , TText * te )
{

  myoldProfile = oldHisto;
  mynewProfile = newHisto;
  myte = te;

  Double_t *res ;

  Double_t mypv = myoldProfile->Chi2Test(mynewProfile,"WW",res);
  TString title = myoldProfile->GetName();
  printRes(title, mypv, myte);
  return;

}
开发者ID:DesyTau,项目名称:cmssw,代码行数:16,代码来源:MECompare.C

示例2: drawFracs


//.........这里部分代码省略.........
      h2->GetXaxis()->SetRangeUser(pvmin,pvmax);
    } else {
      h2->GetXaxis()->SetMoreLogLabels();
      h2->GetXaxis()->SetNoExponent();
      h2->GetXaxis()->SetRangeUser(37,3832);
    }
    h2->SetMaximum(_vspu ? +6+10-1e-5 : +4-1e-5 +6);
    h2->SetMinimum(_vspu ? -6+1e-5 : -4+1e-5 -6);

    //lumi_13TeV = "2.1 fb^{-1}";
    lumi_13TeV = plot_title.c_str();
    TCanvas *c1 = tdrDiCanvas("c1",h,h2,4,0);

    c1->cd(1);
    TLegend *leg = tdrLeg(0.20,0.23-0.05,0.50,0.53-0.05);

    for (int jfrac = 0; jfrac != nfrac; ++jfrac) {

      string sf = fracs[jfrac];
      const char *cf = fracs[jfrac].c_str();
      const char *ctp = stp.c_str();

      string spu = (_vspu ? "_vsnpv" : "");
      const char *cpu = spu.c_str();
      string spudt = (_vspu ? (all_MC ? "mc/" : "jt40/") : "");
      const char *cpudt = spudt.c_str();
      string spumc = (_vspu ? (all_DT ? "jt40/" : "mc/") : "");
      const char *cpumc = spumc.c_str();

      assert(ddt->cd(Form("Eta_%1.1f-%1.1f",y1,y2)));
      const char *hname1 = Form("%sp%s%s%s",cpudt,cf,ctp,cpu);
      TProfile *pdt = (TProfile*)gDirectory->Get(hname1);
      if (!pdt) cout << hname1 << " not found in "
                     << gDirectory->GetName() << endl << flush;
      assert(pdt);
      pdt->SetName(Form("%s_dt",pdt->GetName()));

      assert(dmc->cd(Form("Eta_%1.1f-%1.1f",y1,y2)));
      const char *hname2 = Form("%sp%s%s%s",cpumc,cf,ctp,cpu);
      TProfile *pmc = (TProfile*)gDirectory->Get(hname2);
      if (!pmc) cout << hname2 << " not found in "
                     << gDirectory->GetName() << endl << flush;
      assert(pmc);
      pmc->SetName(Form("%s_mc",pmc->GetName()));

      // Rebin histogram
      TH1D *href = new TH1D("href","", nx, &x[0]);
      //TH1D *hmc = (_vspu ? pmc->ProjectionX() : tools::Rebin(pmc, href));
      //TH1D *hdt = (_vspu ? pdt->ProjectionX() : tools::Rebin(pdt, href));
      TH1D *hmc = tools::Rebin(pmc, href);
      TH1D *hdt = tools::Rebin(pdt, href);

      // Scale data by response to MC-equivalent energy fractions
      if (_shiftJES) {
        for (int i = 1; i != hdt->GetNbinsX()+1; ++i) {

          //double jec = 1.02;
          double jec = jesShift(hdt->GetBinCenter(i));
          hdt->SetBinContent(i, hdt->GetBinContent(i)/jec);
        } // for i
      } // _shiftJES
      
      // For cef, add muf
      if (sf=="cef") {
        assert(ddt->cd(Form("Eta_%1.1f-%1.1f",y1,y2)));
        TProfile *pdt2 = (TProfile*)gDirectory->Get(Form("%spmuf%s%s",
开发者ID:miquork,项目名称:jetphys,代码行数:67,代码来源:drawFracs.C


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