Loading [MathJax]/extensions/tex2jax.js
ATLAS Offline Software
All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Modules Pages
Functions
FPGATrackSimOverlapRemovalTool.cxx File Reference
#include "../FPGATrackSimAlgorithms/FPGATrackSimOverlapRemovalTool.h"
#include "FPGATrackSimMaps/FPGATrackSimPlaneMap.h"
#include "FPGATrackSimObjects/FPGATrackSimVectors.h"
#include "GaudiKernel/MsgStream.h"
#include <sstream>
#include <iostream>
#include <fstream>
Include dependency graph for FPGATrackSimOverlapRemovalTool.cxx:

Go to the source code of this file.

Functions

bool isLocalMax (vector2D< FPGATrackSimRoad * > const &acc, unsigned x, unsigned y, int localMaxWindowSize)
 

Function Documentation

◆ isLocalMax()

bool isLocalMax ( vector2D< FPGATrackSimRoad * > const acc,
unsigned  x,
unsigned  y,
int  localMaxWindowSize 
)

Definition at line 54 of file FPGATrackSimOverlapRemovalTool.cxx.

55 {
56  if (!localMaxWindowSize) return true;
57  if (!acc(y, x)) return false;
58  for (int j = -localMaxWindowSize; j <= localMaxWindowSize; j++)
59  for (int i = -localMaxWindowSize; i <= localMaxWindowSize; i++)
60  {
61  if (i == 0 && j == 0) continue;
62  if (y + j < acc.size(0) && x + i < acc.size(1))
63  {
64  if (!acc(y+j, x+i)) continue;
65  if (acc(y+j, x+i)->getNHitLayers() > acc(y, x)->getNHitLayers()) return false;
66  if (acc(y+j, x+i)->getNHitLayers() == acc(y, x)->getNHitLayers())
67  {
68  if (acc(y+j, x+i)->getNHits() > acc(y, x)->getNHits()) return false;
69  if (acc(y+j, x+i)->getNHits() == acc(y, x)->getNHits() && j <= 0 && i <= 0) return false;
70  }
71  }
72  }
73 
74  return true;
75 }
x
#define x
lumiFormat.i
int i
Definition: lumiFormat.py:85
AthenaPoolTestRead.acc
acc
Definition: AthenaPoolTestRead.py:16
y
#define y