ATLAS Offline Software
Functions
FPGATrackSimOverlapRemovalTool.cxx File Reference
#include "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 51 of file FPGATrackSimOverlapRemovalTool.cxx.

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