5 #include "RooAbsReal.h" 6 #include "RooAbsCategory.h" 7 #include "RooCategory.h" 10 #include "RooRealConstant.h" 11 #include "RooConstVar.h" 14 const std::string& title,
16 RooAbsCategory& _finalstate_,
17 RooAbsReal& _cp_coeff_,
18 RooAbsReal& _cp_coeff_bar_,
19 RooAbsCategory& _tag_os_,
23 RooAbsReal& _delta_p0_os_,
24 RooAbsReal& _delta_p1_os_,
25 RooAbsReal& _avg_eta_os_,
26 RooAbsReal& _tageff_os_,
27 RooAbsReal& _tageff_asym_os_,
28 RooAbsCategory& _tag_ss_,
32 RooAbsReal& _delta_p0_ss_,
33 RooAbsReal& _delta_p1_ss_,
34 RooAbsReal& _avg_eta_ss_,
35 RooAbsReal& _tageff_ss_,
36 RooAbsReal& _tageff_asym_ss_,
37 RooAbsReal& _production_asym_,
38 RooAbsReal& _detection_asym_) :
39 RooAbsReal(name.c_str(),title.c_str()),
40 cp_coeff_(
"cp_coeff_",
"cp_coeff_",this,_cp_coeff_),
41 cp_coeff_bar_(
"cp_coeff_bar_",
"cp_coeff_bar_",this,_cp_coeff_bar_),
42 coeff_type_(_coeff_type_),
43 finalstate_(
"finalstate_",
"finalstate_",this,_finalstate_),
44 tag_os_(
"tag_os_",
"tag_os_",this,_tag_os_),
45 eta_os_(
"eta_os_",
"eta_os_",this,_eta_os_),
46 avg_eta_os_(
"avg_eta_os_",
"avg_eta_os_",this,_avg_eta_os_),
47 p0_os_(
"p0_os_",
"p0_os_",this,_p0_os_),
48 p1_os_(
"p1_os_",
"p1_os_",this,_p1_os_),
49 delta_p0_os_(
"delta_p0_os_",
"delta_p0_os_",this,_delta_p0_os_),
50 delta_p1_os_(
"delta_p1_os_",
"delta_p1_os_",this,_delta_p1_os_),
51 tageff_os_(
"tageff_os_",
"tageff_os_",this,_tageff_os_),
52 tageff_asym_os_(
"tageff_asym_os_",
"tageff_asym_os_",this,_tageff_asym_os_),
53 tag_ss_(
"tag_ss_",
"tag_ss_",this,_tag_ss_),
54 eta_ss_(
"eta_ss_",
"eta_ss_",this,_eta_ss_),
55 avg_eta_ss_(
"avg_eta_ss_",
"avg_eta_ss_",this,_avg_eta_ss_),
56 p0_ss_(
"p0_ss_",
"p0_ss_",this,_p0_ss_),
57 p1_ss_(
"p1_ss_",
"p1_ss_",this,_p1_ss_),
58 delta_p0_ss_(
"delta_p0_ss_",
"delta_p0_ss_",this,_delta_p0_ss_),
59 delta_p1_ss_(
"delta_p1_ss_",
"delta_p1_ss_",this,_delta_p1_ss_),
60 tageff_ss_(
"tageff_ss_",
"tageff_ss_",this,_tageff_ss_),
61 tageff_asym_ss_(
"tageff_asym_ss_",
"tageff_asym_ss_",this,_tageff_asym_ss_),
62 production_asym_(
"production_asym_",
"production_asym_",this,_production_asym_),
63 detection_asym_(
"detection_asym_",
"detection_asym_",this,_detection_asym_),
69 const std::string& title,
71 RooAbsCategory& _finalstate_,
72 RooAbsReal& _cp_coeff_,
73 RooAbsReal& _cp_coeff_bar_,
74 RooAbsCategory& _tag_os_,
78 RooAbsReal& _delta_p0_os_,
79 RooAbsReal& _delta_p1_os_,
80 RooAbsReal& _avg_eta_os_,
81 RooAbsReal& _tageff_os_,
82 RooAbsReal& _tageff_asym_os_,
83 RooAbsReal& _production_asym_,
84 RooAbsReal& _detection_asym_) :
85 RooAbsReal(name.c_str(),title.c_str()),
86 cp_coeff_(
"cp_coeff_",
"cp_coeff_",this,_cp_coeff_),
87 cp_coeff_bar_(
"cp_coeff_bar_",
"cp_coeff_bar_",this,_cp_coeff_bar_),
88 coeff_type_(_coeff_type_),
89 finalstate_(
"finalstate_",
"finalstate_",this,_finalstate_),
90 tag_os_(
"tag_os_",
"tag_os_",this,_tag_os_),
91 eta_os_(
"eta_os_",
"eta_os_",this,_eta_os_),
92 avg_eta_os_(
"avg_eta_os_",
"avg_eta_os_",this,_avg_eta_os_),
93 p0_os_(
"p0_os_",
"p0_os_",this,_p0_os_),
94 p1_os_(
"p1_os_",
"p1_os_",this,_p1_os_),
95 delta_p0_os_(
"delta_p0_os_",
"delta_p0_os_",this,_delta_p0_os_),
96 delta_p1_os_(
"delta_p1_os_",
"delta_p1_os_",this,_delta_p1_os_),
97 tageff_os_(
"tageff_os_",
"tageff_os_",this,_tageff_os_),
98 tageff_asym_os_(
"tageff_asym_os_",
"tageff_asym_os_",this,_tageff_asym_os_),
99 tag_ss_(
"tag_ss_",
"tag_ss_",this,_tag_os_),
100 eta_ss_(
"eta_ss_",
"eta_ss_",this,_eta_os_),
101 avg_eta_ss_(
"avg_eta_ss_",
"avg_eta_ss_",this,_avg_eta_os_),
102 p0_ss_(
"p0_ss_",
"p0_ss_",this,_p0_os_),
103 p1_ss_(
"p1_ss_",
"p1_ss_",this,_p1_os_),
104 delta_p0_ss_(
"delta_p0_ss_",
"delta_p0_ss_",this,_delta_p0_os_),
105 delta_p1_ss_(
"delta_p1_ss_",
"delta_p1_ss_",this,_delta_p1_os_),
106 tageff_ss_(
"tageff_ss_",
"tageff_ss_",this,_tageff_os_),
107 tageff_asym_ss_(
"tageff_asym_ss_",
"tageff_asym_ss_",this,_tageff_asym_os_),
108 production_asym_(
"production_asym_",
"production_asym_",this,_production_asym_),
109 detection_asym_(
"detection_asym_",
"detection_asym_",this,_detection_asym_),
116 RooAbsReal(other,name),
117 cp_coeff_(
"cp_coeff_",this,other.cp_coeff_),
118 cp_coeff_bar_(
"cp_coeff_bar_",this,other.cp_coeff_bar_),
119 coeff_type_(other.coeff_type_),
120 finalstate_(
"finalstate_",this,other.finalstate_),
121 tag_os_(
"tag_os_",this,other.tag_os_),
122 eta_os_(
"eta_os_",this,other.eta_os_),
123 avg_eta_os_(
"avg_eta_os_",this,other.avg_eta_os_),
124 p0_os_(
"p0_os_",this,other.p0_os_),
125 p1_os_(
"p1_os_",this,other.p1_os_),
126 delta_p0_os_(
"delta_p0_os_",this,other.delta_p0_os_),
127 delta_p1_os_(
"delta_p1_os_",this,other.delta_p1_os_),
128 tageff_os_(
"tageff_os_",this,other.tageff_os_),
129 tageff_asym_os_(
"tageff_asym_os_",this,other.tageff_asym_os_),
130 tag_ss_(
"tag_ss_",this,other.tag_ss_),
131 eta_ss_(
"eta_ss_",this,other.eta_ss_),
132 avg_eta_ss_(
"avg_eta_ss_",this,other.avg_eta_ss_),
133 p0_ss_(
"p0_ss_",this,other.p0_ss_),
134 p1_ss_(
"p1_ss_",this,other.p1_ss_),
135 delta_p0_ss_(
"delta_p0_ss_",this,other.delta_p0_ss_),
136 delta_p1_ss_(
"delta_p1_ss_",this,other.delta_p1_ss_),
137 tageff_ss_(
"tageff_ss_",this,other.tageff_ss_),
138 tageff_asym_ss_(
"tageff_asym_ss_",this,other.tageff_asym_ss_),
139 production_asym_(
"production_asym_",this,other.production_asym_),
140 detection_asym_(
"detection_asym_",this,other.detection_asym_),
141 onetagger_(other.onetagger_)
148 return evaluate(
cp_coeff_,
cp_coeff_bar_,
coeff_type_,
finalstate_,
tag_os_,
eta_os_,
avg_eta_os_,
p0_os_,
p1_os_,
delta_p0_os_,
delta_p1_os_,
tageff_os_,
tageff_asym_os_,
tag_ss_,
eta_ss_,
avg_eta_ss_,
p0_ss_,
p1_ss_,
delta_p0_ss_,
delta_p1_ss_,
tageff_ss_,
tageff_asym_ss_,
production_asym_,
detection_asym_);
169 if (normSet) normSet->Print();
172 if (matchArgs(allVars, analVars,
tag_os_))
return 1 ;
173 if (matchArgs(allVars, analVars,
tag_ss_))
return -1 ;
188 integral +=
evaluate(
cp_coeff_,
cp_coeff_bar_,
coeff_type_, +1, +1,
eta_os_,
avg_eta_os_,
p0_os_,
p1_os_,
delta_p0_os_,
delta_p1_os_,
tageff_os_,
tageff_asym_os_, +1,
eta_ss_,
avg_eta_ss_,
p0_ss_,
p1_ss_,
delta_p0_ss_,
delta_p1_ss_,
tageff_ss_,
tageff_asym_ss_,
production_asym_,
detection_asym_);
191 integral +=
evaluate(
cp_coeff_,
cp_coeff_bar_,
coeff_type_, -1, +1,
eta_os_,
avg_eta_os_,
p0_os_,
p1_os_,
delta_p0_os_,
delta_p1_os_,
tageff_os_,
tageff_asym_os_, +1,
eta_ss_,
avg_eta_ss_,
p0_ss_,
p1_ss_,
delta_p0_ss_,
delta_p1_ss_,
tageff_ss_,
tageff_asym_ss_,
production_asym_,
detection_asym_);
198 integral +=
evaluate(
cp_coeff_,
cp_coeff_bar_,
coeff_type_, +1, -1,
eta_os_,
avg_eta_os_,
p0_os_,
p1_os_,
delta_p0_os_,
delta_p1_os_,
tageff_os_,
tageff_asym_os_, +1,
eta_ss_,
avg_eta_ss_,
p0_ss_,
p1_ss_,
delta_p0_ss_,
delta_p1_ss_,
tageff_ss_,
tageff_asym_ss_,
production_asym_,
detection_asym_);
201 integral +=
evaluate(
cp_coeff_,
cp_coeff_bar_,
coeff_type_, -1, -1,
eta_os_,
avg_eta_os_,
p0_os_,
p1_os_,
delta_p0_os_,
delta_p1_os_,
tageff_os_,
tageff_asym_os_, +1,
eta_ss_,
avg_eta_ss_,
p0_ss_,
p1_ss_,
delta_p0_ss_,
delta_p1_ss_,
tageff_ss_,
tageff_asym_ss_,
production_asym_,
detection_asym_);
208 integral +=
evaluate(
cp_coeff_,
cp_coeff_bar_,
coeff_type_, +1, 0,
eta_os_,
avg_eta_os_,
p0_os_,
p1_os_,
delta_p0_os_,
delta_p1_os_,
tageff_os_,
tageff_asym_os_, +1,
eta_ss_,
avg_eta_ss_,
p0_ss_,
p1_ss_,
delta_p0_ss_,
delta_p1_ss_,
tageff_ss_,
tageff_asym_ss_,
production_asym_,
detection_asym_);
211 integral +=
evaluate(
cp_coeff_,
cp_coeff_bar_,
coeff_type_, -1, 0,
eta_os_,
avg_eta_os_,
p0_os_,
p1_os_,
delta_p0_os_,
delta_p1_os_,
tageff_os_,
tageff_asym_os_, +1,
eta_ss_,
avg_eta_ss_,
p0_ss_,
p1_ss_,
delta_p0_ss_,
delta_p1_ss_,
tageff_ss_,
tageff_asym_ss_,
production_asym_,
detection_asym_);
220 integral +=
evaluate(
cp_coeff_,
cp_coeff_bar_,
coeff_type_, +1, +1,
eta_os_,
avg_eta_os_,
p0_os_,
p1_os_,
delta_p0_os_,
delta_p1_os_,
tageff_os_,
tageff_asym_os_, -1,
eta_ss_,
avg_eta_ss_,
p0_ss_,
p1_ss_,
delta_p0_ss_,
delta_p1_ss_,
tageff_ss_,
tageff_asym_ss_,
production_asym_,
detection_asym_);
223 integral +=
evaluate(
cp_coeff_,
cp_coeff_bar_,
coeff_type_, -1, +1,
eta_os_,
avg_eta_os_,
p0_os_,
p1_os_,
delta_p0_os_,
delta_p1_os_,
tageff_os_,
tageff_asym_os_, -1,
eta_ss_,
avg_eta_ss_,
p0_ss_,
p1_ss_,
delta_p0_ss_,
delta_p1_ss_,
tageff_ss_,
tageff_asym_ss_,
production_asym_,
detection_asym_);
230 integral +=
evaluate(
cp_coeff_,
cp_coeff_bar_,
coeff_type_, +1, -1,
eta_os_,
avg_eta_os_,
p0_os_,
p1_os_,
delta_p0_os_,
delta_p1_os_,
tageff_os_,
tageff_asym_os_, -1,
eta_ss_,
avg_eta_ss_,
p0_ss_,
p1_ss_,
delta_p0_ss_,
delta_p1_ss_,
tageff_ss_,
tageff_asym_ss_,
production_asym_,
detection_asym_);
233 integral +=
evaluate(
cp_coeff_,
cp_coeff_bar_,
coeff_type_, -1, -1,
eta_os_,
avg_eta_os_,
p0_os_,
p1_os_,
delta_p0_os_,
delta_p1_os_,
tageff_os_,
tageff_asym_os_, -1,
eta_ss_,
avg_eta_ss_,
p0_ss_,
p1_ss_,
delta_p0_ss_,
delta_p1_ss_,
tageff_ss_,
tageff_asym_ss_,
production_asym_,
detection_asym_);
240 integral +=
evaluate(
cp_coeff_,
cp_coeff_bar_,
coeff_type_, +1, 0,
eta_os_,
avg_eta_os_,
p0_os_,
p1_os_,
delta_p0_os_,
delta_p1_os_,
tageff_os_,
tageff_asym_os_, -1,
eta_ss_,
avg_eta_ss_,
p0_ss_,
p1_ss_,
delta_p0_ss_,
delta_p1_ss_,
tageff_ss_,
tageff_asym_ss_,
production_asym_,
detection_asym_);
243 integral +=
evaluate(
cp_coeff_,
cp_coeff_bar_,
coeff_type_, -1, 0,
eta_os_,
avg_eta_os_,
p0_os_,
p1_os_,
delta_p0_os_,
delta_p1_os_,
tageff_os_,
tageff_asym_os_, -1,
eta_ss_,
avg_eta_ss_,
p0_ss_,
p1_ss_,
delta_p0_ss_,
delta_p1_ss_,
tageff_ss_,
tageff_asym_ss_,
production_asym_,
detection_asym_);
252 integral +=
evaluate(
cp_coeff_,
cp_coeff_bar_,
coeff_type_, +1, +1,
eta_os_,
avg_eta_os_,
p0_os_,
p1_os_,
delta_p0_os_,
delta_p1_os_,
tageff_os_,
tageff_asym_os_, 0,
eta_ss_,
avg_eta_ss_,
p0_ss_,
p1_ss_,
delta_p0_ss_,
delta_p1_ss_,
tageff_ss_,
tageff_asym_ss_,
production_asym_,
detection_asym_);
255 integral +=
evaluate(
cp_coeff_,
cp_coeff_bar_,
coeff_type_, -1, +1,
eta_os_,
avg_eta_os_,
p0_os_,
p1_os_,
delta_p0_os_,
delta_p1_os_,
tageff_os_,
tageff_asym_os_, 0,
eta_ss_,
avg_eta_ss_,
p0_ss_,
p1_ss_,
delta_p0_ss_,
delta_p1_ss_,
tageff_ss_,
tageff_asym_ss_,
production_asym_,
detection_asym_);
262 integral +=
evaluate(
cp_coeff_,
cp_coeff_bar_,
coeff_type_, +1, -1,
eta_os_,
avg_eta_os_,
p0_os_,
p1_os_,
delta_p0_os_,
delta_p1_os_,
tageff_os_,
tageff_asym_os_, 0,
eta_ss_,
avg_eta_ss_,
p0_ss_,
p1_ss_,
delta_p0_ss_,
delta_p1_ss_,
tageff_ss_,
tageff_asym_ss_,
production_asym_,
detection_asym_);
265 integral +=
evaluate(
cp_coeff_,
cp_coeff_bar_,
coeff_type_, -1, -1,
eta_os_,
avg_eta_os_,
p0_os_,
p1_os_,
delta_p0_os_,
delta_p1_os_,
tageff_os_,
tageff_asym_os_, 0,
eta_ss_,
avg_eta_ss_,
p0_ss_,
p1_ss_,
delta_p0_ss_,
delta_p1_ss_,
tageff_ss_,
tageff_asym_ss_,
production_asym_,
detection_asym_);
272 integral +=
evaluate(
cp_coeff_,
cp_coeff_bar_,
coeff_type_, +1, 0,
eta_os_,
avg_eta_os_,
p0_os_,
p1_os_,
delta_p0_os_,
delta_p1_os_,
tageff_os_,
tageff_asym_os_, 0,
eta_ss_,
avg_eta_ss_,
p0_ss_,
p1_ss_,
delta_p0_ss_,
delta_p1_ss_,
tageff_ss_,
tageff_asym_ss_,
production_asym_,
detection_asym_);
275 integral +=
evaluate(
cp_coeff_,
cp_coeff_bar_,
coeff_type_, -1, 0,
eta_os_,
avg_eta_os_,
p0_os_,
p1_os_,
delta_p0_os_,
delta_p1_os_,
tageff_os_,
tageff_asym_os_, 0,
eta_ss_,
avg_eta_ss_,
p0_ss_,
p1_ss_,
delta_p0_ss_,
delta_p1_ss_,
tageff_ss_,
tageff_asym_ss_,
production_asym_,
detection_asym_);
285 double integral = 0.;
288 integral +=
evaluate(
cp_coeff_,
cp_coeff_bar_,
coeff_type_, +1, +1,
eta_os_,
avg_eta_os_,
p0_os_,
p1_os_,
delta_p0_os_,
delta_p1_os_,
tageff_os_,
tageff_asym_os_, 0,
eta_ss_,
avg_eta_ss_,
p0_ss_,
p1_ss_,
delta_p0_ss_,
delta_p1_ss_,
tageff_ss_,
tageff_asym_ss_,
production_asym_,
detection_asym_);
291 integral +=
evaluate(
cp_coeff_,
cp_coeff_bar_,
coeff_type_, -1, +1,
eta_os_,
avg_eta_os_,
p0_os_,
p1_os_,
delta_p0_os_,
delta_p1_os_,
tageff_os_,
tageff_asym_os_, 0,
eta_ss_,
avg_eta_ss_,
p0_ss_,
p1_ss_,
delta_p0_ss_,
delta_p1_ss_,
tageff_ss_,
tageff_asym_ss_,
production_asym_,
detection_asym_);
296 integral +=
evaluate(
cp_coeff_,
cp_coeff_bar_,
coeff_type_, +1, -1,
eta_os_,
avg_eta_os_,
p0_os_,
p1_os_,
delta_p0_os_,
delta_p1_os_,
tageff_os_,
tageff_asym_os_, 0,
eta_ss_,
avg_eta_ss_,
p0_ss_,
p1_ss_,
delta_p0_ss_,
delta_p1_ss_,
tageff_ss_,
tageff_asym_ss_,
production_asym_,
detection_asym_);
299 integral +=
evaluate(
cp_coeff_,
cp_coeff_bar_,
coeff_type_, -1, -1,
eta_os_,
avg_eta_os_,
p0_os_,
p1_os_,
delta_p0_os_,
delta_p1_os_,
tageff_os_,
tageff_asym_os_, 0,
eta_ss_,
avg_eta_ss_,
p0_ss_,
p1_ss_,
delta_p0_ss_,
delta_p1_ss_,
tageff_ss_,
tageff_asym_ss_,
production_asym_,
detection_asym_);
304 integral +=
evaluate(
cp_coeff_,
cp_coeff_bar_,
coeff_type_, +1, 0,
eta_os_,
avg_eta_os_,
p0_os_,
p1_os_,
delta_p0_os_,
delta_p1_os_,
tageff_os_,
tageff_asym_os_, 0,
eta_ss_,
avg_eta_ss_,
p0_ss_,
p1_ss_,
delta_p0_ss_,
delta_p1_ss_,
tageff_ss_,
tageff_asym_ss_,
production_asym_,
detection_asym_);
307 integral +=
evaluate(
cp_coeff_,
cp_coeff_bar_,
coeff_type_, -1, 0,
eta_os_,
avg_eta_os_,
p0_os_,
p1_os_,
delta_p0_os_,
delta_p1_os_,
tageff_os_,
tageff_asym_os_, 0,
eta_ss_,
avg_eta_ss_,
p0_ss_,
p1_ss_,
delta_p0_ss_,
delta_p1_ss_,
tageff_ss_,
tageff_asym_ss_,
production_asym_,
detection_asym_);
315 double integral = 0.;
318 integral +=
evaluate(
cp_coeff_,
cp_coeff_bar_,
coeff_type_, +1, 0,
eta_os_,
avg_eta_os_,
p0_os_,
p1_os_,
delta_p0_os_,
delta_p1_os_,
tageff_os_,
tageff_asym_os_, +1,
eta_ss_,
avg_eta_ss_,
p0_ss_,
p1_ss_,
delta_p0_ss_,
delta_p1_ss_,
tageff_ss_,
tageff_asym_ss_,
production_asym_,
detection_asym_);
321 integral +=
evaluate(
cp_coeff_,
cp_coeff_bar_,
coeff_type_, -1, 0,
eta_os_,
avg_eta_os_,
p0_os_,
p1_os_,
delta_p0_os_,
delta_p1_os_,
tageff_os_,
tageff_asym_os_, +1,
eta_ss_,
avg_eta_ss_,
p0_ss_,
p1_ss_,
delta_p0_ss_,
delta_p1_ss_,
tageff_ss_,
tageff_asym_ss_,
production_asym_,
detection_asym_);
326 integral +=
evaluate(
cp_coeff_,
cp_coeff_bar_,
coeff_type_, +1, 0,
eta_os_,
avg_eta_os_,
p0_os_,
p1_os_,
delta_p0_os_,
delta_p1_os_,
tageff_os_,
tageff_asym_os_, -1,
eta_ss_,
avg_eta_ss_,
p0_ss_,
p1_ss_,
delta_p0_ss_,
delta_p1_ss_,
tageff_ss_,
tageff_asym_ss_,
production_asym_,
detection_asym_);
329 integral +=
evaluate(
cp_coeff_,
cp_coeff_bar_,
coeff_type_, -1, 0,
eta_os_,
avg_eta_os_,
p0_os_,
p1_os_,
delta_p0_os_,
delta_p1_os_,
tageff_os_,
tageff_asym_os_, -1,
eta_ss_,
avg_eta_ss_,
p0_ss_,
p1_ss_,
delta_p0_ss_,
delta_p1_ss_,
tageff_ss_,
tageff_asym_ss_,
production_asym_,
detection_asym_);
334 integral +=
evaluate(
cp_coeff_,
cp_coeff_bar_,
coeff_type_, +1, 0,
eta_os_,
avg_eta_os_,
p0_os_,
p1_os_,
delta_p0_os_,
delta_p1_os_,
tageff_os_,
tageff_asym_os_, 0,
eta_ss_,
avg_eta_ss_,
p0_ss_,
p1_ss_,
delta_p0_ss_,
delta_p1_ss_,
tageff_ss_,
tageff_asym_ss_,
production_asym_,
detection_asym_);
337 integral +=
evaluate(
cp_coeff_,
cp_coeff_bar_,
coeff_type_, -1, 0,
eta_os_,
avg_eta_os_,
p0_os_,
p1_os_,
delta_p0_os_,
delta_p1_os_,
tageff_os_,
tageff_asym_os_, 0,
eta_ss_,
avg_eta_ss_,
p0_ss_,
p1_ss_,
delta_p0_ss_,
delta_p1_ss_,
tageff_ss_,
tageff_asym_ss_,
production_asym_,
detection_asym_);
345 double integral = 0.;
346 if (
hasTagState(
tag_os_, +1) &&
hasTagState(
tag_ss_, +1) &&
hasFinalstateState(
finalstate_, +1)) integral +=
evaluate(
cp_coeff_,
cp_coeff_bar_,
coeff_type_, +1, +1,
eta_os_,
avg_eta_os_,
p0_os_,
p1_os_,
delta_p0_os_,
delta_p1_os_,
tageff_os_,
tageff_asym_os_, +1,
eta_ss_,
avg_eta_ss_,
p0_ss_,
p1_ss_,
delta_p0_ss_,
delta_p1_ss_,
tageff_ss_,
tageff_asym_ss_,
production_asym_,
detection_asym_);
347 if (
hasTagState(
tag_os_, +1) &&
hasTagState(
tag_ss_, +1) &&
hasFinalstateState(
finalstate_, -1)) integral +=
evaluate(
cp_coeff_,
cp_coeff_bar_,
coeff_type_, -1, +1,
eta_os_,
avg_eta_os_,
p0_os_,
p1_os_,
delta_p0_os_,
delta_p1_os_,
tageff_os_,
tageff_asym_os_, +1,
eta_ss_,
avg_eta_ss_,
p0_ss_,
p1_ss_,
delta_p0_ss_,
delta_p1_ss_,
tageff_ss_,
tageff_asym_ss_,
production_asym_,
detection_asym_);
349 if (
hasTagState(
tag_os_, +1) &&
hasTagState(
tag_ss_, -1) &&
hasFinalstateState(
finalstate_, +1)) integral +=
evaluate(
cp_coeff_,
cp_coeff_bar_,
coeff_type_, +1, +1,
eta_os_,
avg_eta_os_,
p0_os_,
p1_os_,
delta_p0_os_,
delta_p1_os_,
tageff_os_,
tageff_asym_os_, -1,
eta_ss_,
avg_eta_ss_,
p0_ss_,
p1_ss_,
delta_p0_ss_,
delta_p1_ss_,
tageff_ss_,
tageff_asym_ss_,
production_asym_,
detection_asym_);
350 if (
hasTagState(
tag_os_, +1) &&
hasTagState(
tag_ss_, -1) &&
hasFinalstateState(
finalstate_, -1)) integral +=
evaluate(
cp_coeff_,
cp_coeff_bar_,
coeff_type_, -1, +1,
eta_os_,
avg_eta_os_,
p0_os_,
p1_os_,
delta_p0_os_,
delta_p1_os_,
tageff_os_,
tageff_asym_os_, -1,
eta_ss_,
avg_eta_ss_,
p0_ss_,
p1_ss_,
delta_p0_ss_,
delta_p1_ss_,
tageff_ss_,
tageff_asym_ss_,
production_asym_,
detection_asym_);
352 if (
hasTagState(
tag_os_, +1) &&
hasTagState(
tag_ss_, 0) &&
hasFinalstateState(
finalstate_, +1)) integral +=
evaluate(
cp_coeff_,
cp_coeff_bar_,
coeff_type_, +1, +1,
eta_os_,
avg_eta_os_,
p0_os_,
p1_os_,
delta_p0_os_,
delta_p1_os_,
tageff_os_,
tageff_asym_os_, 0,
eta_ss_,
avg_eta_ss_,
p0_ss_,
p1_ss_,
delta_p0_ss_,
delta_p1_ss_,
tageff_ss_,
tageff_asym_ss_,
production_asym_,
detection_asym_);
353 if (
hasTagState(
tag_os_, +1) &&
hasTagState(
tag_ss_, 0) &&
hasFinalstateState(
finalstate_, -1)) integral +=
evaluate(
cp_coeff_,
cp_coeff_bar_,
coeff_type_, -1, +1,
eta_os_,
avg_eta_os_,
p0_os_,
p1_os_,
delta_p0_os_,
delta_p1_os_,
tageff_os_,
tageff_asym_os_, 0,
eta_ss_,
avg_eta_ss_,
p0_ss_,
p1_ss_,
delta_p0_ss_,
delta_p1_ss_,
tageff_ss_,
tageff_asym_ss_,
production_asym_,
detection_asym_);
355 if (
hasTagState(
tag_os_, -1) &&
hasTagState(
tag_ss_, +1) &&
hasFinalstateState(
finalstate_, +1)) integral +=
evaluate(
cp_coeff_,
cp_coeff_bar_,
coeff_type_, +1, -1,
eta_os_,
avg_eta_os_,
p0_os_,
p1_os_,
delta_p0_os_,
delta_p1_os_,
tageff_os_,
tageff_asym_os_, +1,
eta_ss_,
avg_eta_ss_,
p0_ss_,
p1_ss_,
delta_p0_ss_,
delta_p1_ss_,
tageff_ss_,
tageff_asym_ss_,
production_asym_,
detection_asym_);
356 if (
hasTagState(
tag_os_, -1) &&
hasTagState(
tag_ss_, +1) &&
hasFinalstateState(
finalstate_, -1)) integral +=
evaluate(
cp_coeff_,
cp_coeff_bar_,
coeff_type_, -1, -1,
eta_os_,
avg_eta_os_,
p0_os_,
p1_os_,
delta_p0_os_,
delta_p1_os_,
tageff_os_,
tageff_asym_os_, +1,
eta_ss_,
avg_eta_ss_,
p0_ss_,
p1_ss_,
delta_p0_ss_,
delta_p1_ss_,
tageff_ss_,
tageff_asym_ss_,
production_asym_,
detection_asym_);
358 if (
hasTagState(
tag_os_, -1) &&
hasTagState(
tag_ss_, -1) &&
hasFinalstateState(
finalstate_, +1)) integral +=
evaluate(
cp_coeff_,
cp_coeff_bar_,
coeff_type_, +1, -1,
eta_os_,
avg_eta_os_,
p0_os_,
p1_os_,
delta_p0_os_,
delta_p1_os_,
tageff_os_,
tageff_asym_os_, -1,
eta_ss_,
avg_eta_ss_,
p0_ss_,
p1_ss_,
delta_p0_ss_,
delta_p1_ss_,
tageff_ss_,
tageff_asym_ss_,
production_asym_,
detection_asym_);
359 if (
hasTagState(
tag_os_, -1) &&
hasTagState(
tag_ss_, -1) &&
hasFinalstateState(
finalstate_, -1)) integral +=
evaluate(
cp_coeff_,
cp_coeff_bar_,
coeff_type_, -1, -1,
eta_os_,
avg_eta_os_,
p0_os_,
p1_os_,
delta_p0_os_,
delta_p1_os_,
tageff_os_,
tageff_asym_os_, -1,
eta_ss_,
avg_eta_ss_,
p0_ss_,
p1_ss_,
delta_p0_ss_,
delta_p1_ss_,
tageff_ss_,
tageff_asym_ss_,
production_asym_,
detection_asym_);
361 if (
hasTagState(
tag_os_, -1) &&
hasTagState(
tag_ss_, 0) &&
hasFinalstateState(
finalstate_, +1)) integral +=
evaluate(
cp_coeff_,
cp_coeff_bar_,
coeff_type_, +1, -1,
eta_os_,
avg_eta_os_,
p0_os_,
p1_os_,
delta_p0_os_,
delta_p1_os_,
tageff_os_,
tageff_asym_os_, 0,
eta_ss_,
avg_eta_ss_,
p0_ss_,
p1_ss_,
delta_p0_ss_,
delta_p1_ss_,
tageff_ss_,
tageff_asym_ss_,
production_asym_,
detection_asym_);
362 if (
hasTagState(
tag_os_, -1) &&
hasTagState(
tag_ss_, 0) &&
hasFinalstateState(
finalstate_, -1)) integral +=
evaluate(
cp_coeff_,
cp_coeff_bar_,
coeff_type_, -1, -1,
eta_os_,
avg_eta_os_,
p0_os_,
p1_os_,
delta_p0_os_,
delta_p1_os_,
tageff_os_,
tageff_asym_os_, 0,
eta_ss_,
avg_eta_ss_,
p0_ss_,
p1_ss_,
delta_p0_ss_,
delta_p1_ss_,
tageff_ss_,
tageff_asym_ss_,
production_asym_,
detection_asym_);
364 if (
hasTagState(
tag_os_, 0) &&
hasTagState(
tag_ss_, +1) &&
hasFinalstateState(
finalstate_, +1)) integral +=
evaluate(
cp_coeff_,
cp_coeff_bar_,
coeff_type_, +1, 0,
eta_os_,
avg_eta_os_,
p0_os_,
p1_os_,
delta_p0_os_,
delta_p1_os_,
tageff_os_,
tageff_asym_os_, +1,
eta_ss_,
avg_eta_ss_,
p0_ss_,
p1_ss_,
delta_p0_ss_,
delta_p1_ss_,
tageff_ss_,
tageff_asym_ss_,
production_asym_,
detection_asym_);
365 if (
hasTagState(
tag_os_, 0) &&
hasTagState(
tag_ss_, +1) &&
hasFinalstateState(
finalstate_, -1)) integral +=
evaluate(
cp_coeff_,
cp_coeff_bar_,
coeff_type_, -1, 0,
eta_os_,
avg_eta_os_,
p0_os_,
p1_os_,
delta_p0_os_,
delta_p1_os_,
tageff_os_,
tageff_asym_os_, +1,
eta_ss_,
avg_eta_ss_,
p0_ss_,
p1_ss_,
delta_p0_ss_,
delta_p1_ss_,
tageff_ss_,
tageff_asym_ss_,
production_asym_,
detection_asym_);
367 if (
hasTagState(
tag_os_, 0) &&
hasTagState(
tag_ss_, -1) &&
hasFinalstateState(
finalstate_, +1)) integral +=
evaluate(
cp_coeff_,
cp_coeff_bar_,
coeff_type_, +1, 0,
eta_os_,
avg_eta_os_,
p0_os_,
p1_os_,
delta_p0_os_,
delta_p1_os_,
tageff_os_,
tageff_asym_os_, -1,
eta_ss_,
avg_eta_ss_,
p0_ss_,
p1_ss_,
delta_p0_ss_,
delta_p1_ss_,
tageff_ss_,
tageff_asym_ss_,
production_asym_,
detection_asym_);
368 if (
hasTagState(
tag_os_, 0) &&
hasTagState(
tag_ss_, -1) &&
hasFinalstateState(
finalstate_, -1)) integral +=
evaluate(
cp_coeff_,
cp_coeff_bar_,
coeff_type_, -1, 0,
eta_os_,
avg_eta_os_,
p0_os_,
p1_os_,
delta_p0_os_,
delta_p1_os_,
tageff_os_,
tageff_asym_os_, -1,
eta_ss_,
avg_eta_ss_,
p0_ss_,
p1_ss_,
delta_p0_ss_,
delta_p1_ss_,
tageff_ss_,
tageff_asym_ss_,
production_asym_,
detection_asym_);
370 if (
hasTagState(
tag_os_, 0) &&
hasTagState(
tag_ss_, 0) &&
hasFinalstateState(
finalstate_, +1)) integral +=
evaluate(
cp_coeff_,
cp_coeff_bar_,
coeff_type_, +1, 0,
eta_os_,
avg_eta_os_,
p0_os_,
p1_os_,
delta_p0_os_,
delta_p1_os_,
tageff_os_,
tageff_asym_os_, 0,
eta_ss_,
avg_eta_ss_,
p0_ss_,
p1_ss_,
delta_p0_ss_,
delta_p1_ss_,
tageff_ss_,
tageff_asym_ss_,
production_asym_,
detection_asym_);
371 if (
hasTagState(
tag_os_, 0) &&
hasTagState(
tag_ss_, 0) &&
hasFinalstateState(
finalstate_, -1)) integral +=
evaluate(
cp_coeff_,
cp_coeff_bar_,
coeff_type_, -1, 0,
eta_os_,
avg_eta_os_,
p0_os_,
p1_os_,
delta_p0_os_,
delta_p1_os_,
tageff_os_,
tageff_asym_os_, 0,
eta_ss_,
avg_eta_ss_,
p0_ss_,
p1_ss_,
delta_p0_ss_,
delta_p1_ss_,
tageff_ss_,
tageff_asym_ss_,
production_asym_,
detection_asym_);
381 std::pair<double, double>
DecRateCoeff_Bd::calibrate(
double eta,
double avg_eta,
double p0,
double p1,
double delta_p0,
double delta_p1)
const 384 double eta_cal_b = 0;
385 double eta_cal_bbar = 0;
388 eta_cal = p0 + p1 * ( eta - avg_eta );
398 eta_cal_b = p0 + 0.5 * delta_p0 + ( p1 + 0.5 * delta_p1 ) * ( eta - avg_eta );
399 eta_cal_bbar = p0 - 0.5 * delta_p0 + ( p1 - 0.5 * delta_p1 ) * ( eta - avg_eta );
409 if (eta_cal_b < 0.0) eta_cal_b = 0;
410 if (eta_cal_bbar < 0.0) eta_cal_bbar = 0;
419 return std::make_pair(eta_cal_b, eta_cal_bbar);
435 double tageff_asym_os,
444 double tageff_asym_ss,
445 double production_asym,
446 double detection_asym)
const 449 std::pair<double, double> calibrated_mistag_os =
calibrate(eta_os, avg_eta_os, p0_os, p1_os, delta_p0_os, delta_p1_os);
450 std::pair<double, double> calibrated_mistag_ss =
calibrate(eta_ss, avg_eta_ss, p0_ss, p1_ss, delta_p0_ss, delta_p1_ss);
452 double eta_os_b = calibrated_mistag_os.first;
453 double eta_os_bbar = calibrated_mistag_os.second;
454 double eta_ss_b = calibrated_mistag_ss.first;
455 double eta_ss_bbar = calibrated_mistag_ss.second;
458 if(coeff_type ==
kCos){
460 if(tag_os == 0)
return cp_coeff * (1 + detection_asym) * (tageff_asym_os - 2 * production_asym * (1 - tageff_os));
461 else return 1.0 * cp_coeff * (1 + detection_asym) * (tag_os * tageff_os - 0.5 * tageff_asym_os
462 - production_asym * (tageff_os - 0.5 * tag_os * tageff_asym_os
463 - tag_os * tageff_os * (eta_os_b - eta_os_bbar)
464 + 0.5 * tag_os * tageff_asym_os * (eta_os_b + eta_os_bbar))
465 - tageff_os * tag_os * (eta_os_b + eta_os_bbar)
466 + 0.5 * tageff_asym_os * tag_os * (eta_os_b - eta_os_bbar) );
468 else if(finalstate == -1){
469 if(tag_os == 0)
return cp_coeff_bar * (1 - detection_asym) * (tageff_asym_os - 2 * production_asym * (1 - tageff_os));
470 else return 1.0 * cp_coeff_bar * (1 - detection_asym) * (tag_os * tageff_os - 0.5 * tageff_asym_os
471 - production_asym * (tageff_os - 0.5 * tag_os * tageff_asym_os
472 - tag_os * tageff_os * (eta_os_b - eta_os_bbar)
473 + 0.5 * tag_os * tageff_asym_os * (eta_os_b + eta_os_bbar))
474 - tageff_os * tag_os * (eta_os_b + eta_os_bbar)
475 + 0.5 * tageff_asym_os * tag_os * (eta_os_b - eta_os_bbar) );
478 std::cout <<
"ERROR\t" <<
"DecRateCoeff_Bd::evaluate(...): No valid finalstate!" << std::endl;
482 if(coeff_type ==
kSin){
484 if(tag_os == 0)
return cp_coeff * (1 + detection_asym) * (tageff_asym_os - 2 * production_asym * (1 - tageff_os));
485 else return -1.0 * cp_coeff * (1 + detection_asym) * (tag_os * tageff_os - 0.5 * tageff_asym_os
486 - production_asym * (tageff_os - 0.5 * tag_os * tageff_asym_os
487 - tag_os * tageff_os * (eta_os_b - eta_os_bbar)
488 + 0.5 * tag_os * tageff_asym_os * (eta_os_b + eta_os_bbar))
489 - tageff_os * tag_os * (eta_os_b + eta_os_bbar)
490 + 0.5 * tageff_asym_os * tag_os * (eta_os_b - eta_os_bbar) );
492 else if(finalstate == -1){
493 if(tag_os == 0)
return cp_coeff_bar * (1 - detection_asym) * (tageff_asym_os - 2 * production_asym * (1 - tageff_os));
494 else return -1.0 * cp_coeff_bar * (1 - detection_asym) * (tag_os * tageff_os - 0.5 * tageff_asym_os
495 - production_asym * (tageff_os - 0.5 * tag_os * tageff_asym_os
496 - tag_os * tageff_os * (eta_os_b - eta_os_bbar)
497 + 0.5 * tag_os * tageff_asym_os * (eta_os_b + eta_os_bbar))
498 - tageff_os * tag_os * (eta_os_b + eta_os_bbar)
499 + 0.5 * tageff_asym_os * tag_os * (eta_os_b - eta_os_bbar) );
502 std::cout <<
"ERROR\t" <<
"DecRateCoeff_Bd::evaluate(...): No valid finalstate!" << std::endl;
506 if(coeff_type ==
kSinh){
508 if(tag_os == 0)
return cp_coeff * (1 + detection_asym) * (2 * (1 - tageff_os) - tageff_asym_os * production_asym);
509 else return 1.0 * cp_coeff * (1 + detection_asym) * (tageff_os - 0.5 * tag_os * tageff_asym_os
510 - tag_os * production_asym * (tageff_os - 0.5 * tag_os * tageff_asym_os
511 - tageff_os * (eta_os_b + eta_os_bbar)
512 + 0.5 * tageff_asym_os * (eta_os_b - eta_os_bbar))
513 - tageff_os * tag_os * (eta_os_b - eta_os_bbar)
514 + 0.5 * tageff_asym_os * tag_os * (eta_os_b + eta_os_bbar) );
516 else if(finalstate == -1){
517 if(tag_os == 0)
return cp_coeff_bar * (1 - detection_asym) * (2 * (1 - tageff_os) - tageff_asym_os * production_asym);
518 else return 1.0 * cp_coeff_bar * (1 - detection_asym) * (tageff_os - 0.5 * tag_os * tageff_asym_os
519 - tag_os * production_asym * (tageff_os - 0.5 * tag_os * tageff_asym_os
520 - tageff_os * (eta_os_b + eta_os_bbar)
521 + 0.5 * tageff_asym_os * (eta_os_b - eta_os_bbar))
522 - tageff_os * tag_os * (eta_os_b - eta_os_bbar)
523 + 0.5 * tageff_asym_os * tag_os * (eta_os_b + eta_os_bbar) );
526 std::cout <<
"ERROR\t" <<
"DecRateCoeff_Bd::evaluate(...): No valid finalstate!" << std::endl;
530 if(coeff_type ==
kCosh){
532 if(tag_os == 0)
return cp_coeff * (1 + detection_asym) * (2 * (1 - tageff_os) - tageff_asym_os * production_asym);
533 else return cp_coeff * (1 + detection_asym) * (tageff_os - 0.5 * tag_os * tageff_asym_os
534 - tag_os * production_asym * (tageff_os - 0.5 * tag_os * tageff_asym_os
535 - tageff_os * (eta_os_b + eta_os_bbar)
536 + 0.5 * tageff_asym_os * (eta_os_b - eta_os_bbar))
537 - tageff_os * tag_os * (eta_os_b - eta_os_bbar)
538 + 0.5 * tageff_asym_os * tag_os * (eta_os_b + eta_os_bbar) );
540 else if(finalstate == -1){
541 if(tag_os == 0)
return cp_coeff_bar * (1 - detection_asym) * (2 * (1 - tageff_os) - tageff_asym_os * production_asym);
542 else return cp_coeff_bar * (1 - detection_asym) * (tageff_os - 0.5 * tag_os * tageff_asym_os
543 - tag_os * production_asym * (tageff_os - 0.5 * tag_os * tageff_asym_os
544 - tageff_os * (eta_os_b + eta_os_bbar)
545 + 0.5 * tageff_asym_os * (eta_os_b - eta_os_bbar))
546 - tageff_os * tag_os * (eta_os_b - eta_os_bbar)
547 + 0.5 * tageff_asym_os * tag_os * (eta_os_b + eta_os_bbar) );
550 std::cout <<
"ERROR\t" <<
"DecRateCoeff_Bd::evaluate(...): No valid finalstate!" << std::endl;
555 std::cout <<
"ERROR\t" <<
"DecRateCoeff_Bd::evaluate(...): No valid finalstate!" << std::endl;
562 double difference = 0;
564 double tageff_os_b = tageff_os - 0.5 * tageff_asym_os;
565 double tageff_os_bbar = tageff_os + 0.5 * tageff_asym_os;
567 double tageff_ss_b = tageff_ss - 0.5 * tageff_asym_ss;
568 double tageff_ss_bbar = tageff_ss + 0.5 * tageff_asym_ss;
570 if( tag_os == 0 && tag_ss == 0) {
571 sum = (1 - tageff_os_b - tageff_ss_b + tageff_os_b * tageff_ss_b) + (1 - tageff_os_bbar - tageff_ss_bbar + tageff_os_bbar * tageff_ss_bbar);
572 difference = (1 - tageff_os_b - tageff_ss_b + tageff_os_b * tageff_ss_b) - (1 - tageff_os_bbar - tageff_ss_bbar + tageff_os_bbar * tageff_ss_bbar);
574 else if(tag_os == 0 && tag_ss != 0){
575 sum = 0.5 * tageff_ss_b * (1 - tageff_os_b + tag_ss * (1 - tageff_os_b - 2 * eta_ss_b + 2 * eta_ss_b * tageff_os_b))
576 + 0.5 * tageff_ss_bbar * (1 - tageff_os_bbar - tag_ss * (1 - tageff_os_bbar - 2 * eta_ss_bbar + 2 * eta_ss_bbar * tageff_os_bbar));
577 difference = 0.5 * tageff_ss_b * (1 - tageff_os_b + tag_ss * (1 - tageff_os_b - 2 * eta_ss_b + 2 * eta_ss_b * tageff_os_b))
578 - 0.5 * tageff_ss_bbar * (1 - tageff_os_bbar - tag_ss * (1 - tageff_os_bbar - 2 * eta_ss_bbar + 2 * eta_ss_bbar * tageff_os_bbar));
580 else if(tag_ss == 0 && tag_os != 0){
581 sum = 0.5 * tageff_os_b * (1 - tageff_ss_b + tag_os * (1 - tageff_ss_b - 2 * eta_os_b + 2 * eta_os_b * tageff_ss_b))
582 + 0.5 * tageff_os_bbar * (1 - tageff_ss_bbar - tag_os * (1 - tageff_ss_bbar - 2 * eta_os_bbar + 2 * eta_os_bbar * tageff_ss_bbar));
583 difference = 0.5 * tageff_os_b * (1 - tageff_ss_b + tag_os * (1 - tageff_ss_b - 2 * eta_os_b + 2 * eta_os_b * tageff_ss_b))
584 - 0.5 * tageff_os_bbar * (1 - tageff_ss_bbar - tag_os * (1 - tageff_ss_bbar - 2 * eta_os_bbar + 2 * eta_os_bbar * tageff_ss_bbar));
586 else if(tag_ss != 0 && tag_os != 0){
587 sum = 0.25 * tageff_os_b * tageff_ss_b * (1 + tag_ss * (1 - 2 * eta_ss_b) + tag_os * (1 - 2 * eta_os_b)
588 + tag_os * tag_ss * (1 - 2 * eta_os_b - 2 * eta_ss_b + 4 * eta_os_b * eta_ss_b))
589 + 0.25 * tageff_os_bbar * tageff_ss_bbar * (1 - tag_ss * (1 - 2 * eta_ss_bbar) - tag_os * (1 - 2 * eta_os_bbar)
590 + tag_os * tag_ss * (1 - 2 * eta_os_bbar - 2 * eta_ss_bbar + 4 * eta_os_bbar * eta_ss_bbar));
591 difference = 0.25 * tageff_os_b * tageff_ss_b * (1 + tag_ss * (1 - 2 * eta_ss_b) + tag_os * (1 - 2 * eta_os_b)
592 + tag_os * tag_ss * (1 - 2 * eta_os_b - 2 * eta_ss_b + 4 * eta_os_b * eta_ss_b))
593 - 0.25 * tageff_os_bbar * tageff_ss_bbar * (1 - tag_ss * (1 - 2 * eta_ss_bbar) - tag_os * (1 - 2 * eta_os_bbar)
594 + tag_os * tag_ss * (1 - 2 * eta_os_bbar - 2 * eta_ss_bbar + 4 * eta_os_bbar * eta_ss_bbar));
597 std::cout <<
"ERROR\t" <<
"DecRateCoeff_Bd::evaluate(...): No valid tag combination!" << std::endl;
602 if (coeff_type ==
kSin){
604 return -1.0 * (1 + detection_asym) * cp_coeff * ( difference - production_asym * sum );
606 else if(finalstate==-1){
607 return -1.0 * (1 - detection_asym) * cp_coeff_bar * ( difference - production_asym * sum );
610 std::cout <<
"ERROR\t" <<
"DecRateCoeff_Bd::evaluate(...): No valid finalstate!" << std::endl;
614 else if (coeff_type ==
kCos){
616 return +1.0 * (1 + detection_asym) * cp_coeff * ( difference - production_asym * sum );
618 else if(finalstate==-1){
619 return +1.0 * (1 - detection_asym) * cp_coeff_bar * ( difference - production_asym * sum );
622 std::cout <<
"ERROR\t" <<
"DecRateCoeff_Bd::evaluate(...): No valid finalstate!" << std::endl;
626 else if (coeff_type ==
kSinh){
628 return 1.0 * (1 + detection_asym) * cp_coeff * ( sum - production_asym * difference );
630 else if(finalstate==-1){
631 return 1.0 * (1 - detection_asym) * cp_coeff_bar * ( sum - production_asym * difference );
634 std::cout <<
"ERROR\t" <<
"DecRateCoeff_Bd::evaluate(...): No valid finalstate!" << std::endl;
638 else if (coeff_type ==
kCosh){
640 return +1.0 * (1 + detection_asym) * cp_coeff * ( sum - production_asym * difference );
642 else if(finalstate==-1){
643 return +1.0 * (1 - detection_asym) * cp_coeff_bar * ( sum - production_asym * difference );
646 std::cout <<
"ERROR\t" <<
"DecRateCoeff_Bd::evaluate(...): No valid finalstate!" << std::endl;
651 std::cout <<
"ERROR\t" <<
"DecRateCoeff_Bd::evaluate(...): No valid coefficient type!" << std::endl;
659 if (tag.arg().lookupType(tag_state) ==
nullptr){
663 return dynamic_cast<const RooCategory&>(tag.arg()).isStateInRange(rangeName, tag.arg().lookupType(tag_state)->GetName());
670 return dynamic_cast<const RooCategory&>(tag.arg()).isValidIndex(tag_state);
675 if (finalstate.arg().lookupType(finalstate_state) ==
nullptr){
679 return dynamic_cast<const RooCategory&>(finalstate.arg()).isStateInRange(rangeName, finalstate.arg().lookupType(finalstate_state)->GetName());
685 return dynamic_cast<const RooCategory&>(finalstate.arg()).isValidIndex(finalstate_state);
690 return dynamic_cast<const RooCategory&>(tag.arg()).
getIndex();
int getIndex(const RooCategoryProxy &tag) const
RooRealProxy cp_coeff_bar_
RooRealProxy tageff_asym_os_
Double_t analyticalIntegral(Int_t code, const char *rangeName=0) const
RooRealProxy delta_p0_ss_
Double_t evaluate() const
DecRateCoeff_Bd()
default constructor for ROOT I/O
bool isFinalstateInRange(const RooCategoryProxy &finalstate, int finalstate_state, const char *rangeName) const
Int_t getAnalyticalIntegral(RooArgSet &allVars, RooArgSet &analVars, const char *rangeName=0) const
RooCategoryProxy finalstate_
RooRealProxy delta_p0_os_
RooRealProxy delta_p1_os_
RooRealProxy delta_p1_ss_
std::pair< double, double > calibrate(double eta, double avg_eta, double p0, double p1, double delta_p0, double delta_p1) const
Int_t getAnalyticalIntegralWN(RooArgSet &allVars, RooArgSet &analVars, const RooArgSet *normSet, const char *rangeName=0) const
bool hasFinalstateState(const RooCategoryProxy &finalstate, int finalstate_state) const
RooRealProxy production_asym_
cosh/sinh/cos/sin coefficients in decay rate equations
bool hasTagState(const RooCategoryProxy &tag, int tag_state) const
RooRealProxy detection_asym_
bool isTagInRange(const RooCategoryProxy &tag, int tag_state, const char *rangeName) const
RooRealProxy tageff_asym_ss_