22 double phiprojderapprox,
23 double zprojderapprox,
32 projlayer_ = projlayer;
36 if (rproj < settings.
rPS2S()) {
37 fpgaphiproj_.set(iphiproj, settings.
nphibitsstub(0),
true, __LINE__, __FILE__);
38 int iphivm = (iphiproj >> (settings.
nphibitsstub(0) - 5)) & 0x7;
39 if ((projlayer_ % 2) == 1) {
42 fpgaphiprojvm_.set(iphivm, 3,
true, __LINE__, __FILE__);
43 fpgazproj_.set(izproj, settings.
nzbitsstub(0),
false, __LINE__, __FILE__);
44 int izvm = izproj >> (12 - 7) & 0xf;
45 fpgazprojvm_.set(izvm, 4,
true, __LINE__, __FILE__);
47 fpgazprojder_.set(izder, settings.
nbitszprojderL123(),
false, __LINE__, __FILE__);
49 fpgaphiproj_.set(iphiproj, settings.
nphibitsstub(5),
true, __LINE__, __FILE__);
50 int iphivm = (iphiproj >> (settings.
nphibitsstub(5) - 5)) & 0x7;
51 if ((projlayer_ % 2) == 1) {
54 fpgaphiprojvm_.set(iphivm, 3,
true, __LINE__, __FILE__);
55 fpgazproj_.set(izproj, settings.
nzbitsstub(5),
false, __LINE__, __FILE__);
56 int izvm = izproj >> (8 - 7) & 0xf;
57 fpgazprojvm_.set(izvm, 4,
true, __LINE__, __FILE__);
59 fpgazprojder_.set(izder, settings.
nbitszprojderL456(),
false, __LINE__, __FILE__);
70 unsigned int zbin1 = (1 << (settings.
MEBinsBits() - 1)) +
71 (((fpgazproj_.value() >> (fpgazproj_.nbits() - settings.
MEBinsBits() - 3)) -
offset) >> 3);
72 unsigned int zbin2 = (1 << (settings.
MEBinsBits() - 1)) +
73 (((fpgazproj_.value() >> (fpgazproj_.nbits() - settings.
MEBinsBits() - 3)) +
offset) >> 3);
74 if (zbin1 >= settings.
MEBins()) {
77 if (zbin2 >= settings.
MEBins())
78 zbin2 = settings.
MEBins() - 1;
80 assert(zbin2 - zbin1 <= 1);
81 fpgazbin1projvm_.set(zbin1, settings.
MEBinsBits(),
true, __LINE__, __FILE__);
83 fpgazbin2projvm_.set(0, 1,
true, __LINE__, __FILE__);
85 fpgazbin2projvm_.set(1, 1,
true, __LINE__, __FILE__);
88 int finez = ((1 << (settings.
MEBinsBits() + 2)) +
89 (fpgazproj_.value() >> (fpgazproj_.nbits() - (settings.
MEBinsBits() + 3)))) -
92 fpgafinezvm_.set(finez, 4,
true, __LINE__, __FILE__);
96 phiprojder_ = phiprojder;
99 phiprojapprox_ = phiprojapprox;
100 zprojapprox_ = zprojapprox;
101 phiprojderapprox_ = phiprojderapprox;
102 zprojderapprox_ = zprojderapprox;