ATLAS Offline Software
CalibrationDataInterfaceBase.h
Go to the documentation of this file.
1 /*
2  Copyright (C) 2002-2022 CERN for the benefit of the ATLAS collaboration
3 */
4 
6 // CalibrationDataInterfaceTool.h, (c) ATLAS Detector software
8 
9 //
10 // for some details on weighting event using the SF, see
11 // https://twiki.cern.ch/twiki/bin/view/AtlasProtected/TopCommonObjects#B_tagging
12 // http://indico.cern.ch/getFile.py/access?contribId=4&resId=0&materialId=slides&confId=106205
13 // http://cdsweb.cern.ch/record/1269912
14 //
15 
16 #ifndef ANALYSISCALIBRATIONDATAINTERFACEBASE_H
17 #define ANALYSISCALIBRATIONDATAINTERFACEBASE_H
18 
19 //#include "Rtypes.h"
20 #include "TNamed.h"
21 #include <vector>
22 #include <string>
23 #include <map>
24 #include <utility>
25 #include <algorithm>
26 
27 class TF1;
28 
29 namespace Analysis
30 {
31 
32  const double CalibZERO = 1.e-6;
33  const double dummyValue = -1.;
34  typedef std::pair<double,double> CalibResult;
35  // The following result is returned upon error
37  // const CalibResult dummyResult(std::make_pair(dummyValue,dummyValue));
38 
47  class CalibrationDataInterfaceBase : public TNamed {
48  public:
50 
52  virtual ~CalibrationDataInterfaceBase() = 0;
53 
60  const std::string& EffCalibrationName(const std::string& flavour, unsigned int mapIndex = 0) const;
61  void setEffCalibrationNames(const std::map<std::string, std::vector<std::string> >& names);
62 
63  const std::string& SFCalibrationName(const std::string& flavour) const;
64  void setSFCalibrationNames(const std::map<std::string, std::string>& names);
65 
68 
69  private:
70 
72  std::map<std::string, std::vector<std::string> > m_calibrationEffNames;
73  std::map<std::string, std::string> m_calibrationSFNames;
74 
75  protected:
76 
77  // /** @brief auxiliary function for string concatenation */
78  // std::string getBasename (const std::string& OP, const std::string& flavour,
79  // const std::string& extra, bool SF, unsigned int mapIndex = 0) const;
80 
82  std::string getContainername (const std::string& flavour,
83  bool SF, unsigned int mapIndex = 0) const;
84 
86  std::string getBasename (const std::string& name) const;
87 
91  double combinedUncertainty (double stat, const std::pair<double, double>& syst) const;
92 
94  std::string m_taggerName;
95 
96  // make it possible to persistify this class (for PROOF purposes)
98  };
99 } // end of namespace
100 
101 #endif
Analysis::CalibResult
std::pair< double, double > CalibResult
Definition: CalibrationDataInterfaceBase.h:34
Analysis::CalibrationDataInterfaceBase::EffCalibrationName
const std::string & EffCalibrationName(const std::string &flavour, unsigned int mapIndex=0) const
Main interface methods accessing the flavour tagging performance information.
Definition: CalibrationDataInterfaceBase.cxx:47
Analysis::CalibrationDataInterfaceBase::m_calibrationEffNames
std::map< std::string, std::vector< std::string > > m_calibrationEffNames
this simply collects the per-flavour properties.
Definition: CalibrationDataInterfaceBase.h:72
Analysis::dummyResult
const CalibResult dummyResult(dummyValue, dummyValue)
Analysis::CalibrationDataInterfaceBase::kAbsEta
@ kAbsEta
Definition: CalibrationDataInterfaceBase.h:67
Analysis::CalibrationDataInterfaceBase
Definition: CalibrationDataInterfaceBase.h:47
Analysis::CalibrationDataInterfaceBase::m_calibrationSFNames
std::map< std::string, std::string > m_calibrationSFNames
Definition: CalibrationDataInterfaceBase.h:73
TRT_PAI_gasdata::SF
const float SF[NF]
Cross sections for Fluor.
Definition: TRT_PAI_gasdata.h:285
Analysis::CalibrationDataInterfaceBase::~CalibrationDataInterfaceBase
virtual ~CalibrationDataInterfaceBase()=0
default destructor
Definition: CalibrationDataInterfaceBase.cxx:41
Analysis::CalibrationDataInterfaceBase::SFCalibrationName
const std::string & SFCalibrationName(const std::string &flavour) const
Definition: CalibrationDataInterfaceBase.cxx:72
Analysis::dummyValue
const double dummyValue
Definition: CalibrationDataInterfaceBase.h:33
Analysis::CalibrationDataInterfaceBase::m_taggerName
std::string m_taggerName
tagging algorithm name
Definition: CalibrationDataInterfaceBase.h:94
Analysis::CalibrationDataInterfaceBase::CalibrationDataInterfaceBase
CalibrationDataInterfaceBase()
Analysis::CalibrationDataInterfaceBase::kEta
@ kEta
Definition: CalibrationDataInterfaceBase.h:67
Analysis::CalibrationDataInterfaceBase::combinedUncertainty
double combinedUncertainty(double stat, const std::pair< double, double > &syst) const
utility function for combination of statistical and (a priori asymmetric) systematic uncertainty.
Definition: CalibrationDataInterfaceBase.cxx:147
python.subdetectors.mmg.names
names
Definition: mmg.py:8
beamspotman.stat
stat
Definition: beamspotman.py:266
Analysis::CalibrationDataInterfaceBase::setEffCalibrationNames
void setEffCalibrationNames(const std::map< std::string, std::vector< std::string > > &names)
Definition: CalibrationDataInterfaceBase.cxx:63
Analysis
The namespace of all packages in PhysicsAnalysis/JetTagging.
Definition: BTaggingCnvAlg.h:20
name
std::string name
Definition: Control/AthContainers/Root/debug.cxx:221
Analysis::CalibrationDataInterfaceBase::getContainername
std::string getContainername(const std::string &flavour, bool SF, unsigned int mapIndex=0) const
auxiliary function for retrieval of container name
Definition: CalibrationDataInterfaceBase.cxx:118
Analysis::CalibrationDataInterfaceBase::setSFCalibrationNames
void setSFCalibrationNames(const std::map< std::string, std::string > &names)
Definition: CalibrationDataInterfaceBase.cxx:87
Analysis::CalibrationDataInterfaceBase::kPt
@ kPt
Definition: CalibrationDataInterfaceBase.h:67
Analysis::CalibrationDataInterfaceBase::variableType
variableType
known variable types that can be used as function arguments
Definition: CalibrationDataInterfaceBase.h:67
Analysis::CalibZERO
const double CalibZERO
Definition: CalibrationDataInterfaceBase.h:32
Analysis::CalibrationDataInterfaceBase::getBasename
std::string getBasename(const std::string &name) const
auxiliary function for retrieval of name within the directory
Definition: CalibrationDataInterfaceBase.cxx:138