本文整理汇总了C++中Observable::SetBkgAcceptance方法的典型用法代码示例。如果您正苦于以下问题:C++ Observable::SetBkgAcceptance方法的具体用法?C++ Observable::SetBkgAcceptance怎么用?C++ Observable::SetBkgAcceptance使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类Observable
的用法示例。
在下文中一共展示了Observable::SetBkgAcceptance方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: if
double Bd2JpsiKstar_sWave_Fs::angularFactor( )
{
double returnValue=0.;
int globalbin=-1;
int xbin=-1, ybin=-1, zbin=-1;
double num_entries_bin=-1.;
//Observable* cos1Obs = cos1Obs = _datapoint->GetObservable( cosPsiName );
Observable* cos1Obs = _datapoint->GetObservable( cosPsiName );
if( cos1Obs->GetBkgBinNumber() != -1 )
{
return cos1Obs->GetBkgAcceptance();
}
else
{
Observable* cos2Obs = _datapoint->GetObservable( cosThetaName );
Observable* phiObs = _datapoint->GetObservable( phiName );
//Find global bin number for values of angles, find number of entries per bin, divide by volume per bin and normalise with total number of entries in the histogram
xbin = xaxis->FindFixBin( cosPsi ); if( xbin > nxbins ) xbin = nxbins; if( xbin == 0 ) xbin = 1;
ybin = yaxis->FindFixBin( cosTheta ); if( ybin > nybins ) ybin = nybins; if( ybin == 0 ) ybin = 1;
zbin = zaxis->FindFixBin( phi ); if( zbin > nzbins ) zbin = nzbins; if( zbin == 0 ) zbin = 1;
globalbin = histo->GetBin( xbin, ybin, zbin );
num_entries_bin = (double)histo->GetBinContent(globalbin);
//Angular factor normalized with phase space of histogram and total number of entries in the histogram
returnValue = (double)num_entries_bin;// / (deltax * deltay * deltaz) / (double)total_num_entries;
//returnValue = (double)num_entries_bin / histo->Integral();
cos1Obs->SetBkgBinNumber( xbin ); cos1Obs->SetBkgAcceptance( returnValue );
cos2Obs->SetBkgBinNumber( ybin ); cos2Obs->SetBkgAcceptance( returnValue );
phiObs->SetBkgBinNumber( zbin ); phiObs->SetBkgAcceptance( returnValue );
}
return returnValue;
}