#include #include gROOT->Reset(); void BtoDWeight_finer() { enum {nBinBmD0 = 16}; double p_BmD0[nBinBmD0+1] = {0.0, 0.15, 0.30, 0.45, 0.60, 0.75, 0.90, 1.05, 1.20, 1.35, 1.50, 1.65, 1.80, 1.95, 2.10, 2.25, 2.40}; double w_BmD0[nBinBmD0] = {0.0600, 0.4667, 0.9800, 0.8600, 1.1022, 1.2491, 1.1431, 1.1770, 1.1306, 1.1324, 1.0128, 1.1371, 0.9544, 0.9673, 0.8850, 0.8154}; double err_BmD0[nBinBmD0] = {0.1217, 0.1217, 0.1241, 0.1040, 0.1014, 0.1005, 0.0904, 0.0879, 0.0839, 0.0760, 0.0680, 0.0788, 0.0676, 0.0708, 0.0765, 0.1101}; /* for (int i=0; iSetBinContent(i+1,w_BmD0[i]); BmD0Weight->SetBinError(i+1,err_BmD0[i]); } TCanvas * cBmD0 = new TCanvas("cBmD0","Bm to D0",0,0,500,600); //BmD0Weight->SetMinimum(0); BmD0Weight->Draw(); TF1 *fitBmD0 = new TF1("fitBmD0",poly,0,p_BmD0[nBinBmD0+1],4); BmD0Weight->Fit("fitBmD0"); cBmD0->Print("w_BmD0_finer.eps"); //################################################ enum {nBinB0barD0 = 15}; double p_B0barD0[nBinB0barD0+1] = {0.0, 0.15, 0.30, 0.45, 0.60, 0.75, 0.90, 1.05, 1.20, 1.35, 1.50, 1.65, 1.80, 1.95, 2.10, 2.25}; double w_B0barD0[nBinB0barD0] = {0.0275, 0.6083, 0.7300, 0.9036, 1.0000, 1.0125, 1.1791, 1.2500, 1.1738, 1.3902, 1.1245, 0.9500, 1.0423, 1.0850, 1.4500}; double err_B0barD0[nBinB0barD0] = {0.3010, 0.2347, 0.2080, 0.1863, 0.1779, 0.1677, 0.1516, 0.1519, 0.1451, 0.1516, 0.1214, 0.1538, 0.1600, 0.1789, 0.5274}; TH1D * B0barD0Weight = new TH1D("B0barD0Weight", "B0bar to D0 weight", nBinB0barD0, p_B0barD0); for (int i=0; iSetBinContent(i+1,w_B0barD0[i]); B0barD0Weight->SetBinError(i+1,err_B0barD0[i]); } TCanvas * cB0barD0 = new TCanvas("cB0barD0","B0bar to D0",0,0,500,600); //B0barD0Weight->SetMinimum(0); B0barD0Weight->Draw(); TF1 *fitB0barD0 = new TF1("fitB0barD0",poly,0,p_B0barD0[nBinB0barD0+1],4); B0barD0Weight->Fit("fitB0barD0"); cB0barD0->Print("w_B0barD0_finer.eps"); //################################################ enum {nBinBpD0 = 12}; double p_BpD0[nBinBpD0+1] = {0.0, 0.15, 0.30, 0.45, 0.60, 0.75, 0.90, 1.05, 1.20, 1.35, 1.50, 1.65, 1.80}; double w_BpD0[nBinBpD0] = {0.1333, 0.4500, 0.7143, 0.9391, 1.2833, 1.4182, 2.3733, 1.1077, 0.8571, 2.9000, 0.0833, 0.4000}; double err_BpD0[nBinBpD0] = {0.1374, 0.1521, 0.1738, 0.1962, , 0.2083, 0.2186, 0.3206, 0.2837, 0.4247, 1.1180, 0.8580, 0.1844}; TH1D * BpD0Weight = new TH1D("BpD0Weight", "Bp to D0 weight", nBinBpD0, p_BpD0); for (int i=0; iSetBinContent(i+1,w_BpD0[i]); BpD0Weight->SetBinError(i+1,err_BpD0[i]); } TCanvas * cBpD0 = new TCanvas("cBpD0","Bp to D0",0,0,500,600); BpD0Weight->SetMaximum(2); BpD0Weight->SetMinimum(-0.5); BpD0Weight->Draw(); TF1 *fitBpD0 = new TF1("fitBpD0",poly,0,p_BpD0[nBinBpD0+1],4); BpD0Weight->Fit("fitBpD0"); cBpD0->Print("w_BpD0_finer2.eps"); //################################################ enum {nBinB0D0 = 12}; double p_B0D0[nBinB0D0+1] = {0.0, 0.15, 0.30, 0.45, 0.60, 0.75, 0.90, 1.05, 1.20, 1.35, 1.50, 1.65, 1.80}; double w_B0D0[nBinB0D0] = {0.0938, 0.5114, 0.5172, 1.2000, 1.2214, 1.2424, 0.8182, 0.5647, 1.6000, -3.5333, 3.4615, 6.3333}; double err_B0D0[nBinB0D0] = {0.2519, 0.2636, 0.2695, 0.3265, 0.3465, 0.3601, 0.3961, 0.4759, 0.8142, 1.9887, 2.6315, 8.3333}; TH1D * B0D0Weight = new TH1D("B0D0Weight", "B0 to D0 weight", nBinB0D0, p_B0D0); for (int i=0; iSetBinContent(i+1,w_B0D0[i]); B0D0Weight->SetBinError(i+1,err_B0D0[i]); } TCanvas * cB0D0 = new TCanvas("cB0D0","B0 to D0",0,0,500,600); B0D0Weight->SetMaximum(2); B0D0Weight->SetMinimum(-0.5); B0D0Weight->Draw(); TF1 *fitB0D0 = new TF1("fitB0D0",poly,0,p_B0D0[nBinB0D0+1],4); B0D0Weight->Fit("fitB0D0"); cB0D0->Print("w_B0D0_finer2.eps"); //################################################ enum {nBinBmDp = 11}; double p_BmDp[nBinBmDp+1] = {0.0, 0.20, 0.40, 0.60, 0.80, 1.00, 1.20, 1.40, 1.60, 1.80, 2.00, 2.20}; double w_BmDp[nBinBmDp] = {0.5558, 0.6486, 1.0438, 1.0402, 0.6615, 0.7929, 0.7056, 0.5414, 0.8313, 0.7500, 0.3333}; double err_BmDp[nBinBmDp] = {0.2712, 0.2190, 0.2285, 0.2032, 0.1655, 0.1585, 0.1557, 0.1762, 0.2642, 0.4413, 0.5429}; TH1D * BmDpWeight = new TH1D("BmDpWeight", "Bm to Dp weight", nBinBmDp, p_BmDp); for (int i=0; iSetBinContent(i+1,w_BmDp[i]); BmDpWeight->SetBinError(i+1,err_BmDp[i]); } TCanvas * cBmDp = new TCanvas("cBmDp","Bm to Dp",0,0,500,600); //BmDpWeight->SetMinimum(0); BmDpWeight->Draw(); TF1 *fitBmDp = new TF1("fitBmDp",poly,0,p_BmDp[nBinBmDp+1],4); BmDpWeight->Fit("fitBmDp"); cBmDp->Print("w_BmDp_finer.eps"); //################################################ enum {nBinB0barDp = 12}; double p_B0barDp[nBinB0barDp+1] = {0.0, 0.20, 0.40, 0.60, 0.80, 1.00, 1.20, 1.40, 1.60, 1.80, 2.00, 2.20, 2.40}; double w_B0barDp[nBinB0barDp] = {0.1333, 0.6790, 0.3702, 0.6823, 0.6279, 0.7489, 1.0468, 1.0208, 1.0036, 1.0453, 0.8105, 0.8490}; double err_B0barDp[nBinB0barDp] = {0.2007, 0.2351, 0.1820, 0.1581, 0.1347, 0.1286, 0.1417, 0.1027, 0.1241, 0.1255, 0.1175, 0.1514}; TH1D * B0barDpWeight = new TH1D("B0barDpWeight", "B0bar to Dp weight", nBinB0barDp, p_B0barDp); for (int i=0; iSetBinContent(i+1,w_B0barDp[i]); B0barDpWeight->SetBinError(i+1,err_B0barDp[i]); } TCanvas * cB0barDp = new TCanvas("cB0barDp","B0bar to Dp",0,0,500,600); //B0barDpWeight->SetMinimum(0); B0barDpWeight->Draw(); TF1 *fitB0barDp = new TF1("fitB0barDp",poly,0,p_B0barDp[nBinB0barDp+1],4); B0barDpWeight->Fit("fitB0barDp"); cB0barDp->Print("w_B0barDp_finer.eps"); //################################################ enum {nBinBpDp = 10}; double p_BpDp[nBinBpDp+1] = {0.0, 0.20, 0.40, 0.60, 0.80, 1.00, 1.20, 1.40, 1.60, 1.80, 2.00}; double w_BpDp[nBinBpDp] = {0.1935, 0.2273, 1.0400, 0.0789, 0.8088, 1.3400, 0.0800, 0.5000, 2.1429, 2.0000}; double err_BpDp[nBinBpDp] = {0.1962, 0.2293, 0.3078, 0.2645, 0.3175, 0.3795, 0.4948, 1.3463, 1.4070, 2.2361}; TH1D * BpDpWeight = new TH1D("BpDpWeight", "Bp to Dp weight", nBinBpDp, p_BpDp); for (int i=0; iSetBinContent(i+1,w_BpDp[i]); BpDpWeight->SetBinError(i+1,err_BpDp[i]); } TCanvas * cBpDp = new TCanvas("cBpDp","Bp to Dp",0,0,500,600); BpDpWeight->SetMaximum(2); BpDpWeight->SetMinimum(-0.5); BpDpWeight->Draw(); TF1 *fitBpDp = new TF1("fitBpDp",poly,0,p_BpDp[nBinBpDp+1],4); BpDpWeight->Fit("fitBpDp"); cBpDp->Print("w_BpDp_finer2.eps"); //################################################ enum {nBinB0Dp = 10}; double p_B0Dp[nBinB0Dp+1] = {0.0, 0.20, 0.40, 0.60, 0.80, 1.00, 1.20, 1.40, 1.60, 1.80, 2.00}; double w_B0Dp[nBinB0Dp] = {0.1613, 0.6462, 0.9315, 0.1143, -0.0984, 1.7674, -0.6667, 2.0000, 5.5000, -8.000}; double err_B0Dp[nBinB0Dp] = {0.1962, 0.4440, 0.5156, 0.5157, 0.5590, 0.9047, 1.4414, 5.2100, 5.2633, 6.4275}; TH1D * B0DpWeight = new TH1D("B0DpWeight", "B0 to Dp weight", nBinB0Dp, p_B0Dp); for (int i=0; iSetBinContent(i+1,w_B0Dp[i]); B0DpWeight->SetBinError(i+1,err_B0Dp[i]); } TCanvas * cB0Dp = new TCanvas("cB0Dp","B0 to Dp",0,0,500,600); B0DpWeight->SetMaximum(2); B0DpWeight->SetMinimum(-0.5); B0DpWeight->Draw(); TF1 *fitB0Dp = new TF1("fitB0Dp",poly,0,p_B0Dp[nBinB0Dp+1],4); B0DpWeight->Fit("fitB0Dp"); cB0Dp->Print("w_B0Dp_finer2.eps"); } Double_t poly(Double_t *x, Double_t *par) { return par[0] + par[1]*x[0] + par[2]*x[0]*x[0] + par[3]*x[0]*x[0]*x[0]; }