ATLAS Offline Software
SUSYToolsAlg.h
Go to the documentation of this file.
1 // -*- C++ -*-
2 
3 /*
4  Copyright (C) 2002-2024 CERN for the benefit of the ATLAS collaboration
5 */
6 
7 // SUSYToolsAlg.h
8 
9 #ifndef SUSYToolsAlg_H
10 #define SUSYToolsAlg_H
11 
12 // Base class
14 
15 // Tool handles
16 #include "AsgTools/AnaToolHandle.h"
17 
18 // For SystInfo needs to be included
20 // GRL
24 
25 
26 // Timing
27 #include "TStopwatch.h"
28 #include "TEfficiency.h"
29 
30 // Standard library includes
31 #include <string>
32 #include <vector>
33 
34 // Need truth matching for TauJet CP tools
35 namespace TauAnalysisTools {
36  class ITauTruthMatchingTool;
37 }
38 
39 // Define ConstAccessors
40 namespace STAlg {
41  const static SG::AuxElement::ConstAccessor<float> acc_ptvarcone30_TTVA_LooseCone("ptvarcone30_Nonprompt_All_MaxWeightTTVALooseCone_pt1000");
42  const static SG::AuxElement::ConstAccessor<float> acc_ptvarcone30_TTVA("ptvarcone30_Nonprompt_All_MaxWeightTTVA_pt1000");
43  const static SG::AuxElement::ConstAccessor<float> acc_topoetcone20("topoetcone20");
44  const static SG::AuxElement::ConstAccessor<float> acc_topoetcone40("topoetcone40");
45  const static SG::AuxElement::ConstAccessor<float> acc_ptcone20("ptcone20");
46  const static SG::AuxElement::ConstAccessor<char> acc_IsTruthMatched("IsTruthMatched");
47  const static SG::AuxElement::ConstAccessor<ElementLink<xAOD::TruthParticleContainer>> acc_truthParticleLink("truthParticleLink");
48  const static SG::AuxElement::ConstAccessor<float> acc_RNNJetScoreSigTrans("RNNJetScoreSigTrans");
49 }
50 
52 
53  public:
54 
55  // Constructor with parameters:
56  SUSYToolsAlg(const std::string& name, ISvcLocator* pSvcLocator);
57 
58  // Destructor:
59  ~SUSYToolsAlg();
60 
61  // Athena algorithm's Hooks
65 
66  private:
67 
68  // Default constructor:
70 
71  // helper functions
72  void groupSysts(void);
74  void stdHistsForObj(xAOD::IParticle *obj, const std::string& objtype, const std::string& objlevel, std::map<std::string,std::string> config = std::map<std::string,std::string>());
75 
76  // configuration and main tools
77  std::vector<std::string> m_GRLFiles;
78  std::string m_mcCampaign;
79  std::map<std::string,bool> m_slices;
80  std::map<std::string,TH1*> m_hists;
81  std::map<std::string,TEfficiency*> m_heffs;
82  std::map<std::string,std::string> m_configDict;
83 
87 
88  unsigned int m_Nevts;
89  int m_maxEvts;
92  std::string m_kernel;
93  std::string m_configFile;
94  std::string m_FatJetCollection;
95  std::string m_TrkJetCollection;
96  std::string m_TrkJetTimeStamp;
97 
98  // systematics
99  bool m_doSyst;
100  std::vector<ST::SystInfo> m_sysInfoList;
101  std::map<std::string,std::vector<std::string>> m_syst_all, m_syst_weights;
102 
103  // timing
104  TStopwatch m_clock0;
105  TStopwatch m_clock1;
106  TStopwatch m_clock2;
107 
108  // triggers
109  std::map<std::string,std::vector<std::string>> m_triggers;
110 
111  // histograms and counts
112  std::vector<std::string> m_objects;
113  std::vector<std::string> m_levels;
114  std::vector<std::string> m_vars;
115  std::map<std::string,std::map<std::string,int>> m_obj_count;
116 
121 
126 
127 };
128 
129 #endif
STAlg
Definition: SUSYToolsAlg.h:40
TauAnalysisTools
Definition: TruthCollectionMakerTau.h:16
SUSYToolsAlg::m_grl
asg::AnaToolHandle< IGoodRunsListSelectionTool > m_grl
Definition: SUSYToolsAlg.h:85
IGoodRunsListSelectionTool.h
asg::AnaToolHandle< ST::ISUSYObjDef_xAODTool >
SUSYToolsAlg::stdHistsForObj
void stdHistsForObj(xAOD::IParticle *obj, const std::string &objtype, const std::string &objlevel, std::map< std::string, std::string > config=std::map< std::string, std::string >())
Definition: SUSYToolsAlg.cxx:1470
SUSYToolsAlg::m_metcst_syst
xAOD::MissingETContainer * m_metcst_syst
Definition: SUSYToolsAlg.h:119
SUSYToolsAlg::m_mettst_nominal
xAOD::MissingETContainer * m_mettst_nominal
Definition: SUSYToolsAlg.h:124
SUSYToolsAlg::m_FatJetCollection
std::string m_FatJetCollection
Definition: SUSYToolsAlg.h:94
SUSYToolsAlg
Definition: SUSYToolsAlg.h:51
SUSYToolsAlg::m_clock0
TStopwatch m_clock0
Definition: SUSYToolsAlg.h:104
SG::ConstAccessor
Helper class to provide constant type-safe access to aux data.
Definition: ConstAccessor.h:55
SUSYToolsAlg::m_mettst_nominal_aux
xAOD::MissingETAuxContainer * m_mettst_nominal_aux
Definition: SUSYToolsAlg.h:125
xAOD::IParticle
Class providing the definition of the 4-vector interface.
Definition: Event/xAOD/xAODBase/xAODBase/IParticle.h:41
SUSYToolsAlg::m_sysInfoList
std::vector< ST::SystInfo > m_sysInfoList
Definition: SUSYToolsAlg.h:100
SUSYToolsAlg::SUSYToolsAlg
SUSYToolsAlg()
SUSYToolsAlg::groupSysts
void groupSysts(void)
Definition: SUSYToolsAlg.cxx:1444
config
Definition: PhysicsAnalysis/AnalysisCommon/AssociationUtils/python/config.py:1
SUSYToolsAlg::m_mcCampaign
std::string m_mcCampaign
Definition: SUSYToolsAlg.h:78
AnaAlgorithm.h
SUSYToolsAlg::m_doSyst
bool m_doSyst
Definition: SUSYToolsAlg.h:99
SUSYToolsAlg::m_slices
std::map< std::string, bool > m_slices
Definition: SUSYToolsAlg.h:79
SUSYToolsAlg::m_mettst_syst_aux
xAOD::MissingETAuxContainer * m_mettst_syst_aux
Definition: SUSYToolsAlg.h:118
EL::AnaAlgorithm
the (new) base class for EventLoop algorithms
Definition: AnaAlgorithm.h:73
SUSYToolsAlg::m_metcst_syst_aux
xAOD::MissingETAuxContainer * m_metcst_syst_aux
Definition: SUSYToolsAlg.h:120
SUSYToolsAlg::m_syst_all
std::map< std::string, std::vector< std::string > > m_syst_all
Definition: SUSYToolsAlg.h:101
SUSYToolsAlg::m_vars
std::vector< std::string > m_vars
Definition: SUSYToolsAlg.h:114
SUSYToolsAlg::m_metcst_nominal
xAOD::MissingETContainer * m_metcst_nominal
Definition: SUSYToolsAlg.h:122
EL::StatusCode
::StatusCode StatusCode
StatusCode definition for legacy code.
Definition: PhysicsAnalysis/D3PDTools/EventLoop/EventLoop/StatusCode.h:22
MissingETAuxContainer.h
SUSYToolsAlg::m_syst_weights
std::map< std::string, std::vector< std::string > > m_syst_weights
Definition: SUSYToolsAlg.h:101
SUSYToolsAlg::m_kernel
std::string m_kernel
Definition: SUSYToolsAlg.h:92
SUSYToolsAlg::finalize
StatusCode finalize()
Definition: SUSYToolsAlg.cxx:257
SUSYToolsAlg::m_tauTruthMatchingTool
asg::AnaToolHandle< TauAnalysisTools::ITauTruthMatchingTool > m_tauTruthMatchingTool
Definition: SUSYToolsAlg.h:86
SUSYToolsAlg::m_Nevts
unsigned int m_Nevts
Definition: SUSYToolsAlg.h:88
SUSYToolsAlg::m_configFile
std::string m_configFile
Definition: SUSYToolsAlg.h:93
xAOD::MissingETAuxContainer_v1
Auxiliary data store for xAOD::MissingETContainer.
Definition: MissingETAuxContainer_v1.h:20
SUSYToolsAlg::m_objects
std::vector< std::string > m_objects
Definition: SUSYToolsAlg.h:112
SUSYToolsAlg::m_obj_count
std::map< std::string, std::map< std::string, int > > m_obj_count
Definition: SUSYToolsAlg.h:115
SUSYToolsAlg::m_SUSYTools
asg::AnaToolHandle< ST::ISUSYObjDef_xAODTool > m_SUSYTools
Definition: SUSYToolsAlg.h:84
SUSYToolsAlg::execute
StatusCode execute()
Definition: SUSYToolsAlg.cxx:303
SUSYToolsAlg::m_TrkJetTimeStamp
std::string m_TrkJetTimeStamp
Definition: SUSYToolsAlg.h:96
AnaToolHandle.h
SUSYToolsAlg::bookHistograms
StatusCode bookHistograms(void)
Definition: SUSYToolsAlg.cxx:1320
SUSYToolsAlg::m_mettst_syst
xAOD::MissingETContainer * m_mettst_syst
Definition: SUSYToolsAlg.h:117
xAOD::MissingETContainer_v1
Container for xAOD::MissingET_v1 objects.
Definition: MissingETContainer_v1.h:21
SUSYToolsAlg::m_GRLFiles
std::vector< std::string > m_GRLFiles
Definition: SUSYToolsAlg.h:77
SUSYToolsAlg::m_maxEvts
int m_maxEvts
Definition: SUSYToolsAlg.h:89
SUSYToolsAlg::initialize
StatusCode initialize()
Definition: SUSYToolsAlg.cxx:104
name
std::string name
Definition: Control/AthContainers/Root/debug.cxx:221
SUSYToolsAlg::m_triggers
std::map< std::string, std::vector< std::string > > m_triggers
Definition: SUSYToolsAlg.h:109
SUSYToolsAlg::m_isPHYSLITE
bool m_isPHYSLITE
Definition: SUSYToolsAlg.h:91
SUSYToolsAlg::m_configDict
std::map< std::string, std::string > m_configDict
Definition: SUSYToolsAlg.h:82
SUSYToolsAlg::m_TrkJetCollection
std::string m_TrkJetCollection
Definition: SUSYToolsAlg.h:95
SUSYToolsAlg::m_clock2
TStopwatch m_clock2
Definition: SUSYToolsAlg.h:106
SUSYToolsAlg::m_metcst_nominal_aux
xAOD::MissingETAuxContainer * m_metcst_nominal_aux
Definition: SUSYToolsAlg.h:123
SUSYToolsAlg::m_levels
std::vector< std::string > m_levels
Definition: SUSYToolsAlg.h:113
SUSYToolsAlg::m_lbfilter
int m_lbfilter
Definition: SUSYToolsAlg.h:90
SUSYToolsAlg::m_hists
std::map< std::string, TH1 * > m_hists
Definition: SUSYToolsAlg.h:80
ISUSYObjDef_xAODTool.h
SUSYToolsAlg::~SUSYToolsAlg
~SUSYToolsAlg()
Definition: SUSYToolsAlg.cxx:100
python.PyAthena.obj
obj
Definition: PyAthena.py:132
SUSYToolsAlg::m_clock1
TStopwatch m_clock1
Definition: SUSYToolsAlg.h:105
MissingETContainer.h
SUSYToolsAlg::m_heffs
std::map< std::string, TEfficiency * > m_heffs
Definition: SUSYToolsAlg.h:81