#include "RooDataHist.h"
#include "RooDataSet.h"
#include "RooGlobalFunc.h"
#include "RooNLLVar.h"
#include "RooRealVar.h"
#include "RooAbsData.h"
#include "RooWorkspace.h"
#include "TH1.h"
#include "RooStats/HybridCalculatorOriginal.h"
using namespace std;
ClassImp(RooStats::HybridCalculatorOriginal)
using namespace RooStats;
HybridCalculatorOriginal::HybridCalculatorOriginal(const char *name) :
TNamed(name,name),
fSbModel(0),
fBModel(0),
fObservables(0),
fNuisanceParameters(0),
fPriorPdf(0),
fData(0),
fGenerateBinned(false),
fUsePriorPdf(false), fTmpDoExtended(true)
{
SetTestStatistic(1);
SetNumberOfToys(1000);
}
HybridCalculatorOriginal::HybridCalculatorOriginal( RooAbsPdf& sbModel,
RooAbsPdf& bModel,
RooArgList& observables,
const RooArgSet* nuisance_parameters,
RooAbsPdf* priorPdf ,
bool GenerateBinned,
int testStatistics,
int numToys) :
fSbModel(&sbModel),
fBModel(&bModel),
fNuisanceParameters(nuisance_parameters),
fPriorPdf(priorPdf),
fData(0),
fGenerateBinned(GenerateBinned),
fUsePriorPdf(false),
fTmpDoExtended(true)
{
fObservables = new RooArgList(observables);
SetTestStatistic(testStatistics);
SetNumberOfToys(numToys);
if (priorPdf) UseNuisance(true);
}
HybridCalculatorOriginal::HybridCalculatorOriginal( RooAbsData & data,
RooAbsPdf& sbModel,
RooAbsPdf& bModel,
const RooArgSet* nuisance_parameters,
RooAbsPdf* priorPdf,
bool GenerateBinned,
int testStatistics,
int numToys) :
fSbModel(&sbModel),
fBModel(&bModel),
fObservables(0),
fNuisanceParameters(nuisance_parameters),
fPriorPdf(priorPdf),
fData(&data),
fGenerateBinned(GenerateBinned),
fUsePriorPdf(false),
fTmpDoExtended(true)
{
SetTestStatistic(testStatistics);
SetNumberOfToys(numToys);
if (priorPdf) UseNuisance(true);
}
HybridCalculatorOriginal::HybridCalculatorOriginal( RooAbsData& data,
const ModelConfig& sbModel,
const ModelConfig& bModel,
bool GenerateBinned,
int testStatistics,
int numToys) :
fSbModel(sbModel.GetPdf()),
fBModel(bModel.GetPdf()),
fObservables(0),
fNuisanceParameters((sbModel.GetNuisanceParameters()) ? sbModel.GetNuisanceParameters() : bModel.GetNuisanceParameters()),
fPriorPdf((sbModel.GetPriorPdf()) ? sbModel.GetPriorPdf() : bModel.GetPriorPdf()),
fData(&data),
fGenerateBinned(GenerateBinned),
fUsePriorPdf(false),
fTmpDoExtended(true)
{
if (fPriorPdf) UseNuisance(true);
SetTestStatistic(testStatistics);
SetNumberOfToys(numToys);
}
HybridCalculatorOriginal::~HybridCalculatorOriginal()
{
if (fObservables) delete fObservables;
}
void HybridCalculatorOriginal::SetNullModel(const ModelConfig& model)
{
fBModel = model.GetPdf();
if (!fPriorPdf) fPriorPdf = model.GetPriorPdf();
if (!fNuisanceParameters) fNuisanceParameters = model.GetNuisanceParameters();
}
void HybridCalculatorOriginal::SetAlternateModel(const ModelConfig& model)
{
fSbModel = model.GetPdf();
fPriorPdf = model.GetPriorPdf();
fNuisanceParameters = model.GetNuisanceParameters();
}
void HybridCalculatorOriginal::SetTestStatistic(int index)
{
fTestStatisticsIdx = index;
}
HybridResult* HybridCalculatorOriginal::Calculate(TH1& data, unsigned int nToys, bool usePriors) const
{
TString dataHistName = GetName(); dataHistName += "_roodatahist";
RooDataHist dataHist(dataHistName,"Data distribution as RooDataHist converted from TH1",*fObservables,&data);
HybridResult* result = Calculate(dataHist,nToys,usePriors);
return result;
}
HybridResult* HybridCalculatorOriginal::Calculate(RooAbsData& data, unsigned int nToys, bool usePriors) const
{
double testStatData = 0;
if ( fTestStatisticsIdx==2 ) {
double nEvents = data.sumEntries();
testStatData = nEvents;
} else if ( fTestStatisticsIdx==3 ) {
if ( fTmpDoExtended ) {
RooNLLVar sb_nll("sb_nll","sb_nll",*fSbModel,data,RooFit::CloneData(false),RooFit::Extended());
fSbModel->fitTo(data,RooFit::Hesse(false),RooFit::Strategy(0),RooFit::Extended());
double sb_nll_val = sb_nll.getVal();
RooNLLVar b_nll("b_nll","b_nll",*fBModel,data,RooFit::CloneData(false),RooFit::Extended());
fBModel->fitTo(data,RooFit::Hesse(false),RooFit::Strategy(0),RooFit::Extended());
double b_nll_val = b_nll.getVal();
double m2lnQ = 2*(sb_nll_val-b_nll_val);
testStatData = m2lnQ;
} else {
RooNLLVar sb_nll("sb_nll","sb_nll",*fSbModel,data,RooFit::CloneData(false));
fSbModel->fitTo(data,RooFit::Hesse(false),RooFit::Strategy(0));
double sb_nll_val = sb_nll.getVal();
RooNLLVar b_nll("b_nll","b_nll",*fBModel,data,RooFit::CloneData(false));
fBModel->fitTo(data,RooFit::Hesse(false),RooFit::Strategy(0));
double b_nll_val = b_nll.getVal();
double m2lnQ = 2*(sb_nll_val-b_nll_val);
testStatData = m2lnQ;
}
} else if ( fTestStatisticsIdx==1 ) {
if ( fTmpDoExtended ) {
RooNLLVar sb_nll("sb_nll","sb_nll",*fSbModel,data,RooFit::Extended());
RooNLLVar b_nll("b_nll","b_nll",*fBModel,data,RooFit::Extended());
double m2lnQ = 2*(sb_nll.getVal()-b_nll.getVal());
testStatData = m2lnQ;
} else {
RooNLLVar sb_nll("sb_nll","sb_nll",*fSbModel,data);
RooNLLVar b_nll("b_nll","b_nll",*fBModel,data);
double m2lnQ = 2*(sb_nll.getVal()-b_nll.getVal());
testStatData = m2lnQ;
}
}
std::cout << "Test statistics has been evaluated for data\n";
HybridResult* result = Calculate(nToys,usePriors);
result->SetDataTestStatistics(testStatData);
return result;
}
HybridResult* HybridCalculatorOriginal::Calculate(unsigned int nToys, bool usePriors) const
{
std::vector<double> bVals;
bVals.reserve(nToys);
std::vector<double> sbVals;
sbVals.reserve(nToys);
RunToys(bVals,sbVals,nToys,usePriors);
HybridResult* result;
TString name = "HybridResult_" + TString(GetName() );
if ( fTestStatisticsIdx==2 )
result = new HybridResult(name,sbVals,bVals,false);
else
result = new HybridResult(name,sbVals,bVals);
return result;
}
void HybridCalculatorOriginal::RunToys(std::vector<double>& bVals, std::vector<double>& sbVals, unsigned int nToys, bool usePriors) const
{
std::cout << "HybridCalculatorOriginal: run " << nToys << " toy-MC experiments\n";
std::cout << "with test statistics index: " << fTestStatisticsIdx << "\n";
if (usePriors) std::cout << "marginalize nuisance parameters \n";
assert(nToys > 0);
assert(fBModel);
assert(fSbModel);
if (usePriors) {
assert(fPriorPdf);
assert(fNuisanceParameters);
}
std::vector<double> parameterValues;
int nParameters = (fNuisanceParameters) ? fNuisanceParameters->getSize() : 0;
RooArgList parametersList("parametersList");
if (usePriors && nParameters>0) {
parametersList.add(*fNuisanceParameters);
parameterValues.resize(nParameters);
for (int iParameter=0; iParameter<nParameters; iParameter++) {
RooRealVar* oneParam = (RooRealVar*) parametersList.at(iParameter);
parameterValues[iParameter] = oneParam->getVal();
}
}
RooArgSet originalSbParams;
RooArgSet originalBParams;
if (fTestStatisticsIdx == 3) {
RooArgSet * sbparams = fSbModel->getParameters(*fObservables);
RooArgSet * bparams = fBModel->getParameters(*fObservables);
if (sbparams) originalSbParams.addClone(*sbparams);
if (bparams) originalBParams.addClone(*bparams);
delete sbparams;
delete bparams;
}
for (unsigned int iToy=0; iToy<nToys; iToy++) {
if ( iToy%500==0 ) {
std::cout << "....... toy number " << iToy << " / " << nToys << std::endl;
}
if (usePriors && nParameters>0) {
RooDataSet* tmpValues = (RooDataSet*) fPriorPdf->generate(*fNuisanceParameters,1);
for (int iParameter=0; iParameter<nParameters; iParameter++) {
RooRealVar* oneParam = (RooRealVar*) parametersList.at(iParameter);
oneParam->setVal(tmpValues->get()->getRealValue(oneParam->GetName()));
}
delete tmpValues;
}
RooAbsData* bData;
if (fGenerateBinned)
bData = static_cast<RooAbsData*> (fBModel->generateBinned(*fObservables,RooFit::Extended()));
else {
if ( fTmpDoExtended ) bData = static_cast<RooAbsData*> (fBModel->generate(*fObservables,RooFit::Extended()));
else bData = static_cast<RooAbsData*> (fBModel->generate(*fObservables,1));
}
bool bIsEmpty = false;
if (bData==NULL) {
bIsEmpty = true;
RooDataSet* bDataDummy=new RooDataSet("bDataDummy","empty dataset",*fObservables);
bData = static_cast<RooAbsData*>(new RooDataHist ("bDataEmpty","",*fObservables,*bDataDummy));
delete bDataDummy;
}
RooAbsData* sbData;
if (fGenerateBinned)
sbData = static_cast<RooAbsData*> (fSbModel->generateBinned(*fObservables,RooFit::Extended()));
else {
if ( fTmpDoExtended ) sbData = static_cast<RooAbsData*> (fSbModel->generate(*fObservables,RooFit::Extended()));
else sbData = static_cast<RooAbsData*> (fSbModel->generate(*fObservables,1));
}
bool sbIsEmpty = false;
if (sbData==NULL) {
sbIsEmpty = true;
RooDataSet* sbDataDummy=new RooDataSet("sbDataDummy","empty dataset",*fObservables);
sbData = static_cast<RooAbsData*>(new RooDataHist ("sbDataEmpty","",*fObservables,*sbDataDummy));
delete sbDataDummy;
}
if (usePriors && nParameters>0) {
for (int iParameter=0; iParameter<nParameters; iParameter++) {
RooRealVar* oneParam = (RooRealVar*) parametersList.at(iParameter);
oneParam->setVal(parameterValues[iParameter]);
}
}
for (int hypoTested=0; hypoTested<=1; hypoTested++) {
RooAbsData* dataToTest = sbData;
bool dataIsEmpty = sbIsEmpty;
if ( hypoTested==1 ) { dataToTest = bData; dataIsEmpty = bIsEmpty; }
if ( fTestStatisticsIdx==2 ) {
double nEvents = 0;
if ( !dataIsEmpty ) nEvents = dataToTest->numEntries();
if ( hypoTested==0 ) sbVals.push_back(nEvents);
else bVals.push_back(nEvents);
} else if ( fTestStatisticsIdx==3 ) {
if ( fTmpDoExtended ) {
RooNLLVar sb_nll("sb_nll","sb_nll",*fSbModel,*dataToTest,RooFit::CloneData(false),RooFit::Extended());
fSbModel->fitTo(*dataToTest,RooFit::PrintLevel(-1), RooFit::Hesse(false),RooFit::Strategy(0),RooFit::Extended());
double sb_nll_val = sb_nll.getVal();
RooNLLVar b_nll("b_nll","b_nll",*fBModel,*dataToTest,RooFit::CloneData(false),RooFit::Extended());
fBModel->fitTo(*dataToTest,RooFit::PrintLevel(-1),RooFit::Hesse(false),RooFit::Strategy(0),RooFit::Extended());
double b_nll_val = b_nll.getVal();
double m2lnQ = -2*(b_nll_val-sb_nll_val);
if ( hypoTested==0 ) sbVals.push_back(m2lnQ);
else bVals.push_back(m2lnQ);
} else {
RooNLLVar sb_nll("sb_nll","sb_nll",*fSbModel,*dataToTest,RooFit::CloneData(false));
fSbModel->fitTo(*dataToTest,RooFit::PrintLevel(-1), RooFit::Hesse(false),RooFit::Strategy(0));
double sb_nll_val = sb_nll.getVal();
RooNLLVar b_nll("b_nll","b_nll",*fBModel,*dataToTest,RooFit::CloneData(false));
fBModel->fitTo(*dataToTest,RooFit::PrintLevel(-1), RooFit::Hesse(false),RooFit::Strategy(0));
double b_nll_val = b_nll.getVal();
double m2lnQ = -2*(b_nll_val-sb_nll_val);
if ( hypoTested==0 ) sbVals.push_back(m2lnQ);
else bVals.push_back(m2lnQ);
}
} else if ( fTestStatisticsIdx==1 ) {
if ( fTmpDoExtended ) {
RooNLLVar sb_nll("sb_nll","sb_nll",*fSbModel,*dataToTest,RooFit::CloneData(false),RooFit::Extended());
RooNLLVar b_nll("b_nll","b_nll",*fBModel,*dataToTest,RooFit::CloneData(false),RooFit::Extended());
double m2lnQ = -2*(b_nll.getVal()-sb_nll.getVal());
if ( hypoTested==0 ) sbVals.push_back(m2lnQ);
else bVals.push_back(m2lnQ);
} else {
RooNLLVar sb_nll("sb_nll","sb_nll",*fSbModel,*dataToTest,RooFit::CloneData(false));
RooNLLVar b_nll("b_nll","b_nll",*fBModel,*dataToTest,RooFit::CloneData(false));
double m2lnQ = -2*(b_nll.getVal()-sb_nll.getVal());
if ( hypoTested==0 ) sbVals.push_back(m2lnQ);
else bVals.push_back(m2lnQ);
}
}
}
delete sbData;
delete bData;
if (fTestStatisticsIdx == 3) {
RooArgSet * sbparams = fSbModel->getParameters(*fObservables);
if (sbparams) {
assert(originalSbParams.getSize() == sbparams->getSize());
*sbparams = originalSbParams;
delete sbparams;
}
RooArgSet * bparams = fBModel->getParameters(*fObservables);
if (bparams) {
assert(originalBParams.getSize() == bparams->getSize());
*bparams = originalBParams;
delete bparams;
}
}
}
if (usePriors && nParameters>0) {
for (int iParameter=0; iParameter<nParameters; iParameter++) {
RooRealVar* oneParam = (RooRealVar*) parametersList.at(iParameter);
oneParam->setVal(parameterValues[iParameter]);
}
}
return;
}
void HybridCalculatorOriginal::PrintMore(const char* options) const
{
if (fSbModel) {
std::cout << "Signal plus background model:\n";
fSbModel->Print(options);
}
if (fBModel) {
std::cout << "\nBackground model:\n";
fBModel->Print(options);
}
if (fObservables) {
std::cout << "\nObservables:\n";
fObservables->Print(options);
}
if (fNuisanceParameters) {
std::cout << "\nParameters being integrated:\n";
fNuisanceParameters->Print(options);
}
if (fPriorPdf) {
std::cout << "\nPrior PDF model for integration:\n";
fPriorPdf->Print(options);
}
return;
}
HybridResult* HybridCalculatorOriginal::GetHypoTest() const {
if (!DoCheckInputs()) return 0;
RooAbsData * treeData = dynamic_cast<RooAbsData *> (fData);
if (!treeData) {
std::cerr << "Error in HybridCalculatorOriginal::GetHypoTest - invalid data type - return NULL" << std::endl;
return 0;
}
bool usePrior = (fUsePriorPdf && fPriorPdf );
return Calculate( *treeData, fNToys, usePrior);
}
bool HybridCalculatorOriginal::DoCheckInputs() const {
if (!fData) {
std::cerr << "Error in HybridCalculatorOriginal - data have not been set" << std::endl;
return false;
}
if (!fObservables && fData->get() ) fObservables = new RooArgList( *fData->get() );
if (!fObservables) {
std::cerr << "Error in HybridCalculatorOriginal - no observables" << std::endl;
return false;
}
if (!fSbModel) {
std::cerr << "Error in HybridCalculatorOriginal - S+B pdf has not been set " << std::endl;
return false;
}
if (!fBModel) {
std::cerr << "Error in HybridCalculatorOriginal - B pdf has not been set" << std::endl;
return false;
}
if (fUsePriorPdf && !fNuisanceParameters) {
std::cerr << "Error in HybridCalculatorOriginal - nuisance parameters have not been set " << std::endl;
return false;
}
if (fUsePriorPdf && !fPriorPdf) {
std::cerr << "Error in HybridCalculatorOriginal - prior pdf has not been set " << std::endl;
return false;
}
return true;
}
HybridCalculatorOriginal.cxx:1 HybridCalculatorOriginal.cxx:2 HybridCalculatorOriginal.cxx:3 HybridCalculatorOriginal.cxx:4 HybridCalculatorOriginal.cxx:5 HybridCalculatorOriginal.cxx:6 HybridCalculatorOriginal.cxx:7 HybridCalculatorOriginal.cxx:8 HybridCalculatorOriginal.cxx:9 HybridCalculatorOriginal.cxx:10 HybridCalculatorOriginal.cxx:11 HybridCalculatorOriginal.cxx:12 HybridCalculatorOriginal.cxx:13 HybridCalculatorOriginal.cxx:14 HybridCalculatorOriginal.cxx:15 HybridCalculatorOriginal.cxx:16 HybridCalculatorOriginal.cxx:17 HybridCalculatorOriginal.cxx:18 HybridCalculatorOriginal.cxx:19 HybridCalculatorOriginal.cxx:20 HybridCalculatorOriginal.cxx:21 HybridCalculatorOriginal.cxx:22 HybridCalculatorOriginal.cxx:23 HybridCalculatorOriginal.cxx:24 HybridCalculatorOriginal.cxx:25 HybridCalculatorOriginal.cxx:26 HybridCalculatorOriginal.cxx:27 HybridCalculatorOriginal.cxx:28 HybridCalculatorOriginal.cxx:29 HybridCalculatorOriginal.cxx:30 HybridCalculatorOriginal.cxx:31 HybridCalculatorOriginal.cxx:32 HybridCalculatorOriginal.cxx:33 HybridCalculatorOriginal.cxx:34 HybridCalculatorOriginal.cxx:35 HybridCalculatorOriginal.cxx:36 HybridCalculatorOriginal.cxx:37 HybridCalculatorOriginal.cxx:38 HybridCalculatorOriginal.cxx:39 HybridCalculatorOriginal.cxx:40 HybridCalculatorOriginal.cxx:41 HybridCalculatorOriginal.cxx:42 HybridCalculatorOriginal.cxx:43 HybridCalculatorOriginal.cxx:44 HybridCalculatorOriginal.cxx:45 HybridCalculatorOriginal.cxx:46 HybridCalculatorOriginal.cxx:47 HybridCalculatorOriginal.cxx:48 HybridCalculatorOriginal.cxx:49 HybridCalculatorOriginal.cxx:50 HybridCalculatorOriginal.cxx:51 HybridCalculatorOriginal.cxx:52 HybridCalculatorOriginal.cxx:53 HybridCalculatorOriginal.cxx:54 HybridCalculatorOriginal.cxx:55 HybridCalculatorOriginal.cxx:56 HybridCalculatorOriginal.cxx:57 HybridCalculatorOriginal.cxx:58 HybridCalculatorOriginal.cxx:59 HybridCalculatorOriginal.cxx:60 HybridCalculatorOriginal.cxx:61 HybridCalculatorOriginal.cxx:62 HybridCalculatorOriginal.cxx:63 HybridCalculatorOriginal.cxx:64 HybridCalculatorOriginal.cxx:65 HybridCalculatorOriginal.cxx:66 HybridCalculatorOriginal.cxx:67 HybridCalculatorOriginal.cxx:68 HybridCalculatorOriginal.cxx:69 HybridCalculatorOriginal.cxx:70 HybridCalculatorOriginal.cxx:71 HybridCalculatorOriginal.cxx:72 HybridCalculatorOriginal.cxx:73 HybridCalculatorOriginal.cxx:74 HybridCalculatorOriginal.cxx:75 HybridCalculatorOriginal.cxx:76 HybridCalculatorOriginal.cxx:77 HybridCalculatorOriginal.cxx:78 HybridCalculatorOriginal.cxx:79 HybridCalculatorOriginal.cxx:80 HybridCalculatorOriginal.cxx:81 HybridCalculatorOriginal.cxx:82 HybridCalculatorOriginal.cxx:83 HybridCalculatorOriginal.cxx:84 HybridCalculatorOriginal.cxx:85 HybridCalculatorOriginal.cxx:86 HybridCalculatorOriginal.cxx:87 HybridCalculatorOriginal.cxx:88 HybridCalculatorOriginal.cxx:89 HybridCalculatorOriginal.cxx:90 HybridCalculatorOriginal.cxx:91 HybridCalculatorOriginal.cxx:92 HybridCalculatorOriginal.cxx:93 HybridCalculatorOriginal.cxx:94 HybridCalculatorOriginal.cxx:95 HybridCalculatorOriginal.cxx:96 HybridCalculatorOriginal.cxx:97 HybridCalculatorOriginal.cxx:98 HybridCalculatorOriginal.cxx:99 HybridCalculatorOriginal.cxx:100 HybridCalculatorOriginal.cxx:101 HybridCalculatorOriginal.cxx:102 HybridCalculatorOriginal.cxx:103 HybridCalculatorOriginal.cxx:104 HybridCalculatorOriginal.cxx:105 HybridCalculatorOriginal.cxx:106 HybridCalculatorOriginal.cxx:107 HybridCalculatorOriginal.cxx:108 HybridCalculatorOriginal.cxx:109 HybridCalculatorOriginal.cxx:110 HybridCalculatorOriginal.cxx:111 HybridCalculatorOriginal.cxx:112 HybridCalculatorOriginal.cxx:113 HybridCalculatorOriginal.cxx:114 HybridCalculatorOriginal.cxx:115 HybridCalculatorOriginal.cxx:116 HybridCalculatorOriginal.cxx:117 HybridCalculatorOriginal.cxx:118 HybridCalculatorOriginal.cxx:119 HybridCalculatorOriginal.cxx:120 HybridCalculatorOriginal.cxx:121 HybridCalculatorOriginal.cxx:122 HybridCalculatorOriginal.cxx:123 HybridCalculatorOriginal.cxx:124 HybridCalculatorOriginal.cxx:125 HybridCalculatorOriginal.cxx:126 HybridCalculatorOriginal.cxx:127 HybridCalculatorOriginal.cxx:128 HybridCalculatorOriginal.cxx:129 HybridCalculatorOriginal.cxx:130 HybridCalculatorOriginal.cxx:131 HybridCalculatorOriginal.cxx:132 HybridCalculatorOriginal.cxx:133 HybridCalculatorOriginal.cxx:134 HybridCalculatorOriginal.cxx:135 HybridCalculatorOriginal.cxx:136 HybridCalculatorOriginal.cxx:137 HybridCalculatorOriginal.cxx:138 HybridCalculatorOriginal.cxx:139 HybridCalculatorOriginal.cxx:140 HybridCalculatorOriginal.cxx:141 HybridCalculatorOriginal.cxx:142 HybridCalculatorOriginal.cxx:143 HybridCalculatorOriginal.cxx:144 HybridCalculatorOriginal.cxx:145 HybridCalculatorOriginal.cxx:146 HybridCalculatorOriginal.cxx:147 HybridCalculatorOriginal.cxx:148 HybridCalculatorOriginal.cxx:149 HybridCalculatorOriginal.cxx:150 HybridCalculatorOriginal.cxx:151 HybridCalculatorOriginal.cxx:152 HybridCalculatorOriginal.cxx:153 HybridCalculatorOriginal.cxx:154 HybridCalculatorOriginal.cxx:155 HybridCalculatorOriginal.cxx:156 HybridCalculatorOriginal.cxx:157 HybridCalculatorOriginal.cxx:158 HybridCalculatorOriginal.cxx:159 HybridCalculatorOriginal.cxx:160 HybridCalculatorOriginal.cxx:161 HybridCalculatorOriginal.cxx:162 HybridCalculatorOriginal.cxx:163 HybridCalculatorOriginal.cxx:164 HybridCalculatorOriginal.cxx:165 HybridCalculatorOriginal.cxx:166 HybridCalculatorOriginal.cxx:167 HybridCalculatorOriginal.cxx:168 HybridCalculatorOriginal.cxx:169 HybridCalculatorOriginal.cxx:170 HybridCalculatorOriginal.cxx:171 HybridCalculatorOriginal.cxx:172 HybridCalculatorOriginal.cxx:173 HybridCalculatorOriginal.cxx:174 HybridCalculatorOriginal.cxx:175 HybridCalculatorOriginal.cxx:176 HybridCalculatorOriginal.cxx:177 HybridCalculatorOriginal.cxx:178 HybridCalculatorOriginal.cxx:179 HybridCalculatorOriginal.cxx:180 HybridCalculatorOriginal.cxx:181 HybridCalculatorOriginal.cxx:182 HybridCalculatorOriginal.cxx:183 HybridCalculatorOriginal.cxx:184 HybridCalculatorOriginal.cxx:185 HybridCalculatorOriginal.cxx:186 HybridCalculatorOriginal.cxx:187 HybridCalculatorOriginal.cxx:188 HybridCalculatorOriginal.cxx:189 HybridCalculatorOriginal.cxx:190 HybridCalculatorOriginal.cxx:191 HybridCalculatorOriginal.cxx:192 HybridCalculatorOriginal.cxx:193 HybridCalculatorOriginal.cxx:194 HybridCalculatorOriginal.cxx:195 HybridCalculatorOriginal.cxx:196 HybridCalculatorOriginal.cxx:197 HybridCalculatorOriginal.cxx:198 HybridCalculatorOriginal.cxx:199 HybridCalculatorOriginal.cxx:200 HybridCalculatorOriginal.cxx:201 HybridCalculatorOriginal.cxx:202 HybridCalculatorOriginal.cxx:203 HybridCalculatorOriginal.cxx:204 HybridCalculatorOriginal.cxx:205 HybridCalculatorOriginal.cxx:206 HybridCalculatorOriginal.cxx:207 HybridCalculatorOriginal.cxx:208 HybridCalculatorOriginal.cxx:209 HybridCalculatorOriginal.cxx:210 HybridCalculatorOriginal.cxx:211 HybridCalculatorOriginal.cxx:212 HybridCalculatorOriginal.cxx:213 HybridCalculatorOriginal.cxx:214 HybridCalculatorOriginal.cxx:215 HybridCalculatorOriginal.cxx:216 HybridCalculatorOriginal.cxx:217 HybridCalculatorOriginal.cxx:218 HybridCalculatorOriginal.cxx:219 HybridCalculatorOriginal.cxx:220 HybridCalculatorOriginal.cxx:221 HybridCalculatorOriginal.cxx:222 HybridCalculatorOriginal.cxx:223 HybridCalculatorOriginal.cxx:224 HybridCalculatorOriginal.cxx:225 HybridCalculatorOriginal.cxx:226 HybridCalculatorOriginal.cxx:227 HybridCalculatorOriginal.cxx:228 HybridCalculatorOriginal.cxx:229 HybridCalculatorOriginal.cxx:230 HybridCalculatorOriginal.cxx:231 HybridCalculatorOriginal.cxx:232 HybridCalculatorOriginal.cxx:233 HybridCalculatorOriginal.cxx:234 HybridCalculatorOriginal.cxx:235 HybridCalculatorOriginal.cxx:236 HybridCalculatorOriginal.cxx:237 HybridCalculatorOriginal.cxx:238 HybridCalculatorOriginal.cxx:239 HybridCalculatorOriginal.cxx:240 HybridCalculatorOriginal.cxx:241 HybridCalculatorOriginal.cxx:242 HybridCalculatorOriginal.cxx:243 HybridCalculatorOriginal.cxx:244 HybridCalculatorOriginal.cxx:245 HybridCalculatorOriginal.cxx:246 HybridCalculatorOriginal.cxx:247 HybridCalculatorOriginal.cxx:248 HybridCalculatorOriginal.cxx:249 HybridCalculatorOriginal.cxx:250 HybridCalculatorOriginal.cxx:251 HybridCalculatorOriginal.cxx:252 HybridCalculatorOriginal.cxx:253 HybridCalculatorOriginal.cxx:254 HybridCalculatorOriginal.cxx:255 HybridCalculatorOriginal.cxx:256 HybridCalculatorOriginal.cxx:257 HybridCalculatorOriginal.cxx:258 HybridCalculatorOriginal.cxx:259 HybridCalculatorOriginal.cxx:260 HybridCalculatorOriginal.cxx:261 HybridCalculatorOriginal.cxx:262 HybridCalculatorOriginal.cxx:263 HybridCalculatorOriginal.cxx:264 HybridCalculatorOriginal.cxx:265 HybridCalculatorOriginal.cxx:266 HybridCalculatorOriginal.cxx:267 HybridCalculatorOriginal.cxx:268 HybridCalculatorOriginal.cxx:269 HybridCalculatorOriginal.cxx:270 HybridCalculatorOriginal.cxx:271 HybridCalculatorOriginal.cxx:272 HybridCalculatorOriginal.cxx:273 HybridCalculatorOriginal.cxx:274 HybridCalculatorOriginal.cxx:275 HybridCalculatorOriginal.cxx:276 HybridCalculatorOriginal.cxx:277 HybridCalculatorOriginal.cxx:278 HybridCalculatorOriginal.cxx:279 HybridCalculatorOriginal.cxx:280 HybridCalculatorOriginal.cxx:281 HybridCalculatorOriginal.cxx:282 HybridCalculatorOriginal.cxx:283 HybridCalculatorOriginal.cxx:284 HybridCalculatorOriginal.cxx:285 HybridCalculatorOriginal.cxx:286 HybridCalculatorOriginal.cxx:287 HybridCalculatorOriginal.cxx:288 HybridCalculatorOriginal.cxx:289 HybridCalculatorOriginal.cxx:290 HybridCalculatorOriginal.cxx:291 HybridCalculatorOriginal.cxx:292 HybridCalculatorOriginal.cxx:293 HybridCalculatorOriginal.cxx:294 HybridCalculatorOriginal.cxx:295 HybridCalculatorOriginal.cxx:296 HybridCalculatorOriginal.cxx:297 HybridCalculatorOriginal.cxx:298 HybridCalculatorOriginal.cxx:299 HybridCalculatorOriginal.cxx:300 HybridCalculatorOriginal.cxx:301 HybridCalculatorOriginal.cxx:302 HybridCalculatorOriginal.cxx:303 HybridCalculatorOriginal.cxx:304 HybridCalculatorOriginal.cxx:305 HybridCalculatorOriginal.cxx:306 HybridCalculatorOriginal.cxx:307 HybridCalculatorOriginal.cxx:308 HybridCalculatorOriginal.cxx:309 HybridCalculatorOriginal.cxx:310 HybridCalculatorOriginal.cxx:311 HybridCalculatorOriginal.cxx:312 HybridCalculatorOriginal.cxx:313 HybridCalculatorOriginal.cxx:314 HybridCalculatorOriginal.cxx:315 HybridCalculatorOriginal.cxx:316 HybridCalculatorOriginal.cxx:317 HybridCalculatorOriginal.cxx:318 HybridCalculatorOriginal.cxx:319 HybridCalculatorOriginal.cxx:320 HybridCalculatorOriginal.cxx:321 HybridCalculatorOriginal.cxx:322 HybridCalculatorOriginal.cxx:323 HybridCalculatorOriginal.cxx:324 HybridCalculatorOriginal.cxx:325 HybridCalculatorOriginal.cxx:326 HybridCalculatorOriginal.cxx:327 HybridCalculatorOriginal.cxx:328 HybridCalculatorOriginal.cxx:329 HybridCalculatorOriginal.cxx:330 HybridCalculatorOriginal.cxx:331 HybridCalculatorOriginal.cxx:332 HybridCalculatorOriginal.cxx:333 HybridCalculatorOriginal.cxx:334 HybridCalculatorOriginal.cxx:335 HybridCalculatorOriginal.cxx:336 HybridCalculatorOriginal.cxx:337 HybridCalculatorOriginal.cxx:338 HybridCalculatorOriginal.cxx:339 HybridCalculatorOriginal.cxx:340 HybridCalculatorOriginal.cxx:341 HybridCalculatorOriginal.cxx:342 HybridCalculatorOriginal.cxx:343 HybridCalculatorOriginal.cxx:344 HybridCalculatorOriginal.cxx:345 HybridCalculatorOriginal.cxx:346 HybridCalculatorOriginal.cxx:347 HybridCalculatorOriginal.cxx:348 HybridCalculatorOriginal.cxx:349 HybridCalculatorOriginal.cxx:350 HybridCalculatorOriginal.cxx:351 HybridCalculatorOriginal.cxx:352 HybridCalculatorOriginal.cxx:353 HybridCalculatorOriginal.cxx:354 HybridCalculatorOriginal.cxx:355 HybridCalculatorOriginal.cxx:356 HybridCalculatorOriginal.cxx:357 HybridCalculatorOriginal.cxx:358 HybridCalculatorOriginal.cxx:359 HybridCalculatorOriginal.cxx:360 HybridCalculatorOriginal.cxx:361 HybridCalculatorOriginal.cxx:362 HybridCalculatorOriginal.cxx:363 HybridCalculatorOriginal.cxx:364 HybridCalculatorOriginal.cxx:365 HybridCalculatorOriginal.cxx:366 HybridCalculatorOriginal.cxx:367 HybridCalculatorOriginal.cxx:368 HybridCalculatorOriginal.cxx:369 HybridCalculatorOriginal.cxx:370 HybridCalculatorOriginal.cxx:371 HybridCalculatorOriginal.cxx:372 HybridCalculatorOriginal.cxx:373 HybridCalculatorOriginal.cxx:374 HybridCalculatorOriginal.cxx:375 HybridCalculatorOriginal.cxx:376 HybridCalculatorOriginal.cxx:377 HybridCalculatorOriginal.cxx:378 HybridCalculatorOriginal.cxx:379 HybridCalculatorOriginal.cxx:380 HybridCalculatorOriginal.cxx:381 HybridCalculatorOriginal.cxx:382 HybridCalculatorOriginal.cxx:383 HybridCalculatorOriginal.cxx:384 HybridCalculatorOriginal.cxx:385 HybridCalculatorOriginal.cxx:386 HybridCalculatorOriginal.cxx:387 HybridCalculatorOriginal.cxx:388 HybridCalculatorOriginal.cxx:389 HybridCalculatorOriginal.cxx:390 HybridCalculatorOriginal.cxx:391 HybridCalculatorOriginal.cxx:392 HybridCalculatorOriginal.cxx:393 HybridCalculatorOriginal.cxx:394 HybridCalculatorOriginal.cxx:395 HybridCalculatorOriginal.cxx:396 HybridCalculatorOriginal.cxx:397 HybridCalculatorOriginal.cxx:398 HybridCalculatorOriginal.cxx:399 HybridCalculatorOriginal.cxx:400 HybridCalculatorOriginal.cxx:401 HybridCalculatorOriginal.cxx:402 HybridCalculatorOriginal.cxx:403 HybridCalculatorOriginal.cxx:404 HybridCalculatorOriginal.cxx:405 HybridCalculatorOriginal.cxx:406 HybridCalculatorOriginal.cxx:407 HybridCalculatorOriginal.cxx:408 HybridCalculatorOriginal.cxx:409 HybridCalculatorOriginal.cxx:410 HybridCalculatorOriginal.cxx:411 HybridCalculatorOriginal.cxx:412 HybridCalculatorOriginal.cxx:413 HybridCalculatorOriginal.cxx:414 HybridCalculatorOriginal.cxx:415 HybridCalculatorOriginal.cxx:416 HybridCalculatorOriginal.cxx:417 HybridCalculatorOriginal.cxx:418 HybridCalculatorOriginal.cxx:419 HybridCalculatorOriginal.cxx:420 HybridCalculatorOriginal.cxx:421 HybridCalculatorOriginal.cxx:422 HybridCalculatorOriginal.cxx:423 HybridCalculatorOriginal.cxx:424 HybridCalculatorOriginal.cxx:425 HybridCalculatorOriginal.cxx:426 HybridCalculatorOriginal.cxx:427 HybridCalculatorOriginal.cxx:428 HybridCalculatorOriginal.cxx:429 HybridCalculatorOriginal.cxx:430 HybridCalculatorOriginal.cxx:431 HybridCalculatorOriginal.cxx:432 HybridCalculatorOriginal.cxx:433 HybridCalculatorOriginal.cxx:434 HybridCalculatorOriginal.cxx:435 HybridCalculatorOriginal.cxx:436 HybridCalculatorOriginal.cxx:437 HybridCalculatorOriginal.cxx:438 HybridCalculatorOriginal.cxx:439 HybridCalculatorOriginal.cxx:440 HybridCalculatorOriginal.cxx:441 HybridCalculatorOriginal.cxx:442 HybridCalculatorOriginal.cxx:443 HybridCalculatorOriginal.cxx:444 HybridCalculatorOriginal.cxx:445 HybridCalculatorOriginal.cxx:446 HybridCalculatorOriginal.cxx:447 HybridCalculatorOriginal.cxx:448 HybridCalculatorOriginal.cxx:449 HybridCalculatorOriginal.cxx:450 HybridCalculatorOriginal.cxx:451 HybridCalculatorOriginal.cxx:452 HybridCalculatorOriginal.cxx:453 HybridCalculatorOriginal.cxx:454 HybridCalculatorOriginal.cxx:455 HybridCalculatorOriginal.cxx:456 HybridCalculatorOriginal.cxx:457 HybridCalculatorOriginal.cxx:458 HybridCalculatorOriginal.cxx:459 HybridCalculatorOriginal.cxx:460 HybridCalculatorOriginal.cxx:461 HybridCalculatorOriginal.cxx:462 HybridCalculatorOriginal.cxx:463 HybridCalculatorOriginal.cxx:464 HybridCalculatorOriginal.cxx:465 HybridCalculatorOriginal.cxx:466 HybridCalculatorOriginal.cxx:467 HybridCalculatorOriginal.cxx:468 HybridCalculatorOriginal.cxx:469 HybridCalculatorOriginal.cxx:470 HybridCalculatorOriginal.cxx:471 HybridCalculatorOriginal.cxx:472 HybridCalculatorOriginal.cxx:473 HybridCalculatorOriginal.cxx:474 HybridCalculatorOriginal.cxx:475 HybridCalculatorOriginal.cxx:476 HybridCalculatorOriginal.cxx:477 HybridCalculatorOriginal.cxx:478 HybridCalculatorOriginal.cxx:479 HybridCalculatorOriginal.cxx:480 HybridCalculatorOriginal.cxx:481 HybridCalculatorOriginal.cxx:482 HybridCalculatorOriginal.cxx:483 HybridCalculatorOriginal.cxx:484 HybridCalculatorOriginal.cxx:485 HybridCalculatorOriginal.cxx:486 HybridCalculatorOriginal.cxx:487 HybridCalculatorOriginal.cxx:488 HybridCalculatorOriginal.cxx:489 HybridCalculatorOriginal.cxx:490 HybridCalculatorOriginal.cxx:491 HybridCalculatorOriginal.cxx:492 HybridCalculatorOriginal.cxx:493 HybridCalculatorOriginal.cxx:494 HybridCalculatorOriginal.cxx:495 HybridCalculatorOriginal.cxx:496 HybridCalculatorOriginal.cxx:497 HybridCalculatorOriginal.cxx:498 HybridCalculatorOriginal.cxx:499 HybridCalculatorOriginal.cxx:500 HybridCalculatorOriginal.cxx:501 HybridCalculatorOriginal.cxx:502 HybridCalculatorOriginal.cxx:503 HybridCalculatorOriginal.cxx:504 HybridCalculatorOriginal.cxx:505 HybridCalculatorOriginal.cxx:506 HybridCalculatorOriginal.cxx:507 HybridCalculatorOriginal.cxx:508 HybridCalculatorOriginal.cxx:509 HybridCalculatorOriginal.cxx:510 HybridCalculatorOriginal.cxx:511 HybridCalculatorOriginal.cxx:512 HybridCalculatorOriginal.cxx:513 HybridCalculatorOriginal.cxx:514 HybridCalculatorOriginal.cxx:515 HybridCalculatorOriginal.cxx:516 HybridCalculatorOriginal.cxx:517 HybridCalculatorOriginal.cxx:518 HybridCalculatorOriginal.cxx:519 HybridCalculatorOriginal.cxx:520 HybridCalculatorOriginal.cxx:521 HybridCalculatorOriginal.cxx:522 HybridCalculatorOriginal.cxx:523 HybridCalculatorOriginal.cxx:524 HybridCalculatorOriginal.cxx:525 HybridCalculatorOriginal.cxx:526 HybridCalculatorOriginal.cxx:527 HybridCalculatorOriginal.cxx:528 HybridCalculatorOriginal.cxx:529 HybridCalculatorOriginal.cxx:530 HybridCalculatorOriginal.cxx:531 HybridCalculatorOriginal.cxx:532 HybridCalculatorOriginal.cxx:533 HybridCalculatorOriginal.cxx:534 HybridCalculatorOriginal.cxx:535 HybridCalculatorOriginal.cxx:536 HybridCalculatorOriginal.cxx:537 HybridCalculatorOriginal.cxx:538 HybridCalculatorOriginal.cxx:539 HybridCalculatorOriginal.cxx:540 HybridCalculatorOriginal.cxx:541 HybridCalculatorOriginal.cxx:542 HybridCalculatorOriginal.cxx:543 HybridCalculatorOriginal.cxx:544 HybridCalculatorOriginal.cxx:545 HybridCalculatorOriginal.cxx:546 HybridCalculatorOriginal.cxx:547 HybridCalculatorOriginal.cxx:548 HybridCalculatorOriginal.cxx:549 HybridCalculatorOriginal.cxx:550 HybridCalculatorOriginal.cxx:551 HybridCalculatorOriginal.cxx:552 HybridCalculatorOriginal.cxx:553 HybridCalculatorOriginal.cxx:554 HybridCalculatorOriginal.cxx:555 HybridCalculatorOriginal.cxx:556 HybridCalculatorOriginal.cxx:557 HybridCalculatorOriginal.cxx:558 HybridCalculatorOriginal.cxx:559 HybridCalculatorOriginal.cxx:560 HybridCalculatorOriginal.cxx:561 HybridCalculatorOriginal.cxx:562 HybridCalculatorOriginal.cxx:563 HybridCalculatorOriginal.cxx:564 HybridCalculatorOriginal.cxx:565 HybridCalculatorOriginal.cxx:566 HybridCalculatorOriginal.cxx:567 HybridCalculatorOriginal.cxx:568 HybridCalculatorOriginal.cxx:569 HybridCalculatorOriginal.cxx:570 HybridCalculatorOriginal.cxx:571 HybridCalculatorOriginal.cxx:572 HybridCalculatorOriginal.cxx:573 HybridCalculatorOriginal.cxx:574 HybridCalculatorOriginal.cxx:575 HybridCalculatorOriginal.cxx:576 HybridCalculatorOriginal.cxx:577 HybridCalculatorOriginal.cxx:578 HybridCalculatorOriginal.cxx:579 HybridCalculatorOriginal.cxx:580 HybridCalculatorOriginal.cxx:581 HybridCalculatorOriginal.cxx:582 HybridCalculatorOriginal.cxx:583 HybridCalculatorOriginal.cxx:584 HybridCalculatorOriginal.cxx:585 HybridCalculatorOriginal.cxx:586 HybridCalculatorOriginal.cxx:587 HybridCalculatorOriginal.cxx:588 HybridCalculatorOriginal.cxx:589 HybridCalculatorOriginal.cxx:590 HybridCalculatorOriginal.cxx:591 HybridCalculatorOriginal.cxx:592 HybridCalculatorOriginal.cxx:593 HybridCalculatorOriginal.cxx:594 HybridCalculatorOriginal.cxx:595 HybridCalculatorOriginal.cxx:596 HybridCalculatorOriginal.cxx:597 HybridCalculatorOriginal.cxx:598 HybridCalculatorOriginal.cxx:599 HybridCalculatorOriginal.cxx:600 HybridCalculatorOriginal.cxx:601 HybridCalculatorOriginal.cxx:602 HybridCalculatorOriginal.cxx:603 HybridCalculatorOriginal.cxx:604 HybridCalculatorOriginal.cxx:605 HybridCalculatorOriginal.cxx:606 HybridCalculatorOriginal.cxx:607 HybridCalculatorOriginal.cxx:608 HybridCalculatorOriginal.cxx:609 HybridCalculatorOriginal.cxx:610 HybridCalculatorOriginal.cxx:611 HybridCalculatorOriginal.cxx:612 HybridCalculatorOriginal.cxx:613 HybridCalculatorOriginal.cxx:614 HybridCalculatorOriginal.cxx:615