ATLAS Offline Software
Efficiencies.h
Go to the documentation of this file.
1 /*
2  Copyright (C) 2002-2018 CERN for the benefit of the ATLAS collaboration
3 */
4 
5 // contact: jmaurer@cern.ch
6 
7 #ifndef TRIGGLOBALEFFICIENCYCORRECTION_EFFICIENCIES_H
8 #define TRIGGLOBALEFFICIENCYCORRECTION_EFFICIENCIES_H 1
9 
10 #include <utility>
11 
12 namespace TrigGlobEffCorr
13 {
14 
16 {
17 public:
18  Efficiencies() = default;
19  Efficiencies(double e) : m_effs(e,e) {}
20  Efficiencies(const Efficiencies&) = default;
21  Efficiencies(Efficiencies&&) = default;
22  Efficiencies& operator=(const Efficiencies&) = default;
24  ~Efficiencies() = default;
25  double& data() { return m_effs.first; }
26  double& mc() { return m_effs.second; }
27  double data() const { return m_effs.first; }
28  double mc() const { return m_effs.second; }
29  Efficiencies operator~() const { return Efficiencies(1. - m_effs.first, 1. - m_effs.second); }
30  Efficiencies operator+(const Efficiencies& rhs) const { return Efficiencies(m_effs.first+rhs.m_effs.first, m_effs.second+rhs.m_effs.second); }
31  Efficiencies operator-(const Efficiencies& rhs) const { return Efficiencies(m_effs.first-rhs.m_effs.first, m_effs.second-rhs.m_effs.second); }
32  Efficiencies operator*(const Efficiencies& rhs) const { return Efficiencies(m_effs.first*rhs.m_effs.first, m_effs.second*rhs.m_effs.second); }
33  Efficiencies& operator+=(const Efficiencies& rhs) { m_effs.first+=rhs.m_effs.first; m_effs.second+=rhs.m_effs.second; return *this; }
34  Efficiencies& operator*=(const Efficiencies& rhs) { m_effs.first*=rhs.m_effs.first; m_effs.second*=rhs.m_effs.second; return *this; }
35 protected:
36  Efficiencies(double vd, double vm) : m_effs(vd,vm) {}
37  std::pair<double,double> m_effs;
38 };
39 
40 }
41 
42 #endif
AllowedVariables::e
e
Definition: AsgElectronSelectorTool.cxx:37
TrigGlobEffCorr::Efficiencies::Efficiencies
Efficiencies()=default
TrigGlobEffCorr::Efficiencies::m_effs
std::pair< double, double > m_effs
Definition: Efficiencies.h:37
TrigGlobEffCorr::Efficiencies::~Efficiencies
~Efficiencies()=default
TrigGlobEffCorr
the template specializations below must be enclosed in this namespace
Definition: Calculator.cxx:1240
TrigGlobEffCorr::Efficiencies
Definition: Efficiencies.h:16
TrigGlobEffCorr::Efficiencies::Efficiencies
Efficiencies(const Efficiencies &)=default
TrigGlobEffCorr::Efficiencies::Efficiencies
Efficiencies(double vd, double vm)
Definition: Efficiencies.h:36
TrigGlobEffCorr::Efficiencies::operator~
Efficiencies operator~() const
Definition: Efficiencies.h:29
TrigGlobEffCorr::Efficiencies::operator=
Efficiencies & operator=(const Efficiencies &)=default
TrigGlobEffCorr::Efficiencies::operator+
Efficiencies operator+(const Efficiencies &rhs) const
Definition: Efficiencies.h:30
TrigGlobEffCorr::Efficiencies::data
double data() const
Definition: Efficiencies.h:27
TrigGlobEffCorr::Efficiencies::operator*
Efficiencies operator*(const Efficiencies &rhs) const
Definition: Efficiencies.h:32
TrigGlobEffCorr::Efficiencies::operator+=
Efficiencies & operator+=(const Efficiencies &rhs)
Definition: Efficiencies.h:33
TrigGlobEffCorr::Efficiencies::mc
double mc() const
Definition: Efficiencies.h:28
TrigGlobEffCorr::Efficiencies::Efficiencies
Efficiencies(double e)
Definition: Efficiencies.h:19
TrigGlobEffCorr::Efficiencies::mc
double & mc()
Definition: Efficiencies.h:26
TrigGlobEffCorr::Efficiencies::operator*=
Efficiencies & operator*=(const Efficiencies &rhs)
Definition: Efficiencies.h:34
TrigGlobEffCorr::Efficiencies::operator-
Efficiencies operator-(const Efficiencies &rhs) const
Definition: Efficiencies.h:31
TrigGlobEffCorr::Efficiencies::operator=
Efficiencies & operator=(Efficiencies &&)=default
TrigGlobEffCorr::Efficiencies::data
double & data()
Definition: Efficiencies.h:25
TrigGlobEffCorr::Efficiencies::Efficiencies
Efficiencies(Efficiencies &&)=default