14 Client AsymptMatrixTool::clientForDB()
40 double e =
p.real_efficiency.nominal,
z =
p.fake_efficiency.nominal;
41 double den = 1. / (
e -
z);
42 double delta =
p.tight? 1. : 0.;
43 m_components.emplace_back(std::array<double,2>{den*(delta-
z), den*(
e-delta)});
44 m_derivatives.emplace_back(std::array<double,2>{den*den*(
z-delta), den*den*(delta-
z)});
45 m_derivatives.emplace_back(std::array<double,2>{den*den*(delta-
e), den*den*(
e-delta)});
60 std::fill_n(
w.begin(),
nc, 0.);
68 if(!
fs.accept_selection(tights, charges))
continue;
72 if(!
fs.accept_process(
n, reals, tights))
continue;
73 std::fill(effprod.begin(), effprod.begin()+
n+1, 1.);
81 if(
l !=
k+1) effprod[
l] *=
x;
85 w[rev_j] += effprod[0];
86 for(
uint64_t k=0;
k<
n;++
k) dproj_dt[2*
k+!reals[
k]][rev_j] += effprod[
k+1];
94 for(
unsigned k=0;
k<
n;++
k)
103 dproj_dt[2*
u][j] *=
x;
104 dproj_dt[2*
u+1][j] *=
x;
107 dlambdaprod_dt[2*
u][j] *=
x;
108 dlambdaprod_dt[2*
u+1][j] *=
x;
119 auto wu = dlambdaprod_dt.begin(), wv = dproj_dt.begin();
125 for(
auto& kv :
p.real_efficiency.uncertainties)
127 auto& uncertainties =
weight.uncertainties[kv.first];
128 uncertainties.up += theta * kv.second.up;
129 uncertainties.down += theta * kv.second.down;
134 for(
auto& kv :
p.fake_efficiency.uncertainties)
136 auto& uncertainties =
weight.uncertainties[kv.first];
137 uncertainties.up += theta * kv.second.up;
138 uncertainties.down += theta * kv.second.down;
141 return StatusCode::SUCCESS;