ATLAS Offline Software
Loading...
Searching...
No Matches
safeDecorator.cxx
Go to the documentation of this file.
1/*
2 Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration
3*/
4
11#include "safeDecorator.h"
12#include <cmath>
13namespace IDPVM {
14 // @name roughlyEqual overloaded functions
15 // @{
16 bool
17 roughlyEqual(const int i, const int j) {
18 return i == j;
19 }
20
21 bool
22 roughlyEqual(const unsigned int i, const unsigned int j) {
23 return i == j;
24 }
25
26 bool
27 roughlyEqual(const float i, const float j) {
28 const float epsilon = 0.001 * std::min(i, j);
29
30 return(std::fabs(i - j) < epsilon);
31 }
32}
Class to retrieve associated truth from a track, implementing a cached response.
bool roughlyEqual(const int i, const int j)
implementation file for function of same name