ATLAS Offline Software
JSSWTopTaggerDNN.cxx
Go to the documentation of this file.
1 /*
2  Copyright (C) 2002-2023 CERN for the benefit of the ATLAS collaboration
3 */
4 
6 
7 #include <fstream>
8 
9 JSSWTopTaggerDNN::JSSWTopTaggerDNN( const std::string& name ) :
11  m_lwnn(nullptr)
12 {
13 
14 }
15 
18 
19  ATH_MSG_INFO( "Initializing JSSWTopTaggerDNN tool" );
20 
22  m_ptGeV = true;
23 
25  m_useMassCut = true;
26 
28  m_useScoreCut = true;
29 
30  if ( ! m_configFile.empty() ) {
31 
34 
36  m_tagType = m_configReader.GetValue("TaggerType" ,"");
37 
40  m_kerasCalibArea = m_configReader.GetValue("CalibAreaKeras" ,"");
41 
43  m_kerasConfigFileName = m_configReader.GetValue("KerasConfigFile" ,"");
44 
46  m_kerasConfigOutputName = m_configReader.GetValue("KerasOutput" ,"");
47 
49  m_strMassCutLow = m_configReader.GetValue("MassCutLow" ,"");
50  m_strMassCutHigh = m_configReader.GetValue("MassCutHigh" ,"");
51  m_strScoreCut = m_configReader.GetValue("ScoreCut" ,"");
52 
54  m_jetPtMin = m_configReader.GetValue("pTCutLow", 350.0);
55  m_jetPtMax = m_configReader.GetValue("pTCutHigh", 4000.0);
56 
58  m_decorationName = m_configReader.GetValue("DecorationName" ,"");
59 
61  m_calcSF = m_configReader.GetValue("CalcSF", false);
62  if ( m_calcSF ) {
63  m_weightDecorationName = m_configReader.GetValue("WeightDecorationName", "");
64  m_weightFileName = m_configReader.GetValue("WeightFile", "");
65  m_weightHistogramName = m_configReader.GetValue("WeightHistogramName", "");
66  m_efficiencyHistogramName = m_configReader.GetValue("EfficiencyHistogramName", "");
67  m_weightFlavors = m_configReader.GetValue("WeightFlavors", "");
68 
70  m_truthLabelName = m_configReader.GetValue("TruthLabelName" , "R10TruthLabel_R21Consolidated");
71  }
72 
74  ATH_MSG_INFO( "Configurations Loaded :");
75  ATH_MSG_INFO( "tagType : " << m_tagType );
76  ATH_MSG_INFO( "calibarea_keras : " << m_kerasCalibArea );
77  ATH_MSG_INFO( "kerasConfigFileName : " << m_kerasConfigFileName );
78  ATH_MSG_INFO( "kerasConfigOutputName : " << m_kerasConfigOutputName );
79  ATH_MSG_INFO( "strMassCutLow : " << m_strMassCutLow );
80  ATH_MSG_INFO( "strMassCutHigh : " << m_strMassCutHigh );
81  ATH_MSG_INFO( "pTCutLow : " << m_jetPtMin );
82  ATH_MSG_INFO( "pTCutHigh : " << m_jetPtMax );
83  ATH_MSG_INFO( "strScoreCut : " << m_strScoreCut );
84  ATH_MSG_INFO( "decorationName : " << m_decorationName );
85  if ( m_calcSF ) {
86  ATH_MSG_INFO( "weightDecorationName : " << m_weightDecorationName );
87  ATH_MSG_INFO( "weightFile : " << m_weightFileName );
88  ATH_MSG_INFO( "weightHistogramName : " << m_weightHistogramName );
89  ATH_MSG_INFO( "efficiencyHistogramName : "<<m_efficiencyHistogramName );
90  ATH_MSG_INFO( "weightFlavors : " << m_weightFlavors );
91  ATH_MSG_INFO( "TruthLabelName : " << m_truthLabelName );
92  }
93  }
94  else {
95  if ( (m_kerasConfigFileName.empty() ||
98  m_kerasConfigOutputName.empty() ||
99  m_strScoreCut.empty() ||
100  m_strMassCutLow.empty() ||
101  m_strMassCutHigh.empty() ||
102  m_decorationName.empty() ||
103  m_weightFileName.empty()) ||
104  ((m_weightDecorationName.empty() ||
105  m_weightHistogramName.empty() ||
106  m_weightFlavors.empty()) && m_calcSF)
107  )
108  {
109  ATH_MSG_ERROR( "No config file provided OR you haven't manually specified all needed parameters" ) ;
110  ATH_MSG_ERROR( "Please read the TWiki for this tool" );
111  return StatusCode::FAILURE;
112  }
113 
114  }
115 
116  ATH_MSG_INFO( "Mass cut low : " << m_strMassCutLow );
117  ATH_MSG_INFO( "Mass cut High : " << m_strMassCutHigh );
118  ATH_MSG_INFO( "Score cut low : " << m_strScoreCut );
119 
121  if ( m_kerasCalibArea.empty() ) {
122  ATH_MSG_ERROR( "You need to specify where the calibarea is as either being Local or on CVMFS" );
123  return StatusCode::FAILURE;
124  }
125  else if ( !m_kerasCalibArea.compare("Local") ){
126  std::string localCalibArea = "BoostedJetTaggers/JSSWTopTaggerDNN/";
127  ATH_MSG_INFO( "Using Local calibarea " << localCalibArea );
130  if ( m_calcSF )
132  }
133  else {
134  ATH_MSG_INFO( "Using CVMFS calibarea" );
138  if ( m_calcSF )
140  }
141 
143  ATH_MSG_INFO( "DNN Tagger configured with: " << m_kerasConfigFilePath );
144 
145  std::ifstream input_cfg( m_kerasConfigFilePath.c_str() );
146 
147  if ( !input_cfg.is_open() ) {
148  ATH_MSG_ERROR( "Error openning config file: " << m_kerasConfigFilePath );
149  ATH_MSG_ERROR( "Are you sure that the file exists at this path?" );
150  return StatusCode::FAILURE;
151  }
152 
153  lwt::JSONConfig cfg = lwt::parse_json( input_cfg );
154 
155  ATH_MSG_INFO( "Keras Network NLayers: " << cfg.layers.size() );
156 
157  m_lwnn = std::make_unique<lwt::LightweightNeuralNetwork>(cfg.inputs, cfg.layers, cfg.outputs);
158 
160  if ( !m_tagType.compare("TopQuark") ) {
161  ATH_MSG_DEBUG( "This is a top quark tagger" );
162  m_tagClass = TAGCLASS::TopQuark;
163  }
164  else if ( !m_tagType.compare("WBoson") ) {
165  ATH_MSG_DEBUG( "This is a W boson tagger" );
167  }
168  else if ( !m_tagType.compare("ZBoson") ) {
169  ATH_MSG_DEBUG( "This is a Z boson tagger" );
171  }
172  else {
173  ATH_MSG_ERROR( "I can't tell what kind of tagger your configuration is for." );
174  return StatusCode::FAILURE;
175  }
176 
178  m_acceptInfo.addCut( "PassMassLow" , "mJet > mCutLow" );
179  m_acceptInfo.addCut( "PassScore" , "ScoreJet > ScoreCut" );
181  m_acceptInfo.addCut( "PassMassHigh", "mJet < mCutHigh" );
182  }
183 
185  printCuts();
186 
189 
190 #ifndef XAOD_STANDALONE
199  }
200 #endif
201 
202  ATH_MSG_INFO( "DNN Tagger tool initialized" );
203 
204  return StatusCode::SUCCESS;
205 
206 }
207 
209 
210  ATH_MSG_DEBUG( "Obtaining DNN result" );
211 
213  asg::AcceptData acceptData( &m_acceptInfo );
214 
216  ATH_CHECK( resetCuts( acceptData ) );
217 
219  ATH_CHECK( checkKinRange( jet, acceptData ) );
220 
223  float jet_pt = jet.pt()/1000.0;
224  float jet_mass = jet.m()/1000.0;
225 
227  float jet_score = getScore(jet);
228 
230  float cut_mass_low = m_funcMassCutLow ->Eval(jet_pt);
231  float cut_mass_high = m_funcMassCutHigh->Eval(jet_pt);
232  float cut_score = m_funcScoreCut ->Eval(jet_pt);
233 
235  ATH_MSG_VERBOSE( "Cut values : Mass window = [" << cut_mass_low << "," << cut_mass_high << "], score cut = " << cut_score );
236  ATH_MSG_VERBOSE( "Jet values : Mass = " << jet_mass << ", score = " << jet_score );
237 
239  ATH_CHECK( getWeight( jet, jet_score > cut_score, acceptData ) );
240 
242  ATH_MSG_DEBUG( "Decorating with score" );
243 
252 
254  decCutMLow(jet) = cut_mass_low;
255  decCutMHigh(jet) = cut_mass_high;
256  decScoreCut(jet) = cut_score;
257  decScoreValue(jet) = jet_score;
258 
260  bool passCuts = true;
261 
264  ATH_MSG_VERBOSE( "Determining WZ tag return" );
265  if ( jet_mass > cut_mass_low ) acceptData.setCutResult( "PassMassLow", true );
266  if ( jet_mass < cut_mass_high ) acceptData.setCutResult( "PassMassHigh", true );
267  if ( jet_score > cut_score ) acceptData.setCutResult( "PassScore", true );
268  decPassMass(jet) = acceptData.getCutResult( "PassMassLow" ) && acceptData.getCutResult( "PassMassHigh" );
269  passCuts = passCuts && acceptData.getCutResult( "PassMassLow" ) && acceptData.getCutResult( "PassMassHigh" );
270  }
271  else if ( m_tagClass == TAGCLASS::TopQuark ) {
272  ATH_MSG_VERBOSE( "Determining TopQuark tag return" );
273  if ( jet_mass > cut_mass_low ) acceptData.setCutResult( "PassMassLow", true );
274  if ( jet_score > cut_score ) acceptData.setCutResult( "PassScore", true );
275  decPassMass(jet) = acceptData.getCutResult( "PassMassLow" );
276  passCuts = passCuts && acceptData.getCutResult( "PassMassLow" );
277  }
278 
279  decPassScore(jet) = acceptData.getCutResult( "PassScore" );
280 
281  passCuts = passCuts && acceptData.getCutResult( "PassScore" );
282 
283  decTagged(jet) = passCuts;
284 
285  return StatusCode::SUCCESS;
286 
287 }
288 
289 double JSSWTopTaggerDNN::getScore( const xAOD::Jet& jet ) const {
290 
292  std::map<std::string,double> DNN_inputValues = getJetProperties(jet);
293 
295  lwt::ValueMap discriminant = m_lwnn->compute(DNN_inputValues);
296 
298  double DNNscore = -666.;
299 
301  bool validVars = true;
303  if ( readTau21WTA(jet) < 0.0 ) validVars = false;
304  if ( m_tagClass == TAGCLASS::TopQuark ) {
306  if ( readTau32WTA(jet) < 0.0 ) validVars = false;
307  }
308 
309  if ( !validVars ) {
310 
311  if ( m_nWarnVar++ < m_nWarnMax ) ATH_MSG_WARNING( "One (or more) tagger input variable has an out-of-range value, setting score to -666" );
312  else ATH_MSG_DEBUG( "One (or more) tagger input variable has an out-of-range value, setting score to -666" );
313 
314  return DNNscore;
315 
316  }
317 
319 
320  return DNNscore;
321 
322 }
323 
324 std::map<std::string,double> JSSWTopTaggerDNN::getJetProperties( const xAOD::Jet& jet ) const {
325 
327  std::map<std::string,double> DNN_inputValues;
328 
331 
332  ATH_MSG_DEBUG( "Loading variables for common DNN tagger" );
333 
339 
342  DNN_inputValues["CaloTACombinedMassUncorrelated"] = jet.m();
343  DNN_inputValues["JetpTCorrByCombinedMass"] = jet.pt();
344 
346  DNN_inputValues["Split12"] = readSplit12(jet);
347 
349  DNN_inputValues["C2"] = readC2(jet);
350  DNN_inputValues["D2"] = readD2(jet);
351 
353  DNN_inputValues["Tau21_wta"] = readTau21WTA(jet);
354 
355  if ( m_tagClass == TAGCLASS::WBoson ) {
356 
357  ATH_MSG_DEBUG( "Loading variables for W boson tagger" );
358 
360  DNN_inputValues["FoxWolfram20"] = jet.getAttribute<float>("FoxWolfram2") / jet.getAttribute<float>("FoxWolfram0");
361  DNN_inputValues["PlanarFlow"] = jet.getAttribute<float>("PlanarFlow");
362  DNN_inputValues["Angularity"] = jet.getAttribute<float>("Angularity");
363  DNN_inputValues["Aplanarity"] = jet.getAttribute<float>("Aplanarity");
364  DNN_inputValues["ZCut12"] = jet.getAttribute<float>("ZCut12");
365  DNN_inputValues["KtDR"] = jet.getAttribute<float>("KtDR");
366 
367  int pv_location = findPV();
368 
369  if(pv_location != -1){
370  if( GetUnGroomTracks(jet, pv_location).isSuccess()){
372 
373  DNN_inputValues["Ntrk500"] = readNtrk500(jet);
374  }
375  else{
376  ATH_MSG_ERROR("Either the ungroomed parent jet doesn't have 'NumTrkPt500' as an attribute or the parent link is broken");
377  DNN_inputValues["Ntrk500"] = -999;
378  }
379  }
380  else {
381  ATH_MSG_ERROR("Could not find a primary vertex");
382  DNN_inputValues["Ntrk500"] = -999;
383  }
384 
385 
386  }
387 
388  else if ( m_tagClass == TAGCLASS::TopQuark ) {
389 
390  ATH_MSG_DEBUG("Loading variables for top quark tagger");
391 
405 
406 
407 
409  DNN_inputValues["m"] = jet.m();
410  DNN_inputValues["pt"] = jet.pt();
411 
413  DNN_inputValues["Split23"] = readSplit23(jet);
414 
416  DNN_inputValues["e3"] = readE3(jet);
417 
419  DNN_inputValues["Tau1_wta"] = readTau1WTA(jet);
420  DNN_inputValues["Tau2_wta"] = readTau2WTA(jet);
421  DNN_inputValues["Tau3_wta"] = readTau3WTA(jet);
422  if(readTau4WTA.isAvailable()){
423  DNN_inputValues["Tau4_wta"] = readTau4WTA(jet);
424  DNN_inputValues["Tau42_wta"] = readTau42WTA(jet);
425  }
426 
427  DNN_inputValues["Tau32_wta"] = readTau32WTA(jet);
428 
430  DNN_inputValues["Qw"] = readQw(jet);
431 
432  if(readThrustMaj.isAvailable()){
433  DNN_inputValues["ThrustMaj"] = readThrustMaj(jet);
434  }
435  if(readL2.isAvailable()){
436  DNN_inputValues["L2"] = readL2(jet);
437  }
438  if(readL3.isAvailable()){
439  DNN_inputValues["L3"] = readL3(jet);
440  }
441  }
442 
443  else {
444  ATH_MSG_ERROR( "Loading variables failed because the tagger type is not supported" );
445  }
446 
447  return DNN_inputValues;
448 
449 }
JSSTaggerBase::m_readTau4WTAKey
SG::ReadDecorHandleKey< xAOD::JetContainer > m_readTau4WTAKey
Definition: JSSTaggerBase.h:156
JSSTaggerBase::m_suppressOutputDependence
bool m_suppressOutputDependence
Definition: JSSTaggerBase.h:189
JSSTaggerBase::m_readSplit23Key
SG::ReadDecorHandleKey< xAOD::JetContainer > m_readSplit23Key
Definition: JSSTaggerBase.h:171
JSSWTopTaggerDNN::JSSWTopTaggerDNN
JSSWTopTaggerDNN(const std::string &name)
Constructor.
Definition: JSSWTopTaggerDNN.cxx:9
JSSTaggerBase::m_decScoreCutKey
SG::WriteDecorHandleKey< xAOD::JetContainer > m_decScoreCutKey
Definition: JSSTaggerBase.h:233
JSSTaggerBase::m_strMassCutLow
std::string m_strMassCutLow
Strings for cut functions.
Definition: JSSTaggerBase.h:192
JSSTaggerBase::m_funcScoreCut
std::unique_ptr< TF1 > m_funcScoreCut
Definition: JSSTaggerBase.h:199
JSSTaggerBase::m_readTau32WTAKey
SG::ReadDecorHandleKey< xAOD::JetContainer > m_readTau32WTAKey
Definition: JSSTaggerBase.h:159
JSSTaggerBase::resetCuts
StatusCode resetCuts(asg::AcceptData &acceptData) const
Reset cuts.
Definition: JSSTaggerBase.cxx:338
ATH_MSG_INFO
#define ATH_MSG_INFO(x)
Definition: AthMsgStreamMacros.h:31
JSSTaggerBase::m_readNtrk500Key
SG::ReadDecorHandleKey< xAOD::JetContainer > m_readNtrk500Key
Definition: JSSTaggerBase.h:187
JSSTaggerBase::m_nWarnVar
std::atomic< int > m_nWarnVar
Warning counters.
Definition: JSSTaggerBase.h:86
JSSTaggerBase::m_useMassCut
bool m_useMassCut
Flag to indicate if mass window cut is used.
Definition: JSSTaggerBase.h:93
JSSTaggerBase::m_readTau42WTAKey
SG::ReadDecorHandleKey< xAOD::JetContainer > m_readTau42WTAKey
Definition: JSSTaggerBase.h:160
JSSTaggerBase::m_kerasCalibArea
std::string m_kerasCalibArea
Definition: JSSTaggerBase.h:120
JSSTaggerBase::m_configFile
std::string m_configFile
Configuration file name.
Definition: JSSTaggerBase.h:111
JSSTaggerBase::m_useScoreCut
bool m_useScoreCut
Flag to indicate if a discriminant score is used.
Definition: JSSTaggerBase.h:96
JSSTaggerBase::m_configReader
TEnv m_configReader
TEnv instance to read config files.
Definition: JSSTaggerBase.h:62
JSSTaggerBase::m_nWarnMax
const int m_nWarnMax
Maximum number of warnings.
Definition: JSSTaggerBase.h:83
JSSTaggerBase::m_weightFileName
std::string m_weightFileName
Definition: JSSTaggerBase.h:210
AthCommonDataStore< AthCommonMsg< AlgTool > >::renounce
std::enable_if_t< std::is_void_v< std::result_of_t< decltype(&T::renounce)(T)> > &&!std::is_base_of_v< SG::VarHandleKeyArray, T > &&std::is_base_of_v< Gaudi::DataHandle, T >, void > renounce(T &h)
Definition: AthCommonDataStore.h:380
JSSTaggerBase::m_decPassScoreKey
SG::WriteDecorHandleKey< xAOD::JetContainer > m_decPassScoreKey
Definition: JSSTaggerBase.h:80
JSSTaggerBase::getWeight
StatusCode getWeight(const xAOD::Jet &jet, bool passSel, asg::AcceptData &acceptData) const
Get SF weight.
Definition: JSSTaggerBase.cxx:596
JSSTaggerBase::m_readTau2WTAKey
SG::ReadDecorHandleKey< xAOD::JetContainer > m_readTau2WTAKey
Definition: JSSTaggerBase.h:154
JSSTaggerBase::m_readSplit12Key
SG::ReadDecorHandleKey< xAOD::JetContainer > m_readSplit12Key
Definition: JSSTaggerBase.h:170
JSSTaggerBase::m_jetPtMin
float m_jetPtMin
Kinematic bounds for the jet - the units are controlled by m_ptGeV.
Definition: JSSTaggerBase.h:132
JSSTaggerBase::m_decCutMLowKey
SG::WriteDecorHandleKey< xAOD::JetContainer > m_decCutMLowKey
WriteDecorHandle keys for cut values.
Definition: JSSTaggerBase.h:231
JSSTaggerBase::m_decorationName
std::string m_decorationName
Decoration name.
Definition: JSSTaggerBase.h:202
ATH_MSG_VERBOSE
#define ATH_MSG_VERBOSE(x)
Definition: AthMsgStreamMacros.h:28
ZBoson
@ ZBoson
Definition: TruthClasses.h:67
JSSWTopTaggerDNN::initialize
virtual StatusCode initialize() override
Run once at the start of the job to setup everything.
Definition: JSSWTopTaggerDNN.cxx:17
JSSTaggerBase::m_readTau21WTAKey
SG::ReadDecorHandleKey< xAOD::JetContainer > m_readTau21WTAKey
Definition: JSSTaggerBase.h:158
lwtDev::parse_json
JSONConfig parse_json(std::istream &json)
Definition: parse_json.cxx:42
JSSTaggerBase::m_funcMassCutHigh
std::unique_ptr< TF1 > m_funcMassCutHigh
Definition: JSSTaggerBase.h:198
JSSTaggerBase::m_weightHistogramName
std::string m_weightHistogramName
Definition: JSSTaggerBase.h:211
JSSTaggerBase::m_jetPtMax
float m_jetPtMax
Definition: JSSTaggerBase.h:133
WBoson
@ WBoson
Definition: TruthClasses.h:66
JSSTaggerBase::m_truthLabelName
std::string m_truthLabelName
Definition: JSSTaggerBase.h:225
JSSTaggerBase::m_decCutMHighKey
SG::WriteDecorHandleKey< xAOD::JetContainer > m_decCutMHighKey
Definition: JSSTaggerBase.h:232
JSSTaggerBase::m_ptGeV
bool m_ptGeV
Flag to indicate units pT is defined in Set to false by default.
Definition: JSSTaggerBase.h:90
jet
Definition: JetCalibTools_PlotJESFactors.cxx:23
ATH_MSG_ERROR
#define ATH_MSG_ERROR(x)
Definition: AthMsgStreamMacros.h:33
JSSTaggerBase::m_readQwKey
SG::ReadDecorHandleKey< xAOD::JetContainer > m_readQwKey
Definition: JSSTaggerBase.h:173
SG::ReadDecorHandle
Handle class for reading a decoration on an object.
Definition: StoreGate/StoreGate/ReadDecorHandle.h:94
JSSTaggerBase::m_tagClass
TAGCLASS m_tagClass
Definition: JSSTaggerBase.h:100
JSSTaggerBase::m_kerasConfigOutputName
std::string m_kerasConfigOutputName
Definition: JSSTaggerBase.h:119
JSSWTopTaggerDNN.h
EL::StatusCode
::StatusCode StatusCode
StatusCode definition for legacy code.
Definition: PhysicsAnalysis/D3PDTools/EventLoop/EventLoop/StatusCode.h:22
ATH_MSG_DEBUG
#define ATH_MSG_DEBUG(x)
Definition: AthMsgStreamMacros.h:29
JSSTaggerBase::checkKinRange
StatusCode checkKinRange(const xAOD::Jet &jet, asg::AcceptData &acceptData) const
Check and record if jet passes kinematic constraints.
Definition: JSSTaggerBase.cxx:370
SG::WriteDecorHandle
Handle class for adding a decoration to an object.
Definition: StoreGate/StoreGate/WriteDecorHandle.h:99
JSSTaggerBase::m_readL3Key
SG::ReadDecorHandleKey< xAOD::JetContainer > m_readL3Key
Definition: JSSTaggerBase.h:179
JSSTaggerBase::m_efficiencyHistogramName
std::string m_efficiencyHistogramName
Definition: JSSTaggerBase.h:212
JSSTaggerBase::m_strScoreCut
std::string m_strScoreCut
Definition: JSSTaggerBase.h:194
JSSTaggerBase::calculateJSSRatios
int calculateJSSRatios(const xAOD::Jet &jet) const
Calculate JSS moment ratios in case they are not already saved TODO: Remove this once JSSMomentTools ...
Definition: JSSTaggerBase.cxx:416
ATH_CHECK
#define ATH_CHECK
Definition: AthCheckMacros.h:40
JSSTaggerBase::m_calcSF
bool m_calcSF
Flag to calculate scale factor.
Definition: JSSTaggerBase.h:205
JSSWTopTaggerDNN::m_lwnn
std::unique_ptr< lwt::LightweightNeuralNetwork > m_lwnn
DNN tools.
Definition: JSSWTopTaggerDNN.h:31
JSSTaggerBase::GetUnGroomTracks
StatusCode GetUnGroomTracks(const xAOD::Jet &jet, int indexPV) const
Retrieve Ntrk variable from the ungroomed parent jet.
Definition: JSSTaggerBase.cxx:553
JSSTaggerBase
Definition: JSSTaggerBase.h:39
JSSTaggerBase::findPV
int findPV() const
Find the PV (to be used for Ntrk)
Definition: JSSTaggerBase.cxx:529
JSSTaggerBase::m_kerasConfigFilePath
std::string m_kerasConfigFilePath
Definition: JSSTaggerBase.h:118
JSSTaggerBase::m_readThrustMajKey
SG::ReadDecorHandleKey< xAOD::JetContainer > m_readThrustMajKey
Definition: JSSTaggerBase.h:175
TauJetParameters::discriminant
@ discriminant
Definition: TauJetParameters.h:166
name
std::string name
Definition: Control/AthContainers/Root/debug.cxx:192
JSSTaggerBase::initialize
virtual StatusCode initialize() override
Initialize the tool.
Definition: JSSTaggerBase.cxx:73
JSSTaggerBase::m_acceptInfo
asg::AcceptInfo m_acceptInfo
Object that stores the results for a jet.
Definition: JSSTaggerBase.h:65
WriteCaloSwCorrections.cfg
cfg
Definition: WriteCaloSwCorrections.py:23
JSSTaggerBase::m_decScoreValueKey
SG::WriteDecorHandleKey< xAOD::JetContainer > m_decScoreValueKey
Definition: JSSTaggerBase.h:234
PathResolverFindCalibFile
std::string PathResolverFindCalibFile(const std::string &logical_file_name)
Definition: PathResolver.cxx:431
JSSTaggerBase::printCuts
void printCuts() const
Print configured cuts.
Definition: JSSTaggerBase.cxx:817
JSSTaggerBase::m_weightDecorationName
std::string m_weightDecorationName
String for scale factor decoration names.
Definition: JSSTaggerBase.h:209
xAOD::Jet_v1
Class describing a jet.
Definition: Jet_v1.h:57
JSSTaggerBase::m_readTau1WTAKey
SG::ReadDecorHandleKey< xAOD::JetContainer > m_readTau1WTAKey
ReadDecorHandle keys for JSS moments.
Definition: JSSTaggerBase.h:153
asg::AcceptData::setCutResult
void setCutResult(const std::string &cutName, bool cutResult)
Set the result of a cut, based on the cut name (safer)
Definition: AcceptData.h:134
asg::AcceptData::getCutResult
bool getCutResult(const std::string &cutName) const
Get the result of a cut, based on the cut name (safer)
Definition: AcceptData.h:98
ATH_MSG_WARNING
#define ATH_MSG_WARNING(x)
Definition: AthMsgStreamMacros.h:32
JSSTaggerBase::m_readTau3WTAKey
SG::ReadDecorHandleKey< xAOD::JetContainer > m_readTau3WTAKey
Definition: JSSTaggerBase.h:155
JSSTaggerBase::m_readD2Key
SG::ReadDecorHandleKey< xAOD::JetContainer > m_readD2Key
Definition: JSSTaggerBase.h:167
JSSTaggerBase::getConfigReader
StatusCode getConfigReader()
Get configReader StatusCode.
Definition: JSSTaggerBase.cxx:300
JSSTaggerBase::m_decPassMassKey
SG::WriteDecorHandleKey< xAOD::JetContainer > m_decPassMassKey
Definition: JSSTaggerBase.h:79
JSSTaggerBase::m_tagType
std::string m_tagType
Definition: JSSTaggerBase.h:129
JSSTaggerBase::m_funcMassCutLow
std::unique_ptr< TF1 > m_funcMassCutLow
TF1 for cut functions.
Definition: JSSTaggerBase.h:197
JSSTaggerBase::m_strMassCutHigh
std::string m_strMassCutHigh
Definition: JSSTaggerBase.h:193
JSSWTopTaggerDNN::getScore
double getScore(const xAOD::Jet &jet) const
Retrieve score for a given DNN type (top/W)
Definition: JSSWTopTaggerDNN.cxx:289
JSSTaggerBase::m_kerasConfigFileName
std::string m_kerasConfigFileName
Keras configurations for ML taggers.
Definition: JSSTaggerBase.h:117
JSSTaggerBase::m_weightConfigPath
std::string m_weightConfigPath
Path to the SF configuration root file.
Definition: JSSTaggerBase.h:108
JSSTaggerBase::m_weightFlavors
std::string m_weightFlavors
Definition: JSSTaggerBase.h:213
asg::AcceptData
Definition: AcceptData.h:30
JSSTaggerBase::m_readE3Key
SG::ReadDecorHandleKey< xAOD::JetContainer > m_readE3Key
Definition: JSSTaggerBase.h:168
SG::ReadDecorHandle::isAvailable
bool isAvailable()
Test to see if this variable exists in the store, for the referenced object.
JSSTaggerBase::m_readL2Key
SG::ReadDecorHandleKey< xAOD::JetContainer > m_readL2Key
Definition: JSSTaggerBase.h:178
ValueMap
std::map< std::string, double > ValueMap
Definition: TauDecayModeNNClassifier.cxx:22
JSSWTopTaggerDNN::getJetProperties
std::map< std::string, double > getJetProperties(const xAOD::Jet &jet) const
Update the jet substructure variables for each jet to use in DNN.
Definition: JSSWTopTaggerDNN.cxx:324
JSSTaggerBase::m_readC2Key
SG::ReadDecorHandleKey< xAOD::JetContainer > m_readC2Key
Definition: JSSTaggerBase.h:166
JSSWTopTaggerDNN::tag
virtual StatusCode tag(const xAOD::Jet &jet) const override
Decorate single jet with tagging info.
Definition: JSSWTopTaggerDNN.cxx:208
JSSTaggerBase::m_decTaggedKey
SG::WriteDecorHandleKey< xAOD::JetContainer > m_decTaggedKey
WriteDecorHandle keys for tagging bools.
Definition: JSSTaggerBase.h:71
asg::AcceptInfo::addCut
int addCut(const std::string &cutName, const std::string &cutDescription)
Add a cut; returning the cut position.
Definition: AcceptInfo.h:53