1 #ifndef TIMEPDFMASTER_HH 2 #define TIMEPDFMASTER_HH 21 #include "RooConstVar.h" 22 #include "RooAbsReal.h" 23 #include "RooUniform.h" 24 #include "RooRealVar.h" 25 #include "RooRealConstant.h" 26 #include "RooCategory.h" 27 #include "RooDataHist.h" 28 #include "RooHistPdf.h" 29 #include "RooBDecay.h" 30 #include "RooEffProd.h" 31 #include "RooProdPdf.h" 32 #include "RooProduct.h" 33 #include "RooGaussModel.h" 34 #include "RooMCStudy.h" 49 using namespace RooFit ;
225 _offset_sigma_dt(offset_sigma_dt),
226 _scale_mean_dt(scale_mean_dt),
227 _scale_sigma_dt(scale_sigma_dt),
228 _scale_sigma_2_dt(scale_sigma_2_dt),
241 _delta_p0_os(delta_p0_os),
242 _delta_p1_os(delta_p1_os),
243 _avg_eta_os(avg_eta_os),
244 _tageff_os(tageff_os),
245 _tageff_asym_os(tageff_asym_os),
248 _delta_p0_ss(delta_p0_ss),
249 _delta_p1_ss(delta_p1_ss),
250 _avg_eta_ss(avg_eta_ss),
251 _tageff_ss(tageff_ss),
252 _tageff_asym_ss(tageff_asym_ss),
253 _production_asym(production_asym),
254 _detection_asym(detection_asym),
255 _marginalPdfsPrefix(marginalPdfsPrefix),
256 _min_TAU(
"min_TAU", 0.4),
257 _max_TAU(
"max_TAU", 10.),
258 _min_TAUERR(
"min_TAUERR", 0.),
259 _max_TAUERR(
"max_TAUERR", 0.1)
264 _r_t =
new RooRealVar(
"t",
"t", _min_TAU, _max_TAU);
265 _r_dt =
new RooRealVar(
"dt",
"dt",_min_TAUERR,_max_TAUERR);
266 _r_f =
new RooCategory(
"qf",
"qf");
267 _r_f->defineType(
"h+", +1);
268 _r_f->defineType(
"h-", -1);
269 _r_f->setRange(
"Range_p",
"h+");
270 _r_f->setRange(
"Range_m",
"h-");
271 _r_q_OS =
new RooCategory(
"q_OS",
"q_OS");
272 _r_q_OS->defineType(
"B+", +1);
273 _r_q_OS->defineType(
"B-", -1) ;
274 _r_q_OS->defineType(
"untagged", 0);
275 _r_eta_OS =
new RooRealVar(
"eta_OS",
"eta_OS",0.,0.5);
276 _r_q_SS =
new RooCategory(
"q_SS",
"q_SS");
277 _r_q_SS->defineType(
"B+", +1);
278 _r_q_SS->defineType(
"B-", -1) ;
279 _r_q_SS->defineType(
"untagged", 0);
280 _r_eta_SS =
new RooRealVar(
"eta_SS",
"eta_SS",0.,0.5);
281 _r_run =
new RooCategory(
"run",
"run");
282 _r_run->defineType(
"Run1", 1);
283 _r_run->defineType(
"Run2", 2);
284 _r_trigger =
new RooCategory(
"trigger",
"trigger");
285 _r_trigger->defineType(
"t0", 0);
286 _r_trigger->defineType(
"t1", 1);
289 _r_tau =
new RooRealVar(
"tau",
"tau",1./_Gamma);
290 _r_dGamma =
new RooRealVar(
"dGamma",
"dGamma",_dGamma);
291 _r_dm =
new RooRealVar(
"dm",
"dm",_dm);
293 _r_scale_mean_dt =
new RooRealVar(
"scale_mean_dt",
"scale_mean_dt", _scale_mean_dt);
294 _r_offset_sigma_dt =
new RooRealVar(
"offset_sigma_dt",
"offset_sigma_dt", _offset_sigma_dt);
295 _r_scale_sigma_dt =
new RooRealVar(
"scale_sigma_dt",
"scale_sigma_dt", _scale_sigma_dt);
296 _r_scale_sigma_2_dt =
new RooRealVar(
"scale_sigma_2_dt",
"scale_sigma_2_dt", _scale_sigma_2_dt);
298 _r_c0 =
new RooRealVar(
"coeff_0",
"coeff_0",_c0);
299 _r_c1 =
new RooRealVar(
"coeff_1",
"coeff_1",_c1);
300 _r_c2 =
new RooRealVar(
"coeff_2",
"coeff_2",_c2);
301 _r_c3 =
new RooRealVar(
"coeff_3",
"coeff_3",_c3);
302 _r_c4 =
new RooRealVar(
"coeff_4",
"coeff_4",_c4);
303 _r_c5 =
new RooRealVar(
"coeff_5",
"coeff_5",_c5);
304 _r_c6 =
new RooRealVar(
"coeff_6",
"coeff_6",_c6);
305 _r_c7 =
new RooRealVar(
"coeff_7",
"coeff_7",_c7);
306 _r_c8 =
new RooRealVar(
"coeff_8",
"coeff_8",_c8);
307 _r_c9 =
new RooRealVar(
"coeff_9",
"coeff_9",_c9);
309 _r_p0_os =
new RooRealVar(
"p0_os",
"p0_os",_p0_os);
310 _r_p1_os =
new RooRealVar(
"p1_os",
"p1_os",_p1_os);
311 _r_delta_p0_os =
new RooRealVar(
"delta_p0_os",
"delta_p0_os",_delta_p0_os);
312 _r_delta_p1_os =
new RooRealVar(
"delta_p1_os",
"delta_p1_os",_delta_p1_os);
313 _r_avg_eta_os =
new RooRealVar(
"avg_eta_os",
"avg_eta_os",_avg_eta_os);
314 _r_tageff_os =
new RooRealVar(
"tageff_os",
"tageff_os",_tageff_os);
315 _r_tageff_asym_os =
new RooRealVar(
"tageff_asym_os",
"tageff_asym_os",_tageff_asym_os);
316 _r_p0_ss =
new RooRealVar(
"p0_ss",
"p0_ss",_p0_ss);
317 _r_p1_ss =
new RooRealVar(
"p1_ss",
"p1_ss",_p1_ss);
318 _r_delta_p0_ss =
new RooRealVar(
"delta_p0_ss",
"delta_p0_ss",_delta_p0_ss);
319 _r_delta_p1_ss =
new RooRealVar(
"delta_p1_ss",
"delta_p1_ss",_delta_p1_ss);
320 _r_avg_eta_ss =
new RooRealVar(
"avg_eta_ss",
"avg_eta_ss",_avg_eta_ss);
321 _r_tageff_ss =
new RooRealVar(
"tageff_ss",
"tageff_ss",_tageff_ss);
322 _r_tageff_asym_ss=
new RooRealVar(
"tageff_asym_ss",
"tageff_asym_ss",_tageff_asym_ss);
324 _r_production_asym =
new RooRealVar(
"production_asym",
"production_asym",_production_asym);
325 _r_detection_asym =
new RooRealVar(
"detection_asym",
"detection_asym",_detection_asym);
328 vector<RooRealVar*> v_coeff;
329 v_coeff.push_back(_r_c0);
330 v_coeff.push_back(_r_c1);
331 v_coeff.push_back(_r_c2);
332 v_coeff.push_back(_r_c3);
333 v_coeff.push_back(_r_c4);
334 v_coeff.push_back(_r_c5);
335 v_coeff.push_back(_r_c6);
336 v_coeff.push_back(_r_c7);
337 v_coeff.push_back(_r_c8);
338 v_coeff.push_back(_r_c9);
342 vector<double> myBinning = knot_positions.
getVector();
344 RooArgList tacc_list;
345 for(
int i= 0; i<= myBinning.size(); i++){
346 tacc_list.add(*v_coeff[i]);
349 _coeff_last =
new RooFormulaVar((
"coeff_"+
anythingToString((
int)myBinning.size()+1)).c_str(),(
"coeff_"+
anythingToString((
int)myBinning.size()+1)).c_str(),
"@0 + ((@0-@1)/(@2-@3)) * (@4 - @2)", RooArgList(RooRealConstant::value(1.0), *tacc_list.find((
"coeff_"+
anythingToString((
int)myBinning.size()-1)).c_str()) , RooRealConstant::value(myBinning[myBinning.size()-1]), RooRealConstant::value(myBinning[myBinning.size()-2]), RooRealConstant::value(_r_t->getMax()) ));
351 tacc_list.add(*_coeff_last);
354 _spline =
new RooCubicSplineFun(
"spline",
"spline", *_r_t, myBinning, tacc_list);
356 _splinePdf =
new RooProduct(
"splinePdf",
"splinePdf", RooArgList(*_spline,RooRealConstant::value(0.1)));
359 _r_dt_scaled = (RooRealVar*)
new RooFormulaVar(
"r_dt_scaled",
"r_dt_scaled",
"@0+@1*@2+@3*@2*@2",RooArgList(*_r_offset_sigma_dt,*_r_scale_sigma_dt,*_r_dt,*_r_scale_sigma_2_dt));
360 _efficiency =
new RooGaussEfficiencyModel(
"resmodel",
"resmodel", *_r_t, *_spline, RooRealConstant::value(0.), *_r_dt_scaled, *_r_scale_mean_dt, RooRealConstant::value(1.) );
363 _r_norm =
new RooRealVar(
"norm",
"norm",1);
364 _r_norm_bar =
new RooRealVar(
"norm_bar",
"norm_bar",1);
365 _r_C =
new RooRealVar(
"C",
"C",1);
366 _r_C_bar =
new RooRealVar(
"Cbar",
"Cbar",-1);
368 _r_D=
new RooRealVar(
"D",
"D",0);
369 _r_D_bar=
new RooRealVar(
"Dbar",
"Dbar",0);
370 _r_S=
new RooRealVar(
"S",
"S",0);
371 _r_S_bar=
new RooRealVar(
"Sbar",
"Sbar",0);
399 *_r_detection_asym );
426 *_r_detection_asym );
453 *_r_detection_asym );
480 *_r_detection_asym );
485 _offset_sigma_dt, _scale_mean_dt, _scale_sigma_dt, _scale_sigma_2_dt
492 _offset_sigma_dt, _scale_mean_dt, _scale_sigma_dt, _scale_sigma_2_dt
499 _offset_sigma_dt, _scale_mean_dt, _scale_sigma_dt, _scale_sigma_2_dt
506 _offset_sigma_dt, _scale_mean_dt, _scale_sigma_dt, _scale_sigma_2_dt
513 cout << (string)_marginalPdfsPrefix << endl;
514 if((
string)_marginalPdfsPrefix ==
"Uniform"){
515 _pdf_sigma_t = (RooAbsPdf*) (
new RooUniform(
"pdf_sigma_t",
"pdf_sigma_t",*_r_dt));
516 _pdf_eta_OS = (RooAbsPdf*) (
new RooUniform(
"pdf_eta_OS",
"pdf_eta_OS",*_r_eta_OS));
517 _pdf_eta_SS = (RooAbsPdf*) (
new RooUniform(
"pdf_eta_SS",
"pdf_eta_SS",*_r_eta_SS));
520 _f_pdfs =
new TFile(
"Mistag_pdfs.root",
"OPEN");
522 _h_dt =
new TH1D( *((TH1D*) _f_pdfs->Get((
"h_dt_norm_"+(
string)_marginalPdfsPrefix).c_str())));
525 for(
int i= 1 ; i<=_h_dt->GetNbinsX(); i++){
526 if(_h_dt->GetBinContent(i) <= 0.)_h_dt->SetBinContent(i,0.000000001*_h_dt->GetMaximum());
528 _r_h_dt =
new RooDataHist(
"r_h_dt",
"r_h_dt",*_r_dt,_h_dt);
529 _pdf_sigma_t = (RooAbsPdf*) (
new RooHistPdf(
"pdf_sigma_t",
"pdf_sigma_t",*_r_dt,*_r_h_dt));
531 _h_eta_OS =
new TH1D( *((TH1D*) _f_pdfs->Get((
"h_w_OS_norm_"+(
string)_marginalPdfsPrefix).c_str())));
533 for(
int i= 1 ; i<=_h_eta_OS->GetNbinsX(); i++){
534 if(_h_eta_OS->GetBinContent(i) <= 0.)_h_eta_OS->SetBinContent(i,0.000000001*_h_eta_OS->GetMaximum());
536 _r_h_eta_OS =
new RooDataHist(
"r_eta_OS",
"r_eta_OS",*_r_eta_OS,_h_eta_OS);
537 _pdf_eta_OS = (RooAbsPdf*) (
new RooHistPdf(
"pdf_eta_OS",
"pdf_eta_OS",*_r_eta_OS,*_r_h_eta_OS));
539 _h_eta_SS =
new TH1D( *((TH1D*) _f_pdfs->Get((
"h_w_SS_norm_"+(
string)_marginalPdfsPrefix).c_str())));
541 for(
int i= 1 ; i<=_h_eta_SS->GetNbinsX(); i++){
542 if(_h_eta_SS->GetBinContent(i) <= 0.)_h_eta_SS->SetBinContent(i,0.000000001*_h_eta_SS->GetMaximum());
544 _r_h_eta_SS =
new RooDataHist(
"r_eta_SS",
"r_eta_SS",*_r_eta_SS,_h_eta_SS);
545 _pdf_eta_SS = (RooAbsPdf*) (
new RooHistPdf(
"pdf_eta_SS",
"pdf_eta_SS",*_r_eta_SS,*_r_h_eta_SS));
552 _resmodel =
new RooGaussModel(
"resmodel",
"resmodel", *_r_t, RooRealConstant::value(0.), *_r_dt_scaled);
554 _samplingPdf_t =
new RooBDecay((
"samplingPdf_t"+(
string)_marginalPdfsPrefix).c_str(), (
"samplingPdf_t"+(
string)_marginalPdfsPrefix).c_str(),
555 *_r_t,*_r_tau, *_r_dGamma,
556 *_cosh_coeff,*_sinh_coeff,*_cos_coeff,*_sin_coeff,
557 *_r_dm, *_resmodel, RooBDecay::SingleSided);
559 _samplingPdf_t_eff =
new RooEffProd((
"samplingPdf_t_eff"+(
string)_marginalPdfsPrefix).c_str(), (
"samplingPdf_t_eff"+(
string)_marginalPdfsPrefix).c_str(),
560 *_samplingPdf_t, *_splinePdf);
562 _samplingPdf =
new RooProdPdf((
"samplingPdf"+(
string)_marginalPdfsPrefix).c_str(),(
"samplingPdf"+(
string)_marginalPdfsPrefix).c_str(),
563 RooArgSet(*_pdf_sigma_t,*_pdf_eta_OS,*_pdf_eta_SS),Conditional(RooArgSet(*_samplingPdf_t_eff),RooArgSet(*_r_t,*_r_f,*_r_q_OS,*_r_q_SS)));
566 _fitPdf_t =
new RooBDecay((
"fitPdf_t"+(
string)_marginalPdfsPrefix).c_str(), (
"fitPdf_t"+(
string)_marginalPdfsPrefix).c_str(),
567 *_r_t,*_r_tau, *_r_dGamma,
568 *_cosh_coeff,*_sinh_coeff,*_cos_coeff,*_sin_coeff,
569 *_r_dm, *_efficiency, RooBDecay::SingleSided);
571 _fitPdf =
new RooProdPdf((
"fitPdf"+(
string)_marginalPdfsPrefix).c_str(),(
"fitPdf"+(
string)_marginalPdfsPrefix).c_str(),
572 RooArgSet(*_pdf_sigma_t,*_pdf_eta_OS,*_pdf_eta_SS),Conditional(RooArgSet(*_fitPdf_t),RooArgSet(*_r_t,*_r_f,*_r_q_OS,*_r_q_SS)));
579 _protoData =
new RooDataSet(
"protoData",
"protoData",RooArgSet(*_r_dt,*_r_eta_OS,*_r_eta_SS));
580 int N_proto = N > 100000 ? N : 100000;
581 for(
int i = 0 ; i < N; i++){
582 _r_dt->setVal(_h_dt->GetRandom());
583 _r_eta_OS->setVal(_h_eta_OS->GetRandom());
584 _r_eta_SS->setVal(_h_eta_SS->GetRandom());
585 _protoData->add(RooArgSet(*_r_dt,*_r_eta_OS,*_r_eta_SS));
587 _sampleGen =
new RooMCStudy(*_samplingPdf,RooArgSet(*_r_t,*_r_q_OS,*_r_q_SS,*_r_f),ProtoData(*_protoData,kFALSE,kTRUE));
589 _sampleGen->generate(1,N,kTRUE);
590 RooDataSet* data = (RooDataSet*)_sampleGen->genData(0);
596 vals.push_back(_h_dt->GetRandom());
597 vals.push_back(_h_eta_OS->GetRandom());
598 vals.push_back(_h_eta_SS->GetRandom());
602 void fillProtoData(
double dt,
int f,
int q_OS,
double eta_OS,
int q_SS,
double eta_SS){
604 _r_q_SS->setIndex(q_SS);
605 _r_q_OS->setIndex(q_OS);
607 _r_eta_OS->setVal(eta_OS);
608 _r_eta_SS->setVal(eta_SS);
609 _protoData->add(RooArgSet(*_r_dt,*_r_f,*_r_q_OS,*_r_eta_OS,*_r_q_SS,*_r_eta_SS));
613 setAllObservablesAndFitParameters(evt);
614 return _fitPdf->getVal(RooArgSet(*_r_t,*_r_dt,*_r_eta_OS,*_r_eta_SS,*_r_f,*_r_q_OS,*_r_q_SS));
690 return _pdf_sigma_t->getVal(RooArgSet(*_r_dt))
691 * ( abs(q_OS) * _pdf_eta_OS->getVal(RooArgSet(*_r_eta_OS)) + ( 1. - abs(q_OS)) * 1./0.5 )
692 * ( abs(q_SS) * _pdf_eta_SS->getVal(RooArgSet(*_r_eta_SS)) + ( 1. - abs(q_SS)) * 1./0.5 );
696 return _pdf_sigma_t->getVal(RooArgSet(*_r_dt)) * _pdf_eta_OS->getVal(RooArgSet(*_r_eta_OS)) * _pdf_eta_SS->getVal(RooArgSet(*_r_eta_SS));
700 return _spline->getVal();
704 return (
double) 1./_Gamma;
712 return (
double)_dGamma;
720 return _cosh_coeff->
calibrate(eta_OS, _avg_eta_os, _p0_os, _p1_os, _delta_p0_os, _delta_p1_os);
735 std::pair<double, double>
getCalibratedMistag(
double eta,
double avg_eta,
double p0,
double p1,
double delta_p0,
double delta_p1 ){
736 return _cosh_coeff->
calibrate(eta, avg_eta, p0, p1, delta_p0, delta_p1);
740 return _cosh_coeff->
calibrate(eta_SS, _avg_eta_ss, _p0_ss, _p1_ss, _delta_p0_ss, _delta_p1_ss);
744 return _offset_sigma_dt + _scale_sigma_dt * dt + _scale_sigma_2_dt * dt *dt;
748 return _offset_sigma_dt + scale_sigma_dt * dt + scale_sigma_2_dt * dt *dt;
752 std::cout <<
"TimePDfIntegrator depends on these fitParameters:" << std::endl;
760 _r_tau->setVal(1./_Gamma);
761 _r_dGamma->setVal(_dGamma);
764 _r_scale_mean_dt->setVal(_scale_mean_dt);
765 _r_offset_sigma_dt->setVal(_offset_sigma_dt);
766 _r_scale_sigma_dt->setVal(_scale_sigma_dt);
767 _r_scale_sigma_2_dt->setVal(_scale_sigma_2_dt);
779 _r_p0_os->setVal(_p0_os);
780 _r_p1_os->setVal(_p1_os);
781 _r_delta_p0_os->setVal(_delta_p0_os);
782 _r_delta_p1_os->setVal(_delta_p1_os);
783 _r_avg_eta_os->setVal(_avg_eta_os);
784 _r_tageff_os->setVal(_tageff_os);
785 _r_tageff_asym_os->setVal(_tageff_asym_os);
786 _r_p0_ss->setVal(_p0_ss);
787 _r_p1_ss->setVal(_p1_ss);
788 _r_delta_p0_ss->setVal(_delta_p0_ss);
789 _r_delta_p1_ss->setVal(_delta_p1_ss);
790 _r_avg_eta_ss->setVal(_avg_eta_ss);
791 _r_tageff_ss->setVal(_tageff_ss);
792 _r_tageff_asym_ss->setVal(_tageff_asym_ss);
794 _r_production_asym->setVal(_production_asym);
795 _r_detection_asym->setVal(_detection_asym);
810 _r_q_OS->setIndex(q_OS);
811 _r_eta_OS->setVal(eta_OS);
812 _r_q_SS->setIndex(q_SS);
813 _r_eta_SS->setVal(eta_SS);
817 _r_t->setVal(1./_Gamma);
818 if((
string)_marginalPdfsPrefix ==
"Uniform")_r_dt->setVal(1./_Gamma/100.);
819 else _r_dt->setVal(_h_dt->GetMean());
821 _r_q_OS->setIndex(0);
822 if((
string)_marginalPdfsPrefix ==
"Uniform")_r_eta_OS->setVal(0.);
823 else _r_eta_OS->setVal(_h_eta_OS->GetMean());
824 _r_q_SS->setIndex(0);
825 if((
string)_marginalPdfsPrefix ==
"Uniform")_r_eta_SS->setVal(0.);
826 else _r_eta_SS->setVal(_h_eta_SS->GetMean());
829 void setCP_coeff(
double norm,
double norm_bar,
double C,
double C_bar,
double D,
double D_bar,
double S,
double S_bar ){
830 _r_norm->setVal(norm);
831 _r_norm_bar->setVal(norm_bar);
833 _r_C_bar->setVal(C_bar);
835 _r_D_bar->setVal(D_bar);
837 _r_S_bar->setVal(S_bar);
843 vals.push_back(_r_norm->getVal());
844 vals.push_back(_r_norm_bar->getVal());
845 vals.push_back(_r_C->getVal());
846 vals.push_back(_r_C_bar->getVal());
847 vals.push_back(_r_D->getVal());
848 vals.push_back(_r_D_bar->getVal());
849 vals.push_back(_r_S->getVal());
850 vals.push_back(_r_S_bar->getVal());
856 setAllObservables(evt);
857 setAllFitParameters();
861 setAllFitParameters();
862 TH1D *h_spline =
new TH1D(
"",
";t (ps);Efficiency (a.u.)", 100, _min_TAU, _max_TAU);
863 for (
int i = 1; i<=h_spline->GetNbinsX(); i++) {
864 _r_t->setVal(h_spline->GetXaxis()->GetBinCenter(i));
865 h_spline->SetBinContent(i,_spline->getVal());
867 TCanvas* c =
new TCanvas();
868 h_spline->SetLineColor(kRed);
869 h_spline->SetLineWidth(5);
871 h_spline->SetMinimum(0.);
872 h_spline->SetMaximum(1.2);
874 h_spline->Draw(
"histc");
875 c->Print(
"spline.eps");
881 TH1D* h_spline = plotSpline();
882 TCanvas* c =
new TCanvas();
883 h_spline->SetLineColor(kRed);
884 h_spline->Draw(
"histc");
885 c->Print(
"spline.eps");
double get_cosh_coeff_Val(IDalitzEvent &evt)
double get_spline_Val(IDalitzEvent &evt)
RooRealVar * _r_scale_mean_dt
RooRealVar * _r_avg_eta_os
RooRealVar * _r_avg_eta_ss
const MINT::FitParameter & _tageff_asym_ss
virtual std::complex< double > getVal(IDalitzEvent &evt)
void setAllObservables(IDalitzEvent &evt)
vector< double > getRandom_marginalVals()
RooRealVar * _r_tageff_os
std::pair< double, double > getCalibratedMistag_SS(IDalitzEvent &evt)
const MINT::FitParameter & _c8
double get_marginalPdfs_Val(IDalitzEvent &evt)
RooFormulaVar * _coeff_last
const MINT::FitParameter & _detection_asym
RooRealVar * _r_delta_p0_os
const MINT::FitParameter & _tageff_asym_os
const MINT::FitParameter & _avg_eta_ss
const MINT::FitParameter & _p1_ss
Double_t analyticalIntegral(Int_t code, const char *rangeName=0) const
const MINT::FitParameter & _dm
string _marginalPdfsPrefix
const MINT::FitParameter & _delta_p1_ss
NamedParameter< double > _max_TAU
const MINT::FitParameter & _dGamma
RooDataHist * _r_h_eta_OS
RooGaussModel * _resmodel
double get_cosh_term_Integral(IDalitzEvent &evt)
void setCP_coeff(double norm, double norm_bar, double C, double C_bar, double D, double D_bar, double S, double S_bar)
Double_t evaluate() const
const MINT::FitParameter & _c5
TimePdfIntegrator * _sinh_term
std::pair< double, double > getCalibratedMistag_OS(IDalitzEvent &evt, double &avg_eta_os, double &p0_os, double &p1_os, double &delta_p0_os, double &delta_p1_os)
TimePdfMaster(const MINT::FitParameter &Gamma, const MINT::FitParameter &dGamma, const MINT::FitParameter &dm, const MINT::FitParameter &offset_sigma_dt, const MINT::FitParameter &scale_mean_dt, const MINT::FitParameter &scale_sigma_dt, const MINT::FitParameter &scale_sigma_2_dt, const MINT::FitParameter &c0, const MINT::FitParameter &c1, const MINT::FitParameter &c2, const MINT::FitParameter &c3, const MINT::FitParameter &c4, const MINT::FitParameter &c5, const MINT::FitParameter &c6, const MINT::FitParameter &c7, const MINT::FitParameter &c8, const MINT::FitParameter &c9, const MINT::FitParameter &p0_os, const MINT::FitParameter &p1_os, const MINT::FitParameter &delta_p0_os, const MINT::FitParameter &delta_p1_os, const MINT::FitParameter &avg_eta_os, const MINT::FitParameter &tageff_os, const MINT::FitParameter &tageff_asym_os, const MINT::FitParameter &p0_ss, const MINT::FitParameter &p1_ss, const MINT::FitParameter &delta_p0_ss, const MINT::FitParameter &delta_p1_ss, const MINT::FitParameter &avg_eta_ss, const MINT::FitParameter &tageff_ss, const MINT::FitParameter &tageff_asym_ss, const MINT::FitParameter &production_asym, const MINT::FitParameter &detection_asym, string marginalPdfsPrefix)
RooRealVar * _r_delta_p0_ss
RooRealVar * _r_offset_sigma_dt
RooRealVar * _r_tageff_ss
RooRealVar * _r_delta_p1_ss
double get_cos_term_Val(IDalitzEvent &evt)
RooEffProd * _samplingPdf_t_eff
double getCalibratedResolution(double &dt)
RooBDecay * _samplingPdf_t
DecRateCoeff_Bd * _cos_coeff
const MINT::FitParameter & _tageff_ss
double get_marginalPdfs_product(IDalitzEvent &evt)
const MINT::FitParameter & _c4
NamedParameter< double > _max_TAUERR
double get_sinh_term_Integral(IDalitzEvent &evt)
double getSamplingPdfVal(IDalitzEvent &evt)
double getCalibratedResolution(double &dt, double &scale_sigma_dt, double &scale_sigma_2_dt)
const MINT::FitParameter & _delta_p0_ss
double get_sinh_coeff_Val(IDalitzEvent &evt)
DecRateCoeff_Bd * _sin_coeff
RooRealVar * _r_t
Cast of MINT parameters to B2DX parameters.
const MINT::FitParameter & _c1
const MINT::FitParameter & _tageff_os
const MINT::FitParameter & _scale_sigma_dt
std::pair< double, double > getCalibratedMistag_OS(double &eta_OS)
const MINT::FitParameter & _p0_os
RooRealVar * _r_delta_p1_os
RooDataHist * _r_h_eta_SS
void setAllFitParameters()
std::pair< double, double > calibrate(double eta, double avg_eta, double p0, double p1, double delta_p0, double delta_p1) const
double get_sin_term_Integral(IDalitzEvent &evt)
RooCubicSplineFun * _spline
RooRealVar * _r_detection_asym
const MINT::FitParameter & _c6
const MINT::FitParameter & _Gamma
void fillProtoData(double dt, int f, int q_OS, double eta_OS, int q_SS, double eta_SS)
void setAllObservablesToMean(IDalitzEvent &evt)
std::pair< double, double > getCalibratedMistag(double eta, double avg_eta, double p0, double p1, double delta_p0, double delta_p1)
TimePdfIntegrator * _sin_term
RooProdPdf * _samplingPdf
const MINT::FitParameter & _scale_mean_dt
const MINT::FitParameter & _c7
const MINT::FitParameter & _p0_ss
TimePdfIntegrator * _cosh_term
void listFitParDependencies()
double get_sin_term_Val(IDalitzEvent &evt)
const std::vector< T > & getVector() const
double get_cosh_term_Val(IDalitzEvent &evt)
RooRealVar * _r_tageff_asym_os
const MINT::FitParameter & _delta_p1_os
DecRateCoeff_Bd * _sinh_coeff
RooRealVar * _r_production_asym
virtual double getValueFromVector(unsigned int i) const =0
double get_sin_coeff_Val(IDalitzEvent &evt)
RooDataSet * sampleEvents(int N=10000)
const MINT::FitParameter & _avg_eta_os
const MINT::FitParameter & _offset_sigma_dt
const MINT::FitParameter & _production_asym
NamedParameter< double > _min_TAUERR
const MINT::FitParameter & _c9
vector< double > getCP_coeff()
std::string anythingToString(const T &anything)
double get_sinh_term_Val(IDalitzEvent &evt)
double get_cos_term_Integral(IDalitzEvent &evt)
const MINT::FitParameter & _c2
const MINT::FitParameter & _c0
RooRealVar * _r_dt_scaled
RooRealVar * _r_scale_sigma_2_dt
cosh/sinh/cos/sin coefficients in decay rate equations
RooGaussEfficiencyModel * _efficiency
const MINT::FitParameter & _delta_p0_os
const MINT::FitParameter & _scale_sigma_2_dt
DecRateCoeff_Bd * _cosh_coeff
RooRealVar * _r_tageff_asym_ss
std::pair< double, double > getCalibratedMistag_SS(double &eta_SS)
const MINT::FitParameter & _c3
RooRealVar * _r_scale_sigma_dt
TimePdfIntegrator * _cos_term
void setAllObservablesAndFitParameters(IDalitzEvent &evt)
const MINT::FitParameter & _p1_os
double get_cos_coeff_Val(IDalitzEvent &evt)
std::pair< double, double > getCalibratedMistag_SS(IDalitzEvent &evt, double &avg_eta_ss, double &p0_ss, double &p1_ss, double &delta_p0_ss, double &delta_p1_ss)
NamedParameter< double > _min_TAU
void listFitParDependencies(std::ostream &os=std::cout) const
std::pair< double, double > getCalibratedMistag_OS(IDalitzEvent &evt)