本文整理汇总了C++中RooRealVar::printValue方法的典型用法代码示例。如果您正苦于以下问题:C++ RooRealVar::printValue方法的具体用法?C++ RooRealVar::printValue怎么用?C++ RooRealVar::printValue使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类RooRealVar
的用法示例。
在下文中一共展示了RooRealVar::printValue方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: RA4Mult
//.........这里部分代码省略.........
if ( !process || sumD<0.01 ) {
hExclusion->SetBinContent(ix,iy,limit.isInInterval);
hLowerLimit->SetBinContent(ix,iy,limit.lowerLimit);
hUpperLimit->SetBinContent(ix,iy,limit.upperLimit);
#ifndef DEBUG
continue;
#endif
}
double sigK(0.);
for ( unsigned int j=0; j<nf; ++j ) {
if ( workingPoints[j]->sigKappa_>sigK )
sigK = workingPoints[j]->sigKappa_;
// sigK += workingPoints[j]->sigKappa_;
}
// sigK /= nf;
double sigEffBase(0.15);
double sigEffLept(0.05);
double sigEffNLO(0.);
for ( unsigned int j=0; j<nf; ++j ) {
double sige = max(fabs(yields05[3][j]-yields[3][j]),
fabs(yields20[3][j]-yields[3][j]));
sige /= yields[3][j];
if ( sige>sigEffNLO ) sigEffNLO = sige;
}
double sigEff = sqrt(sigEffBase*sigEffBase+sigEffLept*sigEffLept+sigEffNLO*sigEffNLO);
std::cout << "Systematics are " << sigK << " " << sigEff << std::endl;
sigEff = 0.20;
if ( !noKappaSyst )
wspace->var("sigmaKappa")->setVal(sigK);
if ( !noSContSyst )
wspace->var("sigmaScont")->setVal(sigEff);
if ( !noEffSyst )
wspace->var("sigmaEff")->setVal(sigEff);
// wspace->var("sigmaKappa")->setVal(sqrt(0.129*0.129+0.1*0.1)*0.967);
// for the time being: work with yields
// if ( muChannel.valid_ ) {
// wspace->var("effM")->setVal(1.);
// wspace->var("sadM")->setVal(0.);
// wspace->var("sbdM")->setVal(0.);
// wspace->var("scdM")->setVal(0.);
// }
// if ( eleChannel.valid_ ) {
// wspace->var("effE")->setVal(1.);
// wspace->var("sadE")->setVal(0.);
// wspace->var("sbdE")->setVal(0.);
// wspace->var("scdE")->setVal(0.);
// }
#ifdef DEBUG
wspace->Print("v");
RooArgSet allVars = wspace->allVars();
// allVars.printLatex(std::cout,1);
TIterator* it = allVars.createIterator();
RooRealVar* var;
while ( var=(RooRealVar*)it->Next() ) {
var->Print("v");
var->printValue(std::cout);
std::cout << std::endl;
}
#endif
std::cout << "Checked ( " << hExclusion->GetXaxis()->GetBinCenter(ix) << " , "
<< hExclusion->GetYaxis()->GetBinCenter(iy) << " ) with signal "
<< yields[3][nf-1] << std::endl;
RooDataSet data("data","data",*wspace->set("obs"));
data.add(*wspace->set("obs"));
data.Print("v");
limit = computeLimit(wspace,&data,method);
std::cout << " Limit [ " << limit.lowerLimit << " , "
<< limit.upperLimit << " ] ; isIn = " << limit.isInInterval << std::endl;
double excl = limit.isInInterval;
if ( limit.upperLimit<limit.lowerLimit ) excl = -1;
hExclusion->SetBinContent(ix,iy,excl);
hLowerLimit->SetBinContent(ix,iy,limit.lowerLimit);
hUpperLimit->SetBinContent(ix,iy,limit.upperLimit);
// return;
}
}
TFile* out = new TFile("RA4abcd.root","RECREATE");
hExclusion->SetDirectory(out);
hExclusion->SetMinimum(); hExclusion->SetMaximum();
hExclusion->SetContour(1); hExclusion->SetContourLevel(0,0.5);
hLowerLimit->SetDirectory(out);
hLowerLimit->SetMinimum(); hLowerLimit->SetMaximum();
hUpperLimit->SetDirectory(out);
hUpperLimit->SetMinimum(); hUpperLimit->SetMaximum();
for ( unsigned int j=0; j<nf; ++j ) {
hYields[3][j]->SetDirectory(out);
hYields[3][j]->SetMinimum(); hYields[3][j]->SetMaximum();
}
out->Write();
delete out;
}