本文整理汇总了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;
}
示例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",