ATLAS Offline Software
TopFlavorTaggingCPTools.h
Go to the documentation of this file.
1 /*
2  Copyright (C) 2002-2021 CERN for the benefit of the ATLAS collaboration
3  */
4 
5 #ifndef TOPCPTOOLS_TOPFLAVORTAGGINGCPTOOLS_H_
6 #define TOPCPTOOLS_TOPFLAVORTAGGINGCPTOOLS_H_
7 
8 // Include what you use
9 #include <vector>
10 #include <string>
11 #include <map>
12 
13 // Framework include(s):
14 #include "AsgTools/AsgTool.h"
15 #include "AsgTools/ToolHandle.h"
17 #include "AsgTools/AnaToolHandle.h"
18 
20 
21 // Flavor tagging include(s):
24 // Need a pointer for excluded systematic functions
26 
27 namespace top {
28  class TopConfig;
29 
30  class FlavorTaggingCPTools final: public asg::AsgTool {
31  public:
32  explicit FlavorTaggingCPTools(const std::string& name);
33  virtual ~FlavorTaggingCPTools() {}
34 
36  private:
37  std::shared_ptr<top::TopConfig> m_config;
38  std::string m_cdi_file;
39  std::string m_calib_file_path;
40  std::string m_excluded_systs;
41  std::string m_efficiency_maps;
42  const std::vector<std::string> m_jet_flavors = {
43  "B", "C", "T", "Light"
44  };
45  // Some tools here
46  ToolHandleArray<IBTaggingEfficiencyTool> m_btagging_efficiency_tools;
47  ToolHandleArray<IBTaggingSelectionTool> m_btagging_selection_tools;
48 
58  StatusCode setupBtagSelectionTool(const std::pair<std::string, std::string>& btag_algo_WP,
59  const std::string& jetCollection,
60  double jetPtCut, double jetEtaCut,
61  bool trackJets=false);
62  // setup btagging efficiency tool, see documentation of setupBtagSelectionTool above
63  StatusCode setupBtagEfficiencyTool(const std::pair<std::string, std::string>& btag_algo_WP,
64  const std::string& jetCollection,
65  double jetPtCut,
66  bool trackJets=false);
67 
68  // workaround method to erase PV0 from VR track jet collection name
69  // needed for the currently-bugged CDI file
70  std::string erasePV0fromJetsName(std::string jetCollectionName);
71 
72  // EV decomposition functions
74  };
75 } // namespace top
76 
77 #endif // TOPCPTOOLS_TOPFLAVORTAGGINGCPTOOLS_H_
asg::AsgTool
Base class for the dual-use tool implementation classes.
Definition: AsgTool.h:47
BTaggingEfficiencyTool
Definition: BTaggingEfficiencyTool.h:33
top
TopConfig A simple configuration that is NOT a singleton.
Definition: AnalysisTrackingHelper.cxx:58
top::FlavorTaggingCPTools::m_excluded_systs
std::string m_excluded_systs
Definition: TopFlavorTaggingCPTools.h:40
BTaggingEfficiencyTool.h
top::FlavorTaggingCPTools::m_btagging_selection_tools
ToolHandleArray< IBTaggingSelectionTool > m_btagging_selection_tools
Definition: TopFlavorTaggingCPTools.h:47
top::FlavorTaggingCPTools::m_cdi_file
std::string m_cdi_file
Definition: TopFlavorTaggingCPTools.h:38
top::FlavorTaggingCPTools::setupBtagEfficiencyTool
StatusCode setupBtagEfficiencyTool(const std::pair< std::string, std::string > &btag_algo_WP, const std::string &jetCollection, double jetPtCut, bool trackJets=false)
Definition: TopFlavorTaggingCPTools.cxx:151
top::FlavorTaggingCPTools::checkExcludedSysts
StatusCode checkExcludedSysts(BTaggingEfficiencyTool *, const std::string &)
Definition: TopFlavorTaggingCPTools.cxx:207
top::FlavorTaggingCPTools::m_calib_file_path
std::string m_calib_file_path
Definition: TopFlavorTaggingCPTools.h:39
top::FlavorTaggingCPTools::m_jet_flavors
const std::vector< std::string > m_jet_flavors
Definition: TopFlavorTaggingCPTools.h:42
IBTaggingEfficiencyTool.h
ToolHandleArray.h
IBTaggingSelectionTool.h
top::FlavorTaggingCPTools::~FlavorTaggingCPTools
virtual ~FlavorTaggingCPTools()
Definition: TopFlavorTaggingCPTools.h:33
EL::StatusCode
::StatusCode StatusCode
StatusCode definition for legacy code.
Definition: PhysicsAnalysis/D3PDTools/EventLoop/EventLoop/StatusCode.h:22
top::FlavorTaggingCPTools::m_btagging_efficiency_tools
ToolHandleArray< IBTaggingEfficiencyTool > m_btagging_efficiency_tools
Definition: TopFlavorTaggingCPTools.h:46
top::FlavorTaggingCPTools::erasePV0fromJetsName
std::string erasePV0fromJetsName(std::string jetCollectionName)
Definition: TopFlavorTaggingCPTools.cxx:199
AnaToolHandle.h
name
std::string name
Definition: Control/AthContainers/Root/debug.cxx:192
top::FlavorTaggingCPTools
Definition: TopFlavorTaggingCPTools.h:30
TopConfig.h
top::FlavorTaggingCPTools::m_config
std::shared_ptr< top::TopConfig > m_config
Definition: TopFlavorTaggingCPTools.h:37
top::FlavorTaggingCPTools::FlavorTaggingCPTools
FlavorTaggingCPTools(const std::string &name)
Definition: TopFlavorTaggingCPTools.cxx:24
PhysDESDM_VH_DV.jetCollectionName
jetCollectionName
Definition: PhysDESDM_VH_DV.py:50
top::FlavorTaggingCPTools::m_efficiency_maps
std::string m_efficiency_maps
Definition: TopFlavorTaggingCPTools.h:41
ToolHandle.h
AsgTool.h
top::FlavorTaggingCPTools::initialize
StatusCode initialize()
Dummy implementation of the initialisation function.
Definition: TopFlavorTaggingCPTools.cxx:29
top::FlavorTaggingCPTools::setupBtagSelectionTool
StatusCode setupBtagSelectionTool(const std::pair< std::string, std::string > &btag_algo_WP, const std::string &jetCollection, double jetPtCut, double jetEtaCut, bool trackJets=false)
Setup BTaggingSelectionTool for a given WP.
Definition: TopFlavorTaggingCPTools.cxx:115