27 for (
int n = 0;
n <
NN; ++
n) {
28 const float cosA = (psPar[0 * N +
n] * psPar[3 * N +
n] + psPar[1 * N +
n] * psPar[4 * N +
n]) /
29 (
std::sqrt((psPar[0 * N +
n] * psPar[0 * N +
n] + psPar[1 * N +
n] * psPar[1 * N +
n]) *
30 (psPar[3 * N +
n] * psPar[3 * N +
n] + psPar[4 * N +
n] * psPar[4 * N +
n])));
31 const float dr = (
hipo(msPar[0 * N +
n], msPar[1 * N +
n]) -
hipo(psPar[0 * N +
n], psPar[1 * N +
n])) / cosA;
33 dprint_np(
n,
"propagateLineToRMPlex dr=" << dr);
35 const float pt =
hipo(psPar[3 * N +
n], psPar[4 * N +
n]);
36 const float p = dr /
pt;
37 const float psq = p *
p;
39 outPar[0 * N +
n] = psPar[0 * N +
n] + p * psPar[3 * N +
n];
40 outPar[1 * N +
n] = psPar[1 * N +
n] + p * psPar[4 * N +
n];
41 outPar[2 * N +
n] = psPar[2 * N +
n] + p * psPar[5 * N +
n];
42 outPar[3 * N +
n] = psPar[3 * N +
n];
43 outPar[4 * N +
n] = psPar[4 * N +
n];
44 outPar[5 * N +
n] = psPar[5 * N +
n];
50 B.fArray[0 * N +
n] = A.fArray[0 * N +
n];
51 B.fArray[1 * N +
n] = A.fArray[1 * N +
n];
52 B.fArray[2 * N +
n] = A.fArray[2 * N +
n];
53 B.fArray[3 * N +
n] = A.fArray[3 * N +
n];
54 B.fArray[4 * N +
n] = A.fArray[4 * N +
n];
55 B.fArray[5 * N +
n] = A.fArray[5 * N +
n];
56 B.fArray[6 * N +
n] = A.fArray[6 * N +
n] + p * A.fArray[0 * N +
n];
57 B.fArray[7 * N +
n] = A.fArray[7 * N +
n] + p * A.fArray[1 * N +
n];
58 B.fArray[8 * N +
n] = A.fArray[8 * N +
n] + p * A.fArray[3 * N +
n];
60 A.fArray[9 * N +
n] + p * (A.fArray[6 * N +
n] + A.fArray[6 * N +
n]) + psq * A.fArray[0 * N +
n];
61 B.fArray[10 * N +
n] = A.fArray[10 * N +
n] + p * A.fArray[1 * N +
n];
62 B.fArray[11 * N +
n] = A.fArray[11 * N +
n] + p * A.fArray[2 * N +
n];
63 B.fArray[12 * N +
n] = A.fArray[12 * N +
n] + p * A.fArray[4 * N +
n];
64 B.fArray[13 * N +
n] =
65 A.fArray[13 * N +
n] + p * (A.fArray[7 * N +
n] + A.fArray[10 * N +
n]) + psq * A.fArray[1 * N +
n];
66 B.fArray[14 * N +
n] =
67 A.fArray[14 * N +
n] + p * (A.fArray[11 * N +
n] + A.fArray[11 * N +
n]) + psq * A.fArray[2 * N +
n];
68 B.fArray[15 * N +
n] = A.fArray[15 * N +
n] + p * A.fArray[3 * N +
n];
69 B.fArray[16 * N +
n] = A.fArray[16 * N +
n] + p * A.fArray[4 * N +
n];
70 B.fArray[17 * N +
n] = A.fArray[17 * N +
n] + p * A.fArray[5 * N +
n];
71 B.fArray[18 * N +
n] =
72 A.fArray[18 * N +
n] + p * (A.fArray[8 * N +
n] + A.fArray[15 * N +
n]) + psq * A.fArray[3 * N +
n];
73 B.fArray[19 * N +
n] =
74 A.fArray[19 * N +
n] + p * (A.fArray[12 * N +
n] + A.fArray[16 * N +
n]) + psq * A.fArray[4 * N +
n];
75 B.fArray[20 * N +
n] =
76 A.fArray[20 * N +
n] + p * (A.fArray[17 * N +
n] + A.fArray[17 * N +
n]) + psq * A.fArray[5 * N +
n];
79 dprint_np(
n,
"propagateLineToRMPlex arrive at r=" <<
hipo(outPar[0 * N +
n], outPar[1 * N +
n]));
90 using namespace mkfit;
98 const T*
a = A.fArray;
100 const T*
b = B.fArray;
105 #include "MultHelixProp.ah"
114 const T*
a = A.fArray;
116 const T*
b = B.fArray;
121 #include "MultHelixPropTransp.ah"
130 const T*
a = A.fArray;
132 const T*
b = B.fArray;
137 #include "MultHelixPropEndcap.ah"
146 const T*
a = A.fArray;
148 const T*
b = B.fArray;
153 #include "MultHelixPropTranspEndcap.ah"
162 const T*
a = A.fArray;
164 const T*
b = B.fArray;
169 c[0 * N +
n] = a[0 * N +
n] * b[0 * N +
n] + a[1 * N +
n] * b[6 * N +
n] + a[2 * N +
n] * b[12 * N +
n] +
170 a[4 * N +
n] * b[24 * N +
n];
171 c[1 * N +
n] = a[0 * N +
n] * b[1 * N +
n] + a[1 * N +
n] * b[7 * N +
n] + a[2 * N +
n] * b[13 * N +
n] +
172 a[4 * N +
n] * b[25 * N +
n];
173 c[2 * N +
n] = a[2 * N +
n];
174 c[3 * N +
n] = a[0 * N +
n] * b[3 * N +
n] + a[1 * N +
n] * b[9 * N +
n] + a[2 * N +
n] * b[15 * N +
n] +
175 a[3 * N +
n] + a[4 * N +
n] * b[27 * N +
n];
176 c[4 * N +
n] = a[0 * N +
n] * b[4 * N +
n] + a[1 * N +
n] * b[10 * N +
n] + a[4 * N +
n];
177 c[5 * N +
n] = a[2 * N +
n] * b[17 * N +
n] + a[5 * N +
n];
178 c[6 * N +
n] = a[6 * N +
n] * b[0 * N +
n] + a[7 * N +
n] * b[6 * N +
n] + a[8 * N +
n] * b[12 * N +
n] +
179 a[10 * N +
n] * b[24 * N +
n];
180 c[7 * N +
n] = a[6 * N +
n] * b[1 * N +
n] + a[7 * N +
n] * b[7 * N +
n] + a[8 * N +
n] * b[13 * N +
n] +
181 a[10 * N +
n] * b[25 * N +
n];
182 c[8 * N +
n] = a[8 * N +
n];
183 c[9 * N +
n] = a[6 * N +
n] * b[3 * N +
n] + a[7 * N +
n] * b[9 * N +
n] + a[8 * N +
n] * b[15 * N +
n] +
184 a[9 * N +
n] + a[10 * N +
n] * b[27 * N +
n];
185 c[10 * N +
n] = a[6 * N +
n] * b[4 * N +
n] + a[7 * N +
n] * b[10 * N +
n] + a[10 * N +
n];
186 c[11 * N +
n] = a[8 * N +
n] * b[17 * N +
n] + a[11 * N +
n];
187 c[12 * N +
n] = a[12 * N +
n] * b[0 * N +
n] + a[13 * N +
n] * b[6 * N +
n] + a[14 * N +
n] * b[12 * N +
n] +
188 a[16 * N +
n] * b[24 * N +
n];
189 c[13 * N +
n] = a[12 * N +
n] * b[1 * N +
n] + a[13 * N +
n] * b[7 * N +
n] + a[14 * N +
n] * b[13 * N +
n] +
190 a[16 * N +
n] * b[25 * N +
n];
191 c[14 * N +
n] = a[14 * N +
n];
192 c[15 * N +
n] = a[12 * N +
n] * b[3 * N +
n] + a[13 * N +
n] * b[9 * N +
n] + a[14 * N +
n] * b[15 * N +
n] +
193 a[15 * N +
n] + a[16 * N +
n] * b[27 * N +
n];
194 c[16 * N +
n] = a[12 * N +
n] * b[4 * N +
n] + a[13 * N +
n] * b[10 * N +
n] + a[16 * N +
n];
195 c[17 * N +
n] = a[14 * N +
n] * b[17 * N +
n] + a[17 * N +
n];
196 c[18 * N +
n] = a[18 * N +
n] * b[0 * N +
n] + a[19 * N +
n] * b[6 * N +
n] + a[20 * N +
n] * b[12 * N +
n] +
197 a[22 * N +
n] * b[24 * N +
n];
198 c[19 * N +
n] = a[18 * N +
n] * b[1 * N +
n] + a[19 * N +
n] * b[7 * N +
n] + a[20 * N +
n] * b[13 * N +
n] +
199 a[22 * N +
n] * b[25 * N +
n];
200 c[20 * N +
n] = a[20 * N +
n];
201 c[21 * N +
n] = a[18 * N +
n] * b[3 * N +
n] + a[19 * N +
n] * b[9 * N +
n] + a[20 * N +
n] * b[15 * N +
n] +
202 a[21 * N +
n] + a[22 * N +
n] * b[27 * N +
n];
203 c[22 * N +
n] = a[18 * N +
n] * b[4 * N +
n] + a[19 * N +
n] * b[10 * N +
n] + a[22 * N +
n];
204 c[23 * N +
n] = a[20 * N +
n] * b[17 * N +
n] + a[23 * N +
n];
205 c[24 * N +
n] = a[24 * N +
n] * b[0 * N +
n] + a[25 * N +
n] * b[6 * N +
n] + a[26 * N +
n] * b[12 * N +
n] +
206 a[28 * N +
n] * b[24 * N +
n];
207 c[25 * N +
n] = a[24 * N +
n] * b[1 * N +
n] + a[25 * N +
n] * b[7 * N +
n] + a[26 * N +
n] * b[13 * N +
n] +
208 a[28 * N +
n] * b[25 * N +
n];
209 c[26 * N +
n] = a[26 * N +
n];
210 c[27 * N +
n] = a[24 * N +
n] * b[3 * N +
n] + a[25 * N +
n] * b[9 * N +
n] + a[26 * N +
n] * b[15 * N +
n] +
211 a[27 * N +
n] + a[28 * N +
n] * b[27 * N +
n];
212 c[28 * N +
n] = a[24 * N +
n] * b[4 * N +
n] + a[25 * N +
n] * b[10 * N +
n] + a[28 * N +
n];
213 c[29 * N +
n] = a[26 * N +
n] * b[17 * N +
n] + a[29 * N +
n];
214 c[30 * N +
n] = a[30 * N +
n] * b[0 * N +
n] + a[31 * N +
n] * b[6 * N +
n] + a[32 * N +
n] * b[12 * N +
n] +
215 a[34 * N +
n] * b[24 * N +
n];
216 c[31 * N +
n] = a[30 * N +
n] * b[1 * N +
n] + a[31 * N +
n] * b[7 * N +
n] + a[32 * N +
n] * b[13 * N +
n] +
217 a[34 * N +
n] * b[25 * N +
n];
218 c[32 * N +
n] = a[32 * N +
n];
219 c[33 * N +
n] = a[30 * N +
n] * b[3 * N +
n] + a[31 * N +
n] * b[9 * N +
n] + a[32 * N +
n] * b[15 * N +
n] +
220 a[33 * N +
n] + a[34 * N +
n] * b[27 * N +
n];
221 c[34 * N +
n] = a[30 * N +
n] * b[4 * N +
n] + a[31 * N +
n] * b[10 * N +
n] + a[34 * N +
n];
222 c[35 * N +
n] = a[32 * N +
n] * b[17 * N +
n] + a[35 * N +
n];
229 for (
int n = 0;
n <
NN; ++
n) {
230 for (
int i = 0;
i < 6; ++
i) {
231 for (
int j = 0;
j < 6; ++
j) {
233 for (
int k = 0;
k < 6; ++
k)
243 for (
int n = 0;
n <
NN; ++
n) {
244 for (
int i = 0;
i < 6; ++
i) {
245 for (
int j = 0;
j < 6; ++
j) {
247 for (
int k = 0;
k < 6; ++
k)
257 for (
int n = 0;
n <
NN; ++
n) {
258 for (
int i = 0;
i < 6; ++
i) {
259 for (
int j = 0;
j < 6; ++
j) {
261 for (
int k = 0;
k < 6; ++
k)
271 for (
int n = 0;
n <
NN; ++
n) {
272 for (
int i = 0;
i < 6; ++
i) {
273 for (
int j = 0;
j < 6; ++
j) {
275 for (
int k = 0;
k < 6; ++
k)
299 for (
int n = 0;
n <
NN; ++
n) {
301 errorProp(
n, 0, 0) = 1.f;
302 errorProp(
n, 1, 1) = 1.f;
303 errorProp(
n, 2, 2) = 1.f;
304 errorProp(
n, 3, 3) = 1.f;
305 errorProp(
n, 4, 4) = 1.f;
306 errorProp(
n, 5, 5) = 1.f;
313 dprint_np(
n,
"distance less than 1mum, skip");
317 const float ipt = inPar.
constAt(
n, 3, 0);
318 const float phiin = inPar.
constAt(
n, 4, 0);
322 errorPropTmp(
n, 2, 2) = 1.f;
323 errorPropTmp(
n, 3, 3) = 1.f;
324 errorPropTmp(
n, 4, 4) = 1.f;
325 errorPropTmp(
n, 5, 5) = 1.f;
327 float cosah = 0., sinah = 0.;
331 float pxin = cosP / ipt;
332 float pyin = sinP / ipt;
337 <<
"attempt propagation from r=" << r0 <<
" to r=" << r << std::endl
338 <<
"x=" << outPar.
At(
n, 0, 0) <<
" y=" << outPar.
At(
n, 1, 0) <<
" z=" << outPar.
At(
n, 2, 0)
340 <<
" pz=" << 1.f / (ipt *
tan(theta)) <<
" q=" << inChg.
constAt(
n, 0, 0) << std::endl);
343 const float ialpha = (r - r0) * ipt / k;
347 sincos4(ialpha * 0.5
f, sinah, cosah);
352 const float cosa = 1.f - 2.f * sinah * sinah;
353 const float sina = 2.f * sinah * cosah;
356 const float dadx = -outPar.
At(
n, 0, 0) * ipt / (k * r0);
357 const float dady = -outPar.
At(
n, 1, 0) * ipt / (k * r0);
358 const float dadipt = (r - r0) / k;
360 outPar.
At(
n, 0, 0) = outPar.
constAt(
n, 0, 0) + 2.f * k * sinah * (pxin * cosah - pyin * sinah);
361 outPar.
At(
n, 1, 0) = outPar.
constAt(
n, 1, 0) + 2.f * k * sinah * (pyin * cosah + pxin * sinah);
362 const float pxinold = pxin;
363 pxin = pxin * cosa - pyin * sina;
364 pyin = pyin * cosa + pxinold * sina;
371 outPar.
At(
n, 2, 0) = outPar.
constAt(
n, 2, 0) + k * ialpha * cosT / (ipt * sinT);
372 outPar.
At(
n, 3, 0) = ipt;
373 outPar.
At(
n, 4, 0) = outPar.
constAt(
n, 4, 0) + ialpha;
376 errorPropTmp(
n, 0, 0) = 1.f + k * (cosP * dadx * cosa - sinP * dadx * sina) / ipt;
377 errorPropTmp(
n, 0, 1) = k * (cosP * dady * cosa - sinP * dady * sina) / ipt;
378 errorPropTmp(
n, 0, 3) =
379 k * (cosP * (ipt * dadipt * cosa - sina) + sinP * ((1.
f - cosa) - ipt * dadipt * sina)) / (ipt * ipt);
380 errorPropTmp(
n, 0, 4) = -k * (sinP * sina + cosP * (1.f - cosa)) / ipt;
382 errorPropTmp(
n, 1, 0) = k * (sinP * dadx * cosa + cosP * dadx * sina) / ipt;
383 errorPropTmp(
n, 1, 1) = 1.f + k * (sinP * dady * cosa + cosP * dady * sina) / ipt;
384 errorPropTmp(
n, 1, 3) =
385 k * (sinP * (ipt * dadipt * cosa - sina) + cosP * (ipt * dadipt * sina - (1.
f - cosa))) / (ipt * ipt);
386 errorPropTmp(
n, 1, 4) = k * (cosP * sina - sinP * (1.f - cosa)) / ipt;
388 errorPropTmp(
n, 2, 0) = k * cosT * dadx / (ipt * sinT);
389 errorPropTmp(
n, 2, 1) = k * cosT * dady / (ipt * sinT);
390 errorPropTmp(
n, 2, 3) = k * cosT * (ipt * dadipt - ialpha) / (ipt * ipt * sinT);
391 errorPropTmp(
n, 2, 5) = -k * ialpha / (ipt * sinT * sinT);
393 errorPropTmp(
n, 4, 0) = dadx;
394 errorPropTmp(
n, 4, 1) = dady;
395 errorPropTmp(
n, 4, 3) = dadipt;
397 MultHelixPropTemp(errorProp, errorPropTmp, errorPropSwap,
n);
398 errorProp = errorPropSwap;
403 "propagation end, dump parameters"
405 <<
"pos = " << outPar.
At(
n, 0, 0) <<
" " << outPar.
At(
n, 1, 0) <<
" " << outPar.
At(
n, 2, 0) << std::endl
406 <<
"mom = " <<
std::cos(outPar.
At(
n, 4, 0)) / outPar.
At(
n, 3, 0) <<
" "
408 << 1. / (outPar.
At(
n, 3, 0) *
tan(outPar.
At(
n, 5, 0)))
409 <<
" r=" <<
std::sqrt(outPar.
At(
n, 0, 0) * outPar.
At(
n, 0, 0) + outPar.
At(
n, 1, 0) * outPar.
At(
n, 1, 0))
410 <<
" pT=" << 1. /
std::abs(outPar.
At(
n, 3, 0)) << std::endl);
416 printf(
"%5f %5f %5f %5f %5f %5f\n",
423 printf(
"%5f %5f %5f %5f %5f %5f\n",
430 printf(
"%5f %5f %5f %5f %5f %5f\n",
437 printf(
"%5f %5f %5f %5f %5f %5f\n",
444 printf(
"%5f %5f %5f %5f %5f %5f\n",
451 printf(
"%5f %5f %5f %5f %5f %5f\n",
466 #include "PropagationMPlex.icc"
481 helixAtRFromIterativeCCS_impl(inPar, inChg, msRad, outPar, errorProp, outFailFlag, 0, NN, N_proc, pflags);
509 for (
int kk = 0;
kk < N_proc; ++
kk) {
511 for (
int i = 0;
i < 6; ++
i) {
512 for (
int j = 0;
j < 6; ++
j)
519 for (
int i = 0;
i < 6; ++
i) {
520 for (
int j = 0;
j < 6; ++
j)
534 for (
int n = 0;
n < N_proc; ++
n) {
535 if (failFlag(
n, 0, 0) || (noMatEffPtr && noMatEffPtr->
constAt(
n, 0, 0))) {
536 hitsRl(
n, 0, 0) = 0.f;
537 hitsXi(
n, 0, 0) = 0.f;
541 hitsRl(
n, 0, 0) = (zbin >= 0 && zbin < Config::nBinsZME && rbin >= 0 && rbin <
Config::nBinsRME)
544 hitsXi(
n, 0, 0) = (zbin >= 0 && zbin < Config::nBinsZME && rbin >= 0 && rbin <
Config::nBinsRME)
548 const float r0 =
hipo(inPar(
n, 0, 0), inPar(
n, 1, 0));
549 const float r = msRad(
n, 0, 0);
550 propSign(
n, 0, 0) = (r > r0 ? 1. : -1.);
562 MultHelixProp(errorProp, outErr, temp);
563 MultHelixPropTransp(errorProp, temp, outErr);
582 for (
int i = 0;
i < N_proc; ++
i) {
583 if (failFlag(
i, 0, 0)) {
608 helixAtZ(inPar, inChg, msZ, outPar, errorProp, N_proc, pflags);
612 for (
int kk = 0;
kk < N_proc; ++
kk) {
614 for (
int i = 0;
i < 6; ++
i) {
615 for (
int j = 0;
j < 6; ++
j)
622 for (
int i = 0;
i < 6; ++
i) {
623 for (
int j = 0;
j < 6; ++
j)
637 for (
int n = 0;
n < N_proc; ++
n) {
638 if (noMatEffPtr && noMatEffPtr->
constAt(
n, 0, 0)) {
639 hitsRl(
n, 0, 0) = 0.f;
640 hitsXi(
n, 0, 0) = 0.f;
644 hitsRl(
n, 0, 0) = (zbin >= 0 && zbin < Config::nBinsZME && rbin >= 0 && rbin <
Config::nBinsRME)
647 hitsXi(
n, 0, 0) = (zbin >= 0 && zbin < Config::nBinsZME && rbin >= 0 && rbin <
Config::nBinsRME)
651 const float zout = msZ.
constAt(
n, 0, 0);
652 const float zin = inPar.
constAt(
n, 2, 0);
663 MultHelixPropEndcap(errorProp, outErr, temp);
664 MultHelixPropTranspEndcap(errorProp, temp, outErr);
704 for (
int n = 0;
n <
NN; ++
n) {
706 errorProp(
n, 0, 0) = 1.f;
707 errorProp(
n, 1, 1) = 1.f;
708 errorProp(
n, 3, 3) = 1.f;
709 errorProp(
n, 4, 4) = 1.f;
710 errorProp(
n, 5, 5) = 1.f;
712 const float zout = msZ.
constAt(
n, 0, 0);
714 const float zin = inPar.
constAt(
n, 2, 0);
715 const float ipt = inPar.
constAt(
n, 3, 0);
716 const float phiin = inPar.
constAt(
n, 4, 0);
724 const float kinv = 1.f /
k;
728 <<
"input parameters"
729 <<
" inPar.constAt(n, 0, 0)=" << std::setprecision(9) << inPar.
constAt(
n, 0, 0)
730 <<
" inPar.constAt(n, 1, 0)=" << std::setprecision(9) << inPar.
constAt(
n, 1, 0)
731 <<
" inPar.constAt(n, 2, 0)=" << std::setprecision(9) << inPar.
constAt(
n, 2, 0)
732 <<
" inPar.constAt(n, 3, 0)=" << std::setprecision(9) << inPar.
constAt(
n, 3, 0)
733 <<
" inPar.constAt(n, 4, 0)=" << std::setprecision(9) << inPar.
constAt(
n, 4, 0)
734 <<
" inPar.constAt(n, 5, 0)=" << std::setprecision(9) << inPar.
constAt(
n, 5, 0));
736 const float pt = 1.f / ipt;
738 float cosahTmp = 0., sinahTmp = 0.;
742 const float tanT = sinT / cosT;
743 const float icos2T = 1.f / (cosT * cosT);
744 const float pxin = cosP *
pt;
745 const float pyin = sinP *
pt;
750 <<
"k=" << std::setprecision(9) << k <<
" pxin=" << std::setprecision(9) << pxin
751 <<
" pyin=" << std::setprecision(9) << pyin <<
" cosP=" << std::setprecision(9) << cosP
752 <<
" sinP=" << std::setprecision(9) << sinP <<
" pt=" << std::setprecision(9) << pt);
754 const float deltaZ = zout - zin;
755 const float alpha = deltaZ * tanT * ipt * kinv;
758 sincos4(alpha * 0.5
f, sinahTmp, cosahTmp);
763 const float cosah = cosahTmp;
764 const float sinah = sinahTmp;
765 const float cosa = 1.f - 2.f * sinah * sinah;
766 const float sina = 2.f * sinah * cosah;
769 outPar.
At(
n, 0, 0) = outPar.
At(
n, 0, 0) + 2.f * k * sinah * (pxin * cosah - pyin * sinah);
770 outPar.
At(
n, 1, 0) = outPar.
At(
n, 1, 0) + 2.f * k * sinah * (pyin * cosah + pxin * sinah);
771 outPar.
At(
n, 2, 0) = zout;
776 <<
"outPar.At(n, 0, 0)=" << outPar.
At(
n, 0, 0) <<
" outPar.At(n, 1, 0)=" << outPar.
At(
n, 1, 0)
777 <<
" pxin=" << pxin <<
" pyin=" << pyin);
779 const float pxcaMpysa = pxin * cosa - pyin * sina;
780 errorProp(
n, 0, 2) = -tanT * ipt * pxcaMpysa;
781 errorProp(
n, 0, 3) = k * pt * pt * (cosP * (alpha * cosa - sina) + sinP * 2.
f * sinah * (sinah - alpha * cosah));
782 errorProp(
n, 0, 4) = -2 * k * pt * sinah * (sinP * cosah + cosP * sinah);
783 errorProp(
n, 0, 5) = deltaZ * ipt * pxcaMpysa * icos2T;
785 const float pycaPpxsa = pyin * cosa + pxin * sina;
786 errorProp(
n, 1, 2) = -tanT * ipt * pycaPpxsa;
787 errorProp(
n, 1, 3) = k * pt * pt * (sinP * (alpha * cosa - sina) - cosP * 2.
f * sinah * (sinah - alpha * cosah));
788 errorProp(
n, 1, 4) = 2 * k * pt * sinah * (cosP * cosah - sinP * sinah);
789 errorProp(
n, 1, 5) = deltaZ * ipt * pycaPpxsa * icos2T;
791 errorProp(
n, 4, 2) = -ipt * tanT * kinv;
792 errorProp(
n, 4, 3) = tanT * deltaZ * kinv;
793 errorProp(
n, 4, 5) = ipt * deltaZ * kinv * icos2T;
797 "propagation end, dump parameters"
799 <<
"pos = " << outPar.
At(
n, 0, 0) <<
" " << outPar.
At(
n, 1, 0) <<
" " << outPar.
At(
n, 2, 0) << std::endl
800 <<
"mom = " <<
std::cos(outPar.
At(
n, 4, 0)) / outPar.
At(
n, 3, 0) <<
" "
802 << 1. / (outPar.
At(
n, 3, 0) *
tan(outPar.
At(
n, 5, 0)))
803 <<
" r=" <<
std::sqrt(outPar.
At(
n, 0, 0) * outPar.
At(
n, 0, 0) + outPar.
At(
n, 1, 0) * outPar.
At(
n, 1, 0))
804 <<
" pT=" << 1. /
std::abs(outPar.
At(
n, 3, 0)) << std::endl);
810 printf(
"%5f %5f %5f %5f %5f %5f\n",
817 printf(
"%5f %5f %5f %5f %5f %5f\n",
824 printf(
"%5f %5f %5f %5f %5f %5f\n",
831 printf(
"%5f %5f %5f %5f %5f %5f\n",
838 printf(
"%5f %5f %5f %5f %5f %5f\n",
845 printf(
"%5f %5f %5f %5f %5f %5f\n",
867 for (
int n = 0;
n <
NN; ++
n) {
868 float radL = hitsRl.
constAt(
n, 0, 0);
872 const float pt = 1.f / outPar.
constAt(
n, 3, 0);
874 const float p2 = p *
p;
875 constexpr
float mpi = 0.140;
876 constexpr
float mpi2 = mpi * mpi;
877 const float beta2 = p2 / (p2 + mpi2);
881 radL = radL * invCos;
889 const float thetaMSC = 0.0136f * (1.f + 0.038f *
std::log(radL)) / (beta * p);
890 const float thetaMSC2 = thetaMSC * thetaMSC * radL;
891 outErr.
At(
n, 4, 4) += thetaMSC2;
893 outErr.
At(
n, 5, 5) += thetaMSC2;
900 const float gamma2 = (p2 + mpi2) / mpi2;
902 constexpr
float me = 0.0005;
903 const float wmax = 2.f * me * beta2 * gamma2 / (1.f + 2.f * gamma * me / mpi + me * me / (mpi * mpi));
904 constexpr
float I = 16.0e-9 * 10.75;
908 ? (2.f * (hitsXi.
constAt(
n, 0, 0) * invCos *
909 (0.5f *
std::log(2.f * me * beta2 * gamma2 * wmax / (I * I)) - beta2 - deltahalf) / beta2))
913 const float dP = propSign.
constAt(
n, 0, 0) * dEdx /
beta;
916 outErr.
At(
n, 3, 3) += dP * dP / (p2 * pt *
pt);
static std::vector< std::string > checklist log
const edm::EventSetup & c
void copySlot(idx_t n, const MatriplexSym &m)
const MaterialEffects materialEff
Sin< T >::type sin(const T &t)
Geom::Theta< T > theta() const
void propagateLineToRMPlex(const MPlexLS &psErr, const MPlexLV &psPar, const MPlexHS &msErr, const MPlexHV &msPar, MPlexLS &outErr, MPlexLV &outPar, const int N_proc)
T & At(idx_t n, idx_t i, idx_t j)
void propagateHelixToRMPlex(const MPlexLS &inErr, const MPlexLV &inPar, const MPlexQI &inChg, const MPlexQF &msRad, MPlexLS &outErr, MPlexLV &outPar, const int N_proc, const PropagationFlags pflags, const MPlexQI *noMatEffPtr)
void squashPhiMPlex(MPlexLV &par, const int N_proc)
const T & constAt(idx_t n, idx_t i, idx_t j) const
int getZbin(const float z) const
printf("params %d %f %f %f\n", minT, eps, errmax, chi2max)
constexpr Matriplex::idx_t NN
Cos< T >::type cos(const T &t)
void helixAtRFromIterativeCCSFullJac(const MPlexLV &inPar, const MPlexQI &inChg, const MPlexQF &msRad, MPlexLV &outPar, MPlexLL &errorProp, const int N_proc)
Tan< T >::type tan(const T &t)
Abs< T >::type abs(const T &t)
const std::complex< double > I
constexpr bool useTrigApprox
void propagateHelixToZMPlex(const MPlexLS &inErr, const MPlexLV &inPar, const MPlexQI &inChg, const MPlexQF &msZ, MPlexLS &outErr, MPlexLV &outPar, const int N_proc, const PropagationFlags pflags, const MPlexQI *noMatEffPtr)
float hipo(float x, float y)
float bFieldFromZR(const float z, const float r)
const T & constAt(idx_t n, idx_t i, idx_t j) const
void applyMaterialEffects(const MPlexQF &hitsRl, const MPlexQF &hitsXi, const MPlexQF &propSign, MPlexLS &outErr, MPlexLV &outPar, const int N_proc, const bool isBarrel)
int getRbin(const float r) const
void copySlot(idx_t n, const Matriplex &m)
void helixAtRFromIterativeCCS(const MPlexLV &inPar, const MPlexQI &inChg, const MPlexQF &msRad, MPlexLV &outPar, MPlexLL &errorProp, MPlexQI &outFailFlag, const int N_proc, const PropagationFlags pflags)
void sincos4(const float x, float &sin, float &cos)
#define ASSUME_ALIGNED(a, b)
T & At(idx_t n, idx_t i, idx_t j)
void helixAtZ(const MPlexLV &inPar, const MPlexQI &inChg, const MPlexQF &msZ, MPlexLV &outPar, MPlexLL &errorProp, const int N_proc, const PropagationFlags pflags)
__host__ __device__ V V wmax