Angular analysis of B+->K*+(K+pi0)mumu
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
 
 

512 lines
25 KiB

// Renata Kopecna
#include <constants.hh>
#include <spdlog.h>
//////////////////////////
// Q2 bins //
//////////////////////////
//Return a vector with low bin edges in Q2, depending on the number of bins
std::vector<double> get_TheQ2binsmin(int nBins, bool Reference){
//choose binning scheme:
if (Reference) return {8.68};
else if (nBins == 1) return {Q2_MIN_RANGE};
else if (nBins == 2) return {Q2_MIN_RANGE, 11.0};
else if (nBins == 4) return {Q2_MIN_RANGE, 4.0, 11.0, 15.0}; //Default is 4 bins
else if (nBins == 5) return {Q2_MIN_RANGE, 4.0, 11.0, 15.0, 1.1}; //Basics 4 + 1.1-6.0 Gev
else if (nBins == 8) return {0.1 , 1.1, 2.5, 4.0, 6.0, 11.0, 15.0, 17.0}; //Same binning as B0 and Ks->PiPi
else if (nBins == 9) return {0.1 , 1.1, 2.5, 4.0, 6.0, 8.68, 11.0, 15.0, 17.0}; //Same binning as B0 and Ks->PiPi + Jpsi, useful in MC checks
else return {};
}
//Return a vector with upper bin edges in Q2, depending on the number of bins
std::vector<double> get_TheQ2binsmax(int nBins, bool Reference){
//choose binning scheme
if (Reference) return {10.09};
else if (nBins == 1) return {Q2_MAX_RANGE};
else if (nBins == 2) return {1.0, Q2_MAX_RANGE};
else if (nBins == 4) return {4.0, 8.0, 12.5, Q2_MAX_RANGE}; //Default is 4 bins
else if (nBins == 5) return {4.0, 8.0, 12.5, Q2_MAX_RANGE, 6.0}; //Basic 4 + 1.1-6.0 Gev
else if (nBins == 8) return {0.98, 2.5, 4.0, 6.0, 8.0, 12.5, 17.0, 19.0};//Same binning as B0 and Ks->PiPi
else if (nBins == 9) return {0.98, 2.5, 4.0, 6.0, 8.0, 10.09, 12.5, 17.0, 19.0};//Same binning as B0 and Ks->PiPi + Jpsi, useful in MC checks
else return {};
}
//////////////////////////
// Angle ranges //
//////////////////////////
//Returns pretty much the max-min for different dimensions
double CTL_RANGE(){ return CTL_MAX - CTL_MIN; }
double CTK_RANGE(){ return CTK_MAX - CTK_MIN; }
double PHI_RANGE(){ return PHI_MAX - PHI_MIN; }
double Q2_RANGE_FULL(){ return Q2_MAX_RANGE - Q2_MIN_RANGE; }
//Same, just in angles or in angles+q2
double RANGE_3D(){ return CTL_RANGE()*CTK_RANGE()*PHI_RANGE(); }
double RANGE_4D(){ return RANGE_3D()*Q2_RANGE_FULL(); }
//////////////////////////
// RESOLUTION //
//////////////////////////
/// \brief get_resolution
/// \return resolution obtained by angular resolution, used for systematic studies
///
std::vector<std::vector<double>> get_resolution(){
std::vector<std::vector<double>> resolution;
resolution.push_back({0.0139, 0.0144, 0.0141, 0.0141, 0.0140, 0.0140});//ctk
resolution.push_back({0.00481,0.00504,0.00503,0.00503,0.00497,0.00499});//ctl
resolution.push_back({0.0256, 0.0253, 0.0260, 0.0260, 0.0258, 0.0248}); //phi
return resolution;
}
//////////////////////////
// Main Fit //
//////////////////////////
//This string contains parameters that are varied when fitting bkg
//TODO: I hope this doesn't change perf bin, but wurst käse scenario I add bin argument
std::vector<std::string> PAR_BKG_STRING_CTL(int folding, int order){
std::vector<std::string> str;
for (int ord = 1; ord <= order; ord++){
if (ord%2==1 && folding>0) continue; //odd values excluded from folding 1,2,3,4
str.push_back("cbkgctl"+std::to_string(ord));
}
return str;
}
std::vector<std::string> PAR_BKG_STRING_CTK(int folding, int order){
std::vector<std::string> str;
for (int ord = 1; ord <= order; ord++){
if (ord%2==1 && folding == 4) continue; //odd values excluded from folding 4
str.push_back("cbkgctk"+std::to_string(ord));
}
return str;
}
std::vector<std::string> PAR_BKG_STRING_PHI(){
//For now return an empty string as the phi is flat
return {};
}
std::vector<std::string> PAR_BKG_STRING(int folding, int nCtl, int nCtk){
std::vector<std::string> str;
std::vector<std::string> ctl = PAR_BKG_STRING_CTL(folding,nCtl);
std::vector<std::string> ctk = PAR_BKG_STRING_CTK(folding,nCtk);
std::vector<std::string> phi = PAR_BKG_STRING_PHI();
str.insert(str.end(), ctl.begin(), ctl.end());
str.insert(str.end(), ctk.begin(), ctk.end());
str.insert(str.end(), phi.begin(), phi.end());
return str;
}
//Init values of said parameters
//CAREFUL!!!! HAS TO BE THE SAME AS PAR_BKG_STRING!!!!
std::vector<double> init_bkg_ctl(int folding, int order){
std::vector<double> init_val;
for (int ord = 1; ord <= order; ord++){
if (ord%2==1 && folding>0) continue; //odd values excluded from foldings 1,2,3,4
init_val.push_back(0.02); //Even values always push
}
return init_val;
}
std::vector<double> init_bkg_ctk(int folding, int order){
std::vector<double> init_val;
for (int ord = 1; ord <= order; ord++){
if (ord%2==1 && folding==4) continue; //odd values excluded from folding 4
if (ord%2==1) init_val.push_back(-0.7);
else init_val.push_back(-0.5);
}
return init_val;
}
std::vector<double> init_bkg_phi(){
return {};
}
std::vector<double> init_bkg(int folding, int nCtl, int nCtk){
std::vector<double> init_val;
std::vector<double> ctl = init_bkg_ctl(folding,nCtl);
std::vector<double> ctk = init_bkg_ctk(folding,nCtk);
std::vector<double> phi = init_bkg_phi();
init_val.insert(init_val.end(), ctl.begin(), ctl.end());
init_val.insert(init_val.end(), ctk.begin(), ctk.end());
init_val.insert(init_val.end(), phi.begin(), phi.end());
return init_val;
}
std::vector<std::vector<double> > fracs(int nBins){
if(nBins == 5 || nBins == 4){
return {{0.040286, 0.060429, 0.016244, 0.012995, 0.051982},
{0.246914, 0.434048, 0.115010, 0.074074, 0.348928}};
}
else {
spdlog::error("No event number fractions given for binning scheme with {0:d} q2 bins. Exit", nBins);
return std::vector<std::vector<double> >(2, std::vector<double>(nBins, 0.));
}
}
std::vector<double> init_n_signal(int nBins){ //init the number of sig events
if(nBins == 5) return {80., 75., 50., 90., 155.};
else if(nBins == 4) return {80., 75., 50., 90.};
else if(nBins == 2) return {80.+75., 50.+90.};
else if(nBins == 1) return {9591.+41809.};
else {
spdlog::error("No Signal event numbers given for binning scheme with {0:d} q2 bins. Exit", nBins);
assert(0);
}
return {}; //useles, but compiler would complain
}
std::vector<double> init_n_bckgnd(int nBins){//init the number of bkg events
if(nBins == 5) return {80., 160., 40., 20., 240.};
else if(nBins == 4) return {80., 160., 40., 20.};
else if(nBins == 2) return {206.+279.+358.+358., 158.+93.};
else if(nBins == 1) return {716.+4337.};
else {
spdlog::error("No Background event numbers given for binning scheme with {0:d} q2 bins. Exit", nBins);
assert(0);
}
return {}; //useles, but compiler would complain
}
std::vector<double> init_f_lambda(int nBins){ //init lambda
if(nBins == 5) return {-0.0064, -0.0064, -0.0065, -0.0065, -0.0064};
else if(nBins == 4) return {-0.0064, -0.0064, -0.0065, -0.0065};
else if(nBins == 2) return {-0.0064, -0.0065};
else if(nBins == 1) return {-0.0044};
else {
spdlog::error("No values for the exponential background description are given for binning scheme with {0:d} q2 bins. Exit", nBins);
assert(0);
}
return {}; //useles, but compiler would complain
}
std::vector<double> get_f_subset(int nPDFs){
//obtained from jpsi channel, data, 5D fit, full range
if(nPDFs == 4) return {0., 0., 0., 0.}; //TODO!!!
else if(nPDFs == 2) return {0.0, 0.0}; //TODO!!!
else if(nPDFs == 1) return {1.};
else{
spdlog::warn("No values for the signal fraction are given for simultaneous fits with {0:d} pdf's. Use default: f_sig = 0.5", nPDFs);
return std::vector<double> (nPDFs, 0.5);
}
return {};
}
std::vector<std::vector<double>> init_angular_params(int nBins, bool NP, bool isReference){
if (nBins==5){
if (NP) return {
//predictions from flavio for new physics scenario with C9 = -1.0, using min(Q2) = 0.25 and max(Q2) = 18.0
{0.30284413148097966,0.27262304293367756,0.4271747118350757,0.4947224191764013,0.22062375348447547},
{0.0016779452277498482,-0.03166521898839871,-0.08541706129465602,-0.18930463721455312,-0.011913104816645514},
{-0.03554278140794295,-0.2399493206724746,-0.28043043274306023,-0.296509757783654,-0.14577653963645607},
{0.1323358147544716,-0.29136093172458405,-0.37328734325703,-0.2736851726358371,-0.08401219272607802},
{-0.18973621926844692,0.1460462265211582,0.4666205500210169,0.468761474000308,-0.08526703027846606},
{-0.021811112779860177,-0.01286712550773734,-0.002747600804479865,-0.0014945589348205987,-0.01889737958853306},
{-0.00881926856860235,-0.003687673879434568,0.0016256878486157777,0.0005018180644191919,-0.005992663137417108},
{-0.0006860405719520938,-0.0006097376632470255,0.0006613554952330075,0.00044525884942171284,-0.0006319657235214326}
};
else return{
//SM predictions from flavio, using min(Q2) = 0.25 and max(Q2) = 18.0
{+0.248569008046490070, +0.2581971160208132000, +0.42526014659559220000, +0.49420669353506260000, +0.1850102996703149000}, //s1s
{+0.000732569649322501, -0.0324523859139632900, -0.08563864422457230000, -0.18934424485647136000, -0.0130310503598977030}, //s3
{-0.028317693174889150, -0.2425837027660650600, -0.28116530113868093000, -0.29668531019781386000, -0.1468982883895949300}, //s4
{+0.035479698896675250, -0.3745017565795041000, -0.40726931726860705000, -0.30161750053585110000, -0.1915219985323076700}, //s5
{-0.122319885918514240, +0.2473816826915200600, +0.52432045165541470000, +0.52106439209368990000, +0.0147578966169414490}, //s6s
{-0.019468600975846337, -0.0105435770924197210, -0.00219285191192886900, -0.00119446595061885200, -0.0160492529928752330}, //s7
{-0.010192773160727949, -0.0043019891737210840, +0.00104987431866559550, +0.00027244645255727460, -0.0070279543261629670}, //s8
{-0.000756965302130655, -0.0006959911482550733, +0.00044741790607562027, +0.00026464193866571387, -0.0007199408885633002} //s9
};
}
else if (nBins==4){
if (NP) return {
//predictions from flavio for new physics scenario with C9 = -1.0, using min(Q2) = 0.25 and max(Q2) = 18.0
{0.30284413148097966,0.27262304293367756,0.4271747118350757,0.4947224191764013},
{0.0016779452277498482,-0.03166521898839871,-0.08541706129465602,-0.18930463721455312},
{-0.03554278140794295,-0.2399493206724746,-0.28043043274306023,-0.296509757783654},
{0.1323358147544716,-0.29136093172458405,-0.37328734325703,-0.2736851726358371},
{-0.18973621926844692,0.1460462265211582,0.4666205500210169,0.468761474000308},
{-0.021811112779860177,-0.01286712550773734,-0.002747600804479865,-0.0014945589348205987},
{-0.00881926856860235,-0.003687673879434568,0.0016256878486157777,0.0005018180644191919},
{-0.0006860405719520938,-0.0006097376632470255,0.0006613554952330075,0.00044525884942171284}
};
else return{
//SM predictions from flavio, using min(Q2) = 0.25 and max(Q2) = 18.0
{0.24856900804649007,0.2581971160208132,0.4252601465955922,0.4942066935350626}, //s1s
{0.000732569649322501,-0.03245238591396329,-0.0856386442245723,-0.18934424485647136}, //s3
{-0.02831769317488915,-0.24258370276606506,-0.28116530113868093,-0.29668531019781386}, //s4
{0.03547969889667525,-0.3745017565795041,-0.40726931726860705,-0.3016175005358511}, //s5
{-0.12231988591851424,0.24738168269152006,0.5243204516554147,0.5210643920936899}, //s6s
{-0.019468600975846337,-0.010543577092419721,-0.002192851911928869,-0.001194465950618852}, //s7
{-0.010192773160727949,-0.004301989173721084,0.0010498743186655955,0.0002724464525572746}, //s8
{-0.000756965302130655,-0.0006959911482550733,0.00044741790607562027,0.00026464193866571387} //s9
};
}
else if (nBins==2){
return { //results from signal channel generator level MC fit TODO
{0.0,0.0}, //s1s
{0.0,0.0}, //s3
{0.0,0.0}, //s4
{0.0,0.0}, //s5
{0.0,0.0}, //s6s
{0.0,0.0}, //s7
{0.0,0.0}, //s8
{0.0,0.0} //s9
};
}
else if (nBins==1){
if (isReference) return { //TODO, David's for now
{+0.321}, //s1s //FL = 0.572
{-0.002}, //s3
{-0.246}, //s4
{-0.003}, //s5
{-0.003}, //s6s
{-0.001}, //s7
{-0.063}, //s8
{-0.084} //s9
};
else return { //TODO
{+0.321}, //s1s//FL = 0.572
{-0.002}, //s3
{-0.246}, //s4
{-0.003}, //s5
{-0.003}, //s6s
{-0.001}, //s7
{-0.063}, //s8
{-0.084} //s9
};
}
else {
spdlog::error("No SM values given for binning scheme with {0:d} q2 bins. Exit", nBins);
assert(0);
return {};
}
}
std::vector<std::vector<double>> init_angular_params_MC(int nBins){
if (nBins==4){
return {
{+0.3, +0.25, +0.4, +0.48}, //s1s // 0 //S1s = 3/4(1-FL)
{-0.06, -0.01, -0.05, -0.2}, //s3 // 1
{-0.02, -0.02, -0.2, -0.3}, //s4 // 2
{+0.06, -0.30, -0.4, -0.3}, //s5 // 3
{-0.12, +0.2, +0.5, +0.5}, //s6s // 4 //S6 = 4/3 AFB
{+0.01, +0.0, +0.0, +0.0}, //s7 // 5
{+0.05, +0.05, +0.05, +0.0}, //s8 // 6 big influence on ctl
{-0.01, +0.01, +0.01, +0.0} //s9 // 7
};
}
else if (nBins==5){
return {
{+0.3, +0.25, +0.3, +0.4, +0.2}, //s1s // 0 //S1s = 3/4(1-FL)
{-0.06, -0.01, -0.07, -0.05, -0.01}, //s3 // 1
{-0.02, -0.20, -0.15, -0.2, -0.13}, //s4 // 2
{+0.09, -0.35, -0.4, -0.4, -0.13}, //s5 // 3
{-0.12, +0.2, +0.2, +0.5, -0.32}, //s6s // 4 //S6 = 4/3 AFB
{+0.01, +0.0, +0.01, +0.0, +0.00}, //s7 // 5
{+0.05, +0.05, +0.03, +0.05, +0.03}, //s8 // 6 big influence on ctl
{-0.01, +0.01, +0.0, +0.01, -0.01} //s9 // 7
};
}
else if (nBins==8){
return {
{+0.5, +0.3, +0.1, +0.2, +0.3, +0.4, +0.5, +0.5}, //s1s // 0 //S1s = 3/4(1-FL)
{+0.0, +0.0, -0.0, -0.0, -0.1, -0.1, -0.2, -0.2}, //s3 // 1
{+0.1, +0.0, -0.2, -0.2, -0.3, -0.3, -0.3, -0.3}, //s4 // 2
{+0.2, +0.1, -0.2, -0.3, -0.4, -0.4, -0.3, -0.2}, //s5 // 3
{-0.1, -0.2, -0.0, +0.1, +0.3, +0.5, +0.6, +0.5}, //s6s // 4 //S6 = 4/3 AFB
{+0.0, +0.0, +0.0, +0.0, +0.0, +0.0, +0.0, +0.0}, //s7 // 5
{+0.0, -0.0, -0.0, -0.0, +0.0, +0.0, +0.0, +0.0}, //s8 // 6 big influence on ctl
{-0.0, +0.0, +0.0, +0.0, +0.0, +0.0, +0.0, +0.0} //s9 // 7
};
/* David's reuslts
s1s = { 0.5120, 0.1800, 0.1370, 0.1930, 0.2750, 0.4170, 0.4840, 0.5030};
s1c = { 0.2450, 0.6996, 0.7993, 0.7384, 0.6414, 0.4201, 0.3513, 0.3344};
s2s = { 0.1448, 0.0749, 0.0514, 0.0662, 0.0900, 0.1449, 0.1620, 0.1662};
s2c = {-0.1953,-0.6639,-0.7774,-0.7254,-0.6334,-0.4171,-0.3497,-0.3332};
s3 = { 0.0000, 0.0020,-0.0080,-0.0120,-0.0240,-0.0620,-0.1520,-0.2330};
s4 = { 0.0870, 0.0040,-0.1080,-0.1950,-0.2510,-0.2770,-0.2900,-0.3040};
s5 = { 0.2440, 0.0950,-0.1590,-0.3050,-0.4140,-0.4210,-0.3400,-0.2490};
s6s = {-0.1270,-0.2070,-0.0860, 0.0950, 0.3020, 0.5140, 0.5570, 0.4700};
s6c = { 0.0000, 0.0000, 0.0000, 0.0000, 0.0000, 0.0000, 0.0000, 0.0000};
s7 = {-0.0060,-0.0100,-0.0030, 0.0020, 0.0030,-0.0020,-0.0020, 0.0050};
s8 = { 0.0010,-0.0030,-0.0040,-0.0030,-0.0010, 0.0030,-0.0010, 0.0030};
s9 = {-0.0020, 0.0000, 0.0020, 0.0040,-0.0020,-0.0010,-0.0010, 0.0010};
*/
}
else if (nBins==9){ //8 bins + Jpsi
return {
{+0.5, +0.3, +0.1, +0.2, +0.3, +0.3, +0.4, +0.5, +0.5}, //s1s // 0 //S1s = 3/4(1-FL)
{+0.0, +0.0, -0.0, -0.0, -0.1, -0.1, -0.1, -0.2, -0.2}, //s3 // 1
{+0.1, +0.0, -0.2, -0.2, -0.3, -0.3, -0.3, -0.3, -0.3}, //s4 // 2
{+0.2, +0.1, -0.2, -0.3, -0.4, -0.4, -0.4, -0.3, -0.2}, //s5 // 3
{-0.1, -0.2, -0.0, +0.1, +0.3, +0.5, +0.5, +0.6, +0.5}, //s6s // 4 //S6 = 4/3 AFB
{+0.0, +0.0, +0.0, +0.0, +0.0, +0.0, +0.0, +0.0, +0.0}, //s7 // 5
{+0.0, -0.0, -0.0, -0.0, +0.0, +0.0, +0.0, +0.0, +0.0}, //s8 // 6
{-0.0, +0.0, +0.0, +0.0, +0.0, +0.0, +0.0, +0.0, +0.0} //s9 // 7
};
}
else if (nBins==2){
return {
{0.0,0.0}, //s1s // 0
{0.0,0.0}, //s3 // 1
{0.0,0.0}, //s4 // 2
{0.0,0.0}, //s5 // 3
{0.0,0.0}, //s6s // 4
{0.0,0.0}, //s7 // 5
{0.0,0.0}, //s8 // 6
{0.0,0.0} //s9 // 7
};
}
else if (nBins==1){
return { //TODO
{+0.321}, //s1s // 0
{-0.013}, //s3 // 1
{-0.250}, //s4 // 2
{-0.00}, //s5 // 3
{-0.00}, //s6s // 4
{-0.00}, //s7 // 5
{-0.048}, //s8 // 6
{-0.084} //s9 // 7
};
}
else {
spdlog::error("No default vectors with values for angular observables obtained from MC defined for binning scheme with {0:d} q2 bins. Exit", nBins);
assert(0);
return {};
}
}
std::vector<std::vector<double>> init_angular_params_zeros(int nBins){
return std::vector<std::vector<double> > (12, std::vector<double> (nBins, 0.0));
}
std::vector<std::vector<double>> init_mass_params_MC(int nBins, int nPDF){
if (nBins == 9){ //Used only in sanity checks, so put zeros for now
return {
{+33.0, +33.0, +29.0, +29.0, +27.0, +27.0, +25.0, +22.8, +22.8}, //sigma 1 //0
{+0.0, +0.0, +0.0, +0.0, +0.0, +0.0, +0.0, +0.0, +0.0}, //sigma 1 //0
{+1.33, +1.33, +1.40, +1.40, +1.37, +1.26, +1.18, +1.85, +1.85}, //sigma 1 //0
{+0.91, +0.91, +0.99, +0.99, +0.99, +1.01,+1.01, +1.34, +1.34}, //alpha 2 //3
{+2.36,+2.36,+2.35,+2.35,+2.28,+2.28,+4.28,+3.1, +3.1}, //n 1 //4
{+3.39,+3.39,+3.23,+3.23,+3.63,+3.63,+5.46,+3.5, +3.5} //n 2 // 5
};
}
else if (nBins == 8){ //Used only in sanity checks, so put zeros for now //TODO: add
return {
{+0.0, +0.0, +0.0, +0.0, +0.0, +0.0, +0.0, +0.0}, //sigma 1 //0
{+0.0, +0.0, +0.0, +0.0, +0.0, +0.0, +0.0, +0.0}, //sigma 1 //0
{+0.0, +0.0, +0.0, +0.0, +0.0, +0.0, +0.0, +0.0}, //sigma 1 //0
{+0.0, +0.0, +0.0, +0.0, +0.0, +0.0, +0.0, +0.0}, //alpha 2 //3
{-0.0, +0.0, +0.0, +0.0, +0.0, +0.0, +0.0, +0.0}, //n 1 //4
{+0.0, +0.0, +0.0, +0.0, +0.0, +0.0, +0.0, +0.0} //n 2 // 5
};
}
else if (nBins == 5){//TODO update values of bin 5 to actual results from MC fit. for now, taking average values of first two bins
if (nPDF ==0) return { //Run 1
{+30.0, +31.0, +24.5, +25.2, +30.5}, //sigma 1 //0
{+25.0, +25.0, +25.0, +25.0, +25.0}, //sigma 2 //1
{+1.40, +1.3967, +1.37, +1.8541,+1.39835},//alpha 1 //2
{+0.94, +0.9847, +1.0039,+1.3360,+0.96235},//alpha 2 //3
{+3.98, +2.35, +1.85, +3.1, +3.165}, //n 1 //4
{+4.39, +3.23, +3.63, +3.50, +3.81} //n 2 //5
};
if (nPDF==1) return { //Run 2
{+35.8, +31.0, +24.5, +22.0, +33.4}, //sigma 1 //0
{+25.0, +25.0, +25.0, +25.0, +25.0}, //sigma 2 //1
{+1.41, +1.2853, +1.4168,+1.8406,+1.34765},//alpha 1 //2
{+1.13, +1.0736, +1.0649,+0.9954,+1.1018}, //alpha 2 //3
{+3.36, +2.35, +2.28, +3.1 ,+2.855}, //n 1 //4
{+4.39, +3.23, +3.63, +3.50 ,+3.81} //n 2 //5
};
}
else if (nBins == 4){
if (nPDF ==0) return { //Run 1
{+30.0, +31.0, +24.5, +25.2}, //sigma 1 //0
{+25.0, +25.0, +25.0, +25.0}, //sigma 2 //1
{+1.40, +1.3967, +1.37, +1.8541},//alpha 1 //2
{+0.94, +0.9847, +1.0039,+1.3360},//alpha 2 //3
{+3.98, +2.35, +1.85, +3.1}, //n 1 //4
{+4.39, +3.23, +3.63, +3.50} //n 2 //5
};
if (nPDF==1) return { //Run 2
{+35.8, +31.0, +24.5, +22.0}, //sigma 1 //0
{+25.0, +25.0, +25.0, +25.0}, //sigma 2 //1
{+1.41, +1.2853, +1.4168,+1.8406},//alpha 1 //2
{+1.13, +1.0736, +1.0649,+0.9954},//alpha 2 //3
{+3.36, +2.35, +2.28, +3.1}, //n 1 //4
{+4.39, +3.23, +3.63, +3.50} //n 2 //5
};
}
else if (nBins==1){
if (nPDF==0) return{ //Run 1
{+31.0}, //sigma 1 //0
{+31.0}, //sigma 2 //1
{+1.40},//alpha 1 //2
{+0.939},//alpha 2 //3
{+4.03}, //n 1 //4
{+5.9} //n 2 //5
};
if (nPDF==1) return{ //Run 2
{+31.0}, //sigma 1 //0
{+31.0}, //sigma 2 //1
{+1.442},//alpha 1 //2
{+1.013},//alpha 2 //3
{+3.74}, //n 1 //4
{+3.90} //n 2 //5
};
}
else {
spdlog::error("No mass param vectors defined for binning scheme with {0:d} q2 bins. Exit", nBins);
assert(0);
return {};
}
return {}; //Not needed but compiler complains
}
//Jpsi results from B+->K*(Kspi+)mumu
std::vector<double> init_angular_params_RefFromDavid(){
return {
+0.321, //s1s // 0
-0.002, //s3 // 1
-0.246, //s4 // 2
-0.003, //s5 // 3
-0.003, //s6s // 4
-0.001, //s7 // 5
-0.063, //s8 // 6
-0.084 //s9 // 7
};
}
//obtain parameter ranges and stepsize for (most) parameters
double GetParamStepsize(std::string name){
double stepsize = 0.1;
//TODO improving the stepsizes can be done later!
spdlog::debug("Stepsize of '"+name+"': {0:f}", stepsize);
return stepsize;
}
std::vector<double> GetParamRange(std::string name){
std::vector<double> range = {-1., +1.};
if(name.find("m_b") != std::string::npos) return range = {B_MASS_LOW, B_MASS_HIGH};
else if(name.find("f_sig") != std::string::npos) return range = {0.0 , 1.0};
else if(name.find("m_sigma") != std::string::npos) return range = {PAR_SIGMA_LOW, PAR_SIGMA_HIGH};
else if(name.find("alpha_") != std::string::npos) return range = {0.5 , 5.0};
else if(name.find("_lambda") != std::string::npos) return range = {PAR_LAMBDA*PAR_LAMBDA_SCALE,
PAR_LAMBDA/PAR_LAMBDA_SCALE};
else if(name.find("_tau") != std::string::npos) return range = {0.0 , 1.0};
else if(name.find("_scale") != std::string::npos) return range = {0.0 , 2.0};
else if(name.find("gamkstp") != std::string::npos) return range = {0.1 , 0.8}; //Width of K1, the naming convention is stupid
else if(name.find("mkstp") != std::string::npos) return range = {1.2 , 1.6};
else if(name.find("gammakstar") != std::string::npos) return range = {0.01, 1.0}; //Width of K*
else if(name.find("mkst") != std::string::npos) return range = {K_ONE_PLUS-PAR_KSTAR_WIDTH/1.0e3,
K_ONE_PLUS+PAR_KSTAR_WIDTH/1.0e3};
else if(name.find("nthreshold") != std::string::npos) return range = {0.1 , 10.0};
else if(name.find("cbkg") != std::string::npos) return range = {-2.25, +1.5};
else if(name.find("FS") != std::string::npos) return range = {0.0 , 1.0};
else if(name == "n_1" || name == "n_2") return range = {1.0 , 8.0};
else if(name.at(0) == 'S'){
if (name.at(1)=='S') return range = {-PAR_ANG_RANGE, PAR_ANG_RANGE}; //S wave
else return range = {-PAR_ANG_RANGE, PAR_ANG_RANGE}; //P wave
}
else spdlog::warn("Using default range for '"+name+"': [{0:f} - {1:f}]", range.front(), range.back());
return range;
}