10 : thePrimaryMass(mPrimary), theSecondaryMass(mSecondary) {}
21 std::pair<AlgebraicMatrix, AlgebraicMatrix>
dqsdpx = this->
dqsdpx(param);
22 std::pair<AlgebraicMatrix, AlgebraicMatrix>
dqsdpy = this->
dqsdpy(param);
23 std::pair<AlgebraicMatrix, AlgebraicMatrix>
dqsdpz = this->
dqsdpz(param);
25 std::pair<AlgebraicMatrix, AlgebraicMatrix>
dqsdphi = this->
dqsdphi(param);
26 std::pair<AlgebraicMatrix, AlgebraicMatrix>
dqsdm = this->
dqsdm(param);
44 return std::make_pair(dqplusdz, dqminusdz);
48 const TwoBodyDecay &tbd,
const std::vector<bool> &selector)
const {
55 throw cms::Exception(
"BadConfig") <<
"@SUB=TwoBodyDecayDerivatives::selectedDerivatives"
56 <<
"selector has bad dimension (size=" << selector.size() <<
").";
59 int nSelected =
std::count(selector.begin(), selector.end(),
true);
64 std::pair<AlgebraicMatrix, AlgebraicMatrix>
dqsdzi;
69 dqplusdz.sub(1, iSelected,
dqsdzi.first);
70 dqminusdz.sub(1, iSelected,
dqsdzi.second);
75 return std::make_pair(dqplusdz, dqminusdz);
100 double c3 = 0.5 * c2 * ctheta /
c1;
107 pplus[2][0] = 0.5 *
p + c3 * c4;
113 pminus[2][0] = 0.5 *
p - c3 * c4;
118 dRotMatdpx[0][0] =
pz / (
pT *
p) * (1. -
px *
px * (1. /
pT2 + 1. /
p2));
120 dRotMatdpx[0][2] = (1. -
px *
px /
p2) /
p;
122 dRotMatdpx[1][0] = -
px *
py *
pz / (
pT *
p) * (1. /
pT2 + 1. /
p2);
123 dRotMatdpx[1][1] = (1. -
px *
px /
pT2) /
pT;
124 dRotMatdpx[1][2] = -
px *
py / (
p *
p2);
126 dRotMatdpx[2][0] = -(1. /
pT -
pT /
p2) *
px /
p;
127 dRotMatdpx[2][1] = 0.;
128 dRotMatdpx[2][2] = -
px *
pz / (
p *
p2);
131 double dpplusdpx =
px * (0.5 /
p + c3 / c4);
134 dqplusdpx[0][0] +=
px * dpplusdpx /
p;
135 dqplusdpx[1][0] +=
py * dpplusdpx /
p;
136 dqplusdpx[2][0] +=
pz * dpplusdpx /
p;
139 double dpminusdpx =
px * (0.5 /
p - c3 / c4);
142 dqminusdpx[0][0] +=
px * dpminusdpx /
p;
143 dqminusdpx[1][0] +=
py * dpminusdpx /
p;
144 dqminusdpx[2][0] +=
pz * dpminusdpx /
p;
147 return std::make_pair(dqplusdpx, dqminusdpx);
172 double c3 = 0.5 * c2 * ctheta /
c1;
179 pplus[2][0] = 0.5 *
p + c3 * c4;
185 pminus[2][0] = 0.5 *
p - c3 * c4;
190 dRotMatdpy[0][0] = -
px *
py *
pz / (
pT *
p) * (1. /
pT2 + 1. /
p2);
191 dRotMatdpy[0][1] = (
py *
py /
pT2 - 1.) /
pT;
192 dRotMatdpy[0][2] = -
px *
py / (
p *
p2);
194 dRotMatdpy[1][0] =
pz / (
pT *
p) * (1. -
py *
py * (1. /
pT2 + 1. /
p2));
195 dRotMatdpy[1][1] = -
px *
py / (
pT *
pT2);
196 dRotMatdpy[1][2] = (1. -
py *
py /
p2) /
p;
198 dRotMatdpy[2][0] = -(1. /
pT -
pT /
p2) *
py /
p;
199 dRotMatdpy[2][1] = 0.;
200 dRotMatdpy[2][2] = -
py *
pz / (
p *
p2);
203 double dpplusdpy =
py * (0.5 /
p + c3 / c4);
206 dqplusdpy[0][0] +=
px * dpplusdpy /
p;
207 dqplusdpy[1][0] +=
py * dpplusdpy /
p;
208 dqplusdpy[2][0] +=
pz * dpplusdpy /
p;
211 double dpminusdpy =
py * (0.5 /
p - c3 / c4);
214 dqminusdpy[0][0] +=
px * dpminusdpy /
p;
215 dqminusdpy[1][0] +=
py * dpminusdpy /
p;
216 dqminusdpy[2][0] +=
pz * dpminusdpy /
p;
219 return std::make_pair(dqplusdpy, dqminusdpy);
244 double c3 = 0.5 * c2 * ctheta /
c1;
251 pplus[2][0] = 0.5 *
p + c3 * c4;
257 pminus[2][0] = 0.5 *
p - c3 * c4;
262 dRotMatdpz[0][0] =
px / (
pT *
p) * (1. -
pz *
pz /
p2);
263 dRotMatdpz[0][1] = 0.;
264 dRotMatdpz[0][2] = -
px *
pz / (
p *
p2);
266 dRotMatdpz[1][0] =
py / (
p *
pT) * (1. -
pz *
pz /
p2);
267 dRotMatdpz[1][1] = 0.;
268 dRotMatdpz[1][2] = -
py *
pz / (
p *
p2);
270 dRotMatdpz[2][0] =
pT *
pz / (
p *
p2);
271 dRotMatdpz[2][1] = 0.;
272 dRotMatdpz[2][2] = (1. -
pz *
pz /
p2) /
p;
275 double dpplusdpz =
pz * (0.5 /
p + c3 / c4);
278 dqplusdpz[0][0] +=
px * dpplusdpz /
p;
279 dqplusdpz[1][0] +=
py * dpplusdpz /
p;
280 dqplusdpz[2][0] +=
pz * dpplusdpz /
p;
283 double dpminusdpz =
pz * (0.5 /
p - c3 / c4);
286 dqminusdpz[0][0] +=
px * dpminusdpz /
p;
287 dqminusdpz[1][0] +=
py * dpminusdpz /
p;
288 dqminusdpz[2][0] +=
pz * dpminusdpz /
p;
291 return std::make_pair(dqplusdpz, dqminusdpz);
314 double c3 = -0.5 * c2 * stheta /
c1;
322 dpplusdtheta[2][0] = c3 * c4;
329 dpminusdtheta[2][0] = -c3 * c4;
337 return std::make_pair(dqplusdtheta, dqminusdtheta);
361 dpplusdphi[2][0] = 0.;
368 dpminusdphi[2][0] = 0.;
376 return std::make_pair(dqplusdphi, dqminusdphi);
397 double c2 = 1. /
sqrt(
c1 *
c1 - 1.);
403 dpplusdm[0][0] = c2 * 0.5 *
c1 * stheta * cphi;
404 dpplusdm[1][0] = c2 * 0.5 *
c1 * stheta * sphi;
410 dpminusdm[0][0] = -dpplusdm[0][0];
411 dpminusdm[1][0] = -dpplusdm[1][0];
412 dpminusdm[2][0] = -dpplusdm[2][0];
420 return std::make_pair(dqplusdm, dqminusdm);
445 throw cms::Exception(
"BadConfig") <<
"@SUB=TwoBodyDecayDerivatives::dqsdzi"
446 <<
"no decay parameter related to selector (" <<
i <<
").";