ATLAS Offline Software
Loading...
Searching...
No Matches
JSSTaggerBase Class Referenceabstract

#include <JSSTaggerBase.h>

Inheritance diagram for JSSTaggerBase:

Public Member Functions

virtual StatusCode initialize () override
 Initialize the tool.
virtual StatusCode decorate (const xAOD::JetContainer &jets) const override
 Decorate jet collection with tagging info.
 JSSTaggerBase (const std::string &name)
 Default constructor - to be used in all derived classes.
virtual void print () const
 Print the state of the tool.
ServiceHandle< StoreGateSvc > & evtStore ()
 The standard StoreGateSvc (event store) Returns (kind of) a pointer to the StoreGateSvc.
const ServiceHandle< StoreGateSvc > & detStore () const
 The standard StoreGateSvc/DetectorStore Returns (kind of) a pointer to the StoreGateSvc.
virtual StatusCode sysInitialize () override
 Perform system initialization for an algorithm.
virtual StatusCode sysStart () override
 Handle START transition.
virtual std::vector< Gaudi::DataHandle * > inputHandles () const override
 Return this algorithm's input handles.
virtual std::vector< Gaudi::DataHandle * > outputHandles () const override
 Return this algorithm's output handles.
Gaudi::Details::PropertyBase & declareProperty (Gaudi::Property< T, V, H > &t)
void updateVHKA (Gaudi::Details::PropertyBase &)
MsgStream & msg () const
bool msgLvl (const MSG::Level lvl) const
virtual StatusCode modify (xAOD::JetContainer &jets) const override final
 Concrete implementation of the function inherited from IJetModifier.
Additional helper functions, not directly mimicking Athena
template<class T>
const T * getProperty (const std::string &name) const
 Get one of the tool's properties.
const std::string & msg_level_name () const __attribute__((deprecated))
 A deprecated function for getting the message level's name.
const std::string & getName (const void *ptr) const
 Get the name of an object that is / should be in the event store.
SG::sgkey_t getKey (const void *ptr) const
 Get the (hashed) key of an object that is in the event store.

Protected Types

enum  TAGCLASS { Unknown , WBoson , ZBoson , TopQuark }
 TAGTYPE enum. More...

Protected Member Functions

virtual StatusCode tag (const xAOD::Jet &jet) const =0
 Decorate single jet with tagging info.
StatusCode getConfigReader ()
 Get configReader StatusCode.
StatusCode resetCuts (asg::AcceptData &acceptData) const
 Reset cuts.
bool passKinRange (const xAOD::Jet &jet) const
 Check if jet passes kinematic constraints.
StatusCode checkKinRange (const xAOD::Jet &jet, asg::AcceptData &acceptData) const
 Check and record if jet passes kinematic constraints.
int calculateJSSRatios (const xAOD::Jet &jet) const
 Calculate JSS moment ratios in case they are not already saved TODO: Remove this once JSSMomentTools is modified to take const jets.
void decorateJSSRatios (const xAOD::JetContainer &jets) const
int findPV () const
 Find the PV (to be used for Ntrk).
int GetUnGroomTracks (const xAOD::Jet &jet, int indexPV) const
 Retrieve Ntrk variable from the ungroomed parent jet.
StatusCode getWeight (const xAOD::Jet &jet, bool passSel, asg::AcceptData &acceptData) const
 Get SF weight.
std::pair< double, double > getSF (const xAOD::Jet &jet, const std::string &truthLabelStr) const
 Get scale factor and efficiency.
std::string getTruthLabelStr (const xAOD::Jet &jet, asg::AcceptData &acceptData) const
void printCuts () const
 Print configured cuts.
void renounceArray (SG::VarHandleKeyArray &handlesArray)
 remove all handles from I/O resolution
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)
void extraDeps_update_handler (Gaudi::Details::PropertyBase &ExtraDeps)
 Add StoreName to extra input/output deps as needed.

Protected Attributes

TEnv m_configReader
 TEnv instance to read config files.
asg::AcceptInfo m_acceptInfo
 Object that stores the results for a jet.
SG::WriteDecorHandleKey< xAOD::JetContainer > m_decTaggedKey {this, "TaggedName", "Tagged", "SG key for Tagged"}
 WriteDecorHandle keys for tagging bools.
SG::WriteDecorHandleKey< xAOD::JetContainer > m_decValidPtRangeHighKey {this, "ValidPtRangeHighName", "ValidPtRangeHigh", "SG key for ValidPtRangeHigh"}
SG::WriteDecorHandleKey< xAOD::JetContainer > m_decValidPtRangeLowKey {this, "ValidPtRangeLowName", "ValidPtRangeLow", "SG key for ValidPtRangeLow"}
SG::WriteDecorHandleKey< xAOD::JetContainer > m_decValidEtaRangeKey {this, "ValidEtaRangeName", "ValidEtaRange", "SG key for ValidEtaRange"}
SG::WriteDecorHandleKey< xAOD::JetContainer > m_decValidKinRangeKey {this, "ValidKinRangeName", "ValidKinRange", "SG key for ValidKinRange"}
SG::WriteDecorHandleKey< xAOD::JetContainer > m_decValidJetContentKey {this, "ValidJetContentName", "ValidJetContent", "SG key for ValidJetContent"}
SG::WriteDecorHandleKey< xAOD::JetContainer > m_decValidEventContentKey {this, "ValidEventContentName", "ValidEventContent", "SG key for ValidEventContent"}
SG::WriteDecorHandleKey< xAOD::JetContainer > m_decPassMassKey {this, "PassMassName", "PassMass", "SG key for PassMass"}
SG::WriteDecorHandleKey< xAOD::JetContainer > m_decPassScoreKey {this, "PassScoreName", "PassScore", "SG key for PassScore"}
const int m_nWarnMax = 10
 Maximum number of warnings.
std::atomic< int > m_nWarnVar
 Warning counters.
bool m_ptGeV = false
 Flag to indicate units pT is defined in Set to false by default.
bool m_useMassCut = false
 Flag to indicate if mass window cut is used.
bool m_useScoreCut = false
 Flag to indicate if a discriminant score is used.
TAGCLASS m_tagClass {Unknown}
std::string m_containerName
 Configurable members.
bool m_isSmallRJet = false
std::string m_weightConfigPath
 Path to the SF configuration root file.
std::string m_configFile
 Configuration file name.
std::string m_calibArea
 Location where config files live on cvmfs.
std::string m_kerasConfigFileName
 Keras configurations for ML taggers.
std::string m_kerasConfigFilePath
std::string m_kerasConfigOutputName
std::string m_kerasCalibArea
std::string m_wkpt
 Tagger information.
std::string m_tagType
float m_jetPtMin {}
 Kinematic bounds for the jet - the units are controlled by m_ptGeV.
float m_jetPtMax {}
float m_jetEtaMax {}
bool m_useECFG = false
 Flags controlling whether generalized ECF moments or L-series ratios are needed TODO: Implement the functionality controlled by these.
bool m_useLSeries = false
SG::WriteDecorHandleKey< xAOD::JetContainer > m_decTau21WTAKey {this, "Tau21WTANameOut", "Tau21_wta", "SG key for Tau21_wta"}
 WriteDecorHandle keys for JSS moments.
SG::WriteDecorHandleKey< xAOD::JetContainer > m_decTau32WTAKey {this, "Tau32WTANameOut", "Tau32_wta", "SG key for Tau32_wta"}
SG::WriteDecorHandleKey< xAOD::JetContainer > m_decTau42WTAKey {this, "Tau42WTANameOut", "Tau42_wta", "SG key for Tau42_wta"}
SG::WriteDecorHandleKey< xAOD::JetContainer > m_decC2Key {this, "C2NameOut", "C2", "SG key for C2"}
SG::WriteDecorHandleKey< xAOD::JetContainer > m_decD2Key {this, "D2NameOut", "D2", "SG key for D2"}
SG::WriteDecorHandleKey< xAOD::JetContainer > m_decE3Key {this, "e3NameOut", "e3", "SG key for e3"}
SG::WriteDecorHandleKey< xAOD::JetContainer > m_decL2Key {this, "L2NameOut", "L2", "SG key for L2"}
SG::WriteDecorHandleKey< xAOD::JetContainer > m_decL3Key {this, "L3NameOut", "L3", "SG key for L3"}
SG::ReadDecorHandleKey< xAOD::JetContainer > m_readTau1WTAKey {this, "Tau1WTAName", "Tau1_wta", "SG key for Tau1_wta"}
 ReadDecorHandle keys for JSS moments.
SG::ReadDecorHandleKey< xAOD::JetContainer > m_readTau2WTAKey {this, "Tau2WTAName", "Tau2_wta", "SG key for Tau2_wta"}
SG::ReadDecorHandleKey< xAOD::JetContainer > m_readTau3WTAKey {this, "Tau3WTAName", "Tau3_wta", "SG key for Tau3_wta"}
SG::ReadDecorHandleKey< xAOD::JetContainer > m_readTau4WTAKey {this, "Tau4WTAName", "Tau4_wta", "SG key for Tau4_wta"}
SG::ReadDecorHandleKey< xAOD::JetContainer > m_readECF1Key {this, "ECF1Name", "ECF1", "SG key for ECF1"}
SG::ReadDecorHandleKey< xAOD::JetContainer > m_readECF2Key {this, "ECF2Name", "ECF2", "SG key for ECF2"}
SG::ReadDecorHandleKey< xAOD::JetContainer > m_readECF3Key {this, "ECF3Name", "ECF3", "SG key for ECF3"}
SG::ReadDecorHandleKey< xAOD::JetContainer > m_readSplit12Key {this, "Split12Name", "Split12", "SG key for Split12"}
SG::ReadDecorHandleKey< xAOD::JetContainer > m_readSplit23Key {this, "Split23Name", "Split23", "SG key for Split23"}
SG::ReadDecorHandleKey< xAOD::JetContainer > m_readQwKey {this, "QwName", "Qw", "SG key for Qw"}
SG::ReadDecorHandleKey< xAOD::JetContainer > m_readThrustMajKey {this, "ThrustMajName", "ThrustMaj", "SG key for ThrustMaj"}
SG::ReadDecorHandleKey< xAOD::JetContainer > m_readSphericityKey {this, "SphericityName", "Sphericity", "SG key for Sphericity"}
SG::ReadDecorHandleKey< xAOD::JetContainer > m_readECFG331Key {this, "ECFG331Name", "ECFG_3_3_1", "SG key for ECFG_3_3_1"}
SG::ReadDecorHandleKey< xAOD::JetContainer > m_readECFG311Key {this, "ECFG311Name", "ECFG_3_1_1", "SG key for ECFG_3_1_1"}
SG::ReadDecorHandleKey< xAOD::JetContainer > m_readECFG212Key {this, "ECFG212Name", "ECFG_2_1_2", "SG key for ECFG_2_1_2"}
SG::ReadDecorHandleKey< xAOD::JetContainer > m_readParentKey {this, "ParentName", "Parent", "SG key for Parent"}
Gaudi::Property< bool > m_suppressInputDependence {this, "SuppressInputDependence", false}
Gaudi::Property< bool > m_suppressOutputDependence {this, "SuppressOutputDependence", false}
std::string m_strMassCutLow
 Strings for cut functions.
std::string m_strMassCutHigh
std::string m_strScoreCut
std::unique_ptr< TF1 > m_funcMassCutLow
 TF1 for cut functions.
std::unique_ptr< TF1 > m_funcMassCutHigh
std::unique_ptr< TF1 > m_funcScoreCut
std::string m_decorationName
 Decoration name.
Gaudi::Property< std::string > m_scoreDecorationName {this, "scoreDecorationName", "", "tagger output scoure decoration name"}
bool m_calcSF {}
 Flag to calculate scale factor.
bool m_isMC {}
std::string m_weightDecorationName
 String for scale factor decoration names.
std::string m_weightFileName
std::string m_weightHistogramName
std::string m_efficiencyHistogramName
std::string m_weightFlavors
std::unique_ptr< TFile > m_weightConfig
 Histograms for scale factors.
std::map< std::string, std::unique_ptr< TH2D >, std::less<> > m_weightHistograms
std::map< std::string, std::unique_ptr< TH2D >, std::less<> > m_efficiencyHistograms
std::string m_truthLabelName
 Truth label options.
SG::ReadDecorHandleKey< xAOD::JetContainer > m_readTruthLabelKey {this, "truthLabelName", "truthLabel", "SG key for truthLabel"}
 Truth label ReadDecorHandle key.
SG::WriteDecorHandleKey< xAOD::JetContainer > m_decCutMLowKey {this, "CutMLowName", "Cut_mlow", "SG key for Cut_mlow"}
 WriteDecorHandle keys for cut values.
SG::WriteDecorHandleKey< xAOD::JetContainer > m_decCutMHighKey {this, "CutMHighName", "Cut_mhigh", "SG key for Cut_mhigh"}
SG::WriteDecorHandleKey< xAOD::JetContainer > m_decScoreCutKey {this, "CutScoreName", "Cut_score", "SG key for Cut_score"}
SG::WriteDecorHandleKey< xAOD::JetContainer > m_decScoreValueKey {this, "ScoreName", "Score", "SG key for Score"}
SG::WriteDecorHandleKey< xAOD::JetContainer > m_decWeightKey {this, "weightName", "weight", "SG key for weight"}
 WriteDecorHandle keys for SF.
SG::WriteDecorHandleKey< xAOD::JetContainer > m_decEfficiencyKey {this, "efficiencyName", "efficiency", "SG key for efficiency"}
SG::WriteDecorHandleKey< xAOD::JetContainer > m_decEffSFKey {this, "effSFName", "effSF", "SG key for effSF"}
SG::WriteDecorHandleKey< xAOD::JetContainer > m_decSigeffSFKey {this, "sigeffSFName", "sigeffSF", "SG key for effSF"}

Private Types

typedef ServiceHandle< StoreGateSvc > StoreGateSvc_t

Private Member Functions

Gaudi::Details::PropertyBase & declareGaudiProperty (Gaudi::Property< T, V, H > &hndl, const SG::VarHandleKeyType &)
 specialization for handling Gaudi::Property<SG::VarHandleKey>

Private Attributes

StoreGateSvc_t m_evtStore
 Pointer to StoreGate (event store by default).
StoreGateSvc_t m_detStore
 Pointer to StoreGate (detector store by default).
std::vector< SG::VarHandleKeyArray * > m_vhka
bool m_varHandleArraysDeclared

Detailed Description

Definition at line 40 of file JSSTaggerBase.h.

Member Typedef Documentation

◆ StoreGateSvc_t

typedef ServiceHandle<StoreGateSvc> AthCommonDataStore< AthCommonMsg< AlgTool > >::StoreGateSvc_t
privateinherited

Definition at line 376 of file AthCommonDataStore.h.

Member Enumeration Documentation

◆ TAGCLASS

enum JSSTaggerBase::TAGCLASS
protected

TAGTYPE enum.

Enumerator
Unknown 
WBoson 
ZBoson 
TopQuark 

Definition at line 96 of file JSSTaggerBase.h.

Constructor & Destructor Documentation

◆ JSSTaggerBase()

JSSTaggerBase::JSSTaggerBase ( const std::string & name)

Default constructor - to be used in all derived classes.

Tagger configuration properties

Jet kinematics properties

Keras properties

Tagging scale factors

Definition at line 11 of file JSSTaggerBase.cxx.

11 :
12 asg::AsgTool(name),
13 m_calibArea(""),
17{
18
20 declareProperty( "ContainerName", m_containerName = "AntiKt10UFOCSSKSoftDropBeta100Zcut10Jets", "Name of jet container" );
21 declareProperty( "ConfigFile", m_configFile = "", "Name of config file" );
22 declareProperty( "CalibArea", m_calibArea = "", "Path to config file" );
23 declareProperty( "CalcSF", m_calcSF = false, "Flag to calculate the efficiency SF" );
24 declareProperty( "WorkingPoint", m_wkpt = "", "If specified, name of working point is added to the variable names" );
25 declareProperty( "TaggerType", m_tagType = "XXX", "Tagger type (e.g. SmoothedWZTagger, JSSWTopTaggerDNN, etc.)" );
26 declareProperty( "Decoration", m_decorationName = "XX", "Prefix for the variables decorated to xAOD::Jet" );
27 declareProperty( "IsMC", m_isMC = true, "Flag to identify data or MC" );
28
30 declareProperty( "JetEtaMax", m_jetEtaMax = 2.0, "Eta cut to define fiducial phase space for the tagger");
31
33 declareProperty( "CalibAreaKeras", m_kerasCalibArea = "BoostedJetTaggers/TopoclusterTopTagger/Boost2017/",
34 "Path to json file to configure ML-taggers (Keras)" );
35 declareProperty( "KerasConfigFile", m_kerasConfigFileName = "XXX",
36 "Name of json file to configure ML-taggers (Keras)" );
37 declareProperty( "KerasOutput", m_kerasConfigOutputName = "XXX",
38 "Name of output variable by the ML-tagger (Keras)" );
39
41 declareProperty( "WeightDecorationName", m_weightDecorationName = "SF",
42 "Name of SF variable decorated to xAOD::Jet" );
43 declareProperty( "WeightFile", m_weightFileName = "",
44 "Name of config ROOT file for SF calculation" );
45 declareProperty( "WeightHistogramName", m_weightHistogramName = "",
46 "Name of SF histograms in the ROOT file" );
47 declareProperty( "EfficiencyHistogramName", m_efficiencyHistogramName = "",
48 "Name of efficiency histograms in the ROOT file" );
49 declareProperty( "WeightFlavors", m_weightFlavors = "",
50 "List of jet flavours for which the SF is available. Divided by comma" );
51}
Gaudi::Details::PropertyBase & declareProperty(Gaudi::Property< T, V, H > &t)
std::string m_kerasCalibArea
bool m_calcSF
Flag to calculate scale factor.
std::string m_weightDecorationName
String for scale factor decoration names.
std::string m_decorationName
Decoration name.
std::string m_kerasConfigFileName
Keras configurations for ML taggers.
std::string m_wkpt
Tagger information.
std::string m_calibArea
Location where config files live on cvmfs.
std::string m_configFile
Configuration file name.
std::string m_strMassCutHigh
std::string m_weightFileName
std::string m_weightFlavors
std::string m_strMassCutLow
Strings for cut functions.
std::string m_tagType
std::string m_containerName
Configurable members.
std::string m_strScoreCut
std::string m_efficiencyHistogramName
std::string m_weightHistogramName
std::string m_kerasConfigOutputName

Member Function Documentation

◆ calculateJSSRatios()

int JSSTaggerBase::calculateJSSRatios ( const xAOD::Jet & jet) const
protected

Calculate JSS moment ratios in case they are not already saved TODO: Remove this once JSSMomentTools is modified to take const jets.

Calculate JSS moment ratios in case they are not already saved These are calculated by hand here because JetSubStructureMomentTools does not operate on const jets.

This should be changed in the future

Create write decor handles

WTA N-subjettiness ratios

ECF ratios

Definition at line 397 of file JSSTaggerBase.cxx.

397 {
398
399 int result = 0;
400
402 SG::WriteDecorHandle<xAOD::JetContainer, float> decTau21WTA(m_decTau21WTAKey);
403 SG::WriteDecorHandle<xAOD::JetContainer, float> decTau32WTA(m_decTau32WTAKey);
404 SG::WriteDecorHandle<xAOD::JetContainer, float> decTau42WTA(m_decTau42WTAKey);
405 SG::WriteDecorHandle<xAOD::JetContainer, float> decC2(m_decC2Key);
406 SG::WriteDecorHandle<xAOD::JetContainer, float> decD2(m_decD2Key);
407 SG::WriteDecorHandle<xAOD::JetContainer, float> decE3(m_decE3Key);
408 SG::WriteDecorHandle<xAOD::JetContainer, float> decL2(m_decL2Key);
409 SG::WriteDecorHandle<xAOD::JetContainer, float> decL3(m_decL3Key);
410
412 float tau21_wta = -999.0;
413 float tau32_wta = -999.0;
414 float tau42_wta = -999.0;
415
416 if(!m_isSmallRJet){
417 SG::ReadDecorHandle<xAOD::JetContainer, float> readTau1WTA(m_readTau1WTAKey);
418 SG::ReadDecorHandle<xAOD::JetContainer, float> readTau2WTA(m_readTau2WTAKey);
419 SG::ReadDecorHandle<xAOD::JetContainer, float> readTau3WTA(m_readTau3WTAKey);
420 SG::ReadDecorHandle<xAOD::JetContainer, float> readTau4WTA(m_readTau4WTAKey);
421
422 float tau1_wta = readTau1WTA(jet);
423 float tau2_wta = readTau2WTA(jet);
424 float tau3_wta = readTau3WTA(jet);
425 float tau4_wta = readTau4WTA(jet);
426
427 if ( tau1_wta > 1e-8 ) {
428 tau21_wta = tau2_wta / tau1_wta;
429 }
430 else result = 1;
431
432 if ( tau2_wta > 1e-8 ) {
433 tau32_wta = tau3_wta / tau2_wta;
434 tau42_wta = tau4_wta / tau2_wta;
435 }
436 else result = 1;
437 }
438
439 decTau21WTA(jet) = tau21_wta;
440 decTau32WTA(jet) = tau32_wta;
441 decTau42WTA(jet) = tau42_wta;
442
444 float C2 = -999.0;
445 float D2 = -999.0;
446 float e3 = -999.0;
447
448 // L-series for UFO top taggers
449 float L2 = -999.0;
450 float L3 = -999.0;
451
452 if(!m_isSmallRJet){
453 SG::ReadDecorHandle<xAOD::JetContainer, float> readECF1(m_readECF1Key);
454 SG::ReadDecorHandle<xAOD::JetContainer, float> readECF2(m_readECF2Key);
455 SG::ReadDecorHandle<xAOD::JetContainer, float> readECF3(m_readECF3Key);
456
457 float ECF1 = readECF1(jet);
458 float ECF2 = readECF2(jet);
459 float ECF3 = readECF3(jet);
460
461 if ( ECF2 > 1e-8 ) {
462 C2 = ECF3 * ECF1 / std::pow( ECF2, 2.0 );
463 D2 = ECF3 * std::pow( ECF1, 3.0 ) / std::pow( ECF2, 3.0 );
464 }
465 else result = 1;
466
467 e3 = ECF3 / std::pow( ECF1, 3.0 );
468
469 SG::ReadDecorHandle<xAOD::JetContainer, float> readECFG331(m_readECFG331Key);
470 SG::ReadDecorHandle<xAOD::JetContainer, float> readECFG311(m_readECFG311Key);
471 SG::ReadDecorHandle<xAOD::JetContainer, float> readECFG212(m_readECFG212Key);
472
473 if(readECFG331.isAvailable() && readECFG212.isAvailable()){
474 if(readECFG212(jet) > 1e-8){
475 L2 = readECFG331(jet) / std::pow(readECFG212(jet), 1.5);
476 }
477 else result = 1;
478 }
479
480 if(readECFG331.isAvailable() && readECFG311.isAvailable()){
481 if(readECFG331(jet) > 1e-8){
482 L3 = readECFG311(jet) / std::pow(readECFG331(jet), 1./3.);
483 }
484 else result = 1;
485 }
486 }
487
488 decC2(jet) = C2;
489 decD2(jet) = D2;
490 decE3(jet) = e3;
491
492 static const SG::ConstAccessor<float> accL2("L2");
493 if(!accL2.isAvailable(jet)) decL2(jet) = L2;
494
495 static const SG::ConstAccessor<float> accL3("L3");
496 if(!accL3.isAvailable(jet)) decL3(jet) = L3;
497
498 // TODO: Add ECFG for ANN tagger whenever it is defined
499
500 return result;
501
502}
SG::ReadDecorHandleKey< xAOD::JetContainer > m_readECF2Key
SG::ReadDecorHandleKey< xAOD::JetContainer > m_readECFG331Key
SG::WriteDecorHandleKey< xAOD::JetContainer > m_decTau21WTAKey
WriteDecorHandle keys for JSS moments.
SG::ReadDecorHandleKey< xAOD::JetContainer > m_readECF1Key
SG::ReadDecorHandleKey< xAOD::JetContainer > m_readTau4WTAKey
SG::ReadDecorHandleKey< xAOD::JetContainer > m_readECFG311Key
SG::ReadDecorHandleKey< xAOD::JetContainer > m_readTau3WTAKey
SG::ReadDecorHandleKey< xAOD::JetContainer > m_readTau2WTAKey
SG::ReadDecorHandleKey< xAOD::JetContainer > m_readECF3Key
SG::WriteDecorHandleKey< xAOD::JetContainer > m_decC2Key
SG::ReadDecorHandleKey< xAOD::JetContainer > m_readTau1WTAKey
ReadDecorHandle keys for JSS moments.
SG::ReadDecorHandleKey< xAOD::JetContainer > m_readECFG212Key
SG::WriteDecorHandleKey< xAOD::JetContainer > m_decL2Key
SG::WriteDecorHandleKey< xAOD::JetContainer > m_decE3Key
SG::WriteDecorHandleKey< xAOD::JetContainer > m_decD2Key
SG::WriteDecorHandleKey< xAOD::JetContainer > m_decTau42WTAKey
SG::WriteDecorHandleKey< xAOD::JetContainer > m_decL3Key
SG::WriteDecorHandleKey< xAOD::JetContainer > m_decTau32WTAKey

◆ checkKinRange()

StatusCode JSSTaggerBase::checkKinRange ( const xAOD::Jet & jet,
asg::AcceptData & acceptData ) const
protected

Check and record if jet passes kinematic constraints.

Check each kinematic constraint Print warnings using counters

Create write decor handles

Decorate kinematic pass information

Definition at line 351 of file JSSTaggerBase.cxx.

351 {
352
353 float scale = 1.0;
354 if ( m_ptGeV ) scale = 1.e3;
355
356 bool passKinRange = true;
357
360 if ( std::abs(jet.eta()) > m_jetEtaMax ) {
361 ATH_MSG_VERBOSE( "Jet does not pass basic kinematic selection (|eta| < " << m_jetEtaMax << "). Jet eta = " << jet.eta() );
362 acceptData.setCutResult( "ValidEtaRange", false );
363 passKinRange = false;
364 }
365
366 if ( jet.pt() < m_jetPtMin * scale ) {
367 ATH_MSG_VERBOSE( "Jet does not pass basic kinematic selection (pT > " << m_jetPtMin * scale / 1.e3 << "). Jet pT = " << jet.pt() / 1.e3 << " GeV" );
368 acceptData.setCutResult( "ValidPtRangeLow", false );
369 passKinRange = false;
370 }
371
372 if ( jet.pt() > m_jetPtMax * scale ) {
373 ATH_MSG_VERBOSE( "Jet does not pass basic kinematic selection (pT < " << m_jetPtMax * scale / 1.e3 << "). Jet pT = " << jet.pt() / 1.e3 << " GeV" );
374 acceptData.setCutResult( "ValidPtRangeHigh", false );
375 passKinRange = false;
376 }
377
379 SG::WriteDecorHandle<xAOD::JetContainer, char> decValidPtRangeHigh(m_decValidPtRangeHighKey);
380 SG::WriteDecorHandle<xAOD::JetContainer, char> decValidPtRangeLow(m_decValidPtRangeLowKey);
381 SG::WriteDecorHandle<xAOD::JetContainer, char> decValidEtaRange(m_decValidEtaRangeKey);
382 SG::WriteDecorHandle<xAOD::JetContainer, char> decValidKinRange(m_decValidKinRangeKey);
383
385 decValidPtRangeHigh(jet) = acceptData.getCutResult( "ValidPtRangeHigh" );
386 decValidPtRangeLow(jet) = acceptData.getCutResult( "ValidPtRangeLow" );
387 decValidEtaRange(jet) = acceptData.getCutResult( "ValidEtaRange" );
388 decValidKinRange(jet) = passKinRange;
389
390 return StatusCode::SUCCESS;
391
392}
#define ATH_MSG_VERBOSE(x,...)
SG::WriteDecorHandleKey< xAOD::JetContainer > m_decValidPtRangeHighKey
float m_jetPtMin
Kinematic bounds for the jet - the units are controlled by m_ptGeV.
SG::WriteDecorHandleKey< xAOD::JetContainer > m_decValidPtRangeLowKey
SG::WriteDecorHandleKey< xAOD::JetContainer > m_decValidKinRangeKey
SG::WriteDecorHandleKey< xAOD::JetContainer > m_decValidEtaRangeKey
bool passKinRange(const xAOD::Jet &jet) const
Check if jet passes kinematic constraints.
bool m_ptGeV
Flag to indicate units pT is defined in Set to false by default.
void setCutResult(const std::string &cutName, bool cutResult)
Set the result of a cut, based on the cut name (safer).
Definition AcceptData.h:135
bool getCutResult(std::string_view cutName) const
Get the result of a cut, based on the cut name (safer).
Definition AcceptData.h:99

◆ declareGaudiProperty()

Gaudi::Details::PropertyBase & AthCommonDataStore< AthCommonMsg< AlgTool > >::declareGaudiProperty ( Gaudi::Property< T, V, H > & hndl,
const SG::VarHandleKeyType &  )
inlineprivateinherited

specialization for handling Gaudi::Property<SG::VarHandleKey>

Definition at line 156 of file AthCommonDataStore.h.

158 {
160 hndl.value(),
161 hndl.documentation());
162
163 }

◆ declareProperty()

Gaudi::Details::PropertyBase & AthCommonDataStore< AthCommonMsg< AlgTool > >::declareProperty ( Gaudi::Property< T, V, H > & t)
inlineinherited

Definition at line 145 of file AthCommonDataStore.h.

145 {
146 typedef typename SG::HandleClassifier<T>::type htype;
148 }
Gaudi::Details::PropertyBase & declareGaudiProperty(Gaudi::Property< T, V, H > &hndl, const SG::VarHandleKeyType &)
specialization for handling Gaudi::Property<SG::VarHandleKey>

◆ decorate()

StatusCode JSSTaggerBase::decorate ( const xAOD::JetContainer & jets) const
overridevirtual

Decorate jet collection with tagging info.

Loop over jet collection and decorate each jet.

Implements IJetDecorator.

Reimplemented in BJT::qgTagger, JSSWTopTaggerANN, JSSWTopTaggerDNN, LundNetTagger, SmoothedTopTagger, and SmoothedWZTagger.

Definition at line 269 of file JSSTaggerBase.cxx.

269 {
270
271 for ( const auto *jet : jets ) {
272 ATH_CHECK( tag(*jet) );
273 }
274
275 return StatusCode::SUCCESS;
276
277}
#define ATH_CHECK
Evaluate an expression and check for errors.
virtual StatusCode tag(const xAOD::Jet &jet) const =0
Decorate single jet with tagging info.

◆ decorateJSSRatios()

void JSSTaggerBase::decorateJSSRatios ( const xAOD::JetContainer & jets) const
protected

Create write decor handles

WTA N-subjettiness ratios

ECF ratios

Definition at line 505 of file JSSTaggerBase.cxx.

505 {
506
508 SG::WriteDecorHandle<xAOD::JetContainer, float> decTau21WTA(m_decTau21WTAKey);
509 bool decor_available = decTau21WTA.isAvailable();
510 if(decor_available) return;
511
512 SG::WriteDecorHandle<xAOD::JetContainer, float> decTau32WTA(m_decTau32WTAKey);
513 SG::WriteDecorHandle<xAOD::JetContainer, float> decTau42WTA(m_decTau42WTAKey);
514 SG::WriteDecorHandle<xAOD::JetContainer, float> decC2(m_decC2Key);
515 SG::WriteDecorHandle<xAOD::JetContainer, float> decD2(m_decD2Key);
516 SG::WriteDecorHandle<xAOD::JetContainer, float> decE3(m_decE3Key);
517 SG::WriteDecorHandle<xAOD::JetContainer, float> decL2(m_decL2Key);
518 SG::WriteDecorHandle<xAOD::JetContainer, float> decL3(m_decL3Key);
519
520 // Use pointers here so we can create only the ones we're configured for
521 std::unique_ptr<SG::ReadDecorHandle<xAOD::JetContainer, float>> readTau1WTA;
522 std::unique_ptr<SG::ReadDecorHandle<xAOD::JetContainer, float>> readTau2WTA;
523 std::unique_ptr<SG::ReadDecorHandle<xAOD::JetContainer, float>> readTau3WTA;
524 std::unique_ptr<SG::ReadDecorHandle<xAOD::JetContainer, float>> readTau4WTA;
525
526 std::unique_ptr<SG::ReadDecorHandle<xAOD::JetContainer, float>> readECF1;
527 std::unique_ptr<SG::ReadDecorHandle<xAOD::JetContainer, float>> readECF2;
528 std::unique_ptr<SG::ReadDecorHandle<xAOD::JetContainer, float>> readECF3;
529
530 std::unique_ptr<SG::ReadDecorHandle<xAOD::JetContainer, float>> readECFG331;
531 std::unique_ptr<SG::ReadDecorHandle<xAOD::JetContainer, float>> readECFG311;
532 std::unique_ptr<SG::ReadDecorHandle<xAOD::JetContainer, float>> readECFG212;
533
534 if(!m_isSmallRJet){
535 readTau1WTA = std::make_unique<SG::ReadDecorHandle<xAOD::JetContainer, float> >(m_readTau1WTAKey);
536 readTau2WTA = std::make_unique<SG::ReadDecorHandle<xAOD::JetContainer, float> >(m_readTau2WTAKey);
537 readTau3WTA = std::make_unique<SG::ReadDecorHandle<xAOD::JetContainer, float> >(m_readTau3WTAKey);
538 readTau4WTA = std::make_unique<SG::ReadDecorHandle<xAOD::JetContainer, float> >(m_readTau4WTAKey);
539
540 readECF1 = std::make_unique<SG::ReadDecorHandle<xAOD::JetContainer, float> >(m_readECF1Key);
541 readECF2 = std::make_unique<SG::ReadDecorHandle<xAOD::JetContainer, float> >(m_readECF2Key);
542 readECF3 = std::make_unique<SG::ReadDecorHandle<xAOD::JetContainer, float> >(m_readECF3Key);
543
544 readECFG331 = std::make_unique<SG::ReadDecorHandle<xAOD::JetContainer, float> >(m_readECFG331Key);
545 readECFG311 = std::make_unique<SG::ReadDecorHandle<xAOD::JetContainer, float> >(m_readECFG311Key);
546 readECFG212 = std::make_unique<SG::ReadDecorHandle<xAOD::JetContainer, float> >(m_readECFG212Key);
547 }
548
549
550 // check if the jets are decorated with the variables already
551 const bool c2_is_available = decC2.isAvailable();
552 const bool d2_is_available = decD2.isAvailable();
553 const bool e3_is_available = decE3.isAvailable();
554 const bool l2_is_available = decL2.isAvailable();
555 const bool l3_is_available = decL3.isAvailable();
556
557
558 for(const xAOD::Jet* jet : jets){
559
560 float tau21_wta = -999.0;
561 float tau32_wta = -999.0;
562 float tau42_wta = -999.0;
563
564 float C2 = -999.0;
565 float D2 = -999.0;
566 float e3 = -999.0;
567
568 float L2 = -999.0;
569 float L3 = -999.0;
570
571 if(!m_isSmallRJet){
572
574 float tau1_wta = (*readTau1WTA)(*jet);
575 float tau2_wta = (*readTau2WTA)(*jet);
576 float tau3_wta = (*readTau3WTA)(*jet);
577 float tau4_wta = (*readTau4WTA)(*jet);
578
579 if ( tau1_wta > 1e-8 ) {
580 tau21_wta = tau2_wta / tau1_wta;
581 }
582
583 if ( tau2_wta > 1e-8 ) {
584 tau32_wta = tau3_wta / tau2_wta;
585 tau42_wta = tau4_wta / tau2_wta;
586 }
587
589 float ECF1 = (*readECF1)(*jet);
590 float ECF2 = (*readECF2)(*jet);
591 float ECF3 = (*readECF3)(*jet);
592
593 if(!c2_is_available){
594 if ( ECF2 > 1e-8 )
595 C2 = ECF3 * ECF1 / std::pow( ECF2, 2.0 );
596 }
597
598 if(!d2_is_available){
599 if ( ECF2 > 1e-8 )
600 D2 = ECF3 * std::pow( ECF1, 3.0 ) / std::pow( ECF2, 3.0 );
601 }
602
603 if(!e3_is_available)
604 e3 = ECF3 / std::pow( ECF1, 3.0 );
605
606 // L-series for UFO top taggers
607 if(!l2_is_available){
608 if((*readECFG331).isAvailable() && (*readECFG212).isAvailable()){
609 if((*readECFG212)(*jet) > 1e-8){
610 L2 = (*readECFG331)(*jet) / std::pow((*readECFG212)(*jet), 1.5);
611 }
612 }
613 }
614
615
616 if(!l3_is_available){
617 if((*readECFG331).isAvailable() && (*readECFG311).isAvailable()){
618 if((*readECFG331)(*jet) > 1e-8){
619 L3 = (*readECFG311)(*jet) / std::pow((*readECFG331)(*jet), 1./3.);
620 }
621 }
622 }
623
624 }
625
626 decTau21WTA(*jet) = tau21_wta;
627 decTau32WTA(*jet) = tau32_wta;
628 decTau42WTA(*jet) = tau42_wta;
629
630 if(!c2_is_available)
631 decC2(*jet) = C2;
632
633 if(!d2_is_available)
634 decD2(*jet) = D2;
635
636 if(!e3_is_available)
637 decE3(*jet) = e3;
638
639 if(!l2_is_available)
640 decL2(*jet) = L2;
641
642 if(!l3_is_available)
643 decL3(*jet) = L3;
644
645 // TODO: Add ECFG for ANN tagger whenever it is defined
646
647 }
648
649 return;
650
651}
Jet_v1 Jet
Definition of the current "jet version".

◆ detStore()

const ServiceHandle< StoreGateSvc > & AthCommonDataStore< AthCommonMsg< AlgTool > >::detStore ( ) const
inlineinherited

The standard StoreGateSvc/DetectorStore Returns (kind of) a pointer to the StoreGateSvc.

Definition at line 95 of file AthCommonDataStore.h.

◆ evtStore()

ServiceHandle< StoreGateSvc > & AthCommonDataStore< AthCommonMsg< AlgTool > >::evtStore ( )
inlineinherited

The standard StoreGateSvc (event store) Returns (kind of) a pointer to the StoreGateSvc.

Definition at line 85 of file AthCommonDataStore.h.

◆ extraDeps_update_handler()

void AthCommonDataStore< AthCommonMsg< AlgTool > >::extraDeps_update_handler ( Gaudi::Details::PropertyBase & ExtraDeps)
protectedinherited

Add StoreName to extra input/output deps as needed.

use the logic of the VarHandleKey to parse the DataObjID keys supplied via the ExtraInputs and ExtraOuputs Properties to add the StoreName if it's not explicitly given

◆ findPV()

int JSSTaggerBase::findPV ( ) const
protected

Find the PV (to be used for Ntrk).

Definition at line 654 of file JSSTaggerBase.cxx.

654 {
655
656 int indexPV = -1;
657
658 const xAOD::VertexContainer* vxCont = nullptr;
659 if ( evtStore()->retrieve( vxCont, "PrimaryVertices" ).isFailure() ) {
660 ATH_MSG_WARNING( "Unable to retrieve primary vertex container PrimaryVertices" );
661 }
662 else {
663 int vtx_counter = 0;
664 for ( const auto *vx : *vxCont ) {
665 if ( vx->vertexType()==xAOD::VxType::PriVtx ) {
666 indexPV = vtx_counter;
667 break;
668 }
669 vtx_counter++;
670 }
671 }
672
673 return indexPV;
674
675}
#define ATH_MSG_WARNING(x,...)
ServiceHandle< StoreGateSvc > & evtStore()
@ PriVtx
Primary vertex.
VertexContainer_v1 VertexContainer
Definition of the current "Vertex container version".

◆ getConfigReader()

StatusCode JSSTaggerBase::getConfigReader ( )
protected

Get configReader StatusCode.

Get configReader TEnv.

Check for the existence of the configuration file

https://root.cern.ch/root/roottalk/roottalk02/5332.html

Definition at line 280 of file JSSTaggerBase.cxx.

280 {
281
282 ATH_MSG_INFO( "Using config file : " << m_configFile );
283
285 std::string configPath;
286
287 if ( m_calibArea.compare("Local") == 0 ) {
289 }
290 else if ( m_calibArea.find("eos") != std::string::npos) {
292 configPath = (m_calibArea+"/"+m_configFile);
293 }
294 else {
295 configPath = PathResolverFindCalibFile("BoostedJetTaggers/"+m_calibArea+"/"+m_configFile);
296 }
297
299 FileStat_t fStats;
300 int fSuccess = gSystem->GetPathInfo(configPath.c_str(), fStats);
301 if ( fSuccess ) {
302 ATH_MSG_ERROR( "Recommendations file " << m_configFile << " could not be found" );
303 return StatusCode::FAILURE;
304 }
305 else {
306 ATH_MSG_DEBUG( "Recommendations file was found : " << configPath );
307 }
308
309 if ( m_configReader.ReadFile( configPath.c_str(), EEnvLevel(0) ) ) {
310 ATH_MSG_ERROR( "Error while reading config file : "<< configPath );
311 return StatusCode::FAILURE;
312 }
313
314 return StatusCode::SUCCESS;
315
316}
#define ATH_MSG_DEBUG(x,...)
#define ATH_MSG_ERROR(x,...)
#define ATH_MSG_INFO(x,...)
std::string PathResolverFindCalibFile(const std::string &logical_file_name)
TEnv m_configReader
TEnv instance to read config files.

◆ getKey()

SG::sgkey_t asg::AsgTool::getKey ( const void * ptr) const
inherited

Get the (hashed) key of an object that is in the event store.

This is a bit of a special one. StoreGateSvc and xAOD::Event both provide ways for getting the SG::sgkey_t key for an object that is in the store, based on a bare pointer. But they provide different interfaces for doing so.

In order to allow tools to efficiently perform this operation, they can use this helper function.

See also
asg::AsgTool::getName
Parameters
ptrThe bare pointer to the object that the event store should know about
Returns
The hashed key of the object in the store. If not found, an invalid (zero) key.

Definition at line 119 of file AsgTool.cxx.

119 {
120
121#ifdef XAOD_STANDALONE
122 // In case we use @c xAOD::Event, we have a direct function call
123 // for this.
124 return evtStore()->event()->getKey( ptr );
125#else
126 const SG::DataProxy* proxy = evtStore()->proxy( ptr );
127 return ( proxy == nullptr ? 0 : proxy->sgkey() );
128#endif // XAOD_STANDALONE
129 }

◆ getName()

const std::string & asg::AsgTool::getName ( const void * ptr) const
inherited

Get the name of an object that is / should be in the event store.

This is a bit of a special one. StoreGateSvc and xAOD::Event both provide ways for getting the std::string name for an object that is in the store, based on a bare pointer. But they provide different interfaces for doing so.

In order to allow tools to efficiently perform this operation, they can use this helper function.

See also
asg::AsgTool::getKey
Parameters
ptrThe bare pointer to the object that the event store should know about
Returns
The string name of the object in the store. If not found, an empty string.

Definition at line 106 of file AsgTool.cxx.

106 {
107
108#ifdef XAOD_STANDALONE
109 // In case we use @c xAOD::Event, we have a direct function call
110 // for this.
111 return evtStore()->event()->getName( ptr );
112#else
113 const SG::DataProxy* proxy = evtStore()->proxy( ptr );
114 static const std::string dummy = "";
115 return ( proxy == nullptr ? dummy : proxy->name() );
116#endif // XAOD_STANDALONE
117 }

◆ getProperty()

template<class T>
const T * asg::AsgTool::getProperty ( const std::string & name) const
inherited

Get one of the tool's properties.

◆ getSF()

std::pair< double, double > JSSTaggerBase::getSF ( const xAOD::Jet & jet,
const std::string & truthLabelStr ) const
protected

Get scale factor and efficiency.

To apply W-tagging efficiency SF to Z-tagger, jet mass is shifted by 10.803 GeV

Definition at line 790 of file JSSTaggerBase.cxx.

790 {
791
792 if ( !passKinRange(jet) ) return std::make_pair( 1.0, 1.0 );
793
794
795 double logmOverPt = std::log(jet.m()/jet.pt());
796 if ( m_decorationName.find("SmoothZ") != std::string::npos ||
797 m_decorationName.find("SmoothInclusiveZ") != std::string::npos ) {
799 const double WtoZmassShift = 10803;
800 logmOverPt = std::log((jet.m()-WtoZmassShift)/jet.pt());
801 }
802
803 if ( logmOverPt > 0 ) logmOverPt = 0;
804
805 double SF = 1.0;
806 double eff = 1.0;
807
808 if ( auto it1 = m_weightHistograms.find(truthLabelStr.c_str()); it1 != m_weightHistograms.end() ) {
809 int pt_mPt_bin = (it1->second)->FindBin(jet.pt()*0.001, logmOverPt);
810 SF = (it1->second)->GetBinContent(pt_mPt_bin);
811 if ( auto it2 = m_efficiencyHistograms.find(truthLabelStr.c_str()); it2 != m_efficiencyHistograms.end()) {
812 eff = (it2->second)->GetBinContent(pt_mPt_bin);
813 }
814 }
815 else {
816 // set the efficiency for "Other" category to be the signal efficiency
817 std::string signal_truthLabel="";
818 if ( m_weightHistograms.count("t_qqb") ) {
819 signal_truthLabel="t_qqb";
820 }else if ( m_weightHistograms.count("V_qq") ){
821 signal_truthLabel="V_qq";
822 }else if ( m_weightHistograms.count("t") ){
823 signal_truthLabel="t";
824 }
825 if ( !signal_truthLabel.empty() && !m_efficiencyHistogramName.empty() ){
826 if (auto pw = m_weightHistograms.find(signal_truthLabel.c_str());pw != m_weightHistograms.end()){
827 int pt_mPt_bin = (pw->second)->FindBin(jet.pt()*0.001, logmOverPt);
828 if (auto pe = m_efficiencyHistograms.find(signal_truthLabel.c_str());pe != m_efficiencyHistograms.end()){
829 eff = (pe->second)->GetBinContent(pt_mPt_bin);
830 }
831 }
832 }
833
834 return std::make_pair( 1.0, eff );
835 }
836
837 if ( SF < 1e-3 ) {
838 ATH_MSG_DEBUG( "(pt, m/pt) (" << jet.pt()/1.e3 << ", " << jet.m()/jet.pt() << ") is out of range for SF calculation. Returning 1.0" );
839 return std::make_pair( 1.0, 1.0 );
840 }
841 else {
842 return std::make_pair( SF, eff );
843 }
844
845}
std::map< std::string, std::unique_ptr< TH2D >, std::less<> > m_weightHistograms
std::map< std::string, std::unique_ptr< TH2D >, std::less<> > m_efficiencyHistograms
Int_t FindBin(const TAxis *axis, const double x)
const float SF[NF]
Cross sections for Fluor.

◆ getTruthLabelStr()

std::string JSSTaggerBase::getTruthLabelStr ( const xAOD::Jet & jet,
asg::AcceptData & acceptData ) const
protected

Truth label string

Truth label value

Contained top tagger

Contained top

QCD

TCC W/Z 2-var tagger

Top

W/Z

QCD

Pass mass and D2

Fail mass, pass D2

Pass mass, fail D2

Fail mass and D2

W/Z tagger

Top

W/Z

QCD

Top

QCD

Definition at line 849 of file JSSTaggerBase.cxx.

849 {
851 std::string truthLabelStr;
852
854 SG::ReadDecorHandle<xAOD::JetContainer, int> readTruthLabel(m_readTruthLabelKey);
855 LargeRJetTruthLabel::TypeEnum jetContainment = LargeRJetTruthLabel::intToEnum(readTruthLabel(jet));
856
858 if ( m_weightHistograms.count("t_qqb") ) {
859
861 if ( jetContainment==LargeRJetTruthLabel::tqqb ) {
862 truthLabelStr = "t_qqb";
863 }
865 else if ( jetContainment==LargeRJetTruthLabel::notruth || jetContainment==LargeRJetTruthLabel::qcd ) {
866 truthLabelStr = "q";
867 }
868
869 }
871 else if ( m_weightHistograms.count("V_qq_passMpassD2") ) {
872
874 if ( jetContainment==LargeRJetTruthLabel::tqqb || jetContainment==LargeRJetTruthLabel::other_From_t ) {
875 truthLabelStr = "t_";
876 }
878 else if ( jetContainment==LargeRJetTruthLabel::Wqq || jetContainment==LargeRJetTruthLabel::Zqq || jetContainment==LargeRJetTruthLabel::Wqq_From_t ) {
879 truthLabelStr = "V_qq_";
880 }
882 else if ( jetContainment==LargeRJetTruthLabel::notruth || jetContainment==LargeRJetTruthLabel::qcd ) {
883 truthLabelStr = "q_";
884 }
885
887 if ( acceptData.getCutResult("PassMassLow") && acceptData.getCutResult("PassMassHigh") && acceptData.getCutResult("PassD2") ) {
888 truthLabelStr += "passMpassD2";
889 }
891 else if ( !(acceptData.getCutResult("PassMassLow") && acceptData.getCutResult("PassMassHigh")) && acceptData.getCutResult("PassD2") ) {
892 truthLabelStr += "failMpassD2";
893 }
895 else if ( acceptData.getCutResult("PassMassLow") && acceptData.getCutResult("PassMassHigh") && !acceptData.getCutResult("PassD2") ) {
896 truthLabelStr += "passMfailD2";
897 }
899 else{
900 truthLabelStr += "failMfailD2";
901 }
902
903 }
904
906 else if ( m_weightHistograms.count("V_qq") ) {
907
909 if ( jetContainment==LargeRJetTruthLabel::tqqb || jetContainment==LargeRJetTruthLabel::other_From_t ) {
910 truthLabelStr = "t";
911 }
913 else if ( jetContainment==LargeRJetTruthLabel::Wqq || jetContainment==LargeRJetTruthLabel::Zqq || jetContainment==LargeRJetTruthLabel::Wqq_From_t ) {
914 truthLabelStr = "V_qq";
915 }
917 else if ( jetContainment==LargeRJetTruthLabel::notruth || jetContainment==LargeRJetTruthLabel::qcd ) {
918 truthLabelStr = "q";
919 }
920 }
921
922 // inclusive top tagger
923 else {
925 if ( jetContainment==LargeRJetTruthLabel::tqqb || jetContainment==LargeRJetTruthLabel::other_From_t || jetContainment==LargeRJetTruthLabel::Wqq_From_t ) {
926 truthLabelStr = "t";
927 }
929 else if ( jetContainment==LargeRJetTruthLabel::notruth || jetContainment==LargeRJetTruthLabel::qcd ) {
930 truthLabelStr = "q";
931 }
932
933 }
934
935 return truthLabelStr;
936}
SG::ReadDecorHandleKey< xAOD::JetContainer > m_readTruthLabelKey
Truth label ReadDecorHandle key.
TypeEnum intToEnum(const int type)

◆ GetUnGroomTracks()

int JSSTaggerBase::GetUnGroomTracks ( const xAOD::Jet & jet,
int indexPV ) const
protected

Retrieve Ntrk variable from the ungroomed parent jet.

Retrieve the Ntrk variable from the ungroomed parent jet.

Definition at line 678 of file JSSTaggerBase.cxx.

678 {
679
680 SG::ReadDecorHandle<xAOD::JetContainer, ElementLink<xAOD::JetContainer> > readParent(m_readParentKey);
681
682 const xAOD::Jet * ungroomedJet = nullptr;
683 if ( readParent.isAvailable() ) {
684 const ElementLink<xAOD::JetContainer>& linkToUngroomed = readParent(jet);
685 if ( linkToUngroomed.isValid() ) {
686 ungroomedJet = *linkToUngroomed;
687
688 static const SG::ConstAccessor< std::vector<int> >acc_Ntrk("NumTrkPt500");
689
690 if ( acc_Ntrk.isAvailable(*ungroomedJet) ) {
691
692 const std::vector<int>& NTrkPt500 = acc_Ntrk(*ungroomedJet);
693
694 int jet_ntrk = NTrkPt500.at(indexPV);
695 return jet_ntrk;
696
697 }
698 else {
699 ATH_MSG_ERROR("WARNING: Unable to retrieve Ntrk of the ungroomed parent jet. Please make sure this variable is in your derivations!!!");
700 }
701 }
702 else {
703 ATH_MSG_ERROR("WARNING: Unable to retrieve the parent ungroomed jet. Please make sure this variable is in your derivations!!!");
704 }
705 }
706 else {
707 ATH_MSG_ERROR("WARNING: Unable to retrieve the link to the parent ungroomed jet. Please make sure this variable is in your derivations!!!");
708 }
709
710 return -999;
711
712}
SG::ReadDecorHandleKey< xAOD::JetContainer > m_readParentKey
SG::ConstAccessor< T, ALLOC > ConstAccessor
Definition AuxElement.h:570

◆ getWeight()

StatusCode JSSTaggerBase::getWeight ( const xAOD::Jet & jet,
bool passSel,
asg::AcceptData & acceptData ) const
protected

Get SF weight.

Inefficiency SF is directly used

Efficiency SF

Calculate inefficiency SF

If inefficiency SF is not available, SF is always 1.0

Create write decor handles

Decorate values

Definition at line 716 of file JSSTaggerBase.cxx.

716 {
717 if ( !m_calcSF ) return StatusCode::SUCCESS;
718
719 float weight = 1.0;
720 float effSF = 1.0;
721 float sigeffSF = 1.0;
722 float efficiency = 1.0;
723
724 if ( m_isMC ) {
725
726 std::string truthLabelStr = getTruthLabelStr( jet, acceptData );
727 std::tie(effSF, efficiency) = getSF( jet, truthLabelStr );
728
729 // calculate signal efficiency SF
730 if ( m_weightHistograms.count("t_qqb") ) {
731 sigeffSF = getSF(jet, "t_qqb").first;
732 } else if ( m_weightHistograms.count("V_qq") ) {
733 sigeffSF = getSF(jet, "V_qq").first;
734 } else if ( m_weightHistograms.count("t") ){
735 sigeffSF = getSF(jet, "t").first;
736 } else {
737 sigeffSF = 1.0;
738 }
739
741 if ( m_weightFlavors.find("fail") != std::string::npos ) {
742 weight = effSF;
743 }
744
745 else {
746
748 if ( passSel ) {
749 weight = effSF;
750 }
751
753 else {
755 if ( m_efficiencyHistogramName.empty() ) {
756 weight = 1.0;
757 }
758 else if ( efficiency < 1.0 ) {
759 weight = ( 1. - effSF * efficiency ) / ( 1. - efficiency );
760 }
761 else {
762 weight = 1.0;
763 }
764 }
765 }
766
767 }
768
769 else {
770 weight = 1.0;
771 }
772
774 SG::WriteDecorHandle<xAOD::JetContainer, float> decWeight(m_decWeightKey);
775 SG::WriteDecorHandle<xAOD::JetContainer, float> decEfficiency(m_decEfficiencyKey);
776 SG::WriteDecorHandle<xAOD::JetContainer, float> decEffSF(m_decEffSFKey);
777 SG::WriteDecorHandle<xAOD::JetContainer, float> decSigeffSF(m_decSigeffSFKey);
778
780 decWeight(jet) = weight;
781 decEfficiency(jet) = efficiency;
782 decEffSF(jet) = effSF;
783 decSigeffSF(jet) = sigeffSF;
784
785 return StatusCode::SUCCESS;
786
787}
std::string getTruthLabelStr(const xAOD::Jet &jet, asg::AcceptData &acceptData) const
SG::WriteDecorHandleKey< xAOD::JetContainer > m_decWeightKey
WriteDecorHandle keys for SF.
SG::WriteDecorHandleKey< xAOD::JetContainer > m_decEffSFKey
SG::WriteDecorHandleKey< xAOD::JetContainer > m_decEfficiencyKey
std::pair< double, double > getSF(const xAOD::Jet &jet, const std::string &truthLabelStr) const
Get scale factor and efficiency.
SG::WriteDecorHandleKey< xAOD::JetContainer > m_decSigeffSFKey
void efficiency(std::vector< double > &bins, std::vector< double > &values, const std::vector< std::string > &files, const std::string &histname, const std::string &tplotname, const std::string &label="")

◆ initialize()

StatusCode JSSTaggerBase::initialize ( void )
overridevirtual

Initialize the tool.

Make sure jet container is set

Initialize warning counters

Define common tagger states

Initialize decorators

Initialize SFs if they are needed

Get weight config file

Install histograms for tagging SFs

Initialize the TF1 functions

Reimplemented from asg::AsgTool.

Reimplemented in BJT::qgTagger, JSSTaggerUtils, JSSWTopTaggerANN, JSSWTopTaggerDNN, LundNetTagger, SmoothedTopTagger, and SmoothedWZTagger.

Definition at line 53 of file JSSTaggerBase.cxx.

53 {
54
56 if ( m_containerName.empty() ) {
57 ATH_MSG_ERROR( "ContainerName has not been set. Exiting" );
58 return StatusCode::FAILURE;
59 }
60 m_isSmallRJet = m_containerName.find("AntiKt4")!=std::string::npos;
61
63 m_nWarnVar = 0;
64
66 m_acceptInfo.addCut( "ValidPtRangeHigh" , "True if the jet is not too high pT" );
67 m_acceptInfo.addCut( "ValidPtRangeLow" , "True if the jet is not too low pT" );
68 m_acceptInfo.addCut( "ValidEtaRange" , "True if the jet is not too forward" );
69
70 m_acceptInfo.addCut( "ValidJetContent" , "True if the jet is alright technically (e.g. all attributes necessary for tag)" );
71 m_acceptInfo.addCut( "ValidEventContent" , "True if the event is alright technically (e.g. primary vertices)" );
72
74 ATH_MSG_INFO( "Decorators that will be attached to jet :" );
75
83
92
93 if(!m_isSmallRJet){
110 }
111
112 ATH_CHECK( m_decTau21WTAKey.initialize() );
113 ATH_CHECK( m_decTau32WTAKey.initialize() );
114 ATH_CHECK( m_decTau42WTAKey.initialize() );
115 ATH_CHECK( m_decC2Key.initialize() );
116 ATH_CHECK( m_decD2Key.initialize() );
117 ATH_CHECK( m_decE3Key.initialize() );
118 ATH_CHECK( m_decL2Key.initialize() );
119 ATH_CHECK( m_decL3Key.initialize() );
120
125
130 ATH_CHECK( m_readECF1Key.initialize(!m_isSmallRJet) );
131 ATH_CHECK( m_readECF2Key.initialize(!m_isSmallRJet) );
132 ATH_CHECK( m_readECF3Key.initialize(!m_isSmallRJet) );
136 ATH_CHECK( m_readQwKey.initialize(!m_isSmallRJet) );
137
139
140 ATH_CHECK( m_decTaggedKey.initialize() );
141 ATH_CHECK( m_decValidPtRangeHighKey.initialize() );
142 ATH_CHECK( m_decValidPtRangeLowKey.initialize() );
143 ATH_CHECK( m_decValidEtaRangeKey.initialize() );
144 ATH_CHECK( m_decValidKinRangeKey.initialize() );
145 ATH_CHECK( m_decValidJetContentKey.initialize() );
146 ATH_CHECK( m_decValidEventContentKey.initialize() );
147
148 ATH_MSG_INFO( " " << m_decTaggedKey.key() << " : pass tagging criteria" );
149 ATH_MSG_INFO( " " << m_decValidPtRangeHighKey.key() << " : pass upper pt range" );
150 ATH_MSG_INFO( " " << m_decValidPtRangeLowKey.key() << " : pass lower pt range" );
151 ATH_MSG_INFO( " " << m_decValidEtaRangeKey.key() << " : pass eta range" );
152 ATH_MSG_INFO( " " << m_decValidKinRangeKey.key() << " : pass kinematic range" );
153 ATH_MSG_INFO( " " << m_decValidJetContentKey.key() << " : has valid jet content" );
154 ATH_MSG_INFO( " " << m_decValidEventContentKey.key() << " : has valid event content" );
155
156
160
161 ATH_CHECK( m_decPassMassKey.initialize() );
162 ATH_CHECK( m_decCutMLowKey.initialize() );
163 ATH_CHECK( m_decCutMHighKey.initialize() );
164
165 ATH_MSG_INFO( " " << m_decPassMassKey.key() << " : pass mass cut" );
166 ATH_MSG_INFO( " " << m_decCutMLowKey.key() << " : lower mass cut" );
167 ATH_MSG_INFO( " " << m_decCutMHighKey.key() << " : upper mass cut" );
168
169
173
174 ATH_CHECK( m_decPassScoreKey.initialize() );
175 ATH_CHECK( m_decScoreCutKey.initialize() );
176 ATH_CHECK( m_decScoreValueKey.initialize() );
177
178 ATH_MSG_INFO( " " << m_decPassScoreKey.key() << " : pass MVA score cut" );
179 ATH_MSG_INFO( " " << m_decScoreCutKey.key() << " : MVA score cut" );
180 ATH_MSG_INFO( " " << m_decScoreValueKey.key() << " : evaluated MVA score" );
181
182
187
188 ATH_CHECK( m_decWeightKey.initialize() );
189 ATH_CHECK( m_decEfficiencyKey.initialize() );
190 ATH_CHECK( m_decEffSFKey.initialize() );
191 ATH_CHECK( m_decSigeffSFKey.initialize() );
192
193 ATH_MSG_INFO( " " << m_decWeightKey.key() << " : tagging SF" );
194
196 ATH_CHECK( m_readTruthLabelKey.initialize(!m_truthLabelName.empty()) ); // TODO Could also depend on m_isMC ?
197
198#ifndef XAOD_STANDALONE
216 }
233 }
234#endif
235
237 if ( m_calcSF ) {
238
240 m_weightConfig = std::make_unique<TFile>( m_weightConfigPath.c_str() );
241 if( !m_weightConfig ) {
242 ATH_MSG_ERROR( "SmoothedWZTagger: Error openning config file : " << m_weightConfigPath );
243 return StatusCode::FAILURE;
244 }
245
247 std::stringstream ss{m_weightFlavors};
248 std::string flavor;
249 while ( std::getline(ss, flavor, ',') ) {
250 m_weightHistograms.insert( std::make_pair( flavor, (TH2D*)m_weightConfig->Get((m_weightHistogramName+"_"+flavor).c_str()) ) );
251 if ( !m_efficiencyHistogramName.empty() ) {
252 m_efficiencyHistograms.insert( std::make_pair( flavor, (TH2D*)m_weightConfig->Get((m_efficiencyHistogramName+"_"+flavor).c_str()) ) );
253 }
254 ATH_MSG_INFO( "Tagging SF histogram for " << flavor << " is installed." );
255 }
256
257 }
258
260 if ( !m_strMassCutLow.empty() ) m_funcMassCutLow = std::make_unique<TF1>("strMassCutLow", m_strMassCutLow.c_str(), 0, 14000);
261 if ( !m_strMassCutHigh.empty() ) m_funcMassCutHigh = std::make_unique<TF1>("strMassCutHigh", m_strMassCutHigh.c_str(), 0, 14000);
262 if ( !m_strScoreCut.empty() ) m_funcScoreCut = std::make_unique<TF1>("strScoreCut", m_strScoreCut.c_str(), 0, 14000);
263
264 return StatusCode::SUCCESS;
265
266}
static Double_t ss
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)
std::unique_ptr< TF1 > m_funcMassCutLow
TF1 for cut functions.
SG::WriteDecorHandleKey< xAOD::JetContainer > m_decValidJetContentKey
SG::WriteDecorHandleKey< xAOD::JetContainer > m_decCutMHighKey
std::unique_ptr< TFile > m_weightConfig
Histograms for scale factors.
Gaudi::Property< bool > m_suppressOutputDependence
std::string m_truthLabelName
Truth label options.
Gaudi::Property< bool > m_suppressInputDependence
std::string m_weightConfigPath
Path to the SF configuration root file.
SG::ReadDecorHandleKey< xAOD::JetContainer > m_readSphericityKey
std::unique_ptr< TF1 > m_funcScoreCut
SG::ReadDecorHandleKey< xAOD::JetContainer > m_readThrustMajKey
SG::WriteDecorHandleKey< xAOD::JetContainer > m_decCutMLowKey
WriteDecorHandle keys for cut values.
SG::ReadDecorHandleKey< xAOD::JetContainer > m_readQwKey
SG::ReadDecorHandleKey< xAOD::JetContainer > m_readSplit23Key
SG::WriteDecorHandleKey< xAOD::JetContainer > m_decPassMassKey
std::atomic< int > m_nWarnVar
Warning counters.
SG::WriteDecorHandleKey< xAOD::JetContainer > m_decScoreValueKey
SG::WriteDecorHandleKey< xAOD::JetContainer > m_decScoreCutKey
SG::WriteDecorHandleKey< xAOD::JetContainer > m_decValidEventContentKey
std::unique_ptr< TF1 > m_funcMassCutHigh
asg::AcceptInfo m_acceptInfo
Object that stores the results for a jet.
SG::WriteDecorHandleKey< xAOD::JetContainer > m_decTaggedKey
WriteDecorHandle keys for tagging bools.
SG::WriteDecorHandleKey< xAOD::JetContainer > m_decPassScoreKey
SG::ReadDecorHandleKey< xAOD::JetContainer > m_readSplit12Key

◆ inputHandles()

virtual std::vector< Gaudi::DataHandle * > AthCommonDataStore< AthCommonMsg< AlgTool > >::inputHandles ( ) const
overridevirtualinherited

Return this algorithm's input handles.

We override this to include handle instances from key arrays if they have not yet been declared. See comments on updateVHKA.

◆ modify()

virtual StatusCode IJetDecorator::modify ( xAOD::JetContainer & jets) const
inlinefinaloverridevirtualinherited

Concrete implementation of the function inherited from IJetModifier.

Implements IJetModifier.

Definition at line 32 of file IJetDecorator.h.

32{return decorate(jets);};
virtual StatusCode decorate(const xAOD::JetContainer &jets) const =0
Decorate a jet collection without otherwise modifying it.

◆ msg()

MsgStream & AthCommonMsg< AlgTool >::msg ( ) const
inlineinherited

Definition at line 24 of file AthCommonMsg.h.

24 {
25 return this->msgStream();
26 }

◆ msg_level_name()

const std::string & asg::AsgTool::msg_level_name ( ) const
inherited

A deprecated function for getting the message level's name.

Instead of using this, weirdly named function, user code should get the string name of the current minimum message level (in case they really need it...), with:

MSG::name( msg().level() )

This function's name doesn't follow the ATLAS coding rules, and as such will be removed in the not too distant future.

Returns
The string name of the current minimum message level that's printed

Definition at line 101 of file AsgTool.cxx.

101 {
102
103 return MSG::name( msg().level() );
104 }
MsgStream & msg() const
const std::string & name(Level lvl)
Convenience function for translating message levels to strings.
Definition MsgLevel.cxx:19

◆ msgLvl()

bool AthCommonMsg< AlgTool >::msgLvl ( const MSG::Level lvl) const
inlineinherited

Definition at line 30 of file AthCommonMsg.h.

30 {
31 return this->msgLevel(lvl);
32 }

◆ outputHandles()

virtual std::vector< Gaudi::DataHandle * > AthCommonDataStore< AthCommonMsg< AlgTool > >::outputHandles ( ) const
overridevirtualinherited

Return this algorithm's output handles.

We override this to include handle instances from key arrays if they have not yet been declared. See comments on updateVHKA.

◆ passKinRange()

bool JSSTaggerBase::passKinRange ( const xAOD::Jet & jet) const
protected

Check if jet passes kinematic constraints.

Definition at line 337 of file JSSTaggerBase.cxx.

337 {
338
339 float scale = 1.0;
340 if ( m_ptGeV ) scale = 1.e3;
341
342 if ( jet.pt() < m_jetPtMin * scale ) return false;
343 if ( jet.pt() > m_jetPtMax * scale ) return false;
344 if ( std::abs( jet.eta() ) > m_jetEtaMax ) return false;
345
346 return true;
347
348}

◆ print()

void asg::AsgTool::print ( ) const
virtualinherited

Print the state of the tool.

Implements asg::IAsgTool.

Reimplemented in AsgHelloTool, HI::HIPileupTool, JetFromPseudojet, JetPileupLabelingTool, JetPseudojetRetriever, JetSubStructureMomentToolsBase, JetTruthLabelingTool, and KtDeltaRTool.

Definition at line 131 of file AsgTool.cxx.

131 {
132
133 ATH_MSG_INFO( "AsgTool " << name() << " @ " << this );
134 return;
135 }

◆ printCuts()

void JSSTaggerBase::printCuts ( ) const
protected

Print configured cuts.

Definition at line 938 of file JSSTaggerBase.cxx.

938 {
939 ATH_MSG_INFO( "After tagging, you will have access to the following cuts as an asg::AcceptData : (<NCut>) <cut> : <description>)" );
940 int nCuts = m_acceptInfo.getNCuts();
941 for ( int iCut=0; iCut < nCuts; iCut++ ) {
942 std::string cut_string = "";
943 cut_string += " (";
944 cut_string += std::to_string(iCut);
945 cut_string += ") ";
946 cut_string += m_acceptInfo.getCutName(iCut).data();
947 cut_string += " : ";
948 cut_string += m_acceptInfo.getCutDescription(iCut).data();
949 ATH_MSG_INFO( cut_string );
950 }
951}

◆ 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 > AthCommonDataStore< AthCommonMsg< AlgTool > >::renounce ( T & h)
inlineprotectedinherited

Definition at line 368 of file AthCommonDataStore.h.

369 {
370 h.renounce();
372 }

◆ renounceArray()

void AthCommonDataStore< AthCommonMsg< AlgTool > >::renounceArray ( SG::VarHandleKeyArray & handlesArray)
inlineprotectedinherited

remove all handles from I/O resolution

Definition at line 352 of file AthCommonDataStore.h.

352 {
354 }

◆ resetCuts()

StatusCode JSSTaggerBase::resetCuts ( asg::AcceptData & acceptData) const
protected

Reset cuts.

Reset the AcceptData cut results to false

Initialize common cuts to true by default

Definition at line 319 of file JSSTaggerBase.cxx.

319 {
320
322 acceptData.clear();
323
325 acceptData.setCutResult( "ValidJetContent", true );
326 acceptData.setCutResult( "ValidEventContent", true );
327
328 acceptData.setCutResult( "ValidPtRangeHigh", true );
329 acceptData.setCutResult( "ValidPtRangeLow" , true );
330 acceptData.setCutResult( "ValidEtaRange" , true );
331
332 return StatusCode::SUCCESS;
333
334}
void clear()
Clear all bits.
Definition AcceptData.h:55

◆ sysInitialize()

virtual StatusCode AthCommonDataStore< AthCommonMsg< AlgTool > >::sysInitialize ( )
overridevirtualinherited

Perform system initialization for an algorithm.

We override this to declare all the elements of handle key arrays at the end of initialization. See comments on updateVHKA.

Reimplemented in asg::AsgMetadataTool, AthCheckedComponent< AthAlgTool >, and AthCheckedComponent<::AthAlgTool >.

◆ sysStart()

virtual StatusCode AthCommonDataStore< AthCommonMsg< AlgTool > >::sysStart ( )
overridevirtualinherited

Handle START transition.

We override this in order to make sure that conditions handle keys can cache a pointer to the conditions container.

◆ tag()

virtual StatusCode JSSTaggerBase::tag ( const xAOD::Jet & jet) const
protectedpure virtual

Decorate single jet with tagging info.

Implemented in BJT::qgTagger, JSSTaggerUtils, JSSWTopTaggerANN, JSSWTopTaggerDNN, LundNetTagger, SmoothedTopTagger, and SmoothedWZTagger.

◆ updateVHKA()

void AthCommonDataStore< AthCommonMsg< AlgTool > >::updateVHKA ( Gaudi::Details::PropertyBase & )
inlineinherited

Definition at line 298 of file AthCommonDataStore.h.

298 {
299 for (auto &a : m_vhka) {
301 for (auto k : keys) {
302 k->setOwner(this);
303 }
304 }
305 }
std::vector< SG::VarHandleKeyArray * > m_vhka

Member Data Documentation

◆ m_acceptInfo

asg::AcceptInfo JSSTaggerBase::m_acceptInfo
protected

Object that stores the results for a jet.

Definition at line 65 of file JSSTaggerBase.h.

◆ m_calcSF

bool JSSTaggerBase::m_calcSF {}
protected

Flag to calculate scale factor.

Definition at line 188 of file JSSTaggerBase.h.

188{};

◆ m_calibArea

std::string JSSTaggerBase::m_calibArea
protected

Location where config files live on cvmfs.

Definition at line 112 of file JSSTaggerBase.h.

◆ m_configFile

std::string JSSTaggerBase::m_configFile
protected

Configuration file name.

Definition at line 109 of file JSSTaggerBase.h.

◆ m_configReader

TEnv JSSTaggerBase::m_configReader
protected

TEnv instance to read config files.

Definition at line 62 of file JSSTaggerBase.h.

◆ m_containerName

std::string JSSTaggerBase::m_containerName
protected

Configurable members.

Jet container name

Definition at line 102 of file JSSTaggerBase.h.

◆ m_decC2Key

SG::WriteDecorHandleKey<xAOD::JetContainer> JSSTaggerBase::m_decC2Key {this, "C2NameOut", "C2", "SG key for C2"}
protected

Definition at line 139 of file JSSTaggerBase.h.

139{this, "C2NameOut", "C2", "SG key for C2"};

◆ m_decCutMHighKey

SG::WriteDecorHandleKey<xAOD::JetContainer> JSSTaggerBase::m_decCutMHighKey {this, "CutMHighName", "Cut_mhigh", "SG key for Cut_mhigh"}
protected

Definition at line 211 of file JSSTaggerBase.h.

211{this, "CutMHighName", "Cut_mhigh", "SG key for Cut_mhigh"};

◆ m_decCutMLowKey

SG::WriteDecorHandleKey<xAOD::JetContainer> JSSTaggerBase::m_decCutMLowKey {this, "CutMLowName", "Cut_mlow", "SG key for Cut_mlow"}
protected

WriteDecorHandle keys for cut values.

Definition at line 210 of file JSSTaggerBase.h.

210{this, "CutMLowName", "Cut_mlow", "SG key for Cut_mlow"};

◆ m_decD2Key

SG::WriteDecorHandleKey<xAOD::JetContainer> JSSTaggerBase::m_decD2Key {this, "D2NameOut", "D2", "SG key for D2"}
protected

Definition at line 140 of file JSSTaggerBase.h.

140{this, "D2NameOut", "D2", "SG key for D2"};

◆ m_decE3Key

SG::WriteDecorHandleKey<xAOD::JetContainer> JSSTaggerBase::m_decE3Key {this, "e3NameOut", "e3", "SG key for e3"}
protected

Definition at line 141 of file JSSTaggerBase.h.

141{this, "e3NameOut", "e3", "SG key for e3"};

◆ m_decEfficiencyKey

SG::WriteDecorHandleKey<xAOD::JetContainer> JSSTaggerBase::m_decEfficiencyKey {this, "efficiencyName", "efficiency", "SG key for efficiency"}
protected

Definition at line 217 of file JSSTaggerBase.h.

217{this, "efficiencyName", "efficiency", "SG key for efficiency"};

◆ m_decEffSFKey

SG::WriteDecorHandleKey<xAOD::JetContainer> JSSTaggerBase::m_decEffSFKey {this, "effSFName", "effSF", "SG key for effSF"}
protected

Definition at line 218 of file JSSTaggerBase.h.

218{this, "effSFName", "effSF", "SG key for effSF"};

◆ m_decL2Key

SG::WriteDecorHandleKey<xAOD::JetContainer> JSSTaggerBase::m_decL2Key {this, "L2NameOut", "L2", "SG key for L2"}
protected

Definition at line 142 of file JSSTaggerBase.h.

142{this, "L2NameOut", "L2", "SG key for L2"};

◆ m_decL3Key

SG::WriteDecorHandleKey<xAOD::JetContainer> JSSTaggerBase::m_decL3Key {this, "L3NameOut", "L3", "SG key for L3"}
protected

Definition at line 143 of file JSSTaggerBase.h.

143{this, "L3NameOut", "L3", "SG key for L3"};

◆ m_decorationName

std::string JSSTaggerBase::m_decorationName
protected

Decoration name.

Definition at line 183 of file JSSTaggerBase.h.

◆ m_decPassMassKey

SG::WriteDecorHandleKey<xAOD::JetContainer> JSSTaggerBase::m_decPassMassKey {this, "PassMassName", "PassMass", "SG key for PassMass"}
protected

Definition at line 76 of file JSSTaggerBase.h.

76{this, "PassMassName", "PassMass", "SG key for PassMass"};

◆ m_decPassScoreKey

SG::WriteDecorHandleKey<xAOD::JetContainer> JSSTaggerBase::m_decPassScoreKey {this, "PassScoreName", "PassScore", "SG key for PassScore"}
protected

Definition at line 77 of file JSSTaggerBase.h.

77{this, "PassScoreName", "PassScore", "SG key for PassScore"};

◆ m_decScoreCutKey

SG::WriteDecorHandleKey<xAOD::JetContainer> JSSTaggerBase::m_decScoreCutKey {this, "CutScoreName", "Cut_score", "SG key for Cut_score"}
protected

Definition at line 212 of file JSSTaggerBase.h.

212{this, "CutScoreName", "Cut_score", "SG key for Cut_score"};

◆ m_decScoreValueKey

SG::WriteDecorHandleKey<xAOD::JetContainer> JSSTaggerBase::m_decScoreValueKey {this, "ScoreName", "Score", "SG key for Score"}
protected

Definition at line 213 of file JSSTaggerBase.h.

213{this, "ScoreName", "Score", "SG key for Score"};

◆ m_decSigeffSFKey

SG::WriteDecorHandleKey<xAOD::JetContainer> JSSTaggerBase::m_decSigeffSFKey {this, "sigeffSFName", "sigeffSF", "SG key for effSF"}
protected

Definition at line 219 of file JSSTaggerBase.h.

219{this, "sigeffSFName", "sigeffSF", "SG key for effSF"};

◆ m_decTaggedKey

SG::WriteDecorHandleKey<xAOD::JetContainer> JSSTaggerBase::m_decTaggedKey {this, "TaggedName", "Tagged", "SG key for Tagged"}
protected

WriteDecorHandle keys for tagging bools.

Definition at line 68 of file JSSTaggerBase.h.

68{this, "TaggedName", "Tagged", "SG key for Tagged"};

◆ m_decTau21WTAKey

SG::WriteDecorHandleKey<xAOD::JetContainer> JSSTaggerBase::m_decTau21WTAKey {this, "Tau21WTANameOut", "Tau21_wta", "SG key for Tau21_wta"}
protected

WriteDecorHandle keys for JSS moments.

Definition at line 135 of file JSSTaggerBase.h.

135{this, "Tau21WTANameOut", "Tau21_wta", "SG key for Tau21_wta"};

◆ m_decTau32WTAKey

SG::WriteDecorHandleKey<xAOD::JetContainer> JSSTaggerBase::m_decTau32WTAKey {this, "Tau32WTANameOut", "Tau32_wta", "SG key for Tau32_wta"}
protected

Definition at line 136 of file JSSTaggerBase.h.

136{this, "Tau32WTANameOut", "Tau32_wta", "SG key for Tau32_wta"};

◆ m_decTau42WTAKey

SG::WriteDecorHandleKey<xAOD::JetContainer> JSSTaggerBase::m_decTau42WTAKey {this, "Tau42WTANameOut", "Tau42_wta", "SG key for Tau42_wta"}
protected

Definition at line 137 of file JSSTaggerBase.h.

137{this, "Tau42WTANameOut", "Tau42_wta", "SG key for Tau42_wta"};

◆ m_decValidEtaRangeKey

SG::WriteDecorHandleKey<xAOD::JetContainer> JSSTaggerBase::m_decValidEtaRangeKey {this, "ValidEtaRangeName", "ValidEtaRange", "SG key for ValidEtaRange"}
protected

Definition at line 71 of file JSSTaggerBase.h.

71{this, "ValidEtaRangeName", "ValidEtaRange", "SG key for ValidEtaRange"};

◆ m_decValidEventContentKey

SG::WriteDecorHandleKey<xAOD::JetContainer> JSSTaggerBase::m_decValidEventContentKey {this, "ValidEventContentName", "ValidEventContent", "SG key for ValidEventContent"}
protected

Definition at line 74 of file JSSTaggerBase.h.

74{this, "ValidEventContentName", "ValidEventContent", "SG key for ValidEventContent"};

◆ m_decValidJetContentKey

SG::WriteDecorHandleKey<xAOD::JetContainer> JSSTaggerBase::m_decValidJetContentKey {this, "ValidJetContentName", "ValidJetContent", "SG key for ValidJetContent"}
protected

Definition at line 73 of file JSSTaggerBase.h.

73{this, "ValidJetContentName", "ValidJetContent", "SG key for ValidJetContent"};

◆ m_decValidKinRangeKey

SG::WriteDecorHandleKey<xAOD::JetContainer> JSSTaggerBase::m_decValidKinRangeKey {this, "ValidKinRangeName", "ValidKinRange", "SG key for ValidKinRange"}
protected

Definition at line 72 of file JSSTaggerBase.h.

72{this, "ValidKinRangeName", "ValidKinRange", "SG key for ValidKinRange"};

◆ m_decValidPtRangeHighKey

SG::WriteDecorHandleKey<xAOD::JetContainer> JSSTaggerBase::m_decValidPtRangeHighKey {this, "ValidPtRangeHighName", "ValidPtRangeHigh", "SG key for ValidPtRangeHigh"}
protected

Definition at line 69 of file JSSTaggerBase.h.

69{this, "ValidPtRangeHighName", "ValidPtRangeHigh", "SG key for ValidPtRangeHigh"};

◆ m_decValidPtRangeLowKey

SG::WriteDecorHandleKey<xAOD::JetContainer> JSSTaggerBase::m_decValidPtRangeLowKey {this, "ValidPtRangeLowName", "ValidPtRangeLow", "SG key for ValidPtRangeLow"}
protected

Definition at line 70 of file JSSTaggerBase.h.

70{this, "ValidPtRangeLowName", "ValidPtRangeLow", "SG key for ValidPtRangeLow"};

◆ m_decWeightKey

SG::WriteDecorHandleKey<xAOD::JetContainer> JSSTaggerBase::m_decWeightKey {this, "weightName", "weight", "SG key for weight"}
protected

WriteDecorHandle keys for SF.

Definition at line 216 of file JSSTaggerBase.h.

216{this, "weightName", "weight", "SG key for weight"};

◆ m_detStore

StoreGateSvc_t AthCommonDataStore< AthCommonMsg< AlgTool > >::m_detStore
privateinherited

Pointer to StoreGate (detector store by default).

Definition at line 381 of file AthCommonDataStore.h.

◆ m_efficiencyHistogramName

std::string JSSTaggerBase::m_efficiencyHistogramName
protected

Definition at line 195 of file JSSTaggerBase.h.

◆ m_efficiencyHistograms

std::map<std::string, std::unique_ptr<TH2D>, std::less<> > JSSTaggerBase::m_efficiencyHistograms
protected

Definition at line 201 of file JSSTaggerBase.h.

◆ m_evtStore

StoreGateSvc_t AthCommonDataStore< AthCommonMsg< AlgTool > >::m_evtStore
privateinherited

Pointer to StoreGate (event store by default).

Definition at line 378 of file AthCommonDataStore.h.

◆ m_funcMassCutHigh

std::unique_ptr<TF1> JSSTaggerBase::m_funcMassCutHigh
protected

Definition at line 179 of file JSSTaggerBase.h.

◆ m_funcMassCutLow

std::unique_ptr<TF1> JSSTaggerBase::m_funcMassCutLow
protected

TF1 for cut functions.

Definition at line 178 of file JSSTaggerBase.h.

◆ m_funcScoreCut

std::unique_ptr<TF1> JSSTaggerBase::m_funcScoreCut
protected

Definition at line 180 of file JSSTaggerBase.h.

◆ m_isMC

bool JSSTaggerBase::m_isMC {}
protected

Definition at line 189 of file JSSTaggerBase.h.

189{};

◆ m_isSmallRJet

bool JSSTaggerBase::m_isSmallRJet = false
protected

Definition at line 103 of file JSSTaggerBase.h.

◆ m_jetEtaMax

float JSSTaggerBase::m_jetEtaMax {}
protected

Definition at line 127 of file JSSTaggerBase.h.

127{};

◆ m_jetPtMax

float JSSTaggerBase::m_jetPtMax {}
protected

Definition at line 126 of file JSSTaggerBase.h.

126{};

◆ m_jetPtMin

float JSSTaggerBase::m_jetPtMin {}
protected

Kinematic bounds for the jet - the units are controlled by m_ptGeV.

Definition at line 125 of file JSSTaggerBase.h.

125{};

◆ m_kerasCalibArea

std::string JSSTaggerBase::m_kerasCalibArea
protected

Definition at line 118 of file JSSTaggerBase.h.

◆ m_kerasConfigFileName

std::string JSSTaggerBase::m_kerasConfigFileName
protected

Keras configurations for ML taggers.

Definition at line 115 of file JSSTaggerBase.h.

◆ m_kerasConfigFilePath

std::string JSSTaggerBase::m_kerasConfigFilePath
protected

Definition at line 116 of file JSSTaggerBase.h.

◆ m_kerasConfigOutputName

std::string JSSTaggerBase::m_kerasConfigOutputName
protected

Definition at line 117 of file JSSTaggerBase.h.

◆ m_nWarnMax

const int JSSTaggerBase::m_nWarnMax = 10
protected

Maximum number of warnings.

Definition at line 80 of file JSSTaggerBase.h.

◆ m_nWarnVar

std::atomic<int> JSSTaggerBase::m_nWarnVar
mutableprotected

Warning counters.

Definition at line 83 of file JSSTaggerBase.h.

◆ m_ptGeV

bool JSSTaggerBase::m_ptGeV = false
protected

Flag to indicate units pT is defined in Set to false by default.

Definition at line 87 of file JSSTaggerBase.h.

◆ m_readECF1Key

SG::ReadDecorHandleKey<xAOD::JetContainer> JSSTaggerBase::m_readECF1Key {this, "ECF1Name", "ECF1", "SG key for ECF1"}
protected

Definition at line 151 of file JSSTaggerBase.h.

151{this, "ECF1Name", "ECF1", "SG key for ECF1"};

◆ m_readECF2Key

SG::ReadDecorHandleKey<xAOD::JetContainer> JSSTaggerBase::m_readECF2Key {this, "ECF2Name", "ECF2", "SG key for ECF2"}
protected

Definition at line 152 of file JSSTaggerBase.h.

152{this, "ECF2Name", "ECF2", "SG key for ECF2"};

◆ m_readECF3Key

SG::ReadDecorHandleKey<xAOD::JetContainer> JSSTaggerBase::m_readECF3Key {this, "ECF3Name", "ECF3", "SG key for ECF3"}
protected

Definition at line 153 of file JSSTaggerBase.h.

153{this, "ECF3Name", "ECF3", "SG key for ECF3"};

◆ m_readECFG212Key

SG::ReadDecorHandleKey<xAOD::JetContainer> JSSTaggerBase::m_readECFG212Key {this, "ECFG212Name", "ECFG_2_1_2", "SG key for ECFG_2_1_2"}
protected

Definition at line 165 of file JSSTaggerBase.h.

165{this, "ECFG212Name", "ECFG_2_1_2", "SG key for ECFG_2_1_2"};

◆ m_readECFG311Key

SG::ReadDecorHandleKey<xAOD::JetContainer> JSSTaggerBase::m_readECFG311Key {this, "ECFG311Name", "ECFG_3_1_1", "SG key for ECFG_3_1_1"}
protected

Definition at line 164 of file JSSTaggerBase.h.

164{this, "ECFG311Name", "ECFG_3_1_1", "SG key for ECFG_3_1_1"};

◆ m_readECFG331Key

SG::ReadDecorHandleKey<xAOD::JetContainer> JSSTaggerBase::m_readECFG331Key {this, "ECFG331Name", "ECFG_3_3_1", "SG key for ECFG_3_3_1"}
protected

Definition at line 163 of file JSSTaggerBase.h.

163{this, "ECFG331Name", "ECFG_3_3_1", "SG key for ECFG_3_3_1"};

◆ m_readParentKey

SG::ReadDecorHandleKey<xAOD::JetContainer> JSSTaggerBase::m_readParentKey {this, "ParentName", "Parent", "SG key for Parent"}
protected

Definition at line 167 of file JSSTaggerBase.h.

167{this, "ParentName", "Parent", "SG key for Parent"};

◆ m_readQwKey

SG::ReadDecorHandleKey<xAOD::JetContainer> JSSTaggerBase::m_readQwKey {this, "QwName", "Qw", "SG key for Qw"}
protected

Definition at line 158 of file JSSTaggerBase.h.

158{this, "QwName", "Qw", "SG key for Qw"};

◆ m_readSphericityKey

SG::ReadDecorHandleKey<xAOD::JetContainer> JSSTaggerBase::m_readSphericityKey {this, "SphericityName", "Sphericity", "SG key for Sphericity"}
protected

Definition at line 161 of file JSSTaggerBase.h.

161{this, "SphericityName", "Sphericity", "SG key for Sphericity"};

◆ m_readSplit12Key

SG::ReadDecorHandleKey<xAOD::JetContainer> JSSTaggerBase::m_readSplit12Key {this, "Split12Name", "Split12", "SG key for Split12"}
protected

Definition at line 155 of file JSSTaggerBase.h.

155{this, "Split12Name", "Split12", "SG key for Split12"};

◆ m_readSplit23Key

SG::ReadDecorHandleKey<xAOD::JetContainer> JSSTaggerBase::m_readSplit23Key {this, "Split23Name", "Split23", "SG key for Split23"}
protected

Definition at line 156 of file JSSTaggerBase.h.

156{this, "Split23Name", "Split23", "SG key for Split23"};

◆ m_readTau1WTAKey

SG::ReadDecorHandleKey<xAOD::JetContainer> JSSTaggerBase::m_readTau1WTAKey {this, "Tau1WTAName", "Tau1_wta", "SG key for Tau1_wta"}
protected

ReadDecorHandle keys for JSS moments.

Definition at line 146 of file JSSTaggerBase.h.

146{this, "Tau1WTAName", "Tau1_wta", "SG key for Tau1_wta"};

◆ m_readTau2WTAKey

SG::ReadDecorHandleKey<xAOD::JetContainer> JSSTaggerBase::m_readTau2WTAKey {this, "Tau2WTAName", "Tau2_wta", "SG key for Tau2_wta"}
protected

Definition at line 147 of file JSSTaggerBase.h.

147{this, "Tau2WTAName", "Tau2_wta", "SG key for Tau2_wta"};

◆ m_readTau3WTAKey

SG::ReadDecorHandleKey<xAOD::JetContainer> JSSTaggerBase::m_readTau3WTAKey {this, "Tau3WTAName", "Tau3_wta", "SG key for Tau3_wta"}
protected

Definition at line 148 of file JSSTaggerBase.h.

148{this, "Tau3WTAName", "Tau3_wta", "SG key for Tau3_wta"};

◆ m_readTau4WTAKey

SG::ReadDecorHandleKey<xAOD::JetContainer> JSSTaggerBase::m_readTau4WTAKey {this, "Tau4WTAName", "Tau4_wta", "SG key for Tau4_wta"}
protected

Definition at line 149 of file JSSTaggerBase.h.

149{this, "Tau4WTAName", "Tau4_wta", "SG key for Tau4_wta"};

◆ m_readThrustMajKey

SG::ReadDecorHandleKey<xAOD::JetContainer> JSSTaggerBase::m_readThrustMajKey {this, "ThrustMajName", "ThrustMaj", "SG key for ThrustMaj"}
protected

Definition at line 160 of file JSSTaggerBase.h.

160{this, "ThrustMajName", "ThrustMaj", "SG key for ThrustMaj"};

◆ m_readTruthLabelKey

SG::ReadDecorHandleKey<xAOD::JetContainer> JSSTaggerBase::m_readTruthLabelKey {this, "truthLabelName", "truthLabel", "SG key for truthLabel"}
protected

Truth label ReadDecorHandle key.

Definition at line 207 of file JSSTaggerBase.h.

207{this, "truthLabelName", "truthLabel", "SG key for truthLabel"};

◆ m_scoreDecorationName

Gaudi::Property<std::string> JSSTaggerBase::m_scoreDecorationName {this, "scoreDecorationName", "", "tagger output scoure decoration name"}
protected

Definition at line 184 of file JSSTaggerBase.h.

184{this, "scoreDecorationName", "", "tagger output scoure decoration name"};

◆ m_strMassCutHigh

std::string JSSTaggerBase::m_strMassCutHigh
protected

Definition at line 174 of file JSSTaggerBase.h.

◆ m_strMassCutLow

std::string JSSTaggerBase::m_strMassCutLow
protected

Strings for cut functions.

Definition at line 173 of file JSSTaggerBase.h.

◆ m_strScoreCut

std::string JSSTaggerBase::m_strScoreCut
protected

Definition at line 175 of file JSSTaggerBase.h.

◆ m_suppressInputDependence

Gaudi::Property<bool> JSSTaggerBase::m_suppressInputDependence {this, "SuppressInputDependence", false}
protected

Definition at line 169 of file JSSTaggerBase.h.

169{this, "SuppressInputDependence", false};

◆ m_suppressOutputDependence

Gaudi::Property<bool> JSSTaggerBase::m_suppressOutputDependence {this, "SuppressOutputDependence", false}
protected

Definition at line 170 of file JSSTaggerBase.h.

170{this, "SuppressOutputDependence", false};

◆ m_tagClass

TAGCLASS JSSTaggerBase::m_tagClass {Unknown}
protected

Definition at line 97 of file JSSTaggerBase.h.

97{Unknown};

◆ m_tagType

std::string JSSTaggerBase::m_tagType
protected

Definition at line 122 of file JSSTaggerBase.h.

◆ m_truthLabelName

std::string JSSTaggerBase::m_truthLabelName
protected

Truth label options.

Definition at line 204 of file JSSTaggerBase.h.

◆ m_useECFG

bool JSSTaggerBase::m_useECFG = false
protected

Flags controlling whether generalized ECF moments or L-series ratios are needed TODO: Implement the functionality controlled by these.

Definition at line 131 of file JSSTaggerBase.h.

◆ m_useLSeries

bool JSSTaggerBase::m_useLSeries = false
protected

Definition at line 132 of file JSSTaggerBase.h.

◆ m_useMassCut

bool JSSTaggerBase::m_useMassCut = false
protected

Flag to indicate if mass window cut is used.

Definition at line 90 of file JSSTaggerBase.h.

◆ m_useScoreCut

bool JSSTaggerBase::m_useScoreCut = false
protected

Flag to indicate if a discriminant score is used.

Definition at line 93 of file JSSTaggerBase.h.

◆ m_varHandleArraysDeclared

bool AthCommonDataStore< AthCommonMsg< AlgTool > >::m_varHandleArraysDeclared
privateinherited

Definition at line 387 of file AthCommonDataStore.h.

◆ m_vhka

std::vector<SG::VarHandleKeyArray*> AthCommonDataStore< AthCommonMsg< AlgTool > >::m_vhka
privateinherited

Definition at line 386 of file AthCommonDataStore.h.

◆ m_weightConfig

std::unique_ptr<TFile> JSSTaggerBase::m_weightConfig
protected

Histograms for scale factors.

Definition at line 199 of file JSSTaggerBase.h.

◆ m_weightConfigPath

std::string JSSTaggerBase::m_weightConfigPath
protected

Path to the SF configuration root file.

Definition at line 106 of file JSSTaggerBase.h.

◆ m_weightDecorationName

std::string JSSTaggerBase::m_weightDecorationName
protected

String for scale factor decoration names.

Definition at line 192 of file JSSTaggerBase.h.

◆ m_weightFileName

std::string JSSTaggerBase::m_weightFileName
protected

Definition at line 193 of file JSSTaggerBase.h.

◆ m_weightFlavors

std::string JSSTaggerBase::m_weightFlavors
protected

Definition at line 196 of file JSSTaggerBase.h.

◆ m_weightHistogramName

std::string JSSTaggerBase::m_weightHistogramName
protected

Definition at line 194 of file JSSTaggerBase.h.

◆ m_weightHistograms

std::map<std::string, std::unique_ptr<TH2D>, std::less<> > JSSTaggerBase::m_weightHistograms
protected

Definition at line 200 of file JSSTaggerBase.h.

◆ m_wkpt

std::string JSSTaggerBase::m_wkpt
protected

Tagger information.

Definition at line 121 of file JSSTaggerBase.h.


The documentation for this class was generated from the following files: