60 Error (
"TSpectrumTransform",
"Invalid length, must be > than 0");
68 Error (
"TSpectrumTransform",
"Invalid length, must be power of 2");
98 int i, ii, li, l2, l3, j, jj, jj1, lj, iter,
m, jmin, jmax;
101 for (i = 0; i < num; i++)
102 working_space[i + num] = 0;
110 for (
m = 1;
m <= iter;
m++) {
113 for (i = 0; i < (2 * l2); i++) {
114 working_space[num + i] = working_space[i];
116 for (j = 0; j < l2; j++) {
119 val = working_space[jj + num] + working_space[jj + 1 + num];
120 working_space[j] = val;
121 val = working_space[jj + num] - working_space[jj + 1 + num];
122 working_space[l3] = val;
126 val = working_space[0];
128 working_space[0] = val;
129 val = working_space[1];
131 working_space[1] = val;
132 for (ii = 2; ii <= iter; ii++) {
137 for (j = jmin; j <= jmax; j++) {
138 val = working_space[j];
142 working_space[j] = val;
146 for (
m = 1;
m <= iter;
m++) {
151 for (i = 0; i < (2 * li); i++) {
152 working_space[i + num] = working_space[i];
154 for (j = 0; j < li; j++) {
156 jj = 2 * (j + 1) - 1;
158 val = working_space[j + num] - working_space[lj + num];
159 working_space[jj] = val;
160 val = working_space[j + num] + working_space[lj + num];
161 working_space[jj1] = val;
176 int i,
m, nump = 1, mnum, mnum2, mp, ib, mp2, mnum21, iba, iter;
179 for (i = 0; i < num; i++)
180 working_space[i + num] = 0;
187 for (
m = 1;
m <= iter;
m++) {
195 for (mp = 0; mp < nump; mp++) {
197 for (mp2 = 0; mp2 < mnum2; mp2++) {
198 mnum21 = mnum2 + mp2 + ib;
200 val1 = working_space[iba];
201 val2 = working_space[mnum21];
202 working_space[iba + num] = val1 + val2;
203 working_space[mnum21 + num] = val1 - val2;
206 for (i = 0; i < num; i++) {
207 working_space[i] = working_space[i + num];
213 for (i = 0; i < num; i++) {
214 val1 = working_space[i];
216 working_space[i] = val1;
230 int i, ib, il, ibd, ip, ifac, i1;
231 for (i = 0; i < num; i++) {
232 working_space[i + num] = working_space[i];
234 for (i = 1; i <= num; i++) {
248 for (i1 = 1; i1 <= il; i1++) {
250 ip = ip + ifac * ipower[i1 - 1];
252 working_space[ip - 1] = working_space[i - 1 + num];
266 int direction,
int zt_clear)
268 int nxp2, nxp, i, j, k,
m, iter, mxp, j1, j2, n1, n2, it;
269 Double_t a,
b,
c,
d, sign, wpwr, arg, wr, wi, tr, ti, pi =
270 3.14159265358979323846;
273 for (i = 0; i < num; i++)
274 working_space[i + num] = 0;
286 for (it = 1; it <= iter; it++) {
291 for (
m = 1;
m <= nxp2;
m++) {
296 for (mxp = nxp; mxp <= num; mxp += nxp) {
299 val1 = working_space[j1 - 1];
300 val2 = working_space[j2 - 1];
301 val3 = working_space[j1 - 1 + num];
302 val4 = working_space[j2 - 1 + num];
311 working_space[j1 - 1] = val1;
314 working_space[j1 - 1 + num] = val1;
315 a = tr * wr - ti * wi;
317 working_space[j2 - 1] = val1;
318 a = ti * wr + tr * wi;
320 working_space[j2 - 1 + num] = val1;
327 for (i = 1; i <= n1; i++) {
330 val1 = working_space[j - 1];
331 val2 = working_space[j - 1 + num];
332 val3 = working_space[i - 1];
333 working_space[j - 1] = val3;
334 working_space[j - 1 + num] = working_space[i - 1 + num];
335 working_space[i - 1] = val1;
336 working_space[i - 1 + num] = val2;
338 lab60:
if (k >= j)
goto lab65;
346 for (i = 0; i < num; i++) {
348 val1 = working_space[i];
352 working_space[i] = val1;
353 b = working_space[i + num];
355 working_space[i + num] =
b;
359 b = working_space[i];
360 c = working_space[i + num];
362 working_space[i] =
b;
363 working_space[i + num] = 0;
367 for (i = 1; i < num; i++)
368 working_space[num - i + num] = working_space[i];
369 working_space[0 + num] = working_space[0];
370 for (i = 0; i < num; i++) {
371 working_space[i] = working_space[i + num];
372 working_space[i + num] = 0;
390 int i, ib, il, ibd, ip, ifac, i1;
391 for (i = 0; i < num; i++) {
392 working_space[i + shift + start] = working_space[i + start];
393 working_space[i + shift + start + 2 * shift] =
394 working_space[i + start + 2 * shift];
396 for (i = 1; i <= num; i++) {
410 for (i1 = 1; i1 <= il; i1++) {
412 ip = ip + ifac * ipower[i1 - 1];
414 working_space[ip - 1 + start] =
415 working_space[i - 1 + shift + start];
416 working_space[ip - 1 + start + 2 * shift] =
417 working_space[i - 1 + shift + start + 2 * shift];
432 int degree,
int type)
434 int i, j, k,
m, nump, mnum, mnum2, mp, ib, mp2, mnum21, iba, iter,
435 mp2step, mppom, ring;
436 Double_t a,
b,
c,
d, wpwr, arg, wr, wi, tr, ti, pi =
437 3.14159265358979323846;
438 Double_t val1, val2, val3, val4, a0oldr = 0, b0oldr = 0, a0r, b0r;
440 for (i = 0; i < num; i++)
441 working_space[i + 2 * num] = 0;
454 for (i = 0; i < iter - degree; i++)
456 for (
m = 1;
m <= iter;
m++) {
468 for (mp = 0; mp < nump; mp++) {
471 mppom = mppom % ring;
475 for (i = 0; i < (iter - 1); i++) {
476 if ((mppom & j) != 0)
491 for (mp2 = 0; mp2 < mnum2; mp2++) {
492 mnum21 = mnum2 + mp2 + ib;
494 if (mp2 % mp2step == 0) {
505 val1 = working_space[iba];
506 val2 = working_space[mnum21];
507 val3 = working_space[iba + 2 * num];
508 val4 = working_space[mnum21 + 2 * num];
513 tr =
a * a0r +
b * b0r;
515 working_space[num + iba] = val1;
516 ti =
c * a0r +
d * b0r;
518 working_space[num + iba + 2 * num] = val1;
520 a * b0r * wr -
c * b0r * wi -
b * a0r * wr +
d * a0r * wi;
522 working_space[num + mnum21] = val1;
524 c * b0r * wr +
a * b0r * wi -
d * a0r * wr -
b * a0r * wi;
526 working_space[num + mnum21 + 2 * num] = val1;
529 for (i = 0; i < num; i++) {
530 val1 = working_space[num + i];
531 working_space[i] = val1;
532 val1 = working_space[num + i + 2 * num];
533 working_space[i + 2 * num] = val1;
550 int i, j, k,
m, nump =
551 1, mnum, mnum2, mp, ib, mp2, mnum21, iba, iter, mp2step, mppom,
553 Double_t a,
b,
c,
d, wpwr, arg, wr, wi, tr, ti, pi =
554 3.14159265358979323846;
555 Double_t val1, val2, val3, val4, a0oldr = 0, b0oldr = 0, a0r, b0r;
567 for (i = 0; i < iter - degree; i++)
571 for (
m = 1;
m <= iter;
m++) {
579 if (
m > iter - degree + 1)
581 for (mp = nump - 1; mp >= 0; mp--) {
584 mppom = mppom % ring;
588 for (i = 0; i < (iter - 1); i++) {
589 if ((mppom & j) != 0)
604 for (mp2 = 0; mp2 < mnum2; mp2++) {
605 mnum21 = mnum2 + mp2 + ib;
607 if (mp2 % mp2step == 0) {
618 val1 = working_space[iba];
619 val2 = working_space[mnum21];
620 val3 = working_space[iba + 2 * num];
621 val4 = working_space[mnum21 + 2 * num];
626 tr =
a * a0r +
b * wr * b0r +
d * wi * b0r;
628 working_space[num + iba] = val1;
629 ti =
c * a0r +
d * wr * b0r -
b * wi * b0r;
631 working_space[num + iba + 2 * num] = val1;
632 tr =
a * b0r -
b * wr * a0r -
d * wi * a0r;
634 working_space[num + mnum21] = val1;
635 ti =
c * b0r -
d * wr * a0r +
b * wi * a0r;
637 working_space[num + mnum21 + 2 * num] = val1;
640 if (
m <= iter - degree
646 for (i = 0; i < num; i++) {
647 val1 = working_space[num + i];
648 working_space[i] = val1;
649 val1 = working_space[num + i + 2 * num];
650 working_space[i + 2 * num] = val1;
743 int i, j=0, k = 1,
m,
l;
777 for (i = 0; i <
fSize; i++) {
778 working_space[i] = source[i];
781 for (i = 0; i <
fSize; i++) {
782 destVector[i] = working_space[i];
786 for (i = 0; i <
fSize; i++) {
787 working_space[i] = source[i];
791 for (i = 0; i <
fSize; i++) {
792 destVector[i] = working_space[i];
797 for (i = 1; i <= (
fSize / 2); i++) {
799 working_space[i - 1] = val;
800 working_space[
fSize - i] = val;
803 for (i = 0; i <
fSize / 2; i++) {
806 b = working_space[i];
808 working_space[i] =
a;
809 working_space[i +
fSize] = 0;
810 } working_space[0] = working_space[0] /
TMath::Sqrt(2.0);
811 for (i = 0; i <
fSize / 2; i++) {
812 destVector[i] = working_space[i];
817 for (i = 1; i <= (
fSize / 2); i++) {
819 working_space[i - 1] = val;
820 working_space[
fSize - i] = -val;
823 for (i = 0; i <
fSize / 2; i++) {
826 b = working_space[i];
829 working_space[i - 1] =
a;
830 working_space[i +
fSize] = 0;
832 working_space[
fSize / 2 - 1] =
834 for (i = 0; i <
fSize / 2; i++) {
835 destVector[i] = working_space[i];
839 for (i = 0; i <
fSize; i++) {
840 working_space[i] = source[i];
843 for (i = 0; i < 2 *
fSize; i++) {
844 destVector[i] = working_space[i];
848 for (i = 0; i <
fSize; i++) {
849 working_space[i] = source[i];
852 for (i = 0; i <
fSize; i++) {
853 destVector[i] = working_space[i];
863 for (i = 0; i <
fSize; i++) {
870 working_space[k + i % j] = val;
871 working_space[k + 2 * j - 1 - i % j] = val;
879 working_space[k + i % j] = val;
880 working_space[k + 2 * j - 1 - i % j] = -val;
884 working_space[i] = val;
889 for (i = 0; i < j; i++)
898 for (i = 0; i <
l; i++)
901 for (i = 0; i <
fSize; i++) {
906 b = working_space[k + i % j];
912 working_space[i] =
a;
913 working_space[i + 2 *
fSize] = 0;
921 for (i = 0; i <
l; i++)
924 for (i = 0; i <
fSize; i++) {
929 b = working_space[j + k + i % j];
935 working_space[j + k / 2 - i % j - 1] =
a;
936 working_space[i + 2 *
fSize] = 0;
946 working_space[
fSize + i] = working_space[
l + i / j];
948 working_space[
l + i / j + 2 *
fSize];
950 for (i = 0; i <
fSize; i++) {
951 working_space[i] = working_space[
fSize + i];
952 working_space[i + 2 *
fSize] =
955 for (i = 0; i <
fSize; i++) {
956 destVector[i] = working_space[i];
960 for (i = 0; i <
fSize; i++) {
961 destVector[
fSize + i] = working_space[i + 2 *
fSize];
971 for (i = 0; i <
fSize; i++) {
972 working_space[i] = source[i];
975 for (i = 0; i <
fSize; i++) {
976 destVector[i] = working_space[i];
980 for (i = 0; i <
fSize; i++) {
981 working_space[i] = source[i];
985 for (i = 0; i <
fSize; i++) {
986 destVector[i] = working_space[i];
990 for (i = 0; i <
fSize; i++) {
991 working_space[i] = source[i];
994 working_space[0] = working_space[0] *
TMath::Sqrt(2.0);
995 for (i = 0; i <
fSize / 2; i++) {
1000 working_space[i] = (
Double_t) working_space[i] *
a;
1001 }
for (i = 2; i <= (
fSize / 2); i++) {
1002 working_space[
fSize - i + 1] = working_space[i - 1];
1004 -working_space[i - 1 +
fSize];
1006 working_space[
fSize / 2] = 0;
1009 for (i = 0; i <
fSize / 2; i++) {
1010 destVector[i] = working_space[i];
1014 for (i = 0; i <
fSize; i++) {
1015 working_space[i] = source[i];
1018 working_space[
fSize / 2] =
1020 for (i =
fSize / 2 - 1; i > 0; i--) {
1022 working_space[i +
fSize] =
1026 }
for (i = 2; i <= (
fSize / 2); i++) {
1027 working_space[
fSize - i + 1] = working_space[i - 1];
1029 -working_space[i - 1 +
fSize];
1031 working_space[0] = 0;
1032 working_space[
fSize] = 0;
1035 for (i = 0; i <
fSize / 2; i++) {
1036 destVector[i] = working_space[i];
1040 for (i = 0; i < 2 *
fSize; i++) {
1041 working_space[i] = source[i];
1044 for (i = 0; i <
fSize; i++) {
1045 destVector[i] = working_space[i];
1049 for (i = 0; i <
fSize; i++) {
1050 working_space[i] = source[i];
1053 for (i = 0; i <
fSize; i++) {
1054 destVector[i] = working_space[i];
1064 for (i = 0; i <
fSize; i++) {
1065 working_space[i] = source[i];
1069 for (i = 0; i <
fSize; i++) {
1070 working_space[i + 2 *
fSize] = source[
fSize + i];
1080 working_space[
fSize +
l + i / j] = working_space[i];
1082 working_space[i + 2 *
fSize];
1084 for (i = 0; i <
fSize; i++) {
1085 working_space[i] = working_space[
fSize + i];
1086 working_space[i + 2 *
fSize] =
1093 for (i = 0; i < j; i++)
1102 for (i = 0; i <
fSize; i++) {
1107 working_space[2 *
fSize + k + i % j] =
1109 working_space[4 *
fSize + 2 *
fSize + k + i % j] = 0;
1115 working_space[4 *
fSize + 2 *
fSize + k + i % j] =
1117 working_space[2 *
fSize + k + i % j] =
1119 } }
for (i = 0; i <
fSize; i++) {
1123 working_space[2 *
fSize + k + j] = 0;
1124 working_space[4 *
fSize + 2 *
fSize + k + j] = 0;
1128 working_space[2 *
fSize + k + 2 * j - i % j] =
1129 working_space[2 *
fSize + k + i % j];
1130 working_space[4 *
fSize + 2 *
fSize + k + 2 * j - i % j] =
1131 -working_space[4 *
fSize + 2 *
fSize + k + i % j];
1134 for (i = 0; i < 2 *
fSize; i++) {
1135 working_space[i] = working_space[2 *
fSize + i];
1136 working_space[4 *
fSize + i] =
1142 for (i = 0; i <
l; i++)
1151 for (i = 0; i <
fSize; i++) {
1156 working_space[2 *
fSize + k + j + i % j] =
1157 working_space[j + k / 2 - i % j -
1159 working_space[4 *
fSize + 2 *
fSize + k + j + i % j] = 0;
1165 working_space[4 *
fSize + 2 *
fSize + k + j + i % j] =
1166 -(
Double_t) working_space[j + k / 2 - i % j - 1] *
b;
1167 working_space[2 *
fSize + k + j + i % j] =
1168 (
Double_t) working_space[j + k / 2 - i % j - 1] *
a;
1169 } }
for (i = 0; i <
fSize; i++) {
1173 working_space[2 *
fSize + k] = 0;
1174 working_space[4 *
fSize + 2 *
fSize + k] = 0;
1178 working_space[2 *
fSize + k + i % j] =
1179 working_space[2 *
fSize + k + 2 * j - i % j];
1180 working_space[4 *
fSize + 2 *
fSize + k + i % j] =
1181 -working_space[4 *
fSize + 2 *
fSize + k + 2 * j -
1185 for (i = 0; i < 2 *
fSize; i++) {
1186 working_space[i] = working_space[2 *
fSize + i];
1187 working_space[4 *
fSize + i] =
1191 for (i = 0; i <
l; i++)
1194 for (i = 0; i <
fSize; i++) {
1198 val = working_space[k + i % j];
1202 val = working_space[i];
1203 destVector[i] = val;
1208 delete[]working_space;
1271 int i, j=0, k = 1,
m,
l;
1274 Double_t a,
b, pi = 3.14159265358979323846, old_area, new_area;
1304 for (i = 0; i <
fSize; i++) {
1305 working_space[i] = source[i];
1310 for (i = 0; i <
fSize; i++) {
1311 working_space[i] = source[i];
1318 for (i = 1; i <= (
fSize / 2); i++) {
1319 val = source[i - 1];
1320 working_space[i - 1] = val;
1321 working_space[
fSize - i] = val;
1324 for (i = 0; i <
fSize / 2; i++) {
1327 b = working_space[i];
1329 working_space[i] =
a;
1330 working_space[i +
fSize] = 0;
1331 } working_space[0] = working_space[0] /
TMath::Sqrt(2.0);
1336 for (i = 1; i <= (
fSize / 2); i++) {
1337 val = source[i - 1];
1338 working_space[i - 1] = val;
1339 working_space[
fSize - i] = -val;
1342 for (i = 0; i <
fSize / 2; i++) {
1345 b = working_space[i];
1348 working_space[i - 1] =
a;
1349 working_space[i +
fSize] = 0;
1351 working_space[
fSize / 2 - 1] =
1356 for (i = 0; i <
fSize; i++) {
1357 working_space[i] = source[i];
1362 for (i = 0; i <
fSize; i++) {
1363 working_space[i] = source[i];
1374 for (i = 0; i <
fSize; i++) {
1380 working_space[k + i % j] = val;
1381 working_space[k + 2 * j - 1 - i % j] = val;
1389 working_space[k + i % j] = val;
1390 working_space[k + 2 * j - 1 - i % j] = -val;
1394 working_space[i] = val;
1399 for (i = 0; i < j; i++)
1407 for (i = 0; i <
l; i++)
1410 for (i = 0; i <
fSize; i++) {
1415 b = working_space[k + i % j];
1421 working_space[i] =
a;
1422 working_space[i + 2 *
fSize] = 0;
1429 for (i = 0; i <
l; i++)
1432 for (i = 0; i <
fSize; i++) {
1437 b = working_space[j + k + i % j];
1443 working_space[j + k / 2 - i % j - 1] =
a;
1444 working_space[i + 2 *
fSize] = 0;
1454 working_space[
fSize + i] = working_space[
l + i / j];
1456 working_space[
l + i / j + 2 *
fSize];
1458 for (i = 0; i <
fSize; i++) {
1459 working_space[i] = working_space[
fSize + i];
1464 if (!working_space)
return;
1465 for (i = 0, old_area = 0; i <
fSize; i++) {
1466 old_area += working_space[i];
1468 for (i = 0, new_area = 0; i <
fSize; i++) {
1471 new_area += working_space[i];
1473 if (new_area != 0) {
1474 a = old_area / new_area;
1475 for (i = 0; i <
fSize; i++) {
1476 working_space[i] *=
a;
1480 for (i = 0, old_area = 0; i <
fSize; i++) {
1481 old_area += working_space[i +
fSize];
1483 for (i = 0, new_area = 0; i <
fSize; i++) {
1486 new_area += working_space[i +
fSize];
1488 if (new_area != 0) {
1489 a = old_area / new_area;
1490 for (i = 0; i <
fSize; i++) {
1491 working_space[i +
fSize] *=
a;
1498 for (i = 0, old_area = 0; i <
fSize; i++) {
1499 old_area += working_space[i + 2 *
fSize];
1501 for (i = 0, new_area = 0; i <
fSize; i++) {
1504 new_area += working_space[i + 2 *
fSize];
1506 if (new_area != 0) {
1507 a = old_area / new_area;
1508 for (i = 0; i <
fSize; i++) {
1509 working_space[i + 2 *
fSize] *=
a;
1516 for (i = 0; i <
fSize; i++) {
1517 destVector[i] = working_space[i];
1523 for (i = 0; i <
fSize; i++) {
1524 destVector[i] = working_space[i];
1529 working_space[0] = working_space[0] *
TMath::Sqrt(2.0);
1530 for (i = 0; i <
fSize / 2; i++) {
1535 working_space[i] = (
Double_t) working_space[i] *
a;
1536 }
for (i = 2; i <= (
fSize / 2); i++) {
1537 working_space[
fSize - i + 1] = working_space[i - 1];
1539 -working_space[i - 1 +
fSize];
1541 working_space[
fSize / 2] = 0;
1544 for (i = 0; i <
fSize / 2; i++) {
1545 destVector[i] = working_space[i];
1550 working_space[
fSize / 2] =
1552 for (i =
fSize / 2 - 1; i > 0; i--) {
1554 working_space[i +
fSize] =
1557 }
for (i = 2; i <= (
fSize / 2); i++) {
1558 working_space[
fSize - i + 1] = working_space[i - 1];
1560 -working_space[i - 1 +
fSize];
1562 working_space[0] = 0;
1563 working_space[
fSize] = 0;
1566 for (i = 0; i <
fSize / 2; i++) {
1567 destVector[i] = working_space[i];
1572 for (i = 0; i <
fSize; i++) {
1573 destVector[i] = working_space[i];
1578 for (i = 0; i <
fSize; i++) {
1579 destVector[i] = working_space[i];
1596 working_space[
fSize +
l + i / j] = working_space[i];
1598 working_space[i + 2 *
fSize];
1600 for (i = 0; i <
fSize; i++) {
1601 working_space[i] = working_space[
fSize + i];
1608 for (i = 0; i < j; i++)
1616 for (i = 0; i <
fSize; i++) {
1621 working_space[2 *
fSize + k + i % j] =
1623 working_space[4 *
fSize + 2 *
fSize + k + i % j] = 0;
1629 working_space[4 *
fSize + 2 *
fSize + k + i % j] =
1631 working_space[2 *
fSize + k + i % j] =
1633 } }
for (i = 0; i <
fSize; i++) {
1637 working_space[2 *
fSize + k + j] = 0;
1638 working_space[4 *
fSize + 2 *
fSize + k + j] = 0;
1642 working_space[2 *
fSize + k + 2 * j - i % j] =
1643 working_space[2 *
fSize + k + i % j];
1644 working_space[4 *
fSize + 2 *
fSize + k + 2 * j - i % j] =
1645 -working_space[4 *
fSize + 2 *
fSize + k + i % j];
1648 for (i = 0; i < 2 *
fSize; i++) {
1649 working_space[i] = working_space[2 *
fSize + i];
1650 working_space[4 *
fSize + i] =
1656 for (i = 0; i <
l; i++)
1664 for (i = 0; i <
fSize; i++) {
1669 working_space[2 *
fSize + k + j + i % j] =
1670 working_space[j + k / 2 - i % j - 1] *
TMath::Sqrt(2.0);
1671 working_space[4 *
fSize + 2 *
fSize + k + j + i % j] = 0;
1677 working_space[4 *
fSize + 2 *
fSize + k + j + i % j] =
1678 -(
Double_t) working_space[j + k / 2 - i % j - 1] *
b;
1679 working_space[2 *
fSize + k + j + i % j] =
1680 (
Double_t) working_space[j + k / 2 - i % j - 1] *
a;
1681 } }
for (i = 0; i <
fSize; i++) {
1685 working_space[2 *
fSize + k] = 0;
1686 working_space[4 *
fSize + 2 *
fSize + k] = 0;
1690 working_space[2 *
fSize + k + i % j] =
1691 working_space[2 *
fSize + k + 2 * j - i % j];
1692 working_space[4 *
fSize + 2 *
fSize + k + i % j] =
1693 -working_space[4 *
fSize + 2 *
fSize + k + 2 * j - i % j];
1696 for (i = 0; i < 2 *
fSize; i++) {
1697 working_space[i] = working_space[2 *
fSize + i];
1698 working_space[4 *
fSize + i] =
1702 for (i = 0; i <
l; i++)
1705 for (i = 0; i <
fSize; i++) {
1709 val = working_space[k + i % j];
1713 val = working_space[i];
1714 destVector[i] = val;
1718 delete[]working_space;
1781 int i, j=0, k = 1,
m,
l;
1784 Double_t a,
b, pi = 3.14159265358979323846, old_area, new_area;
1814 for (i = 0; i <
fSize; i++) {
1815 working_space[i] = source[i];
1820 for (i = 0; i <
fSize; i++) {
1821 working_space[i] = source[i];
1828 for (i = 1; i <= (
fSize / 2); i++) {
1829 val = source[i - 1];
1830 working_space[i - 1] = val;
1831 working_space[
fSize - i] = val;
1834 for (i = 0; i <
fSize / 2; i++) {
1837 b = working_space[i];
1839 working_space[i] =
a;
1840 working_space[i +
fSize] = 0;
1841 } working_space[0] = working_space[0] /
TMath::Sqrt(2.0);
1846 for (i = 1; i <= (
fSize / 2); i++) {
1847 val = source[i - 1];
1848 working_space[i - 1] = val;
1849 working_space[
fSize - i] = -val;
1852 for (i = 0; i <
fSize / 2; i++) {
1855 b = working_space[i];
1858 working_space[i - 1] =
a;
1859 working_space[i +
fSize] = 0;
1861 working_space[
fSize / 2 - 1] =
1866 for (i = 0; i <
fSize; i++) {
1867 working_space[i] = source[i];
1872 for (i = 0; i <
fSize; i++) {
1873 working_space[i] = source[i];
1884 for (i = 0; i <
fSize; i++) {
1890 working_space[k + i % j] = val;
1891 working_space[k + 2 * j - 1 - i % j] = val;
1899 working_space[k + i % j] = val;
1900 working_space[k + 2 * j - 1 - i % j] = -val;
1904 working_space[i] = val;
1909 for (i = 0; i < j; i++)
1917 for (i = 0; i <
l; i++)
1920 for (i = 0; i <
fSize; i++) {
1925 b = working_space[k + i % j];
1931 working_space[i] =
a;
1932 working_space[i + 2 *
fSize] = 0;
1939 for (i = 0; i <
l; i++)
1942 for (i = 0; i <
fSize; i++) {
1947 b = working_space[j + k + i % j];
1953 working_space[j + k / 2 - i % j - 1] =
a;
1954 working_space[i + 2 *
fSize] = 0;
1964 working_space[
fSize + i] = working_space[
l + i / j];
1966 working_space[
l + i / j + 2 *
fSize];
1968 for (i = 0; i <
fSize; i++) {
1969 working_space[i] = working_space[
fSize + i];
1974 if (!working_space)
return;
1975 for (i = 0, old_area = 0; i <
fSize; i++) {
1976 old_area += working_space[i];
1978 for (i = 0, new_area = 0; i <
fSize; i++) {
1981 new_area += working_space[i];
1983 if (new_area != 0) {
1984 a = old_area / new_area;
1985 for (i = 0; i <
fSize; i++) {
1986 working_space[i] *=
a;
1990 for (i = 0, old_area = 0; i <
fSize; i++) {
1991 old_area += working_space[i +
fSize];
1993 for (i = 0, new_area = 0; i <
fSize; i++) {
1996 new_area += working_space[i +
fSize];
1998 if (new_area != 0) {
1999 a = old_area / new_area;
2000 for (i = 0; i <
fSize; i++) {
2001 working_space[i +
fSize] *=
a;
2008 for (i = 0, old_area = 0; i <
fSize; i++) {
2009 old_area += working_space[i + 2 *
fSize];
2011 for (i = 0, new_area = 0; i <
fSize; i++) {
2014 new_area += working_space[i + 2 *
fSize];
2016 if (new_area != 0) {
2017 a = old_area / new_area;
2018 for (i = 0; i <
fSize; i++) {
2019 working_space[i + 2 *
fSize] *=
a;
2026 for (i = 0; i <
fSize; i++) {
2027 destVector[i] = working_space[i];
2033 for (i = 0; i <
fSize; i++) {
2034 destVector[i] = working_space[i];
2039 working_space[0] = working_space[0] *
TMath::Sqrt(2.0);
2040 for (i = 0; i <
fSize / 2; i++) {
2045 working_space[i] = (
Double_t) working_space[i] *
a;
2046 }
for (i = 2; i <= (
fSize / 2); i++) {
2047 working_space[
fSize - i + 1] = working_space[i - 1];
2049 -working_space[i - 1 +
fSize];
2051 working_space[
fSize / 2] = 0;
2054 for (i = 0; i <
fSize / 2; i++) {
2055 destVector[i] = working_space[i];
2060 working_space[
fSize / 2] =
2062 for (i =
fSize / 2 - 1; i > 0; i--) {
2064 working_space[i +
fSize] =
2067 }
for (i = 2; i <= (
fSize / 2); i++) {
2068 working_space[
fSize - i + 1] = working_space[i - 1];
2070 -working_space[i - 1 +
fSize];
2072 working_space[0] = 0;
2073 working_space[
fSize] = 0;
2076 for (i = 0; i <
fSize / 2; i++) {
2077 destVector[i] = working_space[i];
2082 for (i = 0; i <
fSize; i++) {
2083 destVector[i] = working_space[i];
2088 for (i = 0; i <
fSize; i++) {
2089 destVector[i] = working_space[i];
2106 working_space[
fSize +
l + i / j] = working_space[i];
2108 working_space[i + 2 *
fSize];
2110 for (i = 0; i <
fSize; i++) {
2111 working_space[i] = working_space[
fSize + i];
2118 for (i = 0; i < j; i++)
2126 for (i = 0; i <
fSize; i++) {
2131 working_space[2 *
fSize + k + i % j] =
2133 working_space[4 *
fSize + 2 *
fSize + k + i % j] = 0;
2139 working_space[4 *
fSize + 2 *
fSize + k + i % j] =
2141 working_space[2 *
fSize + k + i % j] =
2143 } }
for (i = 0; i <
fSize; i++) {
2147 working_space[2 *
fSize + k + j] = 0;
2148 working_space[4 *
fSize + 2 *
fSize + k + j] = 0;
2152 working_space[2 *
fSize + k + 2 * j - i % j] =
2153 working_space[2 *
fSize + k + i % j];
2154 working_space[4 *
fSize + 2 *
fSize + k + 2 * j - i % j] =
2155 -working_space[4 *
fSize + 2 *
fSize + k + i % j];
2158 for (i = 0; i < 2 *
fSize; i++) {
2159 working_space[i] = working_space[2 *
fSize + i];
2160 working_space[4 *
fSize + i] =
2166 for (i = 0; i <
l; i++)
2174 for (i = 0; i <
fSize; i++) {
2179 working_space[2 *
fSize + k + j + i % j] =
2180 working_space[j + k / 2 - i % j - 1] *
TMath::Sqrt(2.0);
2181 working_space[4 *
fSize + 2 *
fSize + k + j + i % j] = 0;
2187 working_space[4 *
fSize + 2 *
fSize + k + j + i % j] =
2188 -(
Double_t) working_space[j + k / 2 - i % j - 1] *
b;
2189 working_space[2 *
fSize + k + j + i % j] =
2190 (
Double_t) working_space[j + k / 2 - i % j - 1] *
a;
2191 } }
for (i = 0; i <
fSize; i++) {
2195 working_space[2 *
fSize + k] = 0;
2196 working_space[4 *
fSize + 2 *
fSize + k] = 0;
2200 working_space[2 *
fSize + k + i % j] =
2201 working_space[2 *
fSize + k + 2 * j - i % j];
2202 working_space[4 *
fSize + 2 *
fSize + k + i % j] =
2203 -working_space[4 *
fSize + 2 *
fSize + k + 2 * j - i % j];
2206 for (i = 0; i < 2 *
fSize; i++) {
2207 working_space[i] = working_space[2 *
fSize + i];
2208 working_space[4 *
fSize + i] =
2212 for (i = 0; i <
l; i++)
2215 for (i = 0; i <
fSize; i++) {
2219 val = working_space[k + i % j];
2223 val = working_space[i];
2224 destVector[i] = val;
2228 delete[]working_space;
2247 Error (
"TSpectrumTransform",
"Invalid type of transform");
2251 if (degree > j || degree < 1){
2252 Error (
"TSpectrumTransform",
"Invalid degree of mixed transform");
2266 if(
xmin<0 || xmax < xmin || xmax >=
fSize){
2267 Error(
"TSpectrumTransform",
"Wrong range");
2281 Error(
"TSpectrumTransform",
"Wrong direction");
size_t size(const MatrixT &matrix)
retrieve the size of a square matrix
Option_t Option_t TPoint TPoint const char GetTextMagnitude GetFillStyle GetLineColor GetLineWidth GetMarkerStyle GetTextAlign GetTextColor GetTextSize void char Point_t Rectangle_t WindowAttributes_t Float_t Float_t Float_t Int_t Int_t UInt_t UInt_t Rectangle_t Int_t Int_t Window_t TString Int_t GCValues_t GetPrimarySelectionOwner GetDisplay GetScreen GetColormap GetNativeEvent const char const char dpyName wid window const char font_name cursor keysym reg const char only_if_exist regb h Point_t winding char text const char depth char const char Int_t count const char ColorStruct_t color const char Pixmap_t Pixmap_t PictureAttributes_t attr const char char ret_data h unsigned char height h Atom_t Int_t ULong_t ULong_t unsigned char prop_list Atom_t Atom_t Atom_t Time_t type
The TNamed class is the base class for all named ROOT classes.
virtual void Error(const char *method, const char *msgfmt,...) const
Issue error message.
Double_t Sqrt(Double_t x)
Returns the square root of x.
LongDouble_t Power(LongDouble_t x, LongDouble_t y)
Returns x raised to the power y.
Double_t Cos(Double_t)
Returns the cosine of an angle of x radians.
Double_t Sin(Double_t)
Returns the sine of an angle of x radians.