ATLAS Offline Software
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>
13 namespace 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 }
IDPVM
Class to retrieve associated truth from a track, implementing a cached response.
Definition: InDetPhysValMonitoringTool.h:55
safeDecorator.h
lumiFormat.i
int i
Definition: lumiFormat.py:92
min
#define min(a, b)
Definition: cfImp.cxx:40
IDPVM::roughlyEqual
bool roughlyEqual(const int i, const int j)
Definition: safeDecorator.cxx:17