ATLAS Offline Software
safeLogRatio.cxx
Go to the documentation of this file.
1 /*
2  Copyright (C) 2002-2022 CERN for the benefit of the ATLAS collaboration
3 */
4 
6 
7 #include <cmath>
8 
9 float safeLogRatio(float num, float denom) {
10  float ratio = (denom == 0 ? INFINITY : num / denom);
11  return ratio == 0 ? -INFINITY : std::log( ratio );
12 }
safeLogRatio
float safeLogRatio(float num, float denom)
Definition: safeLogRatio.cxx:9
compute_lumi.denom
denom
Definition: compute_lumi.py:76
trigbs_pickEvents.num
num
Definition: trigbs_pickEvents.py:76
python.compareTCTs.ratio
ratio
Definition: compareTCTs.py:295
safeLogRatio.h
python.CaloCondTools.log
log
Definition: CaloCondTools.py:20