Loading [MathJax]/extensions/tex2jax.js
ATLAS Offline Software
All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Modules Pages
TauWPDecorator.h
Go to the documentation of this file.
1 /*
2  Copyright (C) 2002-2025 CERN for the benefit of the ATLAS collaboration
3 */
4 
5 #ifndef TAURECTOOLS_TAUWPDECORATOR_H
6 #define TAURECTOOLS_TAUWPDECORATOR_H
7 
9 
10 #include "xAODTau/TauDefs.h"
14 
15 #include <utility>
16 #include <memory>
17 #include <vector>
18 #include <map>
19 
20 class TH2;
21 
36  public:
37 
39 
40 
41  TauWPDecorator(const std::string& name="TauWPDecorator");
42 
45 
47  virtual StatusCode initialize() override;
48 
50  virtual StatusCode execute(xAOD::TauJet& tau) const override;
51 
52  private:
53 
58  StatusCode retrieveHistos(int nProng);
59 
64  StatusCode storeLimits(int nProng);
65 
74  double transformScore(double score, double cutLow, double effLow, double cutHigh, double effHigh) const;
75 
76  // properties
77  Gaudi::Property<bool> m_useAbsEta{this, "UseAbsEta", false};
78  Gaudi::Property<bool> m_defineWPs{this, "DefineWPs", false};
79  Gaudi::Property<std::string> m_scoreName{this, "ScoreName", ""};
80  Gaudi::Property<std::string> m_scoreNameTrans{this, "NewScoreName", ""};
81  Gaudi::Property<std::string> m_file0p{this, "flatteningFile0Prong", ""};
82  Gaudi::Property<std::string> m_file1p{this, "flatteningFile1Prong", ""};
83  Gaudi::Property<std::string> m_file2p{this, "flatteningFile2Prong", ""};
84  Gaudi::Property<std::string> m_file3p{this, "flatteningFile3Prong", ""};
85  Gaudi::Property<std::vector<int>> m_EDMWPs{this, "CutEnumVals", {}};
86  Gaudi::Property<std::vector<float>> m_EDMWPEffs0p{this, "SigEff0P", {}};
87  Gaudi::Property<std::vector<float>> m_EDMWPEffs1p{this, "SigEff1P", {}};
88  Gaudi::Property<std::vector<float>> m_EDMWPEffs2p{this, "SigEff2P", {}};
89  Gaudi::Property<std::vector<float>> m_EDMWPEffs3p{this, "SigEff3P", {}};
90  Gaudi::Property<std::vector<std::string>> m_decorWPs{this, "DecorWPNames", {}};
91  Gaudi::Property<std::vector<float>> m_decorWPEffs0p{this, "DecorWPCutEffs0P", {}};
92  Gaudi::Property<std::vector<float>> m_decorWPEffs1p{this, "DecorWPCutEffs1P", {}};
93  Gaudi::Property<std::vector<float>> m_decorWPEffs2p{this, "DecorWPCutEffs2P", {}};
94  Gaudi::Property<std::vector<float>> m_decorWPEffs3p{this, "DecorWPCutEffs3P", {}};
95 
96  std::vector<SG::Accessor<char>> m_charDecors;
97 
99  "averageInteractionsPerCrossingKey",
100  "EventInfo.averageInteractionsPerCrossing",
101  "Decoration for Average Interaction Per Crossing"};
102 
103  typedef std::pair<double, std::shared_ptr<TH2> > m_pair_t;
104 
105  std::shared_ptr<std::vector<m_pair_t>> m_hists0p;
106  std::shared_ptr<std::vector<m_pair_t>> m_hists1p;
107  std::shared_ptr<std::vector<m_pair_t>> m_hists2p;
108  std::shared_ptr<std::vector<m_pair_t>> m_hists3p;
109 
110  std::map<int, double> m_xMin;
111  std::map<int, double> m_yMin;
112  std::map<int, double> m_xMax;
113  std::map<int, double> m_yMax;
114 };
115 
116 #endif // TAURECTOOLS_TAUWPDECORATOR_H
TauWPDecorator
Implementation of tool to decorate flattened BDT score and working points.
Definition: TauWPDecorator.h:35
PropertyWrapper.h
TauWPDecorator::m_yMax
std::map< int, double > m_yMax
Map of n-prong and the maximum value of y variables.
Definition: TauWPDecorator.h:113
TauWPDecorator::m_EDMWPEffs2p
Gaudi::Property< std::vector< float > > m_EDMWPEffs2p
Definition: TauWPDecorator.h:88
ASG_TOOL_CLASS2
#define ASG_TOOL_CLASS2(CLASSNAME, INT1, INT2)
Definition: AsgToolMacros.h:77
TauWPDecorator::m_decorWPs
Gaudi::Property< std::vector< std::string > > m_decorWPs
Definition: TauWPDecorator.h:90
TauWPDecorator::m_EDMWPEffs3p
Gaudi::Property< std::vector< float > > m_EDMWPEffs3p
Definition: TauWPDecorator.h:89
TauRecToolBase.h
TauRecToolBase
The base class for all tau tools.
Definition: TauRecToolBase.h:21
TauWPDecorator::m_xMax
std::map< int, double > m_xMax
Map of n-prong and the maximum value of x variables.
Definition: TauWPDecorator.h:112
TauWPDecorator::~TauWPDecorator
~TauWPDecorator()
Destructor.
Definition: TauWPDecorator.cxx:20
TauWPDecorator::transformScore
double transformScore(double score, double cutLow, double effLow, double cutHigh, double effHigh) const
Obtain the flattened score.
Definition: TauWPDecorator.cxx:124
TauWPDecorator::initialize
virtual StatusCode initialize() override
Initialization of this tool.
Definition: TauWPDecorator.cxx:131
TauWPDecorator::m_decorWPEffs0p
Gaudi::Property< std::vector< float > > m_decorWPEffs0p
Definition: TauWPDecorator.h:91
TauWPDecorator::m_EDMWPEffs0p
Gaudi::Property< std::vector< float > > m_EDMWPEffs0p
Definition: TauWPDecorator.h:86
TauWPDecorator::m_hists1p
std::shared_ptr< std::vector< m_pair_t > > m_hists1p
Efficiency and corresponding score distributions of 1-prong taus.
Definition: TauWPDecorator.h:106
ReadDecorHandleKey.h
Property holding a SG store/key/clid/attr name from which a ReadDecorHandle is made.
TauWPDecorator::m_EDMWPs
Gaudi::Property< std::vector< int > > m_EDMWPs
Definition: TauWPDecorator.h:85
TauWPDecorator::m_decorWPEffs1p
Gaudi::Property< std::vector< float > > m_decorWPEffs1p
Definition: TauWPDecorator.h:92
TauWPDecorator::m_aveIntPerXKey
SG::ReadDecorHandleKey< xAOD::EventInfo > m_aveIntPerXKey
Definition: TauWPDecorator.h:98
TauDefs.h
TauWPDecorator::m_scoreName
Gaudi::Property< std::string > m_scoreName
Definition: TauWPDecorator.h:79
TauWPDecorator::TauWPDecorator
TauWPDecorator(const std::string &name="TauWPDecorator")
Constructor.
Definition: TauWPDecorator.cxx:15
EL::StatusCode
::StatusCode StatusCode
StatusCode definition for legacy code.
Definition: PhysicsAnalysis/D3PDTools/EventLoop/EventLoop/StatusCode.h:22
TauWPDecorator::m_hists0p
std::shared_ptr< std::vector< m_pair_t > > m_hists0p
Efficiency and corresponding score distributions of 0-prong taus.
Definition: TauWPDecorator.h:105
xAOD::TauJet_v3
Class describing a tau jet.
Definition: TauJet_v3.h:41
TauWPDecorator::m_charDecors
std::vector< SG::Accessor< char > > m_charDecors
Definition: TauWPDecorator.h:96
TauWPDecorator::m_xMin
std::map< int, double > m_xMin
Map of n-prong and the minimum value of x variables.
Definition: TauWPDecorator.h:110
TauWPDecorator::storeLimits
StatusCode storeLimits(int nProng)
Obtain the limit of the dependent variables.
Definition: TauWPDecorator.cxx:78
TauWPDecorator::m_EDMWPEffs1p
Gaudi::Property< std::vector< float > > m_EDMWPEffs1p
Definition: TauWPDecorator.h:87
TauWPDecorator::m_hists2p
std::shared_ptr< std::vector< m_pair_t > > m_hists2p
Efficiency and corresponding score distributions of 2-prong taus.
Definition: TauWPDecorator.h:107
TauWPDecorator::m_file3p
Gaudi::Property< std::string > m_file3p
Definition: TauWPDecorator.h:84
TauWPDecorator::m_file2p
Gaudi::Property< std::string > m_file2p
Definition: TauWPDecorator.h:83
TauWPDecorator::m_file0p
Gaudi::Property< std::string > m_file0p
Definition: TauWPDecorator.h:81
TauWPDecorator::m_file1p
Gaudi::Property< std::string > m_file1p
Definition: TauWPDecorator.h:82
TauWPDecorator::execute
virtual StatusCode execute(xAOD::TauJet &tau) const override
Executation of this tool.
Definition: TauWPDecorator.cxx:171
TauWPDecorator::m_yMin
std::map< int, double > m_yMin
Map of n-prong and the minimum value of y variables.
Definition: TauWPDecorator.h:111
TauWPDecorator::m_useAbsEta
Gaudi::Property< bool > m_useAbsEta
Definition: TauWPDecorator.h:77
name
std::string name
Definition: Control/AthContainers/Root/debug.cxx:240
ITauToolBase
The base class for all tau tools.
Definition: ITauToolBase.h:30
EventInfo.h
xAOD::score
@ score
Definition: TrackingPrimitives.h:514
TauWPDecorator::m_scoreNameTrans
Gaudi::Property< std::string > m_scoreNameTrans
Definition: TauWPDecorator.h:80
TauWPDecorator::m_decorWPEffs3p
Gaudi::Property< std::vector< float > > m_decorWPEffs3p
Definition: TauWPDecorator.h:94
SG::ReadDecorHandleKey
Property holding a SG store/key/clid/attr name from which a ReadDecorHandle is made.
Definition: StoreGate/StoreGate/ReadDecorHandleKey.h:85
TauWPDecorator::m_defineWPs
Gaudi::Property< bool > m_defineWPs
Definition: TauWPDecorator.h:78
TauWPDecorator::m_hists3p
std::shared_ptr< std::vector< m_pair_t > > m_hists3p
Efficiency and corresponding score distributions of 3-prong taus.
Definition: TauWPDecorator.h:108
TauWPDecorator::retrieveHistos
StatusCode retrieveHistos(int nProng)
Retrieve the histograms containing BDT/RNN score distributions as a function of dependent variables.
Definition: TauWPDecorator.cxx:24
TauWPDecorator::m_decorWPEffs2p
Gaudi::Property< std::vector< float > > m_decorWPEffs2p
Definition: TauWPDecorator.h:93
TauWPDecorator::m_pair_t
std::pair< double, std::shared_ptr< TH2 > > m_pair_t
Definition: TauWPDecorator.h:103