本文整理汇总了C++中TGraph2D::SetMarkerSize方法的典型用法代码示例。如果您正苦于以下问题:C++ TGraph2D::SetMarkerSize方法的具体用法?C++ TGraph2D::SetMarkerSize怎么用?C++ TGraph2D::SetMarkerSize使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类TGraph2D
的用法示例。
在下文中一共展示了TGraph2D::SetMarkerSize方法的3个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: setGraphOptions
void setGraphOptions(TGraph2D &g)
{
g.SetTitle("");
g.SetMarkerColor(1);
g.SetMarkerStyle(24);
g.SetMarkerSize(.5);
}
示例2: view_SMEvents_3D_from_Hits
//.........这里部分代码省略.........
// lineZY->Draw("same");
// 3D FITTING CODE (based on line3Dfit.C), draw graph and line fit
ROOT::Fit::Fitter fitter;
SumDistance2 sdist(graph);
#ifdef __CINT__
ROOT::Math::Functor fcn(&sdist,4,"SumDistance2");
#else
ROOT::Math::Functor fcn(sdist,4);
#endif
// set the function and the initial parameter values
double pStart[4] = {param0,param1,param2,param3};
fitter.SetFCN(fcn,pStart);
// set step sizes different than default ones (0.3 times parameter values)
for (int i = 0; i < 4; ++i) fitter.Config().ParSettings(i).SetStepSize(0.01);
bool ok = fitter.FitFCN();
if (!ok) {
Error("line3Dfit","Line3D Fit failed");
fitFailed = true;
} else {
const ROOT::Fit::FitResult & result = fitter.Result();
const double * fitParams = result.GetParams();
sumSquares = result.MinFcnValue();
std::cout << "Sum of distance squares: " << sumSquares << std::endl;
std::cout << "Sum of distance squares divided by numEntries: " << sumSquares/numEntries << std::endl;
std::cout << "Theta : " << TMath::ATan(sqrt(pow(fitParams[1], 2) + pow(fitParams[3], 2))) << std::endl;
// result.Print(std::cout); // (un)suppress results output
// Draw the graph
graph->SetMarkerStyle(8);
graph->SetMarkerSize(0.5);
graph->Draw("pcol");
// Draw the fitted line
int n = 1000;
double t0 = 0; // t is the z coordinate
double dt = 40.96;
TPolyLine3D *l = new TPolyLine3D(n);
for (int i = 0; i <n;++i) {
double t = t0+ dt*i/n;
double x,y,z;
line(t,fitParams,x,y,z);
l->SetPoint(i,x,y,z);
}
l->SetLineColor(kRed);
l->Draw("same");
// Access fit params and minfcnvalue
// cout << "FIT1: " << fitParams[1] << "\n";
// cout << "FIT2: " << result.MinFcnValue() << "\n";
}
// Criteria to be a good event (if not good entry, then don't show)
bool isGoodEvent = false;
// the following block of code finds the mean X, Y ans Z values
double meanX = 0;
double meanY = 0;
double meanZ = 0;
reader->SetEntry(startEntryNum);
for (int i = 0; i < endEntryNum - startEntryNum; i++) {
meanX += graph->GetX()[i];
meanY += graph->GetY()[i];
示例3: FitXS
//.........这里部分代码省略.........
//c1_5->SetTicks(0,0);
//c1_2->SetRightMargin(0.15);
//c1_2->SetLeftMargin(0.15);
//c1_2->SetBottomMargin(0.02);
lm5->Draw("colz1");
text->DrawLatex(-3.,0.7,"#kappa_{#lambda} = -5, c_{g} = c_{2} = 0");
c1->cd(12);
//c1_5->SetTicks(0,0);
//c1_2->SetRightMargin(0.15);
//c1_2->SetLeftMargin(0.15);
//c1_2->SetBottomMargin(0.02);
lm10->Draw("colz1");
//text->DrawLatex(-3,1,"SM plane in log scale");
//text->SetTextSize(0.08);
//text->SetTextColor(0);
text->DrawLatex(-3.,0.7,"#kappa_{#lambda} = -10, c_{g} = c_{2} = 0");
c1->SaveAs("C2Fit.pdf");
c1->Close();
*/
//////////////////////////////////////////////////
//
// do histrograms with errors
//
// plot (point - fit)/fit between int nmintest, int nmaxtest
// do by the planes
//////////////////////////////////////////////////
// take the fit
// need to be done by planes
//c1->Clear();
// a
double SMxs = 0.013531; // 1 0.017278;// 14 0.0041758;// 8tev 0.013531; // 13 tev 0.017278;// 0.0041758;
TGraph2D *g2 = new TGraph2D(117);//(118);
g2->SetMarkerStyle(20);
g2->SetMarkerSize(2);
g2->SetTitle("0");
g2->SetTitle("#kappa_{t} = #kappa_{#lambda} = 1 , c_{2} = 0 ; c_{g} ; c_{2g}");
int j=0;
for (unsigned int ij = 0; ij < nmaxx ; ij++) if( par1[ij] ==1 && par0[ij] ==1 && par2[ij]==0 && cross_section[ij] >0.0001) if(ij!=301) {
double fit = SMxs*(fg2->Eval(par3[ij], par4[ij]));
cout<<j<<" "<< par3[ij]<<" "<< par4[ij]<<" "<<fit <<" "<< cross_section[ij]<<" diff: " <<(fit - cross_section[ij])/fit<< endl;
g2->SetPoint(j, par3[ij], par4[ij], 100*(fit - cross_section[ij])/fit);
j++;
//Differences2->Fill(par3[i], par4[i], (fit - cross_section[i])/fit);
}
// b
////////////////////////////////
int ktb=1.0;
int klb=1.0;
// cg ===> x ==> c2
// c2g ===> y ==> kt ==> cg = c2g
TF2 *pb = new TF2("pb","([0]*[15]**4 + [1]*x**2 + [2]*[15]**2*[16]**2 + [3]*y**2*[16]**2 + [4]*y**2 + [5]*x*[15]**2 + [6]*[15]*[16]*[15]**2 + [7]*[15]*[16]*x + [8]*y*[16]*x - [9]*x*y + [10]*y*[16]*[15]**2 - [11]*y*[15]**2 + [12]*[16]*y*[15]*[16] - [13]*y*[15]*[16] - [14]*y*y*[16])/[17]",-3,3,-1,1);
pb->SetParameter(0,a[0]);
pb->SetParameter(1,a[1]);
pb->SetParameter(2,a[2]);
pb->SetParameter(3,a[3]);
pb->SetParameter(4,a[4]);
pb->SetParameter(5,a[5]);
pb->SetParameter(6,a[6]);
pb->SetParameter(7,a[7]);
pb->SetParameter(8,a[8]);
pb->SetParameter(9,a[9]);
pb->SetParameter(10,a[10]);
pb->SetParameter(11,a[11]);
pb->SetParameter(12,a[12]);
pb->SetParameter(13,a[13]);
pb->SetParameter(14,a[14]);