本文整理汇总了C++中TGraphErrors::GetMarkerStyle方法的典型用法代码示例。如果您正苦于以下问题:C++ TGraphErrors::GetMarkerStyle方法的具体用法?C++ TGraphErrors::GetMarkerStyle怎么用?C++ TGraphErrors::GetMarkerStyle使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类TGraphErrors
的用法示例。
在下文中一共展示了TGraphErrors::GetMarkerStyle方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: softrad
//.........这里部分代码省略.........
const char *cs = samples[isample];
const int a = alphas[ialpha];
// Get graph made vs pT
string s = Form("%s/%s/%s_%s_a%d",types[itype],bin,cm,cs,a);
TGraphErrors *g = (TGraphErrors*)fin->Get(s.c_str());
if (!g) cout << "Missing " << s << endl << flush;
assert(g);
// Clean out empty points
// as well as trigger-biased ones for dijets
// as well as weird gamma+jet high pT point
for (int i = g->GetN()-1; i != -1; --i) {
if (g->GetY()[i]==0 || g->GetEY()[i]==0 ||
(string(cs)=="dijet" && g->GetX()[i]<70.) ||
(string(cs)=="gamjet" && g->GetX()[i]>600. && etamin!=0))
g->RemovePoint(i);
}
gemap[ct][cm][cs][a] = g;
// Sort points into new graphs vs alpha
TH1D *hpt = (isample==0 ? hpt2 : hpt1);
TProfile *ppt = (isample==0 ? ppt2 : ppt1);
if (isample==3) { hpt = hpt4; ppt = ppt4; } // pas-v6
for (int i = 0; i != g->GetN(); ++i) {
double pt = g->GetX()[i];
ppt->Fill(pt, pt);
int ipt = int(hpt->GetBinLowEdge(hpt->FindBin(pt))+0.5);
//int ipt = int(pt+0.5);
TGraphErrors *ga = gamap[ct][cm][cs][ipt];
if (!ga) {
ga = new TGraphErrors(0);
ga->SetMarkerStyle(g->GetMarkerStyle());
ga->SetMarkerColor(g->GetMarkerColor());
ga->SetLineColor(g->GetLineColor());
gamap[ct][cm][cs][ipt] = ga;
}
int n = ga->GetN();
ga->SetPoint(n, 0.01*a, g->GetY()[i]);
ga->SetPointError(n, 0, g->GetEY()[i]);
} // for i
} // for ialpha
} // for isample
} // for imethod
} // for itype
cout << "Drawing plots vs pT for each alpha" << endl << flush;
// 2x6 plots
for (int itype = 0; itype != ntypes; ++itype) {
for (int imethod = 0; imethod != nmethods; ++imethod) {
const char *ct = types[itype];
const char *cm = methods[imethod];
int ipad = ntypes*imethod + itype + 1; assert(ipad<=6);
c1->cd(ipad);
gPad->SetLogx();
h1->SetMaximum(itype<2 ? 1.15 : 1.08);
h1->SetMinimum(itype<2 ? 0.85 : 0.93);
h1->SetYTitle(Form("Response (%s)",ct));
h1->DrawClone("AXIS");
tex->DrawLatex(0.20,0.85,texlabel[cm]);