ATLAS Offline Software
Functions
ECFHelper.h File Reference
#include <string>
#include <cmath>
Include dependency graph for ECFHelper.h:
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Functions

std::string GetBetaSuffix (float beta)
 

Function Documentation

◆ GetBetaSuffix()

std::string GetBetaSuffix ( float  beta)

This is a helper function that provides the suffix for ECF and ECF ratio decorations. No suffix is used for beta = 1.0 and other values are given a suffix of _BetaN where N is the value with decimal points removed. This assumes beta values of [0.0,9.9]

and that the maximum precision is 0.1.

Definition at line 10 of file ECFHelper.cxx.

10  {
11  std::string suffix = "";
12 
13  // Create suffix for beta != 1.0
14  // 10*beta is used in the suffix
15  // As long as beta < 10, this shouldn't cause any confusion
16  if(std::abs(beta-1.0) > 1.0e-5) {
17  suffix = "_Beta" + std::to_string(int(beta*10));
18  }
19 
20  return suffix;
21 }
AllowedVariables::e
e
Definition: AsgElectronSelectorTool.cxx:37
hotSpotInTAG.suffix
string suffix
Definition: hotSpotInTAG.py:186
ActsTrk::to_string
std::string to_string(const DetectorType &type)
Definition: GeometryDefs.h:34
MuonParameters::beta
@ beta
Definition: MuonParamDefs.h:144