22 double phiprojderapprox,
23 double zprojderapprox) {
31 projlayer_ = projlayer;
35 if (rproj < settings.
rPS2S()) {
36 fpgaphiproj_.set(iphiproj, settings.
nphibitsstub(0),
true, __LINE__, __FILE__);
37 int iphivm = (iphiproj >> (settings.
nphibitsstub(0) - 5)) & 0x7;
38 if ((projlayer_ % 2) == 1) {
41 fpgaphiprojvm_.set(iphivm, 3,
true, __LINE__, __FILE__);
42 fpgazproj_.set(izproj, settings.
nzbitsstub(0),
false, __LINE__, __FILE__);
43 int izvm = izproj >> (12 - 7) & 0xf;
44 fpgazprojvm_.set(izvm, 4,
true, __LINE__, __FILE__);
46 fpgazprojder_.set(izder, settings.
nbitszprojderL123(),
false, __LINE__, __FILE__);
48 fpgaphiproj_.set(iphiproj, settings.
nphibitsstub(5),
true, __LINE__, __FILE__);
49 int iphivm = (iphiproj >> (settings.
nphibitsstub(5) - 5)) & 0x7;
50 if ((projlayer_ % 2) == 1) {
53 fpgaphiprojvm_.set(iphivm, 3,
true, __LINE__, __FILE__);
54 fpgazproj_.set(izproj, settings.
nzbitsstub(5),
false, __LINE__, __FILE__);
55 int izvm = izproj >> (8 - 7) & 0xf;
56 fpgazprojvm_.set(izvm, 4,
true, __LINE__, __FILE__);
58 fpgazprojder_.set(izder, settings.
nbitszprojderL456(),
false, __LINE__, __FILE__);
65 unsigned int zbin1 = (1 << (settings.
MEBinsBits() - 1)) +
66 (((fpgazproj_.value() >> (fpgazproj_.nbits() - settings.
MEBinsBits() - 2)) - 2) >> 2);
67 unsigned int zbin2 = (1 << (settings.
MEBinsBits() - 1)) +
68 (((fpgazproj_.value() >> (fpgazproj_.nbits() - settings.
MEBinsBits() - 2)) + 2) >> 2);
69 if (zbin1 >= settings.
MEBins())
71 if (zbin2 >= settings.
MEBins())
72 zbin2 = settings.
MEBins() - 1;
74 assert(zbin2 - zbin1 <= 1);
75 fpgazbin1projvm_.set(zbin1, settings.
MEBinsBits(),
true, __LINE__, __FILE__);
77 fpgazbin2projvm_.set(0, 1,
true, __LINE__, __FILE__);
79 fpgazbin2projvm_.set(1, 1,
true, __LINE__, __FILE__);
82 int finez = ((1 << (settings.
MEBinsBits() + 2)) +
83 (fpgazproj_.value() >> (fpgazproj_.nbits() - (settings.
MEBinsBits() + 3)))) -
86 fpgafinezvm_.set(finez, 4,
true, __LINE__, __FILE__);
90 phiprojder_ = phiprojder;
93 phiprojapprox_ = phiprojapprox;
94 zprojapprox_ = zprojapprox;
95 phiprojderapprox_ = phiprojderapprox;
96 zprojderapprox_ = zprojderapprox;