PDF_CrossCor_Dh_K3pi_vs_DK_KSKpi::PDF_CrossCor_Dh_K3pi_vs_DK_KSKpi(PDF_Abs* pdf1, PDF_Abs* pdf2, config cCor)
: PDF_CrossCorAbs(pdf1,pdf2)
{
  name = "CrossCor_Dh_K3pi_vs_DK_KSKpi";
  setCorrelations(cCor);
	buildCov();
  buildPdf();
}
PDF_CrossCorTest3::PDF_CrossCorTest3(PDF_Abs* pdf1, PDF_Abs* pdf2, config cCor)
: PDF_CrossCorAbs(pdf1,pdf2)
{
  name = "CrossCorTest3";
  setCorrelations(cCor);
	buildCov();
  buildPdf();
}
///
/// Cleo histogram for kD, dD
///
void PDF_D_Cleo::buildPdfHistogram()
{
    RooMsgService::instance().setGlobalKillBelow(WARNING);
    TString fName = this->dir+"/ExpNll/CLEO_K3PiScan_2009_GaussianRise_pdf2.root";
    TString hName = "hPdf";
    obsValSource += ", "+fName;
    obsErrSource += ", "+fName;
    corSource += ", "+fName;
    if ( !FileExists(fName) ) {
        cout << "PDF_D_CleoNoK2pi::buildPdfHistogram() : ERROR : File not found : " << fName << endl;
        exit(1);
    }
    TFile *fExpNll = new TFile(fName, "ro");
    TH2D *hExpNll = (TH2D*)fExpNll->Get(hName);
    assert(hExpNll);
    // hExpNll->Scale(1./1.3027449); // scale so best fit value gives chi2=0.
    hExpNll->Scale(1./0.858588); // scale so best fit value gives chi2=0: run bin/unittests which fits PDFs to minimum. The factor is 1/min.
    RooRealVar *x_hist = new RooRealVar("x_cleo_k3pi_hist", "x_cleo_k3pi_hist", 0,  -1e4, 1e4);
    RooRealVar *y_hist = new RooRealVar("y_cleo_k3pi_hist", "y_cleo_k3pi_hist", 0,  -1e4, 1e4);
    RooDataHist *dhExpNll = new RooDataHist("dh_cleo_k3pi", "dh_cleo_k3pi", RooArgList(*x_hist,*y_hist), Import(*hExpNll));
    RooRealVar *kD_k3pi_obs = (RooRealVar*)observables->find("kD_k3pi_obs");
    RooRealVar *kD_k3pi_th  = (RooRealVar*)theory->find("kD_k3pi_th");
    RooRealVar *dD_k3pi_obs = (RooRealVar*)observables->find("dD_k3pi_obs");
    RooRealVar *dD_k3pi_th  = (RooRealVar*)theory->find("dD_k3pi_th");
    RooHistPdfVar *kD_pdf = new RooHistPdfVar("kD_cleo_k3pi_pdf", "kD_cleo_k3pi_pdf", *kD_k3pi_obs, *kD_k3pi_th, RooConst(0.3325));  // those precise shifts I got from zooming into the exp nll histogram
    RooHistPdfAngleVar *dD_pdf = new RooHistPdfAngleVar("dD_cleo_k3pi_pdf", "dD_cleo_k3pi_pdf", *dD_k3pi_obs, *dD_k3pi_th, RooConst(1.9984));
    RooHistPdf *pdf_kDdD = new RooHistPdf("pdf_cleo_kDdD_k3pi", "pdf_cleo_kDdD_k3pi", RooArgList(*kD_pdf,*dD_pdf), RooArgList(*x_hist,*y_hist), *dhExpNll, 1);

    // Re-use the full multivariate Gaussian for the rest
    // blow up errors of kD and dD
    float largeNumber = 50.;
    StatErr[ 0] *= largeNumber;  // kD_k3pi_obs
    StatErr[ 1] *= largeNumber;  // dD_k3pi_obs
    buildCov();
    RooMultiVarGaussian *pdf_gaus = new RooMultiVarGaussian("pdf_cleo_gaus", "pdf_cleo_gaus", *(RooArgSet*)observables, *(RooArgSet*)theory, covMatrix);

    // reset errors so that the pull plot remains correct
    StatErr[ 0] /= largeNumber;  // kD_k3pi_obs
    StatErr[ 1] /= largeNumber;  // dD_k3pi_obs

    // multiply both
    pdf = new RooProdPdf("pdf_"+name, "pdf_"+name, RooArgSet(*pdf_kDdD, *pdf_gaus));

    fExpNll->Close();
    RooMsgService::instance().setGlobalKillBelow(INFO);
    // addToTrash(fExpNll); ///< these two get cleaned by fExpNll->Close();
    // addToTrash(hExpNll);
    addToTrash(x_hist);
    addToTrash(y_hist);
    addToTrash(dhExpNll);
    addToTrash(kD_pdf);
    addToTrash(dD_pdf);
    addToTrash(pdf_kDdD);
    addToTrash(pdf_gaus);
}
	PDF_CrossCorTest1::PDF_CrossCorTest1(config cObs, config cErr, config cCor)
: PDF_Abs(3)
{
	name = "CrossCorTest1";
	initParameters();
	initRelations();
	initObservables();
	setObservables(cObs);
	setUncertainties(cErr);
	setCorrelations(cCor);
	buildCov();
	buildPdf();
}
PDF_D_Cleo::PDF_D_Cleo(config cObs, config cType, config cUseKdDdK3pi, TString d)
    : PDF_Abs(13)
{
    constructorBody(cObs, cType, cUseKdDdK3pi, d);
    initParameters();
    initRelations();
    initObservables();
    setObservables(cObs);
    setUncertainties(cleo);
    setCorrelations(cleo);
    buildCov();
    buildPdf();
}
	PDF_GLW_DK_2var::PDF_GLW_DK_2var(config cObs, config cErr, config cCor)
: PDF_Abs(2)
{
	name = "glw_dk_2var";
	initParameters();
	initRelations();
	initObservables();
	setObservables(cObs);
	setUncertainties(cErr);
	setCorrelations(cCor);
	buildCov();
	buildPdf();
}
	PDF_Dmixing_xy::PDF_Dmixing_xy(config cObs, config cErr, config cCor)
: PDF_Abs(2)
{
	name = "DmixingXY";
	initParameters();
	initRelations();
	initObservables();
	setObservables(cObs);
	setUncertainties(cErr);
	setCorrelations(cCor);
	buildCov();
	buildPdf();
}
	PDF_gamma::PDF_gamma(config cObs, config cErr, config cCor)
: PDF_Abs(1)
{
	name = "gamma";
	initParameters();
	initRelations();
	initObservables();
	setObservables(cObs);
	setUncertainties(cErr);
	setCorrelations(cCor);
	buildCov();
	buildPdf();
}
	PDF_D_hhpi0_dilution::PDF_D_hhpi0_dilution(config cObs, config cErr, config cCor)
: PDF_Abs(2)
{
	name = "CleoDhhpi0Dilution";
	initParameters();
	initRelations();
	initObservables();
	setObservables(cObs);
	setUncertainties(cErr);
	setCorrelations(cCor);
	buildCov();
	buildPdf();
}
	PDF_D_HFAGfit_4D::PDF_D_HFAGfit_4D(config cObs, config cErr, config cCor)
: PDF_Abs(4)
{
	name = "d-hfagfit_4D";
	initParameters();
	initRelations();
	initObservables();
	setObservables(cObs);
	setUncertainties(cErr);
	setCorrelations(cCor);
	buildCov();
	buildPdf();
}
PDF_D_KSKpi_RWS::PDF_D_KSKpi_RWS(config cObs, config cErr, config cCor):
	PDF_Abs(1)
{
	name = "dkskpiRWS";
  initParameters();
  initRelations();
  initObservables();
  setObservables(cObs);
  setUncertainties(cErr);
  setCorrelations(cCor);
  buildCov();
  buildPdf();

}
PDF_GLWADS_Dpi_K3pi::PDF_GLWADS_Dpi_K3pi(config cObs, config cErr, config cCor, ParametersAbs* pars, TString d)
    : PDF_GLWADS_DKDpi_K3pi(pars,d,3)
{
    name = "glwads-dpi-k3pi";
    this->dir = d;
    initParameters();
    initRelations();
    initObservables();
    setObservables(cObs);
    setUncertainties(cErr);
    setCorrelations(cCor);
    buildCov();
    buildPdf();
}
	PDF_ADS_DK_Kpi::PDF_ADS_DK_Kpi(config cObs, config cErr, config cCor, config cTrad)
: PDF_Abs(3)
{
	name = "ads-dk-kpi";
	this->cTrad = cTrad;
	initParameters();
	initRelations();
	initObservables();
	setObservables(cObs);
	setUncertainties(cErr);
	setCorrelations(cCor);
	buildCov();
	buildPdf();
}
	PDF_GGSZ_DstK::PDF_GGSZ_DstK(config cObs, config cErr, config cCor, ParametersAbs* pars)
: PDF_Abs(4)
{
	if ( pars ) p = pars;
	else p = new ParametersGammaCombo();
	name = "ggsz_dstk";
	initParameters();
	initRelations();
	initObservables();
	setObservables(cObs);
	setUncertainties(cErr);
	setCorrelations(cCor);
	buildCov();
	buildPdf();
}
	PDF_Dmixing::PDF_Dmixing(config cObs, config cErr, config cCor, ParametersAbs* pars)
: PDF_Abs(3)
{
	if ( pars ) p = pars;
	else p = new ParametersGammaCombo();
	name = "Dmixing";
	initParameters();
	initRelations();
	initObservables();
	setObservables(cObs);
	setUncertainties(cErr);
	setCorrelations(cCor);
	buildCov();
	buildPdf();
}
	PDF_GLWADS_DKDpi_hh_2012::PDF_GLWADS_DKDpi_hh_2012(config cObs, config cErr, config cCor, ParametersAbs* pars)
: PDF_Abs(13)
{
	if ( pars ) p = pars;
	else p = new ParametersGammaCombo();
	name = "GlwadsDkdpiKpi2012";
	initParameters();
	initRelations();
	initObservables();
	setObservables(cObs);
	setUncertainties(cErr);
	setCorrelations(cCor);
	buildCov();
	buildPdf();
}
	PDF_ADS_DKstz_Kpi::PDF_ADS_DKstz_Kpi(config cObs, config cErr, config cCor, ParametersAbs* pars, TString d)
: PDF_Abs(3)
{
	if ( pars ) p = pars;
	else p = new ParametersGammaCombo();
	name = "ads-dkstz-kpi";
	initParameters();
	initRelations();
	initObservables();
	setObservables(cObs);
	setUncertainties(cErr);
	setCorrelations(cCor);
	buildCov();
	buildPdf();
}
	PDF_D_CleoNoK2pi::PDF_D_CleoNoK2pi(config cObs, config cType, ParametersAbs* pars, config cUseKdDdK3pi, TString d)
: PDF_D_Cleo(cObs, cType, cUseKdDdK3pi, d, 9) 
{
	if ( pars ) p = pars;
	else p = new ParametersGammaCombo();
	name = "dcleo-nok2pi";
	initParameters();
	initRelations();
	initObservables();
	setObservables(cObs);
	setUncertainties(cleo);
	setCorrelations(cleo);
	buildCov();
	buildPdf();
}
	PDF_GLWADS_DKDpi_KSKpi::PDF_GLWADS_DKDpi_KSKpi(config cObs, config cErr, config cCor, ParametersAbs* pars, TString d)
: PDF_Abs(7)
{
	if ( pars ) p = pars;
	else p = new ParametersGammaCombo();
	name = "glwads-dkdpi-KSKpi";
	this->dir = d;  
	initParameters();
	initRelations();
	initObservables();
	setObservables(cObs);
	setUncertainties(cErr);
	setCorrelations(cCor);
	buildCov();
	buildPdf();
}
PDF_GLWADS_DKDpi_K3pi_newVars::PDF_GLWADS_DKDpi_K3pi_newVars(config cObs, config cErr, config cCor,
  ParametersAbs* pars, TString d)
: PDF_Abs(9)
{
	if ( pars ) p = pars;
	else p = new ParametersGammaCombo();
  name = "glwads-dkdpi-k3pi-newvars";
	initParameters();
	initRelations();
	initObservables();
	setObservables(cObs);
	setUncertainties(cErr);
	setCorrelations(cCor);
	buildCov();
	buildPdf();
}
	PDF_D_KSKpi_noDmix::PDF_D_KSKpi_noDmix(config cObs, config cErr, config cCor, config cType, TString d)
: PDF_Abs(3)
{
	name = "dkskpi-nodmix";
	this->cType = cType;
	this->cObs = cObs;
	this->dir = d;
	initParameters();
	initRelations();
	initObservables();
	setObservables(cObs);
	setUncertainties(cErr);
	setCorrelations(cCor);
	buildCov();
	buildPdf();
}
PDF_Dmixing_CLEO2D::PDF_Dmixing_CLEO2D(config cObs, config cErr, config cCor, config cType, TString d):
    PDF_Abs(2)
{
    name = "dk3pi_dmixing_cleo";
    this->cType = cType;
    this->cObs = cObs;
    this->dir = d;
    initParameters();
    initRelations();
    initObservables();
    setObservables(cObs);
    setUncertainties(cErr);
    setCorrelations(cCor);
    buildCov();
    buildPdf();

}
PDF_GLWADS_DKDpi_hh_Dmix_newVars_uv::PDF_GLWADS_DKDpi_hh_Dmix_newVars_uv(config cObs, config cErr, config cCor,
		double Mxy, ParametersAbs* pars, TString d)
: PDF_Abs(12)
{
	if ( pars ) p = pars;
	else p = new ParametersGammaCombo();
	name = "glwads-dkdpi-hh-dmix-newvars";
	_Mxy = Mxy;
	initParameters();
	initRelations();
	initObservables();
	setObservables(cObs);
	setUncertainties(cErr);
	setCorrelations(cCor);
	buildCov();
	buildPdf();
}
Exemple #24
0
///
/// Shortcut for buildCov() and buildPdf().
///
void PDF_Abs::build()
{
	buildCov();
	buildPdf();
}