23 #define LAST_LAYER NOF_LAYERS - 1
24 #define NOF_STATIONS 4
25 #define LAST_STATION NOF_STATIONS - 1
27 #define TIMEBIN_LENGTH 100
29 #define NOF_SIGMAS_SQ NOF_SIGMAS* NOF_SIGMAS
56 std::list<PointDesc>
mcRefs;
126 for (std::list<LxTbBinnedTriplet*>::iterator
i =
triplets.begin();
153 std::list<LxTbBinnedPoint>
points;
183 for (
int i = 0;
i < nybs; ++
i)
204 new unsigned char[noftb * sizeof(
LxTbTYXBin)]))
221 for (
int i = 0;
i < noftb; ++
i)
263 #define LXTB_ITERATE_LAYER_BEGIN \
264 if (maxX > layer.minX && minX < layer.maxX && maxY > layer.minY \
265 && minY < layer.maxY && maxT > layer.minT && minT < layer.maxT) { \
266 int minTind = (minT - layer.minT) / layer.timeBinLength; \
270 else if (minTind > layer.lastTimeBinNumber) \
271 minTind = layer.lastTimeBinNumber; \
273 int maxTind = (maxT - layer.minT) / layer.timeBinLength; \
277 else if (maxTind > layer.lastTimeBinNumber) \
278 maxTind = layer.lastTimeBinNumber; \
280 int minYind = (minY - layer.minY) / layer.yBinLength; \
284 else if (minYind > layer.lastYBinNumber) \
285 minYind = layer.lastYBinNumber; \
287 int maxYind = (maxY - layer.minY) / layer.yBinLength; \
291 else if (maxYind > layer.lastYBinNumber) \
292 maxYind = layer.lastYBinNumber; \
294 int minXind = (minX - layer.minX) / layer.xBinLength; \
298 else if (minXind > layer.lastXBinNumber) \
299 minXind = layer.lastXBinNumber; \
301 int maxXind = (maxX - minX) / layer.xBinLength; \
305 else if (maxXind > layer.lastXBinNumber) \
306 maxXind = layer.lastXBinNumber; \
308 for (int tInd = minTind; tInd <= maxTind; ++tInd) { \
309 LxTbTYXBin& tyxBin = layer.tyxBins[tInd]; \
311 for (int yInd = minYind; yInd <= maxYind; ++yInd) { \
312 LxTbYXBin& yxBin = tyxBin.yxBins[yInd]; \
314 for (int xInd = minXind; xInd <= maxXind; ++xInd) { \
315 LxTbXBin& xBin = yxBin.xBins[xInd]; \
317 for (std::list<LxTbBinnedPoint>::iterator pointIterator = \
318 xBin.points.begin(); \
319 pointIterator != xBin.points.end(); \
321 LxTbBinnedPoint& point = *pointIterator; \
323 if (point.x >= minX && point.x <= maxX && point.y >= minY \
324 && point.y <= maxY && point.t >= minT && point.t <= maxT) {
326 #define LXTB_ITERATE_LAYER_END \
332 if (xBin.use) yxBin.use = true; \
335 if (yxBin.use) tyxBin.use = true; \
340 #define LXTB_ITERATE_LAYER_END_NO_USE \
350 template<
class HandlePo
int>
355 if (!tyxBin.
use)
continue;
357 for (
int j = 0; j < layer.
nofYXBins; ++j) {
360 if (!yxBin.
use)
continue;
362 for (
int k = 0; k < layer.
nofXBins; ++k) {
365 if (!xBin.
use)
continue;
367 for (std::list<LxTbBinnedPoint>::iterator l = xBin.
points.begin();
372 if (!point.
use)
continue;
381 template<
class HandlePo
int>
391 HandlePoint& handlePoint) {
409 if (maxX < layer.minX || minX > layer.
maxX || maxY < layer.
minY
410 || minY > layer.
maxY || maxT < layer.minT || minT > layer.
maxT)
455 for (
int tInd = minTind; tInd <= maxTind; ++tInd) {
458 for (
int yInd = minYind; yInd <= maxYind; ++yInd) {
461 for (
int xInd = minXind; xInd <= maxXind; ++xInd) {
464 for (std::list<LxTbBinnedPoint>::iterator pointIterator =
466 pointIterator != xBin.
points.end();
473 scaltype deltaXSq = deltaX * deltaX;
475 scaltype deltaYSq = deltaY * deltaY;
477 scaltype deltaTSq = deltaT * deltaT;
479 if (deltaXSq > errWinXSq || deltaYSq > errWinYSq
480 || deltaTSq > errWinTSq)
488 if (xBin.
use) yxBin.
use =
true;
491 if (yxBin.
use) tyxBin.
use =
true;
496 template<
class HandlePo
int>