169 double str_mean_CB_err_e;
170 double str_mean_CB_err_m;
171 double str_sigma_CB_err_e;
172 double str_sigma_CB_err_m;
173 readSigSystFromFile(str_mean_CB_err_e, str_mean_CB_err_m, str_sigma_CB_err_e, str_sigma_CB_err_m);
175 MELAout <<
"mean_CB systematics (ele and mu): " << str_mean_CB_err_e <<
" / " << str_mean_CB_err_m << endl;
176 MELAout <<
"sigma_CB systematics (ele and mu): " << str_sigma_CB_err_e <<
" / " << str_sigma_CB_err_m << endl;
183 mean_CB_err_=
new RooRealVar(
"mean_CB_err",
"mean_CB_err", str_mean_CB_err_m);
184 sigma_CB_err_=
new RooRealVar(
"sigma_CB_err",
"sigma_CB_err", str_sigma_CB_err_m);
187 mean_CB_err_=
new RooRealVar(
"mean_CB_err",
"mean_CB_err", str_mean_CB_err_e);
188 sigma_CB_err_=
new RooRealVar(
"sigma_CB_err",
"sigma_CB_err", str_sigma_CB_err_e);
191 mean_CB_err_=
new RooRealVar(
"mean_CB_err",
"mean_CB_err", (str_mean_CB_err_m + str_mean_CB_err_e));
192 sigma_CB_err_=
new RooRealVar(
"sigma_CB_err",
"sigma_CB_err", sqrt(pow(str_sigma_CB_err_m, 2) + pow(str_sigma_CB_err_e, 2)));
202 string str_alpha2_CB;
206 readSigParsFromFile(str_mean_CB, str_sigma_CB, str_n_CB, str_alpha_CB, str_n2_CB, str_alpha2_CB);
208 MELAout <<
"Read from input card the following formulas: " << endl;
209 MELAout <<
"Mean RooFormula (string): " << str_mean_CB.c_str() << endl;
210 MELAout <<
"Sigma RooFormula (string): " << str_sigma_CB.c_str() << endl;
218 sprintf(rrvName,
"CMS_zz4l_n_sig_%s_%d",
strChan_.c_str(),
int(
sqrts_));
219 if (
verbose_)
MELAout <<
"SuperMELA::init: Constructing n_CB_ from formula " << str_n_CB.c_str() << endl;
220 n_CB_=
new RooFormulaVar(rrvName, str_n_CB.c_str(), RooArgList(*
mH_rrv_));
221 sprintf(rrvName,
"CMS_zz4l_alpha_sig_%s_%d",
strChan_.c_str(),
int(
sqrts_));
222 if (
verbose_)
MELAout <<
"SuperMELA::init: Constructing alpha_CB_ from formula " << str_alpha_CB.c_str() << endl;
223 alpha_CB_=
new RooFormulaVar(rrvName, str_alpha_CB.c_str(), RooArgList(*
mH_rrv_));
224 sprintf(rrvName,
"CMS_zz4l_n2_sig_%s_%d",
strChan_.c_str(),
int(
sqrts_));
225 if (
verbose_)
MELAout <<
"SuperMELA::init: Constructing n2_CB_ from formula " << str_n2_CB.c_str() << endl;
226 n2_CB_=
new RooFormulaVar(rrvName, str_n2_CB.c_str(), RooArgList(*
mH_rrv_));
227 sprintf(rrvName,
"CMS_zz4l_alpha2_sig_%s_%d",
strChan_.c_str(),
int(
sqrts_));
228 if (
verbose_)
MELAout <<
"SuperMELA::init: Constructing alpha2_CB_ from formula " << str_alpha2_CB.c_str() << endl;
229 alpha2_CB_=
new RooFormulaVar(rrvName, str_alpha2_CB.c_str(), RooArgList(*
mH_rrv_));
231 corr_mean_sig =
new RooRealVar(
"CMS_zz4l_mean_sig_corrMH",
"CMS_zz4l_mean_sig_corrMH", 0., -10., 10.);
232 corr_sigma_sig =
new RooRealVar(
"CMS_zz4l_sigma_sig_corrMH",
"CMS_zz4l_sigma_sig_corrMH", 0., -10., 10.);
247 sprintf(rrvName,
"CMS_zz4l_mean_BW_sig_%s_%d",
strChan_.c_str(),
int(
sqrts_));
248 mean_BW_=
new RooRealVar(rrvName,
"CMS_zz4l_mean_BW",
mHVal_, 100., 1000.);
249 sprintf(rrvName,
"CMS_zz4l_width_BW_sig_%s_%d",
strChan_.c_str(),
int(
sqrts_));
250 width_BW_=
new RooRealVar(rrvName,
"CMS_zz4l_width_BW", 1.);
256 MELAout <<
"Signal shape parameter values: " << endl;
259 MELAout <<
"n (formula value) = " <<
n_CB_->getVal() << endl;
261 MELAout <<
"n2 (formula value) = " <<
n2_CB_->getVal() << endl;
275 MELAout <<
"Value of signal m4l CB shape is " <<
sig_CB_->getVal() << endl;
276 MELAout <<
"Value of signal m4l BW shape is " <<
sig_BW_->getVal() << endl;
283 tmpint =
sig_CB_->createIntegral(RooArgSet(*
m4l_rrv_), RooFit::Range(
"shape"));
289 tmpint =
sig_BW_->createIntegral(RooArgSet(*
m4l_rrv_), RooFit::Range(
"shape"));
290 double norm_sig_BW_ =tmpint->getVal();
292 if (
verbose_)
MELAout <<
"Normalization of signal m4l BW shape is " << norm_sig_BW_ << endl;
303 vector<double> v_apars;
307 MELAout <<
"Size of vector with bkg shape pars is " << v_apars.size() << endl;
308 MELAout <<
"Param [0]=" << v_apars.at(0) <<
" [13]=" << v_apars.at(13) << endl;
311 delete a0_qqZZ_;
a0_qqZZ_=
new RooRealVar(
"CMS_zz4l_a0_qqZZ",
"CMS_zz4l_a0_qqZZ", v_apars.at(0), 0., 200.);
312 delete a1_qqZZ_;
a1_qqZZ_=
new RooRealVar(
"CMS_zz4l_a1_qqZZ",
"CMS_zz4l_a1_qqZZ", v_apars.at(1), 0., 200.);
313 delete a2_qqZZ_;
a2_qqZZ_=
new RooRealVar(
"CMS_zz4l_a2_qqZZ",
"CMS_zz4l_a2_qqZZ", v_apars.at(2), 0., 200.);
314 delete a3_qqZZ_;
a3_qqZZ_=
new RooRealVar(
"CMS_zz4l_a3_qqZZ",
"CMS_zz4l_a3_qqZZ", v_apars.at(3), 0., 1.);
315 delete a4_qqZZ_;
a4_qqZZ_=
new RooRealVar(
"CMS_zz4l_a4_qqZZ",
"CMS_zz4l_a4_qqZZ", v_apars.at(4), 0., 200.);
316 delete a5_qqZZ_;
a5_qqZZ_=
new RooRealVar(
"CMS_zz4l_a5_qqZZ",
"CMS_zz4l_a5_qqZZ", v_apars.at(5), 0., 200.);
317 delete a6_qqZZ_;
a6_qqZZ_=
new RooRealVar(
"CMS_zz4l_a6_qqZZ",
"CMS_zz4l_a6_qqZZ", v_apars.at(6), 0., 100.);
318 delete a7_qqZZ_;
a7_qqZZ_=
new RooRealVar(
"CMS_zz4l_a7_qqZZ",
"CMS_zz4l_a7_qqZZ", v_apars.at(7), 0., 1.);
319 delete a8_qqZZ_;
a8_qqZZ_=
new RooRealVar(
"CMS_zz4l_a8_qqZZ",
"CMS_zz4l_a8_qqZZ", v_apars.at(8), 0., 200.);
320 delete a9_qqZZ_;
a9_qqZZ_=
new RooRealVar(
"CMS_zz4l_a9_qqZZ",
"CMS_zz4l_a9_qqZZ", v_apars.at(9), 0., 1.);
321 delete a10_qqZZ_;
a10_qqZZ_=
new RooRealVar(
"CMS_zz4l_a10_qqZZ",
"CMS_zz4l_a10_qqZZ", v_apars.at(10), 0., 200.);
322 delete a11_qqZZ_;
a11_qqZZ_=
new RooRealVar(
"CMS_zz4l_a11_qqZZ",
"CMS_zz4l_a11_qqZZ", v_apars.at(11), -100., 100.);
323 delete a12_qqZZ_;
a12_qqZZ_=
new RooRealVar(
"CMS_zz4l_a12_qqZZ",
"CMS_zz4l_a12_qqZZ", v_apars.at(12), 0., 10000.);
324 delete a13_qqZZ_;
a13_qqZZ_=
new RooRealVar(
"CMS_zz4l_a13_qqZZ",
"CMS_zz4l_a13_qqZZ", v_apars.at(13), 0., 1.);
346 tmpint =
qqZZ_pdf_->createIntegral(RooArgSet(*
m4l_rrv_), RooFit::Range(
"shape"));