本文整理汇总了C++中TProfile::GetMean方法的典型用法代码示例。如果您正苦于以下问题:C++ TProfile::GetMean方法的具体用法?C++ TProfile::GetMean怎么用?C++ TProfile::GetMean使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类TProfile
的用法示例。
在下文中一共展示了TProfile::GetMean方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: recoil_analysis
//.........这里部分代码省略.........
parmB.clear();
parmC.clear();
parmD.clear();
for (int i=0; i<ptnbinszphi; i++) {
//this is zbset and response, in bins of luminosity
if (i!=theBin && theBin != -4) continue;
if (RecoilRespData[i]->numEntries() < 5) continue;
cout<<"RESP bin "<<i<<endl;
RecoilRespData[i]->printMultiline(cout, 1);
TH2D* genHist(0);
double twopi = 2*TMath::Pi();
cout<<"RESP bin start HIST "<<i<<endl;
genHist = (TH2D*) RecoilRespData[i]->createHistogram(TString::Format("recoil_resp_zphi_hist_bin_%d", i).Data(),
resp, Binning(500, 0., resp_bdr[i]),
YVar(zphi, Binning(64, 0., twopi)));//was 40 0 20
cout<<"RESP bin start Write "<<i<<endl;
genHist->SetName(TString::Format("recoil_resp_zphi_hist_bin_%d", i));
genHist->SetTitle(TString::Format("recoil_resp_zphi_hist_bin_%d", i));
TProfile *myhisty = genHist->ProfileY();
ROOTout->cd();
myhisty->Write(TString::Format("recoil_resp_zphi_hist_bin_%d", i),TObject::kOverwrite);
TF1 *pol3 = new TF1("pol3", "pol3");
myhisty->Fit("pol3");
double stats[7];
myhisty->GetStats(stats);
parmMean.push_back(myhisty->GetMean(2));
parmA.push_back(pol3->GetParameter(0));
parmB.push_back(pol3->GetParameter(1));
parmC.push_back(pol3->GetParameter(2));
parmD.push_back(pol3->GetParameter(3));
myhisty->Draw();
c1->Print(psoutput);
}
if (theBin == -4){
cout<<"HardRecoil_zphiresp_Mean: ";
for (int i=0; i<ptnbinszphi-1; i++) {
cout<<parmMean[i]<<" ";
}
cout<<parmMean[ptnbinszphi-1]<<endl;;
cout<<"HardRecoil_zphiresp_ParameterA: ";
for (int i=0; i<ptnbinszphi-1; i++) {
cout<<parmA[i]<<" ";
}
cout<<parmA[ptnbinszphi-1]<<endl;;
cout<<"HardRecoil_zphiresp_ParameterB: ";
for (int i=0; i<ptnbinszphi-1; i++) {
cout<<parmB[i]<<" ";
}
cout<<parmB[ptnbinszphi-1]<<endl;;
cout<<"HardRecoil_zphiresp_ParameterC: ";
for (int i=0; i<ptnbinszphi-1; i++) {
cout<<parmC[i]<<" ";