ATLAS Offline Software
Loading...
Searching...
No Matches
JSSTaggerUtils Class Reference

#include <JSSTaggerUtils.h>

Inheritance diagram for JSSTaggerUtils:
Collaboration diagram for JSSTaggerUtils:

Public Member Functions

 JSSTaggerUtils (const std::string &name)
 Constructor.
virtual StatusCode initialize () override
 Run once at the start of the job to setup everything.
virtual StatusCode tag (const xAOD::Jet &jet) const override
 IJetSelectorTool interface.
TH2D MakeJetImage (TString TagImage, const xAOD::Jet *jet, std::vector< xAOD::JetConstituent > constituents) const override
StatusCode GetImageScore (const xAOD::JetContainer &jets) const override
StatusCode GetConstScore (const xAOD::JetContainer &jets) const override
StatusCode GetQGConstScore (const xAOD::JetContainer &jets) const override
StatusCode GetTopConstScore (const xAOD::JetContainer &jets) const override
StatusCode GetWConstScore (const xAOD::JetContainer &jets) const override
StatusCode GetPolarisationScore (const xAOD::JetContainer &jets) const override
StatusCode GetHLScore (const xAOD::JetContainer &jets) const override
std::map< std::string, double > GetJSSVars (const xAOD::Jet &jet) const override
StatusCode ReadScaler () override
virtual StatusCode decorate (const xAOD::JetContainer &jets) const override
 Decorate jet collection with tagging info.
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.

Public Attributes

std::map< std::string, std::vector< double > > m_scaler

Protected Types

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

Protected Member Functions

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::JetContainerm_decTaggedKey {this, "TaggedName", "Tagged", "SG key for Tagged"}
 WriteDecorHandle keys for tagging bools.
SG::WriteDecorHandleKey< xAOD::JetContainerm_decValidPtRangeHighKey {this, "ValidPtRangeHighName", "ValidPtRangeHigh", "SG key for ValidPtRangeHigh"}
SG::WriteDecorHandleKey< xAOD::JetContainerm_decValidPtRangeLowKey {this, "ValidPtRangeLowName", "ValidPtRangeLow", "SG key for ValidPtRangeLow"}
SG::WriteDecorHandleKey< xAOD::JetContainerm_decValidEtaRangeKey {this, "ValidEtaRangeName", "ValidEtaRange", "SG key for ValidEtaRange"}
SG::WriteDecorHandleKey< xAOD::JetContainerm_decValidKinRangeKey {this, "ValidKinRangeName", "ValidKinRange", "SG key for ValidKinRange"}
SG::WriteDecorHandleKey< xAOD::JetContainerm_decValidJetContentKey {this, "ValidJetContentName", "ValidJetContent", "SG key for ValidJetContent"}
SG::WriteDecorHandleKey< xAOD::JetContainerm_decValidEventContentKey {this, "ValidEventContentName", "ValidEventContent", "SG key for ValidEventContent"}
SG::WriteDecorHandleKey< xAOD::JetContainerm_decPassMassKey {this, "PassMassName", "PassMass", "SG key for PassMass"}
SG::WriteDecorHandleKey< xAOD::JetContainerm_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_tmvaConfigFileName
 TMVA configurations for BDT taggers.
std::string m_tmvaConfigFilePath
std::string m_tmvaCalibArea
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::JetContainerm_decTau21WTAKey {this, "Tau21WTANameOut", "Tau21_wta", "SG key for Tau21_wta"}
 WriteDecorHandle keys for JSS moments.
SG::WriteDecorHandleKey< xAOD::JetContainerm_decTau32WTAKey {this, "Tau32WTANameOut", "Tau32_wta", "SG key for Tau32_wta"}
SG::WriteDecorHandleKey< xAOD::JetContainerm_decTau42WTAKey {this, "Tau42WTANameOut", "Tau42_wta", "SG key for Tau42_wta"}
SG::WriteDecorHandleKey< xAOD::JetContainerm_decC2Key {this, "C2NameOut", "C2", "SG key for C2"}
SG::WriteDecorHandleKey< xAOD::JetContainerm_decD2Key {this, "D2NameOut", "D2", "SG key for D2"}
SG::WriteDecorHandleKey< xAOD::JetContainerm_decE3Key {this, "e3NameOut", "e3", "SG key for e3"}
SG::WriteDecorHandleKey< xAOD::JetContainerm_decL2Key {this, "L2NameOut", "L2", "SG key for L2"}
SG::WriteDecorHandleKey< xAOD::JetContainerm_decL3Key {this, "L3NameOut", "L3", "SG key for L3"}
SG::ReadDecorHandleKey< xAOD::JetContainerm_readTau1WTAKey {this, "Tau1WTAName", "Tau1_wta", "SG key for Tau1_wta"}
 ReadDecorHandle keys for JSS moments.
SG::ReadDecorHandleKey< xAOD::JetContainerm_readTau2WTAKey {this, "Tau2WTAName", "Tau2_wta", "SG key for Tau2_wta"}
SG::ReadDecorHandleKey< xAOD::JetContainerm_readTau3WTAKey {this, "Tau3WTAName", "Tau3_wta", "SG key for Tau3_wta"}
SG::ReadDecorHandleKey< xAOD::JetContainerm_readTau4WTAKey {this, "Tau4WTAName", "Tau4_wta", "SG key for Tau4_wta"}
SG::ReadDecorHandleKey< xAOD::JetContainerm_readECF1Key {this, "ECF1Name", "ECF1", "SG key for ECF1"}
SG::ReadDecorHandleKey< xAOD::JetContainerm_readECF2Key {this, "ECF2Name", "ECF2", "SG key for ECF2"}
SG::ReadDecorHandleKey< xAOD::JetContainerm_readECF3Key {this, "ECF3Name", "ECF3", "SG key for ECF3"}
SG::ReadDecorHandleKey< xAOD::JetContainerm_readSplit12Key {this, "Split12Name", "Split12", "SG key for Split12"}
SG::ReadDecorHandleKey< xAOD::JetContainerm_readSplit23Key {this, "Split23Name", "Split23", "SG key for Split23"}
SG::ReadDecorHandleKey< xAOD::JetContainerm_readQwKey {this, "QwName", "Qw", "SG key for Qw"}
SG::ReadDecorHandleKey< xAOD::JetContainerm_readThrustMajKey {this, "ThrustMajName", "ThrustMaj", "SG key for ThrustMaj"}
SG::ReadDecorHandleKey< xAOD::JetContainerm_readSphericityKey {this, "SphericityName", "Sphericity", "SG key for Sphericity"}
SG::ReadDecorHandleKey< xAOD::JetContainerm_readECFG331Key {this, "ECFG331Name", "ECFG_3_3_1", "SG key for ECFG_3_3_1"}
SG::ReadDecorHandleKey< xAOD::JetContainerm_readECFG311Key {this, "ECFG311Name", "ECFG_3_1_1", "SG key for ECFG_3_1_1"}
SG::ReadDecorHandleKey< xAOD::JetContainerm_readECFG212Key {this, "ECFG212Name", "ECFG_2_1_2", "SG key for ECFG_2_1_2"}
SG::ReadDecorHandleKey< xAOD::JetContainerm_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.
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 > > m_weightHistograms
std::map< std::string, std::unique_ptr< TH2D > > m_efficiencyHistograms
bool m_truthLabelUseTRUTH3 {}
 Truth label options.
std::string m_truthParticleContainerName
std::string m_truthBosonContainerName
std::string m_truthTopQuarkContainerName
std::string m_truthLabelName
SG::ReadDecorHandleKey< xAOD::JetContainerm_readTruthLabelKey {this, "truthLabelName", "truthLabel", "SG key for truthLabel"}
 Truth label ReadDecorHandle key.
SG::WriteDecorHandleKey< xAOD::JetContainerm_decCutMLowKey {this, "CutMLowName", "Cut_mlow", "SG key for Cut_mlow"}
 WriteDecorHandle keys for cut values.
SG::WriteDecorHandleKey< xAOD::JetContainerm_decCutMHighKey {this, "CutMHighName", "Cut_mhigh", "SG key for Cut_mhigh"}
SG::WriteDecorHandleKey< xAOD::JetContainerm_decScoreCutKey {this, "CutScoreName", "Cut_score", "SG key for Cut_score"}
SG::WriteDecorHandleKey< xAOD::JetContainerm_decScoreValueKey {this, "ScoreName", "Score", "SG key for Score"}
SG::WriteDecorHandleKey< xAOD::JetContainerm_decWeightKey {this, "weightName", "weight", "SG key for weight"}
 WriteDecorHandle keys for SF.
SG::WriteDecorHandleKey< xAOD::JetContainerm_decEfficiencyKey {this, "efficiencyName", "efficiency", "SG key for efficiency"}
SG::WriteDecorHandleKey< xAOD::JetContainerm_decEffSFKey {this, "effSFName", "effSF", "SG key for effSF"}
SG::WriteDecorHandleKey< xAOD::JetContainerm_decSigeffSFKey {this, "sigeffSFName", "sigeffSF", "SG key for effSF"}

Private Types

typedef ServiceHandle< StoreGateSvcStoreGateSvc_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

int m_nbins_eta {}
int m_nbins_phi {}
double m_min_eta {}
double m_max_eta {}
double m_min_phi {}
double m_max_phi {}
int m_ncolors {}
bool m_dorscaling {}
double m_rscaling_p0 {}
double m_rscaling_p1 {}
bool m_UseConstTagger {}
ToolHandle< AthONNX::IJSSMLToolm_MLBosonTagger {"", this}
bool m_UseHLTagger {}
ToolHandle< AthONNX::IJSSMLToolm_MLBosonTagger_HL {"", this}
SG::WriteDecorHandleKey< xAOD::JetContainerm_decNConstituentsKey {this, "nConstituentsName", "nConstituents", "SG key for constituents multiplicity"}
 WriteDecorHandle keys.
SG::WriteDecorHandleKey< xAOD::JetContainerm_decNTopoTowersKey {this, "nTopoTowersName", "nTopoTowers", "SG key for towers multiplicity"}
SG::WriteDecorHandleKey< xAOD::JetContainerm_decConstScoreKey {this, "ConstScoreNameDec", "ConstScore", "SG key for ConstScore"}
SG::WriteDecorHandleKey< xAOD::JetContainerm_decHLScoreKey {this, "HLScoreName", "HLScore", "SG key for HLScore"}
std::unique_ptr< SG::ConstAccessor< float > > m_constScoreAcc = nullptr
SG::WriteDecorHandleKey< xAOD::JetContainerm_decConstScoreQGKey {this, "ConstScoreQGNameDec", "ConstScore_qg", "SG key for qg node"}
SG::WriteDecorHandleKey< xAOD::JetContainerm_decConstScoreWLKey {this, "ConstScoreWLNameDec", "ConstScore_wl", "SG key for WL node"}
SG::WriteDecorHandleKey< xAOD::JetContainerm_decConstScoreWTKey {this, "ConstScoreWTNameDec", "ConstScore_wt", "SG key for WT node"}
SG::WriteDecorHandleKey< xAOD::JetContainerm_decConstScoreZLKey {this, "ConstScoreZLNameDec", "ConstScore_zl", "SG key for ZL node"}
SG::WriteDecorHandleKey< xAOD::JetContainerm_decConstScoreZTKey {this, "ConstScoreZTNameDec", "ConstScore_zt", "SG key for ZT node"}
SG::WriteDecorHandleKey< xAOD::JetContainerm_decConstScoreCosTKey {this, "ConstScoreCosTNameDec", "ConstScore_cosT", "SG key for cosT regress"}
SG::WriteDecorHandleKey< xAOD::JetContainerm_decConstScorePT1Key {this, "ConstScorePT1NameDec", "ConstScore_pT1", "SG key for pT1 regress"}
SG::WriteDecorHandleKey< xAOD::JetContainerm_decConstScoreEta1Key {this, "ConstScoreEta1NameDec", "ConstScore_eta1", "SG key for eta1 regress"}
SG::WriteDecorHandleKey< xAOD::JetContainerm_decConstScorePhi1Key {this, "ConstScorePhi1NameDec", "ConstScore_phi1", "SG key for phi1 regress"}
SG::WriteDecorHandleKey< xAOD::JetContainerm_decConstScorePT2Key {this, "ConstScorePT2NameDec", "ConstScore_pT2", "SG key for pT2 regress"}
SG::WriteDecorHandleKey< xAOD::JetContainerm_decConstScoreEta2Key {this, "ConstScoreEta2NameDec", "ConstScore_eta2", "SG key for eta2 regress"}
SG::WriteDecorHandleKey< xAOD::JetContainerm_decConstScorePhi2Key {this, "ConstScorePhi2NameDec", "ConstScore_phi2", "SG key for phi2 regress"}
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 14 of file JSSTaggerUtils.h.

Member Typedef Documentation

◆ StoreGateSvc_t

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

Definition at line 388 of file AthCommonDataStore.h.

Member Enumeration Documentation

◆ TAGCLASS

enum JSSTaggerBase::TAGCLASS
protectedinherited

TAGTYPE enum.

Enumerator
Unknown 
WBoson 
ZBoson 
TopQuark 

Definition at line 97 of file JSSTaggerBase.h.

Constructor & Destructor Documentation

◆ JSSTaggerUtils()

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

Constructor.

Definition at line 35 of file JSSTaggerUtils.cxx.

35 :
36 JSSTaggerBase( name )
37{
38 declareProperty("MLBosonTagger", m_MLBosonTagger, "Tool to manage the data pre-processing and inference of the Const model");
39 declareProperty("MLBosonTaggerHL", m_MLBosonTagger_HL, "Tool to manage the data pre-processing and inference of the High-Level model");
40 declareProperty("nPixelsEta", m_nbins_eta);
41 declareProperty("nPixelsPhi", m_nbins_phi);
42 declareProperty("nColors", m_ncolors);
43 declareProperty("MinEtaRange", m_min_eta);
44 declareProperty("MaxEtaRange", m_max_eta);
45 declareProperty("MinPhiRange", m_min_phi);
46 declareProperty("MaxPhiRange", m_max_phi);
47 declareProperty("DoRScaling", m_dorscaling);
48 declareProperty("RScaling_p0", m_rscaling_p0);
49 declareProperty("RScaling_p1", m_rscaling_p1);
50}
Gaudi::Details::PropertyBase & declareProperty(Gaudi::Property< T, V, H > &t)
JSSTaggerBase(const std::string &name)
Default constructor - to be used in all derived classes.
ToolHandle< AthONNX::IJSSMLTool > m_MLBosonTagger_HL
ToolHandle< AthONNX::IJSSMLTool > m_MLBosonTagger

Member Function Documentation

◆ calculateJSSRatios()

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

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 410 of file JSSTaggerBase.cxx.

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

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 364 of file JSSTaggerBase.cxx.

364 {
365
366 float scale = 1.0;
367 if ( m_ptGeV ) scale = 1.e3;
368
369 bool passKinRange = true;
370
373 if ( std::abs(jet.eta()) > m_jetEtaMax ) {
374 ATH_MSG_VERBOSE( "Jet does not pass basic kinematic selection (|eta| < " << m_jetEtaMax << "). Jet eta = " << jet.eta() );
375 acceptData.setCutResult( "ValidEtaRange", false );
376 passKinRange = false;
377 }
378
379 if ( jet.pt() < m_jetPtMin * scale ) {
380 ATH_MSG_VERBOSE( "Jet does not pass basic kinematic selection (pT > " << m_jetPtMin * scale / 1.e3 << "). Jet pT = " << jet.pt() / 1.e3 << " GeV" );
381 acceptData.setCutResult( "ValidPtRangeLow", false );
382 passKinRange = false;
383 }
384
385 if ( jet.pt() > m_jetPtMax * scale ) {
386 ATH_MSG_VERBOSE( "Jet does not pass basic kinematic selection (pT < " << m_jetPtMax * scale / 1.e3 << "). Jet pT = " << jet.pt() / 1.e3 << " GeV" );
387 acceptData.setCutResult( "ValidPtRangeHigh", false );
388 passKinRange = false;
389 }
390
392 SG::WriteDecorHandle<xAOD::JetContainer, char> decValidPtRangeHigh(m_decValidPtRangeHighKey);
393 SG::WriteDecorHandle<xAOD::JetContainer, char> decValidPtRangeLow(m_decValidPtRangeLowKey);
394 SG::WriteDecorHandle<xAOD::JetContainer, char> decValidEtaRange(m_decValidEtaRangeKey);
395 SG::WriteDecorHandle<xAOD::JetContainer, char> decValidKinRange(m_decValidKinRangeKey);
396
398 decValidPtRangeHigh(jet) = acceptData.getCutResult( "ValidPtRangeHigh" );
399 decValidPtRangeLow(jet) = acceptData.getCutResult( "ValidPtRangeLow" );
400 decValidEtaRange(jet) = acceptData.getCutResult( "ValidEtaRange" );
401 decValidKinRange(jet) = passKinRange;
402
403 return StatusCode::SUCCESS;
404
405}
#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:134
bool getCutResult(const std::string &cutName) const
Get the result of a cut, based on the cut name (safer)
Definition AcceptData.h:98
virtual double pt() const
The transverse momentum ( ) of the particle.
Definition Jet_v1.cxx:44
virtual double eta() const
The pseudorapidity ( ) of the particle.
Definition Jet_v1.cxx:49

◆ 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
overridevirtualinherited

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 282 of file JSSTaggerBase.cxx.

282 {
283
284 for ( const auto *jet : jets ) {
285 ATH_CHECK( tag(*jet) );
286 }
287
288 return StatusCode::SUCCESS;
289
290}
#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
protectedinherited

Create write decor handles

WTA N-subjettiness ratios

ECF ratios

Definition at line 518 of file JSSTaggerBase.cxx.

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

Find the PV (to be used for Ntrk)

Definition at line 641 of file JSSTaggerBase.cxx.

641 {
642
643 int indexPV = -1;
644
645 const xAOD::VertexContainer* vxCont = nullptr;
646 if ( evtStore()->retrieve( vxCont, "PrimaryVertices" ).isFailure() ) {
647 ATH_MSG_WARNING( "Unable to retrieve primary vertex container PrimaryVertices" );
648 }
649 else {
650 int vtx_counter = 0;
651 for ( const auto *vx : *vxCont ) {
652 if ( vx->vertexType()==xAOD::VxType::PriVtx ) {
653 indexPV = vtx_counter;
654 break;
655 }
656 vtx_counter++;
657 }
658 }
659
660 return indexPV;
661
662}
#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 ( )
protectedinherited

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 293 of file JSSTaggerBase.cxx.

293 {
294
295 ATH_MSG_INFO( "Using config file : " << m_configFile );
296
298 std::string configPath;
299
300 if ( m_calibArea.compare("Local") == 0 ) {
302 }
303 else if ( m_calibArea.find("eos") != std::string::npos) {
304 configPath = PathResolverFindCalibFile((m_calibArea+"/"+m_configFile).c_str());
305 configPath = (m_calibArea+"/"+m_configFile).c_str();
306 }
307 else {
308 configPath = PathResolverFindCalibFile(("BoostedJetTaggers/"+m_calibArea+"/"+m_configFile).c_str());
309 }
310
312 FileStat_t fStats;
313 int fSuccess = gSystem->GetPathInfo(configPath.c_str(), fStats);
314 if ( fSuccess ) {
315 ATH_MSG_ERROR( "Recommendations file " << m_configFile << " could not be found" );
316 return StatusCode::FAILURE;
317 }
318 else {
319 ATH_MSG_DEBUG( "Recommendations file was found : " << configPath );
320 }
321
322 if ( m_configReader.ReadFile( configPath.c_str(), EEnvLevel(0) ) ) {
323 ATH_MSG_ERROR( "Error while reading config file : "<< configPath );
324 return StatusCode::FAILURE;
325 }
326
327 return StatusCode::SUCCESS;
328
329}
#define ATH_MSG_ERROR(x)
#define ATH_MSG_INFO(x)
#define ATH_MSG_DEBUG(x)
std::string PathResolverFindCalibFile(const std::string &logical_file_name)
std::string m_calibArea
Location where config files live on cvmfs.
std::string m_configFile
Configuration file name.
TEnv m_configReader
TEnv instance to read config files.

◆ GetConstScore()

StatusCode JSSTaggerUtils::GetConstScore ( const xAOD::JetContainer & jets) const
overridevirtual

Implements IJSSTaggerUtils.

Definition at line 262 of file JSSTaggerUtils.cxx.

262 {
263
264 SG::WriteDecorHandle<xAOD::JetContainer, float> decConstScore(m_decConstScoreKey);
265 SG::WriteDecorHandle<xAOD::JetContainer, float> decNConstituents(m_decNConstituentsKey);
266 SG::WriteDecorHandle<xAOD::JetContainer, float> decNTopoTowers(m_decNTopoTowersKey);
267
268 for(const xAOD::Jet *jet : jets){
269
270 // init value
271 float score (-99.);
272
273 // get constituents
274 std::vector<xAOD::JetConstituent> constituents = jet -> getConstituents().asSTLVector();
275 std::sort( constituents.begin(), constituents.end(), DescendingPtSorterConstituents) ;
276
277 int MaxConstituents (100);
278 std::vector<xAOD::JetConstituent> constituentsForModel;
279
280 if( constituents.size() > 100 )
281 constituentsForModel = std::vector<xAOD::JetConstituent> (constituents.begin(), constituents.begin() + MaxConstituents);
282 else
283 constituentsForModel = constituents;
284
285 // get towers
286 std::vector<const xAOD::CaloCluster*> towers;
288 if (towersAcc.isAvailable(*jet)){
289 // Vector of towers linked to jets
290 std::vector<ElementLink<DataVector<xAOD::IParticle>>> towerLinks = towersAcc(*jet);
291 for (auto link_itr : towerLinks){
292 if (!link_itr.isValid()) continue;
293 towers.push_back(dynamic_cast<const xAOD::CaloCluster *>(*link_itr));
294 }
295 }
297
298 // use ML tool on constituents
299 std::vector<float> m, pT, eta, phi, E;
300 for(auto cnst : constituents){
301 m.push_back( cnst -> m() );
302 pT.push_back( cnst -> pt() );
303 eta.push_back( cnst -> eta() );
304 phi.push_back( cnst -> phi() );
305 E.push_back( cnst -> e() );
306 }
307 std::vector<std::vector<float>> constituents_packed = {m, pT, eta, phi};
308
309 m.clear(); pT.clear(); eta.clear(); phi.clear();
310 for(auto cnst : towers){
311 m.push_back( cnst -> m() );
312 pT.push_back( cnst -> pt() );
313 eta.push_back( cnst -> eta() );
314 phi.push_back( cnst -> phi() );
315 E.push_back( cnst -> e() );
316 }
317 std::vector<std::vector<float>> towers_packed = {m, pT, eta, phi};
318
319 // pack for the ML tool
320 std::vector<std::vector<float>> inputs_packed = {
321 constituents_packed.at(0), constituents_packed.at(1), constituents_packed.at(2), constituents_packed.at(3),
322 towers_packed.at(0), towers_packed.at(1), towers_packed.at(2), towers_packed.at(3),
323 };
324
325 // evaluate the model
326 if( (constituents.size() + towers.size()) > 1 )
327 score = m_MLBosonTagger -> retrieveConstituentsScore(inputs_packed);
328
329 // save decorator
330 decConstScore(*jet) = score;
331
332 // and inputs as well
333 decNConstituents(*jet) = constituents.size();
334 decNTopoTowers(*jet) = towers.size();
335
336 }
337
338 return StatusCode::SUCCESS;
339
340}
Scalar eta() const
pseudorapidity method
Scalar phi() const
phi method
bool DescendingPtSorterConstituents(const xAOD::JetConstituent p1, const xAOD::JetConstituent p2)
SG::WriteDecorHandleKey< xAOD::JetContainer > m_decNTopoTowersKey
SG::WriteDecorHandleKey< xAOD::JetContainer > m_decNConstituentsKey
WriteDecorHandle keys.
SG::WriteDecorHandleKey< xAOD::JetContainer > m_decConstScoreKey
SG::ConstAccessor< T, ALLOC > ConstAccessor
Definition AuxElement.h:570
void sort(typename DataModel_detail::iterator< DVL > beg, typename DataModel_detail::iterator< DVL > end)
Specialization of sort for DataVector/List.
CaloCluster_v1 CaloCluster
Define the latest version of the calorimeter cluster class.

◆ GetHLScore()

StatusCode JSSTaggerUtils::GetHLScore ( const xAOD::JetContainer & jets) const
overridevirtual

Implements IJSSTaggerUtils.

Definition at line 483 of file JSSTaggerUtils.cxx.

483 {
484
485 SG::WriteDecorHandle<xAOD::JetContainer, float> decHLScore(m_decHLScoreKey);
486
487 // make available JSS variables
488 decorateJSSRatios(jets);
489
490 for(const xAOD::Jet* jet : jets){
491
492 // init value
493 float score (-99.);
494
495 // get input variables
496 std::map<std::string, double> JSSVars = GetJSSVars(*jet);
497
498 // evaluate the model
499 score = m_MLBosonTagger_HL -> retrieveHighLevelScore(JSSVars);
500
501 // save decorator
502 decHLScore(*jet) = score;
503
504 }
505
506 return StatusCode::SUCCESS;
507
508}
void decorateJSSRatios(const xAOD::JetContainer &jets) const
SG::WriteDecorHandleKey< xAOD::JetContainer > m_decHLScoreKey
std::map< std::string, double > GetJSSVars(const xAOD::Jet &jet) const override

◆ GetImageScore()

StatusCode JSSTaggerUtils::GetImageScore ( const xAOD::JetContainer & jets) const
overridevirtual

Implements IJSSTaggerUtils.

Definition at line 196 of file JSSTaggerUtils.cxx.

196 {
197
198 SG::WriteDecorHandle<xAOD::JetContainer, float> decConstScore(m_decConstScoreKey);
199
200 for(const xAOD::Jet* jet : jets){
201
202 // init value
203 float score (-99.);
204
205 // preliminary actions for constituents
206 // add a dedicated function for this?
207
208 // get constituents
209 std::vector<xAOD::JetConstituent> constituents = jet -> getConstituents().asSTLVector();
210 std::sort( constituents.begin(), constituents.end(), DescendingPtSorterConstituents) ;
211
212 int MaxConstituents (100);
213 std::vector<xAOD::JetConstituent> constituentsForModel;
214
215 if( constituents.size() > 100 )
216 constituentsForModel = std::vector<xAOD::JetConstituent> (constituents.begin(), constituents.begin() + MaxConstituents);
217 else
218 constituentsForModel = constituents;
219
220 // constituents - charged
221 std::vector<xAOD::JetConstituent> csts_charged = constituentsForModel;
222 csts_charged.erase( std::remove_if( csts_charged.begin(), csts_charged.end(),
223 [] (xAOD::JetConstituent constituent) -> bool {
224 const xAOD::FlowElement* ufo = dynamic_cast<const xAOD::FlowElement*>(constituent.rawConstituent());
225 return ufo -> signalType() != xAOD::FlowElement::SignalType::Charged;
226 }), csts_charged.end()) ;
227
228 // constituents - neutral
229 std::vector<xAOD::JetConstituent> csts_neutral = constituentsForModel;
230 csts_neutral.erase( std::remove_if( csts_neutral.begin(), csts_neutral.end(),
231 [] (xAOD::JetConstituent constituent) -> bool {
232 const xAOD::FlowElement* ufo = dynamic_cast<const xAOD::FlowElement*>(constituent.rawConstituent());
233 return ufo -> signalType() != xAOD::FlowElement::SignalType::Neutral;
234 }), csts_neutral.end()) ;
235
236 // constituents - combined
237 std::vector<xAOD::JetConstituent> csts_combined = constituentsForModel;
238 csts_combined.erase( std::remove_if( csts_combined.begin(), csts_combined.end(),
239 [] (xAOD::JetConstituent constituent){
240 const xAOD::FlowElement* ufo = dynamic_cast<const xAOD::FlowElement*>(constituent.rawConstituent());
241 return ufo -> signalType() != xAOD::FlowElement::SignalType::Combined;
242 }), csts_combined.end()) ;
243
244 // use ML tool on constituents
245 TH2D ImageCharged = MakeJetImage("Charged" , jet, csts_charged );
246 TH2D ImageNeutral = MakeJetImage("Neutral" , jet, csts_neutral );
247 TH2D ImageCombined = MakeJetImage("Combined", jet, csts_combined);
248
249 std::vector<TH2D> Images = {ImageCharged, ImageNeutral, ImageCombined};
250
251 // evaluate the model
252 score = m_MLBosonTagger -> retrieveConstituentsScore(Images);
253
254 // save decorator
255 decConstScore(*jet) = score;
256 }
257
258 return StatusCode::SUCCESS;
259
260}
TH2D MakeJetImage(TString TagImage, const xAOD::Jet *jet, std::vector< xAOD::JetConstituent > constituents) const override
DataModel_detail::iterator< DVL > remove_if(typename DataModel_detail::iterator< DVL > beg, typename DataModel_detail::iterator< DVL > end, Predicate pred)
Specialization of remove_if for DataVector/List.

◆ GetJSSVars()

std::map< std::string, double > JSSTaggerUtils::GetJSSVars ( const xAOD::Jet & jet) const
overridevirtual

Implements IJSSTaggerUtils.

Definition at line 510 of file JSSTaggerUtils.cxx.

510 {
511
512 std::map<std::string, double> JSSVars;
513
514 // retrieve ungroomed tracks multiplicity
515 int nUngrTracks (-1);
516 int pv_location = findPV();
517 if(pv_location != -1)
518 nUngrTracks = GetUnGroomTracks(jet, pv_location);
519
520 // store input variables
521 JSSVars["pT"] = jet.pt();
522 JSSVars["nTracks"] = nUngrTracks;
523 JSSVars["CNN"] = (*m_constScoreAcc)(jet);
524
525 // define the decorator readers
526 SG::ReadDecorHandle<xAOD::JetContainer, float> readSplit12(m_readSplit12Key);
527 SG::ReadDecorHandle<xAOD::JetContainer, float> readSplit23(m_readSplit23Key);
528
529 SG::ReadDecorHandle<xAOD::JetContainer, float> readTau1_wta(m_readTau1WTAKey);
530 SG::ReadDecorHandle<xAOD::JetContainer, float> readTau2_wta(m_readTau2WTAKey);
531 SG::ReadDecorHandle<xAOD::JetContainer, float> readTau3_wta(m_readTau3WTAKey);
532
533 SG::ReadDecorHandle<xAOD::JetContainer, float> readECF1(m_readECF1Key);
534 SG::ReadDecorHandle<xAOD::JetContainer, float> readECF2(m_readECF2Key);
535 SG::ReadDecorHandle<xAOD::JetContainer, float> readECF3(m_readECF3Key);
536
537 SG::ReadDecorHandle<xAOD::JetContainer, float> readQw(m_readQwKey);
538
539 // define the ConstAccessor
540 static const SG::ConstAccessor<float> FoxWolfram0Acc("FoxWolfram0");
541 static const SG::ConstAccessor<float> FoxWolfram2Acc("FoxWolfram2");
542 static const SG::ConstAccessor<float> PlanarFlowAcc("PlanarFlow");
543 static const SG::ConstAccessor<float> AngularityAcc("Angularity");
544 static const SG::ConstAccessor<float> AplanarityAcc("Aplanarity");
545 static const SG::ConstAccessor<float> ZCut12Acc("ZCut12");
546 static const SG::ConstAccessor<float> KtDRAcc("KtDR");
547 static const SG::ConstAccessor<float> D2Acc("D2");
548
549 // split
550 JSSVars["Split12"] = readSplit12(jet);
551 JSSVars["Split23"] = readSplit23(jet);
552
553 // Energy Correlation Functions
554 JSSVars["D2"] = D2Acc(jet);
555
556 // Tau123 WTA
557 JSSVars["Tau1_wta"] = readTau1_wta(jet);
558 JSSVars["Tau2_wta"] = readTau2_wta(jet);
559 JSSVars["Tau3_wta"] = readTau3_wta(jet);
560
561 // ECF
562 JSSVars["ECF1"] = readECF1(jet);
563 JSSVars["ECF2"] = readECF2(jet);
564 JSSVars["ECF3"] = readECF3(jet);
565
566 // Qw
567 JSSVars["Qw"] = readQw(jet);
568
569 // Other moments
570 JSSVars["FoxWolfram0"] = FoxWolfram0Acc.withDefault(jet, -99.);
571 JSSVars["FoxWolfram2"] = FoxWolfram2Acc.withDefault(jet, -99.);
572 JSSVars["PlanarFlow"] = PlanarFlowAcc.withDefault(jet, -99.);
573 JSSVars["Angularity"] = AngularityAcc.withDefault(jet, -99.);
574 JSSVars["Aplanarity"] = AplanarityAcc.withDefault(jet, -99.);
575 JSSVars["ZCut12"] = ZCut12Acc.withDefault(jet, -99.);
576 JSSVars["KtDR"] = KtDRAcc.withDefault(jet, -99.);
577
578 return JSSVars;
579
580}
int GetUnGroomTracks(const xAOD::Jet &jet, int indexPV) const
Retrieve Ntrk variable from the ungroomed parent jet.
SG::ReadDecorHandleKey< xAOD::JetContainer > m_readQwKey
int findPV() const
Find the PV (to be used for Ntrk)
SG::ReadDecorHandleKey< xAOD::JetContainer > m_readSplit23Key
SG::ReadDecorHandleKey< xAOD::JetContainer > m_readSplit12Key

◆ 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::TEvent 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::TEvent, 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::TEvent 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::TEvent, 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 }

◆ GetPolarisationScore()

StatusCode JSSTaggerUtils::GetPolarisationScore ( const xAOD::JetContainer & jets) const
overridevirtual

Implements IJSSTaggerUtils.

Definition at line 984 of file JSSTaggerUtils.cxx.

984 {
985
986 SG::WriteDecorHandle<xAOD::JetContainer, float> decConstScore(m_decConstScoreKey);
987
988 SG::WriteDecorHandle<xAOD::JetContainer, float> decConstScore_qg(m_decConstScoreQGKey);
989 SG::WriteDecorHandle<xAOD::JetContainer, float> decConstScore_wl(m_decConstScoreWLKey);
990 SG::WriteDecorHandle<xAOD::JetContainer, float> decConstScore_wt(m_decConstScoreWTKey);
991 SG::WriteDecorHandle<xAOD::JetContainer, float> decConstScore_zl(m_decConstScoreZLKey);
992 SG::WriteDecorHandle<xAOD::JetContainer, float> decConstScore_zt(m_decConstScoreZTKey);
993
994 SG::WriteDecorHandle<xAOD::JetContainer, float> decConstScore_cosT(m_decConstScoreCosTKey);
995 SG::WriteDecorHandle<xAOD::JetContainer, float> decConstScore_pT1(m_decConstScorePT1Key);
996 SG::WriteDecorHandle<xAOD::JetContainer, float> decConstScore_eta1(m_decConstScoreEta1Key);
997 SG::WriteDecorHandle<xAOD::JetContainer, float> decConstScore_phi1(m_decConstScorePhi1Key);
998 SG::WriteDecorHandle<xAOD::JetContainer, float> decConstScore_pT2(m_decConstScorePT2Key);
999 SG::WriteDecorHandle<xAOD::JetContainer, float> decConstScore_eta2(m_decConstScoreEta2Key);
1000 SG::WriteDecorHandle<xAOD::JetContainer, float> decConstScore_phi2(m_decConstScorePhi2Key);
1001
1002 // define vectors to store constituents for calculations
1003 const long unsigned int nMaxConstituents (70);
1004 std::vector<float> pT, eta, phi, E;
1005 pT.reserve(nMaxConstituents); eta.reserve(nMaxConstituents); phi.reserve(nMaxConstituents); E.reserve(nMaxConstituents);
1006
1007 for(const xAOD::Jet *jet : jets){
1008
1009 // init value
1010 std::vector<float> scores;
1011
1012 // get constituents
1013 std::vector<xAOD::JetConstituent> constituents = jet -> getConstituents().asSTLVector();
1014
1015 // skip non physical constituents
1016 constituents.erase( std::remove_if( constituents.begin(), constituents.end(),
1017 [] (xAOD::JetConstituent constituent) -> bool {return constituent -> pt() < 1.e-3;}),
1018 constituents.end()) ;
1019
1020 // sort by pT
1021 std::sort( constituents.begin(), constituents.end(), DescendingPtSorterConstituents) ;
1022
1023 std::vector<xAOD::JetConstituent> constituentsForModel;
1024
1025 if( constituents.size() > nMaxConstituents )
1026 {
1027 constituentsForModel = std::vector<xAOD::JetConstituent> (constituents.begin(), constituents.begin() + nMaxConstituents);
1028 }
1029 else
1030 constituentsForModel = constituents;
1031
1032 // build constituents, mask and base momentum for interaction variables
1033 std::vector<std::vector<float>> const_vars;
1034 std::vector<std::vector<float>> masks_vars;
1035 std::vector<std::vector<std::vector<float>>> inter_vars;
1036
1037 for (const auto& ci : constituentsForModel) {
1038
1039 // put the constituent in a tlv for help
1040 TLorentzVector constituent_i;
1041 constituent_i.SetPtEtaPhiE(ci.pt(), ci.eta(), ci.phi(), ci.e());
1042
1043 // calculate variables
1044 float log_pT = log(ci.pt());
1045 float log_E = log(ci.e());
1046 float log_pT_rel = log(Clip(ci.pt() / jet->pt(), 1.e-8));
1047 float log_E_rel = log(Clip(ci.e() / jet->e(), 1.e-8));
1048 float Deta = ci.eta() - jet->eta();
1049 float Dphi = constituent_i.DeltaPhi(jet->p4());
1050 float DR = constituent_i.DeltaR(jet->p4());
1051
1052 // pack: constituents variables
1053 std::vector<float> vars = {log_pT, log_E,
1054 (float)ci.eta(), (float)ci.phi(),
1055 log_pT_rel, log_E_rel, Deta, Dphi, DR};
1056 const_vars.push_back(vars);
1057
1058 // pack: mask variable
1059 vars = {1.};
1060 masks_vars.push_back(vars);
1061
1062 // explict interaction variables
1063 // calculate variables: interactions
1064 std::vector<std::vector<float>> inter_vars_int;
1065 for (const auto& cj : constituentsForModel) {
1066 // tlv for constituents
1067 TLorentzVector constituent_j;
1068 constituent_j.SetPtEtaPhiE(cj.pt(), cj.eta(), cj.phi(), cj.e());
1069
1070 // preparing variables
1071 float delta = constituent_i.DeltaR(constituent_j, true);
1072 float min = std::min(ci.pt(), cj.pt());
1073 float mass2 = (constituent_i + constituent_j).M2();
1074
1075 // final values
1076 float log_delta = log(Clip(delta, 1.e-8));
1077 float log_mindelta = log(Clip(min * delta, 1.e-8));
1078 float log_min_over_pT = log(Clip(min / (ci.pt() + cj.pt()), 1.e-8));
1079 float log_mass2 = log(Clip(mass2, 1.e-8));
1080
1081 // set the diagonal to 0
1082 if(&ci == &cj){
1083 log_delta = 0;
1084 log_mindelta = 0;
1085 log_min_over_pT = 0;
1086 log_mass2 = 0;
1087 }
1088
1089 std::vector<float> vars = { log_delta,
1090 log_mindelta,
1091 log_min_over_pT,
1092 log_mass2
1093 };
1094 inter_vars_int.push_back(vars);
1095 }
1096
1097 inter_vars.push_back(inter_vars_int);
1098 }
1099
1100 // adjust
1101 std::vector<std::vector<float>> vars_inter;
1102 vars_inter.reserve(nMaxConstituents);
1103 for(long unsigned int i=constituents.size(); i<nMaxConstituents; i++){
1104 // pack: constituents variables
1105 std::vector<float> vars = {-99., -99., -99., -99., -99., -99., -99., -99., -99.};
1106 const_vars.push_back(vars);
1107
1108 // pack: interaction variables
1109 vars_inter.clear();
1110 vars = {-99., -99., -99., -99.};
1111 for(long unsigned int j=0; j<nMaxConstituents; j++){
1112 vars_inter.push_back(vars);
1113 }
1114 inter_vars.push_back(vars_inter);
1115
1116 // pack: mask variable
1117 vars = {0.};
1118 masks_vars.push_back(vars);
1119 }
1120
1121 for(long unsigned int i=0; i<constituents.size(); i++){
1122 std::vector<float> vars = {-99., -99., -99., -99.};
1123 for(long unsigned int j=constituents.size(); j<nMaxConstituents; j++){
1124 inter_vars.at(i).push_back(vars);
1125 }
1126 }
1127
1128 // evaluate the model
1129 if( constituents.size() > 1 )
1130 scores = m_MLBosonTagger -> retrieveConstituentsScoreMultiClass(const_vars, inter_vars, masks_vars);
1131
1132 // save decorator(s)
1133 // score not available
1134 if(scores.size() == 0)
1135 decConstScore(*jet) = -99.;
1136 // binary or regression
1137 else if(scores.size() == 1)
1138 decConstScore(*jet) = scores.at(0);
1139 // multiclass
1140 else if(scores.size() == 5){
1141 decConstScore_qg(*jet) = scores.at(0);
1142 decConstScore_wl(*jet) = scores.at(1);
1143 decConstScore_wt(*jet) = scores.at(2);
1144 decConstScore_zl(*jet) = scores.at(3);
1145 decConstScore_zt(*jet) = scores.at(4);
1146 }
1147 // multi regression
1148 else if(scores.size() == 7){
1149 decConstScore_cosT(*jet) = scores.at(0);
1150 decConstScore_pT1(*jet) = scores.at(1);
1151 decConstScore_eta1(*jet) = scores.at(2);
1152 decConstScore_phi1(*jet) = scores.at(3);
1153 decConstScore_pT2(*jet) = scores.at(4);
1154 decConstScore_eta2(*jet) = scores.at(5);
1155 decConstScore_phi2(*jet) = scores.at(6);
1156 }
1157 // multiclass + regression
1158 else if(scores.size() == 12){
1159 decConstScore_qg(*jet) = scores.at(0);
1160 decConstScore_wl(*jet) = scores.at(1);
1161 decConstScore_wt(*jet) = scores.at(2);
1162 decConstScore_zl(*jet) = scores.at(3);
1163 decConstScore_zt(*jet) = scores.at(4);
1164 decConstScore_cosT(*jet) = scores.at(5);
1165 decConstScore_pT1(*jet) = scores.at(6);
1166 decConstScore_eta1(*jet) = scores.at(7);
1167 decConstScore_phi1(*jet) = scores.at(8);
1168 decConstScore_pT2(*jet) = scores.at(9);
1169 decConstScore_eta2(*jet) = scores.at(10);
1170 decConstScore_phi2(*jet) = scores.at(11);
1171 }
1172 else{
1173 ATH_MSG_ERROR("ERROR: the output size of this tagger is not currently supported!");
1174 return StatusCode::FAILURE;
1175 }
1176
1177 }
1178
1179 return StatusCode::SUCCESS;
1180}
float Clip(float in, float low=1.e-36, float high=1.e+30)
#define min(a, b)
Definition cfImp.cxx:40
SG::WriteDecorHandleKey< xAOD::JetContainer > m_decConstScoreZLKey
SG::WriteDecorHandleKey< xAOD::JetContainer > m_decConstScorePT2Key
SG::WriteDecorHandleKey< xAOD::JetContainer > m_decConstScorePT1Key
SG::WriteDecorHandleKey< xAOD::JetContainer > m_decConstScoreWLKey
SG::WriteDecorHandleKey< xAOD::JetContainer > m_decConstScoreZTKey
SG::WriteDecorHandleKey< xAOD::JetContainer > m_decConstScorePhi2Key
SG::WriteDecorHandleKey< xAOD::JetContainer > m_decConstScorePhi1Key
SG::WriteDecorHandleKey< xAOD::JetContainer > m_decConstScoreWTKey
SG::WriteDecorHandleKey< xAOD::JetContainer > m_decConstScoreQGKey
SG::WriteDecorHandleKey< xAOD::JetContainer > m_decConstScoreCosTKey
SG::WriteDecorHandleKey< xAOD::JetContainer > m_decConstScoreEta2Key
SG::WriteDecorHandleKey< xAOD::JetContainer > m_decConstScoreEta1Key
float j(const xAOD::IParticle &, const xAOD::TrackMeasurementValidation &hit, const Eigen::Matrix3d &jab_inv)

◆ getProperty()

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

Get one of the tool's properties.

◆ GetQGConstScore()

StatusCode JSSTaggerUtils::GetQGConstScore ( const xAOD::JetContainer & jets) const
overridevirtual

Implements IJSSTaggerUtils.

Definition at line 342 of file JSSTaggerUtils.cxx.

342 {
343
344 SG::WriteDecorHandle<xAOD::JetContainer, float> decConstScore(m_decConstScoreKey);
345
346 for(const xAOD::Jet *jet : jets){
347
348 // init value
349 float score (-99.);
350
351 // get constituents
352 std::vector<xAOD::JetConstituent> constituents = jet -> getConstituents().asSTLVector();
353 std::sort( constituents.begin(), constituents.end(), DescendingPtSorterConstituents) ;
354
355 // get towers
356 std::vector<const xAOD::CaloCluster*> towers;
358 if (towersAcc.isAvailable(*jet)){
359 // Vector of towers linked to jets
360 std::vector<ElementLink<DataVector<xAOD::IParticle>>> towerLinks = towersAcc(*jet);
361 for (auto link_itr : towerLinks){
362 if (!link_itr.isValid()) continue;
363 towers.push_back(dynamic_cast<const xAOD::CaloCluster *>(*link_itr));
364 }
365 }
367
368 // use ML tool on constituents
369 std::vector<float> m, pT, eta, phi, E, isTower, px, py, pz;
370 for(auto cnst : constituents){
371 m.push_back( cnst -> m() );
372 pT.push_back( cnst -> pt() );
373 eta.push_back( cnst -> eta() );
374 phi.push_back( cnst -> phi() );
375 E.push_back( cnst -> e() );
376 isTower.push_back(0.);
377 px.push_back( cnst -> pt() * std::cos(cnst -> phi()) );
378 py.push_back( cnst -> pt() * std::sin(cnst -> phi()) );
379 pz.push_back( cnst -> pt() * std::sinh(cnst -> eta()) );
380 }
381
382 for(auto cnst : towers){
383 m.push_back( cnst -> m() );
384 pT.push_back( cnst -> pt() );
385 eta.push_back( cnst -> eta() );
386 phi.push_back( cnst -> phi() );
387 E.push_back( cnst -> e() );
388 isTower.push_back(1.);
389 px.push_back( cnst -> pt() * std::cos(cnst -> phi()) );
390 py.push_back( cnst -> pt() * std::sin(cnst -> phi()) );
391 pz.push_back( cnst -> pt() * std::sinh(cnst -> eta()) );
392 }
393
394 // put together constituents + towers
395 std::vector<std::vector<float>> features_packed;
396
397 for(long unsigned int f=0; f<pT.size(); f++){
398 std::vector<float> features = { m.at(f), pT.at(f), eta.at(f), phi.at(f), E.at(f), isTower.at(f), px.at(f), py.at(f), pz.at(f) };
399 features_packed.push_back(features);
400 }
401
402 // sort them
403 std::sort(features_packed.begin(), features_packed.end(), [](const auto& i, const auto& j) { return i.at(1) > j.at(1); });
404
405 // global aux variables
406 float sum_features_px = std::accumulate(px.begin(), px.end(), 0);
407 float sum_features_py = std::accumulate(py.begin(), py.end(), 0);
408 float sum_features_pz = std::accumulate(pz.begin(), pz.end(), 0);
409
410 float sum_features_pT = sqrt( sum_features_px*sum_features_px + sum_features_py*sum_features_py);
411 float sum_features_eta = std::asinh( sum_features_pz / Clip(sum_features_pT) );
412 float sum_features_phi = std::atan2( sum_features_py, sum_features_px );
413
414 // build constituents and interaction variables
415 std::vector<std::vector<float>> const_vars;
416 std::vector<std::vector<std::vector<float>>> inter_vars;
417
418 for(auto const &feature_i : features_packed){
419
420 // calculate variables: constituents
421 float log_pT = log( Clip(feature_i.at(1) / sum_features_pT) );
422 float log_E = log( Clip(feature_i.at(4) / sum_features_pT) );
423 float eta = feature_i.at(2) - sum_features_eta;
424 float phi = feature_i.at(3) - sum_features_phi;
425 float DR = sqrt((feature_i.at(2) - sum_features_eta)*(feature_i.at(2) - sum_features_eta) + (feature_i.at(3) - sum_features_phi)*(feature_i.at(3) - sum_features_phi));
426 float log_m = log(Clip(feature_i.at(0)));
427 float type = feature_i.at(5);
428
429 std::vector<float> vars = {log_pT, log_E, eta, phi, DR, log_m, type};
430 const_vars.push_back(vars);
431
432 // calculate variables: interactions
433 std::vector<std::vector<float>> inter_vars_int;
434 for(auto const &feature_j : features_packed){
435
436 // preparing variables
437 float delta = sqrt((feature_i.at(2)-feature_j.at(2))*(feature_i.at(2)-feature_j.at(2)) + (feature_i.at(3)-feature_j.at(3))*(feature_i.at(3)-feature_j.at(3)));
438 float min = feature_i.at(1) != feature_j.at(1) ? std::min(feature_i.at(1), feature_j.at(1)): 0.;
439 float mass2 = (feature_i.at(4)/sum_features_pT + feature_j.at(4)/sum_features_pT) * (feature_i.at(4)/sum_features_pT + feature_j.at(4)/sum_features_pT);
440 mass2 -= (feature_i.at(6)/sum_features_pT + feature_j.at(6)/sum_features_pT) * (feature_i.at(6)/sum_features_pT + feature_j.at(6)/sum_features_pT);
441 mass2 -= (feature_i.at(7)/sum_features_pT + feature_j.at(7)/sum_features_pT) * (feature_i.at(7)/sum_features_pT + feature_j.at(7)/sum_features_pT);
442 mass2 -= (feature_i.at(8)/sum_features_pT + feature_j.at(8)/sum_features_pT) * (feature_i.at(8)/sum_features_pT + feature_j.at(8)/sum_features_pT);
443
444 // final values
445 float log_delta = log(Clip(delta));
446 float log_mindelta = log(Clip(min * delta / sum_features_pT));
447 float min_over_pT = min / (feature_i.at(1) + feature_j.at(1));
448 float log_mass = log(Clip(mass2));
449
450 // set the diagonal to 0
451 if(feature_i==feature_j){
452 log_delta = 0;
453 log_mindelta = 0;
454 min_over_pT = 0;
455 log_mass = 0;
456 }
457
458 std::vector<float> vars = { log_delta,
459 log_mindelta,
460 min_over_pT,
461 log_mass
462 };
463 inter_vars_int.push_back(vars);
464
465 }
466
467 inter_vars.push_back(inter_vars_int);
468 }
469
470 // evaluate the model
471 if( (constituents.size() + towers.size()) > 1 )
472 score = m_MLBosonTagger -> retrieveConstituentsScore(const_vars, inter_vars);
473
474 // save decorator
475 decConstScore(*jet) = score;
476
477 }
478
479 return StatusCode::SUCCESS;
480
481}

◆ getSF()

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

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 777 of file JSSTaggerBase.cxx.

777 {
778
779 if ( !passKinRange(jet) ) return std::make_pair( 1.0, 1.0 );
780
781
782 double logmOverPt = std::log(jet.m()/jet.pt());
783 if ( m_decorationName.find("SmoothZ") != std::string::npos ||
784 m_decorationName.find("SmoothInclusiveZ") != std::string::npos ) {
786 const double WtoZmassShift = 10803;
787 logmOverPt = std::log((jet.m()-WtoZmassShift)/jet.pt());
788 }
789
790 if ( logmOverPt > 0 ) logmOverPt = 0;
791
792 double SF = 1.0;
793 double eff = 1.0;
794
795 if ( m_weightHistograms.count(truthLabelStr.c_str()) ) {
796
797 int pt_mPt_bin = (m_weightHistograms.find(truthLabelStr.c_str())->second)->FindBin(jet.pt()*0.001, logmOverPt);
798 SF = (m_weightHistograms.find(truthLabelStr.c_str())->second)->GetBinContent(pt_mPt_bin);
799
800 if ( !m_efficiencyHistogramName.empty() ) {
801 eff = (m_efficiencyHistograms.find(truthLabelStr.c_str())->second)->GetBinContent(pt_mPt_bin);
802 }
803
804 }
805 else {
806 // set the efficiency for "Other" category to be the signal efficiency
807 std::string signal_truthLabel="";
808 if ( m_weightHistograms.count("t_qqb") ) {
809 signal_truthLabel="t_qqb";
810 }else if ( m_weightHistograms.count("V_qq") ){
811 signal_truthLabel="V_qq";
812 }else if ( m_weightHistograms.count("t") ){
813 signal_truthLabel="t";
814 }
815 if ( !signal_truthLabel.empty() && !m_efficiencyHistogramName.empty() ){
816 int pt_mPt_bin = (m_weightHistograms.find(signal_truthLabel.c_str())->second)->FindBin(jet.pt()*0.001, logmOverPt);
817 eff = (m_efficiencyHistograms.find(signal_truthLabel.c_str())->second)->GetBinContent(pt_mPt_bin);
818 }
819
820 return std::make_pair( 1.0, eff );
821 }
822
823 if ( SF < 1e-3 ) {
824 ATH_MSG_DEBUG( "(pt, m/pt) (" << jet.pt()/1.e3 << ", " << jet.m()/jet.pt() << ") is out of range for SF calculation. Returning 1.0" );
825 return std::make_pair( 1.0, 1.0 );
826 }
827 else {
828 return std::make_pair( SF, eff );
829 }
830
831}
std::string m_decorationName
Decoration name.
std::map< std::string, std::unique_ptr< TH2D > > m_efficiencyHistograms
std::map< std::string, std::unique_ptr< TH2D > > m_weightHistograms
std::string m_efficiencyHistogramName
virtual double m() const
The invariant mass of the particle.
Definition Jet_v1.cxx:59
const float SF[NF]
Cross sections for Fluor.

◆ GetTopConstScore()

StatusCode JSSTaggerUtils::GetTopConstScore ( const xAOD::JetContainer & jets) const
overridevirtual

Implements IJSSTaggerUtils.

Definition at line 667 of file JSSTaggerUtils.cxx.

667 {
668
669 SG::WriteDecorHandle<xAOD::JetContainer, float> decConstScore(m_decConstScoreKey);
670
671 for(const xAOD::Jet *jet : jets){
672
673 // init value
674 float score (-99.);
675 int parity (1);
676
677 // get constituents
678 std::vector<xAOD::JetConstituent> constituents = jet -> getConstituents().asSTLVector();
679 std::sort( constituents.begin(), constituents.end(), DescendingPtSorterConstituents) ;
680
681 // skim constituents
682 // nMaxConstituents: used to compute the sum_pT and sum_E for the pre-processing
683 // nInputConstituents: actual input to the network
684 long unsigned int nMaxConstituents (100);
685 long unsigned int nInputConstituents (80);
686
687 std::vector<float> pT_nMax, E_nMax;
688 for(auto cnst : constituents){
689 pT_nMax.push_back( cnst -> pt() );
690 E_nMax.push_back( cnst -> e() );
691 if(pT_nMax.size()==nMaxConstituents) break;
692 }
693
694 // remove non physical constituents
695 constituents.erase( std::remove_if( constituents.begin(), constituents.end(),
696 [] (xAOD::JetConstituent constituent) -> bool {return log(constituent -> pt()) < 0.1;}),
697 constituents.end()) ;
698
699 // use ML tool on constituents
700 std::vector<float> pT, eta, phi, E, isValid, px, py, pz;
701 for(auto cnst : constituents){
702 pT.push_back( cnst -> pt() );
703 eta.push_back( cnst -> eta() );
704 phi.push_back( cnst -> phi() );
705 E.push_back( cnst -> e() );
706 isValid.push_back(1.);
707 px.push_back( cnst -> pt() * std::cos(cnst -> phi()) );
708 py.push_back( cnst -> pt() * std::sin(cnst -> phi()) );
709 pz.push_back( cnst -> pt() * std::sinh(cnst -> eta()) );
710 }
711
712
713 // global aux variables
714 float sum_features_E = std::accumulate(E_nMax.begin(), E_nMax.end(), 0.);
715 float sum_features_pT_scalar = std::accumulate(pT_nMax.begin(), pT_nMax.end(), 0.);
716
717 TLorentzVector constituent0;
718 if(constituents.size() > 0)
719 constituent0.SetPtEtaPhiE(pT.at(0), eta.at(0), phi.at(0), E.at(0));
720
721 float angle (0.);
722 if(constituents.size() > 1){
723 float deta01 = eta.at(1) - eta.at(0);
724 float dphi01 = phi.at(1) - phi.at(0);
725 if(dphi01 > std::numbers::pi) dphi01 -= 2*std::numbers::pi;
726 else if(dphi01 < -std::numbers::pi) dphi01 += 2*std::numbers::pi;
727
728 angle = std::atan2(dphi01, deta01) + std::numbers::pi/2;
729 }
730
731 // build constituents, mask and base momentum for interaction variables
732 std::vector<std::vector<float>> const_vars;
733 std::vector<std::vector<float>> masks_vars;
734 std::vector<std::vector<std::vector<float>>> inter_vars;
735
736 for(long unsigned int i=0; i<constituents.size(); i++){
737
738 // up to nInputConstituents constituents
739 if(const_vars.size()==nInputConstituents) break;
740
741 // put the constituent in a tlv for help
742 TLorentzVector constituent_i;
743 constituent_i.SetPtEtaPhiE(pT.at(i), eta.at(i), phi.at(i), E.at(i));
744
745 // flip/rot of constituents: center
746 float eta_center = eta.at(i) - eta.at(0);
747 float phi_center = constituent_i.DeltaPhi(constituent0);
748
749 // flip/rot of constituents: rotate
750 // ToDo: this does not make sense when nConst == 1,
751 // but it also true that the score is not retrieved for those jets,
752 // should we add a further protection?
753 float eta_rot = eta_center * cos(angle) + phi_center * sin(angle);
754 float phi_rot = -eta_center * sin(angle) + phi_center * cos(angle);
755
756 // flip/rot of constituents: parity
757 if(i==2 && eta_rot<0.) parity = -1;
758 float eta_flip = eta_rot * parity;
759
760 // calculate constituents variables
761 float log_pT = log( pT.at(i));
762 float log_E = log( E.at(i));
763 float log_pT_rel = log( pT.at(i) / sum_features_pT_scalar);
764 float log_E_rel = log( E.at(i) / sum_features_E);
765 float Deta = eta_flip;
766 float Dphi = phi_rot;
767 float DR = sqrt(Deta*Deta + Dphi*Dphi);
768
769 // pack: constituents variables
770 std::vector<float> vars = {log_pT, log_E, log_pT_rel, log_E_rel, DR, Deta, Dphi};
771 const_vars.push_back(vars);
772
773 // pack: mask variable
774 vars = {1.};
775 masks_vars.push_back(vars);
776
777 // explict interaction variables
778 // calculate variables: interactions
779 std::vector<std::vector<float>> inter_vars_int;
780 for(long unsigned int j=0; j<constituents.size(); j++){
781
782 // tlv for constituents
783 // todo: harmonise with the previous one
784 TLorentzVector constituent_j;
785 constituent_j.SetPtEtaPhiE(pT.at(j), eta.at(j), phi.at(j), E.at(j));
786
787 // preparing variables
788
789 // custom rapidity calculation
790 double rap_i = 0.5 * log( 1 + (2 * pz.at(i)) / Clip(E.at(i) - pz.at(i), 1.e-8) );
791 double rap_j = 0.5 * log( 1 + (2 * pz.at(j)) / Clip(E.at(j) - pz.at(j), 1.e-8) );
792 double deltaY = rap_i - rap_j;
793 double deltaPhi = TVector2::Phi_mpi_pi(constituent_i.Phi() - constituent_j.Phi());
794 double delta = std::sqrt(deltaY * deltaY + deltaPhi * deltaPhi);
795
796 float min = pT.at(i) != pT.at(j) ? std::min(pT.at(i), pT.at(j)): pT.at(i);
797 float mass2 = (E.at(i) + E.at(j)) * (E.at(i) + E.at(j));
798 mass2 -= (px.at(i) + px.at(j)) * (px.at(i) + px.at(j));
799 mass2 -= (py.at(i) + py.at(j)) * (py.at(i) + py.at(j));
800 mass2 -= (pz.at(i) + pz.at(j)) * (pz.at(i) + pz.at(j));
801
802 // final values
803 float log_delta = log(Clip(delta, 1.e-8));
804 float log_mindelta = log(Clip(min * delta, 1.e-8));
805 float log_min_over_pT = log(Clip(min / (pT.at(i) + pT.at(j)), 1.e-8));
806 float log_mass = log(Clip(mass2, 1.e-8));
807
808 std::vector<float> vars = { log_mindelta,
809 log_min_over_pT,
810 log_delta,
811 log_mass
812 };
813 inter_vars_int.push_back(vars);
814
815 }
816 inter_vars.push_back(inter_vars_int);
817
818 }
819
820 for(long unsigned int i=constituents.size(); i<nInputConstituents; i++){
821 // pack: constituents variables
822 std::vector<float> vars = {-18.4207, -18.4207, -18.4207, -18.4207, -18.4207, -18.4207, -18.4207};
823 const_vars.push_back(vars);
824
825 // pack: interaction variables
826 vars = {-18.4207, -18.4207, -18.4207, -18.4207};
827 std::vector<std::vector<float>> vars_inter;
828 for(long unsigned int j=0; j<nInputConstituents; j++){
829 vars_inter.push_back(vars);
830 }
831 inter_vars.push_back(vars_inter);
832
833 // pack: mask variable
834 vars = {0.};
835 masks_vars.push_back(vars);
836 }
837
838 // further adjustment for interaction variables
839 for(long unsigned int i=0; i<constituents.size(); i++){
840 std::vector<float> vars = {0., 0., 0., 0.};
841 vars = {-18.4207, -18.4207, -18.4207, -18.4207};
842 for(long unsigned int j=constituents.size(); j<nInputConstituents; j++){
843 inter_vars.at(i).push_back(vars);
844 }
845 }
846
847 // evaluate the model
848 if( constituents.size() > 1 )
849 score = m_MLBosonTagger -> retrieveConstituentsScore(const_vars, inter_vars, masks_vars);
850
851 // save decorator
852 // the model return the qcd node score
853 // therefore, we use 1 - score to have
854 // top jet: 1, q/g jet: 0
855 decConstScore(*jet) = 1 - score;
856
857 }
858
859 return StatusCode::SUCCESS;
860
861}
Scalar deltaPhi(const MatrixBase< Derived > &vec) const
bool isValid(const T &p)
Av: we implement here an ATLAS-sepcific convention: all particles which are 99xxxxx are fine.
Definition AtlasPID.h:878
double angle(const GeoTrf::Vector2D &a, const GeoTrf::Vector2D &b)

◆ getTruthLabelStr()

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

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 835 of file JSSTaggerBase.cxx.

835 {
837 std::string truthLabelStr;
838
840 SG::ReadDecorHandle<xAOD::JetContainer, int> readTruthLabel(m_readTruthLabelKey);
841 LargeRJetTruthLabel::TypeEnum jetContainment = LargeRJetTruthLabel::intToEnum(readTruthLabel(jet));
842
844 if ( m_weightHistograms.count("t_qqb") ) {
845
847 if ( jetContainment==LargeRJetTruthLabel::tqqb ) {
848 truthLabelStr = "t_qqb";
849 }
851 else if ( jetContainment==LargeRJetTruthLabel::notruth || jetContainment==LargeRJetTruthLabel::qcd ) {
852 truthLabelStr = "q";
853 }
854
855 }
857 else if ( m_weightHistograms.count("V_qq_passMpassD2") ) {
858
860 if ( jetContainment==LargeRJetTruthLabel::tqqb || jetContainment==LargeRJetTruthLabel::other_From_t ) {
861 truthLabelStr = "t_";
862 }
864 else if ( jetContainment==LargeRJetTruthLabel::Wqq || jetContainment==LargeRJetTruthLabel::Zqq || jetContainment==LargeRJetTruthLabel::Wqq_From_t ) {
865 truthLabelStr = "V_qq_";
866 }
868 else if ( jetContainment==LargeRJetTruthLabel::notruth || jetContainment==LargeRJetTruthLabel::qcd ) {
869 truthLabelStr = "q_";
870 }
871
873 if ( acceptData.getCutResult("PassMassLow") && acceptData.getCutResult("PassMassHigh") && acceptData.getCutResult("PassD2") ) {
874 truthLabelStr += "passMpassD2";
875 }
877 else if ( !(acceptData.getCutResult("PassMassLow") && acceptData.getCutResult("PassMassHigh")) && acceptData.getCutResult("PassD2") ) {
878 truthLabelStr += "failMpassD2";
879 }
881 else if ( acceptData.getCutResult("PassMassLow") && acceptData.getCutResult("PassMassHigh") && !acceptData.getCutResult("PassD2") ) {
882 truthLabelStr += "passMfailD2";
883 }
885 else{
886 truthLabelStr += "failMfailD2";
887 }
888
889 }
890
892 else if ( m_weightHistograms.count("V_qq") ) {
893
895 if ( jetContainment==LargeRJetTruthLabel::tqqb || jetContainment==LargeRJetTruthLabel::other_From_t ) {
896 truthLabelStr = "t";
897 }
899 else if ( jetContainment==LargeRJetTruthLabel::Wqq || jetContainment==LargeRJetTruthLabel::Zqq || jetContainment==LargeRJetTruthLabel::Wqq_From_t ) {
900 truthLabelStr = "V_qq";
901 }
903 else if ( jetContainment==LargeRJetTruthLabel::notruth || jetContainment==LargeRJetTruthLabel::qcd ) {
904 truthLabelStr = "q";
905 }
906 }
907
908 // inclusive top tagger
909 else {
911 if ( jetContainment==LargeRJetTruthLabel::tqqb || jetContainment==LargeRJetTruthLabel::other_From_t || jetContainment==LargeRJetTruthLabel::Wqq_From_t ) {
912 truthLabelStr = "t";
913 }
915 else if ( jetContainment==LargeRJetTruthLabel::notruth || jetContainment==LargeRJetTruthLabel::qcd ) {
916 truthLabelStr = "q";
917 }
918
919 }
920
921 return truthLabelStr;
922}
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
protectedinherited

Retrieve Ntrk variable from the ungroomed parent jet.

Retrieve the Ntrk variable from the ungroomed parent jet.

Definition at line 665 of file JSSTaggerBase.cxx.

665 {
666
667 SG::ReadDecorHandle<xAOD::JetContainer, ElementLink<xAOD::JetContainer> > readParent(m_readParentKey);
668
669 const xAOD::Jet * ungroomedJet = nullptr;
670 if ( readParent.isAvailable() ) {
671 const ElementLink<xAOD::JetContainer>& linkToUngroomed = readParent(jet);
672 if ( linkToUngroomed.isValid() ) {
673 ungroomedJet = *linkToUngroomed;
674
675 static const SG::AuxElement::ConstAccessor< std::vector<int> >acc_Ntrk("NumTrkPt500");
676
677 if ( acc_Ntrk.isAvailable(*ungroomedJet) ) {
678
679 const std::vector<int>& NTrkPt500 = acc_Ntrk(*ungroomedJet);
680
681 int jet_ntrk = NTrkPt500.at(indexPV);
682 return jet_ntrk;
683
684 }
685 else {
686 ATH_MSG_ERROR("WARNING: Unable to retrieve Ntrk of the ungroomed parent jet. Please make sure this variable is in your derivations!!!");
687 }
688 }
689 else {
690 ATH_MSG_ERROR("WARNING: Unable to retrieve the parent ungroomed jet. Please make sure this variable is in your derivations!!!");
691 }
692 }
693 else {
694 ATH_MSG_ERROR("WARNING: Unable to retrieve the link to the parent ungroomed jet. Please make sure this variable is in your derivations!!!");
695 }
696
697 return -999;
698
699}
SG::ReadDecorHandleKey< xAOD::JetContainer > m_readParentKey

◆ GetWConstScore()

StatusCode JSSTaggerUtils::GetWConstScore ( const xAOD::JetContainer & jets) const
overridevirtual

Implements IJSSTaggerUtils.

Definition at line 863 of file JSSTaggerUtils.cxx.

863 {
864
865 SG::WriteDecorHandle<xAOD::JetContainer, float> decConstScore(m_decConstScoreKey);
866
867 // define vectors to store constituents for calculations
868 long unsigned int nMaxConstituents (100);
869 std::vector<float> pT, eta, phi, E, isValid, px, py, pz;
870 pT.reserve(nMaxConstituents); eta.reserve(nMaxConstituents); phi.reserve(nMaxConstituents); E.reserve(nMaxConstituents);
871 isValid.reserve(nMaxConstituents);
872 px.reserve(nMaxConstituents); py.reserve(nMaxConstituents); pz.reserve(nMaxConstituents);
873
874 for(const xAOD::Jet *jet : jets){
875
876 // init value
877 float score (-99.);
878
879 // get constituents
880 std::vector<xAOD::JetConstituent> constituents = jet -> getConstituents().asSTLVector();
881
882 // skip non physical constituents
883 constituents.erase( std::remove_if( constituents.begin(), constituents.end(),
884 [] (xAOD::JetConstituent constituent) -> bool {return constituent -> pt() < 1.e-8;}),
885 constituents.end()) ;
886
887 // sort by pT
888 std::sort( constituents.begin(), constituents.end(), DescendingPtSorterConstituents) ;
889
890 std::vector<xAOD::JetConstituent> constituentsForModel;
891
892 if( constituents.size() > nMaxConstituents )
893 {
894 constituentsForModel = std::vector<xAOD::JetConstituent> (constituents.begin(), constituents.begin() + nMaxConstituents);
895 }
896 else
897 constituentsForModel = constituents;
898
899 // fill vectors of constituents for calculation
900 pT.clear(); eta.clear(); phi.clear(); E.clear();
901 isValid.clear();
902 px.clear(); py.clear(); pz.clear();
903 for(auto cnst : constituentsForModel){
904 pT.push_back( cnst -> pt() );
905 eta.push_back( cnst -> eta() );
906 phi.push_back( cnst -> phi() );
907 E.push_back( cnst -> e() );
908 isValid.push_back(1.);
909 px.push_back( cnst -> pt() * std::cos(cnst -> phi()) );
910 py.push_back( cnst -> pt() * std::sin(cnst -> phi()) );
911 pz.push_back( cnst -> pt() * std::sinh(cnst -> eta()) );
912 }
913
914 // build constituents, mask and base momentum for interaction variables
915 std::vector<std::vector<float>> const_vars;
916 std::vector<std::vector<float>> masks_vars;
917 std::vector<std::vector<std::vector<float>>> inter_vars;
918
919 for(long unsigned int i=0; i<constituentsForModel.size(); i++){
920
921 // put the constituent in a tlv for help
922 TLorentzVector constituent_i;
923 constituent_i.SetPtEtaPhiE(pT.at(i), eta.at(i), phi.at(i), E.at(i));
924
925 // calculate variables
926 float log_pT = log( pT.at(i));
927 float log_E = log( E.at(i));
928 float log_pT_rel = log( pT.at(i) / jet -> pt());
929 float log_E_rel = log( E.at(i) / jet -> e());
930 float Deta = eta.at(i) - jet -> eta();
931 float Dphi = constituent_i.DeltaPhi(jet -> p4());
932 float DR = sqrt(Deta*Deta + Dphi*Dphi);
933
934 // pack: constituents variables
935 std::vector<float> vars = {log_E, log_pT, log_E_rel, log_pT_rel, Deta, Dphi, DR};
936 const_vars.push_back(vars);
937
938 // pack: mask variable
939 vars = {1.};
940 masks_vars.push_back(vars);
941
942 // explict interaction variables
943 // calculate variables: interactions
944 std::vector<std::vector<float>> inter_vars_int;
945 for(long unsigned int j=0; j<constituentsForModel.size(); j++){
946
947 // tlv for constituents
948 TLorentzVector constituent_j;
949 constituent_j.SetPtEtaPhiE(pT.at(j), eta.at(j), phi.at(j), E.at(j));
950
951 // preparing variables
952 float delta = constituent_i.DeltaR(constituent_j, true);
953 float min = std::min(pT.at(i), pT.at(j));
954 float mass2 = (constituent_i + constituent_j).M2();
955
956 // final values
957 float log_delta = log(Clip(delta, 1.e-8));
958 float log_mindelta = log(Clip(min * delta, 1.e-8));
959 float log_min_over_pT = log(Clip(min / (pT.at(i) + pT.at(j)), 1.e-8));
960 float log_mass = log(Clip(mass2, 1.e-8));
961
962 std::vector<float> vars = { log_delta,
963 log_mindelta,
964 log_min_over_pT,
965 log_mass
966 };
967 inter_vars_int.push_back(vars);
968 }
969
970 inter_vars.push_back(inter_vars_int);
971 }
972
973 // evaluate the model
974 if( constituents.size() > 1 )
975 score = m_MLBosonTagger -> retrieveConstituentsScore(const_vars, inter_vars, masks_vars);
976
977 // save decorator
978 decConstScore(*jet) = score;
979 }
980
981 return StatusCode::SUCCESS;
982}

◆ getWeight()

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

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 703 of file JSSTaggerBase.cxx.

703 {
704 if ( !m_calcSF ) return StatusCode::SUCCESS;
705
706 float weight = 1.0;
707 float effSF = 1.0;
708 float sigeffSF = 1.0;
709 float efficiency = 1.0;
710
711 if ( m_isMC ) {
712
713 std::string truthLabelStr = getTruthLabelStr( jet, acceptData );
714 std::tie(effSF, efficiency) = getSF( jet, truthLabelStr );
715
716 // calculate signal efficiency SF
717 if ( m_weightHistograms.count("t_qqb") ) {
718 sigeffSF = getSF(jet, "t_qqb").first;
719 } else if ( m_weightHistograms.count("V_qq") ) {
720 sigeffSF = getSF(jet, "V_qq").first;
721 } else if ( m_weightHistograms.count("t") ){
722 sigeffSF = getSF(jet, "t").first;
723 } else {
724 sigeffSF = 1.0;
725 }
726
728 if ( m_weightFlavors.find("fail") != std::string::npos ) {
729 weight = effSF;
730 }
731
732 else {
733
735 if ( passSel ) {
736 weight = effSF;
737 }
738
740 else {
742 if ( m_efficiencyHistogramName.empty() ) {
743 weight = 1.0;
744 }
745 else if ( efficiency < 1.0 ) {
746 weight = ( 1. - effSF * efficiency ) / ( 1. - efficiency );
747 }
748 else {
749 weight = 1.0;
750 }
751 }
752 }
753
754 }
755
756 else {
757 weight = 1.0;
758 }
759
761 SG::WriteDecorHandle<xAOD::JetContainer, float> decWeight(m_decWeightKey);
762 SG::WriteDecorHandle<xAOD::JetContainer, float> decEfficiency(m_decEfficiencyKey);
763 SG::WriteDecorHandle<xAOD::JetContainer, float> decEffSF(m_decEffSFKey);
764 SG::WriteDecorHandle<xAOD::JetContainer, float> decSigeffSF(m_decSigeffSFKey);
765
767 decWeight(jet) = weight;
768 decEfficiency(jet) = efficiency;
769 decEffSF(jet) = effSF;
770 decSigeffSF(jet) = sigeffSF;
771
772 return StatusCode::SUCCESS;
773
774}
std::string getTruthLabelStr(const xAOD::Jet &jet, asg::AcceptData &acceptData) const
SG::WriteDecorHandleKey< xAOD::JetContainer > m_decWeightKey
WriteDecorHandle keys for SF.
bool m_calcSF
Flag to calculate scale factor.
SG::WriteDecorHandleKey< xAOD::JetContainer > m_decEffSFKey
SG::WriteDecorHandleKey< xAOD::JetContainer > m_decEfficiencyKey
std::string m_weightFlavors
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 JSSTaggerUtils::initialize ( void )
overridevirtual

Run once at the start of the job to setup everything.

Get configReader

Get the decoration name

Initialize decorators

Reimplemented from JSSTaggerBase.

Definition at line 52 of file JSSTaggerUtils.cxx.

52 {
53
54 ATH_MSG_INFO( "Initializing JSSTaggerUtils tool" );
55
56 ATH_MSG_INFO( " m_calibArea : " << m_calibArea );
57 ATH_MSG_INFO( " m_configFile : " << m_configFile );
58
59 if ( ! m_configFile.empty() ) {
60
63
65 m_decorationName = m_configReader.GetValue("DecorationName", "");
66
67 m_UseConstTagger = !((std::string)m_configReader.GetValue("ConstTaggerFileName", "")).empty();
68 m_UseHLTagger = !((std::string)m_configReader.GetValue("HLTaggerFileName", "")).empty();
69
70 std::string ConstTaggerFileName = m_configReader.GetValue("ConstTaggerFileName", "aaa");
71 std::string HLTaggerFileName = m_configReader.GetValue("HLTaggerFileName", "aaa");
72
73 if(m_UseConstTagger && m_MLBosonTagger.empty()){
74 // init tool
75 std::string ModelPath = "";
76 if ( m_calibArea.compare("Local") == 0 ) {
77 ModelPath = PathResolverFindCalibFile(ConstTaggerFileName);
78 }
79 else if ( m_calibArea.find("eos") != std::string::npos) {
80 ModelPath = (ConstTaggerFileName);
81 }
82 else{
83 ModelPath = PathResolverFindCalibFile(("BoostedJetTaggers/" + m_calibArea + "/" + ConstTaggerFileName).c_str());
84 }
85 ATH_MSG_INFO("JSSTaggerUtils::MLBosonTagger()" << " + ModelPath " << ModelPath );
86
87 asg::AsgToolConfig config ("AthONNX::JSSMLTool/MLBosonTagger");
88 ATH_CHECK( config.setProperty("ModelPath", ModelPath));
89
90 // get model paramters from the config file
91 ATH_MSG_INFO("JSSTaggerUtils::MLBosonTagger() read value from config" );
92
93 // set parameters
94 ATH_CHECK( config.setProperty("nPixelsX", (int)m_configReader.GetValue("nPixelsEta", -99)) );
95 ATH_CHECK( config.setProperty("nPixelsY", (int)m_configReader.GetValue("nPixelsPhi", -99)) );
96 ATH_CHECK( config.setProperty("nPixelsZ", (int)m_configReader.GetValue("nColors", -99)) );
97
98 m_nbins_eta = (int)m_configReader.GetValue("nPixelsEta", -99);
99 m_nbins_phi = (int)m_configReader.GetValue("nPixelsPhi", -99);
100 m_ncolors = m_configReader.GetValue("nColors", -99);
101 m_min_eta = m_configReader.GetValue("aEta", -99.);
102 m_max_eta = m_configReader.GetValue("bEta", -99.);
103 m_min_phi = m_configReader.GetValue("aPhi", -99.);
104 m_max_phi = m_configReader.GetValue("bPhi", -99.);
105 m_dorscaling = (bool)m_configReader.GetValue("DoRScaling", -99);
106 m_rscaling_p0 = m_configReader.GetValue("RScaling_p0", -99.);
107 m_rscaling_p1 = m_configReader.GetValue("RScaling_p1", -99.);
108
109 ATH_CHECK( config.makePrivateTool(m_MLBosonTagger) );
110 ATH_CHECK( m_MLBosonTagger.retrieve() );
111
112 }
113 if(m_UseHLTagger){
114 // init tool
115 std::string ModelPath = "";
116 if ( m_calibArea.compare("Local") == 0 ) {
117 ModelPath = PathResolverFindCalibFile(HLTaggerFileName);
118 }
119 else if ( m_calibArea.find("eos") != std::string::npos) {
120 ModelPath = (HLTaggerFileName);
121 }
122 else{
123 ModelPath = PathResolverFindCalibFile(("BoostedJetTaggers/" + m_calibArea + "/" + HLTaggerFileName).c_str());
124 }
125 ATH_MSG_INFO("JSSTaggerUtils::MLBosonTagger()" << " + ModelPath " << ModelPath );
126
127 asg::AsgToolConfig config ("AthONNX::JSSMLTool/MLBosonTaggerHL");
128 ATH_CHECK( config.setProperty("ModelPath", ModelPath));
129
130 ATH_CHECK( config.makePrivateTool(m_MLBosonTagger_HL) );
131 ATH_CHECK( m_MLBosonTagger_HL.retrieve() );
132
133 // get model paramters from the config file
134 ATH_MSG_INFO("JSSTaggerUtils::MLBosonTagger() read value from config" );
136
137 }
138
139 }
140
142 ATH_MSG_INFO( "Decorators that will be attached to jet :" );
144
146 ATH_CHECK( m_decNConstituentsKey.initialize() );
148 ATH_CHECK( m_decNTopoTowersKey.initialize() );
149
151 ATH_CHECK( m_decConstScoreKey.initialize() );
152
153 m_constScoreAcc = std::make_unique<SG::ConstAccessor<float>>(m_decorationName + "_ConstScore");
154
156 ATH_CHECK( m_decHLScoreKey.initialize() );
157
170
171 ATH_CHECK( m_decConstScoreQGKey.initialize() );
172 ATH_CHECK( m_decConstScoreWLKey.initialize() );
173 ATH_CHECK( m_decConstScoreWTKey.initialize() );
174 ATH_CHECK( m_decConstScoreZLKey.initialize() );
175 ATH_CHECK( m_decConstScoreZTKey.initialize() );
176 ATH_CHECK( m_decConstScoreCosTKey.initialize() );
177 ATH_CHECK( m_decConstScorePT1Key.initialize() );
178 ATH_CHECK( m_decConstScoreEta1Key.initialize() );
179 ATH_CHECK( m_decConstScorePhi1Key.initialize() );
180 ATH_CHECK( m_decConstScorePT2Key.initialize() );
181 ATH_CHECK( m_decConstScoreEta2Key.initialize() );
182 ATH_CHECK( m_decConstScorePhi2Key.initialize() );
183
184 return StatusCode::SUCCESS;
185
186}
StatusCode getConfigReader()
Get configReader StatusCode.
std::string m_containerName
Configurable members.
virtual StatusCode initialize() override
Initialize the tool.
std::unique_ptr< SG::ConstAccessor< float > > m_constScoreAcc
StatusCode ReadScaler() override
setBGCode setTAP setLVL2ErrorBits bool

◆ 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.

◆ MakeJetImage()

TH2D JSSTaggerUtils::MakeJetImage ( TString TagImage,
const xAOD::Jet * jet,
std::vector< xAOD::JetConstituent > constituents ) const
overridevirtual

Implements IJSSTaggerUtils.

Definition at line 626 of file JSSTaggerUtils.cxx.

627 {
628
629 double eta (-99.), phi (-99.), pT (-99.), z (-99.);
630 int BinEta (-99), BinPhi (-99);
631
632 auto cst_pT = [] ( double sum, xAOD::JetConstituent cst ){
633 return sum + cst.pt(); };
634 double SumPT = std::accumulate( constituents.begin(), constituents.end(), 0., cst_pT) ;
635
636 auto Image = std::make_unique<TH2D>("Image_" + TagImage, "Image_" + TagImage,
638
639 for( auto& cst : constituents ){
640 eta = cst -> eta() - jet -> eta() ;
641 phi = cst -> phi() - jet -> phi() ;
642 pT = cst -> pt() ;
643
644 // apply r-scaling
645 if( m_dorscaling ){
646 eta *= 1. / (m_rscaling_p0 + m_rscaling_p1/jet->pt());
647 phi *= 1. / (m_rscaling_p0 + m_rscaling_p1/jet->pt());
648 }
649
650 BinEta = Image -> GetXaxis() -> FindBin(eta);
651 BinPhi = Image -> GetYaxis() -> FindBin(phi);
652
653 z = pT / SumPT ;
654
655 int x = m_nbins_phi+1-BinPhi, y = BinEta; // transpose + flip
656
657 double current_z = Image -> GetBinContent( x, y );
658
659 if( eta>m_min_eta && eta<m_max_eta && phi>m_min_phi && phi<m_max_phi ) // avoid overflow pixels
660 Image -> SetBinContent( x, y, current_z += z );
661 }
662
663 return *Image;
664
665 }
#define y
#define x
#define z
Int_t FindBin(const TAxis *axis, const double x)

◆ 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
protectedinherited

Check if jet passes kinematic constraints.

Definition at line 350 of file JSSTaggerBase.cxx.

350 {
351
352 float scale = 1.0;
353 if ( m_ptGeV ) scale = 1.e3;
354
355 if ( jet.pt() < m_jetPtMin * scale ) return false;
356 if ( jet.pt() > m_jetPtMax * scale ) return false;
357 if ( std::abs( jet.eta() ) > m_jetEtaMax ) return false;
358
359 return true;
360
361}

◆ print()

◆ printCuts()

void JSSTaggerBase::printCuts ( ) const
protectedinherited

Print configured cuts.

Definition at line 924 of file JSSTaggerBase.cxx.

924 {
925 ATH_MSG_INFO( "After tagging, you will have access to the following cuts as an asg::AcceptData : (<NCut>) <cut> : <description>)" );
926 int nCuts = m_acceptInfo.getNCuts();
927 for ( int iCut=0; iCut < nCuts; iCut++ ) {
928 std::string cut_string = "";
929 cut_string += " (";
930 cut_string += std::to_string(iCut);
931 cut_string += ") ";
932 cut_string += m_acceptInfo.getCutName(iCut).data();
933 cut_string += " : ";
934 cut_string += m_acceptInfo.getCutDescription(iCut).data();
935 ATH_MSG_INFO( cut_string );
936 }
937}
asg::AcceptInfo m_acceptInfo
Object that stores the results for a jet.

◆ ReadScaler()

StatusCode JSSTaggerUtils::ReadScaler ( )
overridevirtual

Implements IJSSTaggerUtils.

Definition at line 582 of file JSSTaggerUtils.cxx.

582 {
583
584 // input list
585 std::vector<std::string> vars_list = {
586 "pT","CNN","D2","nTracks","ZCut12",
587 "Tau1_wta","Tau2_wta","Tau3_wta",
588 "KtDR","Split12","Split23",
589 "ECF1","ECF2","ECF3",
590 "Angularity","FoxWolfram0","FoxWolfram2",
591 "Aplanarity","PlanarFlow","Qw",
592 };
593
594 // loop and read
595 for(const std::string & var : vars_list){
596 std::string s_mean = var + "_mean";
597 std::string s_std = var + "_std";
598 double mean = m_configReader.GetValue(s_mean.c_str(), -99.);
599 double std = m_configReader.GetValue(s_std.c_str() , -99.);
600
601 if(mean==-99. && std==-99.){
602 ATH_MSG_ERROR("ERROR: one of the parameter for " << var << " is missing, please, double check the config!!!");
603 return StatusCode::FAILURE;
604 }
605 else if(mean==-99. || std==-99.){
606 ATH_MSG_ERROR("ERROR: parameters for " << var << " are missing, please, double check the config!!!");
607 return StatusCode::FAILURE;
608 }
609 else{
610 m_scaler[var] = {mean, std};
611 }
612
613 // pass the features scaling paramters to the ML tool
614 // we need to apply the data pre-processing
615 // before to apply the model inference via ONNX
616
617 // ToDo: change this to a property
618 ATH_CHECK( m_MLBosonTagger_HL -> SetScaler(m_scaler) );
619
620 }
621
622 return StatusCode::SUCCESS;
623
624}
std::map< std::string, std::vector< double > > m_scaler
void mean(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="")

◆ 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 380 of file AthCommonDataStore.h.

381 {
382 h.renounce();
384 }
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)

◆ renounceArray()

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

remove all handles from I/O resolution

Definition at line 364 of file AthCommonDataStore.h.

364 {
366 }

◆ resetCuts()

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

Reset cuts.

Reset the AcceptData cut results to false

Initialize common cuts to true by default

Definition at line 332 of file JSSTaggerBase.cxx.

332 {
333
335 acceptData.clear();
336
338 acceptData.setCutResult( "ValidJetContent", true );
339 acceptData.setCutResult( "ValidEventContent", true );
340
341 acceptData.setCutResult( "ValidPtRangeHigh", true );
342 acceptData.setCutResult( "ValidPtRangeLow" , true );
343 acceptData.setCutResult( "ValidEtaRange" , true );
344
345 return StatusCode::SUCCESS;
346
347}
void clear()
Clear all bits.
Definition AcceptData.h:54

◆ 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 >, AthCheckedComponent<::AthAlgTool >, and DerivationFramework::CfAthAlgTool.

◆ 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()

StatusCode JSSTaggerUtils::tag ( const xAOD::Jet & jet) const
overridevirtual

IJetSelectorTool interface.

Implements JSSTaggerBase.

Definition at line 188 of file JSSTaggerUtils.cxx.

188 {
189
190 ATH_MSG_DEBUG( "Obtaining JSS Tagger Utils result " << jet.pt() << " " << jet.m() );
191
192 return StatusCode::SUCCESS;
193
194}

◆ updateVHKA()

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

Definition at line 308 of file AthCommonDataStore.h.

308 {
309 // debug() << "updateVHKA for property " << p.name() << " " << p.toString()
310 // << " size: " << m_vhka.size() << endmsg;
311 for (auto &a : m_vhka) {
313 for (auto k : keys) {
314 k->setOwner(this);
315 }
316 }
317 }
std::vector< SG::VarHandleKeyArray * > m_vhka

Member Data Documentation

◆ m_acceptInfo

asg::AcceptInfo JSSTaggerBase::m_acceptInfo
protectedinherited

Object that stores the results for a jet.

Definition at line 66 of file JSSTaggerBase.h.

◆ m_calcSF

bool JSSTaggerBase::m_calcSF {}
protectedinherited

Flag to calculate scale factor.

Definition at line 192 of file JSSTaggerBase.h.

192{};

◆ m_calibArea

std::string JSSTaggerBase::m_calibArea
protectedinherited

Location where config files live on cvmfs.

Definition at line 113 of file JSSTaggerBase.h.

◆ m_configFile

std::string JSSTaggerBase::m_configFile
protectedinherited

Configuration file name.

Definition at line 110 of file JSSTaggerBase.h.

◆ m_configReader

TEnv JSSTaggerBase::m_configReader
protectedinherited

TEnv instance to read config files.

Definition at line 63 of file JSSTaggerBase.h.

◆ m_constScoreAcc

std::unique_ptr<SG::ConstAccessor<float> > JSSTaggerUtils::m_constScoreAcc = nullptr
private

Definition at line 68 of file JSSTaggerUtils.h.

◆ m_containerName

std::string JSSTaggerBase::m_containerName
protectedinherited

Configurable members.

Jet container name

Definition at line 103 of file JSSTaggerBase.h.

◆ m_decC2Key

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

Definition at line 145 of file JSSTaggerBase.h.

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

◆ m_decConstScoreCosTKey

SG::WriteDecorHandleKey<xAOD::JetContainer> JSSTaggerUtils::m_decConstScoreCosTKey {this, "ConstScoreCosTNameDec", "ConstScore_cosT", "SG key for cosT regress"}
private

Definition at line 76 of file JSSTaggerUtils.h.

76{this, "ConstScoreCosTNameDec", "ConstScore_cosT", "SG key for cosT regress"};

◆ m_decConstScoreEta1Key

SG::WriteDecorHandleKey<xAOD::JetContainer> JSSTaggerUtils::m_decConstScoreEta1Key {this, "ConstScoreEta1NameDec", "ConstScore_eta1", "SG key for eta1 regress"}
private

Definition at line 78 of file JSSTaggerUtils.h.

78{this, "ConstScoreEta1NameDec", "ConstScore_eta1", "SG key for eta1 regress"};

◆ m_decConstScoreEta2Key

SG::WriteDecorHandleKey<xAOD::JetContainer> JSSTaggerUtils::m_decConstScoreEta2Key {this, "ConstScoreEta2NameDec", "ConstScore_eta2", "SG key for eta2 regress"}
private

Definition at line 81 of file JSSTaggerUtils.h.

81{this, "ConstScoreEta2NameDec", "ConstScore_eta2", "SG key for eta2 regress"};

◆ m_decConstScoreKey

SG::WriteDecorHandleKey<xAOD::JetContainer> JSSTaggerUtils::m_decConstScoreKey {this, "ConstScoreNameDec", "ConstScore", "SG key for ConstScore"}
private

Definition at line 65 of file JSSTaggerUtils.h.

65{this, "ConstScoreNameDec", "ConstScore", "SG key for ConstScore"};

◆ m_decConstScorePhi1Key

SG::WriteDecorHandleKey<xAOD::JetContainer> JSSTaggerUtils::m_decConstScorePhi1Key {this, "ConstScorePhi1NameDec", "ConstScore_phi1", "SG key for phi1 regress"}
private

Definition at line 79 of file JSSTaggerUtils.h.

79{this, "ConstScorePhi1NameDec", "ConstScore_phi1", "SG key for phi1 regress"};

◆ m_decConstScorePhi2Key

SG::WriteDecorHandleKey<xAOD::JetContainer> JSSTaggerUtils::m_decConstScorePhi2Key {this, "ConstScorePhi2NameDec", "ConstScore_phi2", "SG key for phi2 regress"}
private

Definition at line 82 of file JSSTaggerUtils.h.

82{this, "ConstScorePhi2NameDec", "ConstScore_phi2", "SG key for phi2 regress"};

◆ m_decConstScorePT1Key

SG::WriteDecorHandleKey<xAOD::JetContainer> JSSTaggerUtils::m_decConstScorePT1Key {this, "ConstScorePT1NameDec", "ConstScore_pT1", "SG key for pT1 regress"}
private

Definition at line 77 of file JSSTaggerUtils.h.

77{this, "ConstScorePT1NameDec", "ConstScore_pT1", "SG key for pT1 regress"};

◆ m_decConstScorePT2Key

SG::WriteDecorHandleKey<xAOD::JetContainer> JSSTaggerUtils::m_decConstScorePT2Key {this, "ConstScorePT2NameDec", "ConstScore_pT2", "SG key for pT2 regress"}
private

Definition at line 80 of file JSSTaggerUtils.h.

80{this, "ConstScorePT2NameDec", "ConstScore_pT2", "SG key for pT2 regress"};

◆ m_decConstScoreQGKey

SG::WriteDecorHandleKey<xAOD::JetContainer> JSSTaggerUtils::m_decConstScoreQGKey {this, "ConstScoreQGNameDec", "ConstScore_qg", "SG key for qg node"}
private

Definition at line 71 of file JSSTaggerUtils.h.

71{this, "ConstScoreQGNameDec", "ConstScore_qg", "SG key for qg node"};

◆ m_decConstScoreWLKey

SG::WriteDecorHandleKey<xAOD::JetContainer> JSSTaggerUtils::m_decConstScoreWLKey {this, "ConstScoreWLNameDec", "ConstScore_wl", "SG key for WL node"}
private

Definition at line 72 of file JSSTaggerUtils.h.

72{this, "ConstScoreWLNameDec", "ConstScore_wl", "SG key for WL node"};

◆ m_decConstScoreWTKey

SG::WriteDecorHandleKey<xAOD::JetContainer> JSSTaggerUtils::m_decConstScoreWTKey {this, "ConstScoreWTNameDec", "ConstScore_wt", "SG key for WT node"}
private

Definition at line 73 of file JSSTaggerUtils.h.

73{this, "ConstScoreWTNameDec", "ConstScore_wt", "SG key for WT node"};

◆ m_decConstScoreZLKey

SG::WriteDecorHandleKey<xAOD::JetContainer> JSSTaggerUtils::m_decConstScoreZLKey {this, "ConstScoreZLNameDec", "ConstScore_zl", "SG key for ZL node"}
private

Definition at line 74 of file JSSTaggerUtils.h.

74{this, "ConstScoreZLNameDec", "ConstScore_zl", "SG key for ZL node"};

◆ m_decConstScoreZTKey

SG::WriteDecorHandleKey<xAOD::JetContainer> JSSTaggerUtils::m_decConstScoreZTKey {this, "ConstScoreZTNameDec", "ConstScore_zt", "SG key for ZT node"}
private

Definition at line 75 of file JSSTaggerUtils.h.

75{this, "ConstScoreZTNameDec", "ConstScore_zt", "SG key for ZT node"};

◆ m_decCutMHighKey

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

Definition at line 219 of file JSSTaggerBase.h.

219{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"}
protectedinherited

WriteDecorHandle keys for cut values.

Definition at line 218 of file JSSTaggerBase.h.

218{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"}
protectedinherited

Definition at line 146 of file JSSTaggerBase.h.

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

◆ m_decE3Key

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

Definition at line 147 of file JSSTaggerBase.h.

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

◆ m_decEfficiencyKey

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

Definition at line 225 of file JSSTaggerBase.h.

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

◆ m_decEffSFKey

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

Definition at line 226 of file JSSTaggerBase.h.

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

◆ m_decHLScoreKey

SG::WriteDecorHandleKey<xAOD::JetContainer> JSSTaggerUtils::m_decHLScoreKey {this, "HLScoreName", "HLScore", "SG key for HLScore"}
private

Definition at line 66 of file JSSTaggerUtils.h.

66{this, "HLScoreName", "HLScore", "SG key for HLScore"};

◆ m_decL2Key

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

Definition at line 148 of file JSSTaggerBase.h.

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

◆ m_decL3Key

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

Definition at line 149 of file JSSTaggerBase.h.

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

◆ m_decNConstituentsKey

SG::WriteDecorHandleKey<xAOD::JetContainer> JSSTaggerUtils::m_decNConstituentsKey {this, "nConstituentsName", "nConstituents", "SG key for constituents multiplicity"}
private

WriteDecorHandle keys.

Definition at line 63 of file JSSTaggerUtils.h.

63{this, "nConstituentsName", "nConstituents", "SG key for constituents multiplicity"};

◆ m_decNTopoTowersKey

SG::WriteDecorHandleKey<xAOD::JetContainer> JSSTaggerUtils::m_decNTopoTowersKey {this, "nTopoTowersName", "nTopoTowers", "SG key for towers multiplicity"}
private

Definition at line 64 of file JSSTaggerUtils.h.

64{this, "nTopoTowersName", "nTopoTowers", "SG key for towers multiplicity"};

◆ m_decorationName

std::string JSSTaggerBase::m_decorationName
protectedinherited

Decoration name.

Definition at line 189 of file JSSTaggerBase.h.

◆ m_decPassMassKey

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

Definition at line 77 of file JSSTaggerBase.h.

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

◆ m_decPassScoreKey

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

Definition at line 78 of file JSSTaggerBase.h.

78{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"}
protectedinherited

Definition at line 220 of file JSSTaggerBase.h.

220{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"}
protectedinherited

Definition at line 221 of file JSSTaggerBase.h.

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

◆ m_decSigeffSFKey

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

Definition at line 227 of file JSSTaggerBase.h.

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

◆ m_decTaggedKey

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

WriteDecorHandle keys for tagging bools.

Definition at line 69 of file JSSTaggerBase.h.

69{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"}
protectedinherited

WriteDecorHandle keys for JSS moments.

Definition at line 141 of file JSSTaggerBase.h.

141{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"}
protectedinherited

Definition at line 142 of file JSSTaggerBase.h.

142{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"}
protectedinherited

Definition at line 143 of file JSSTaggerBase.h.

143{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"}
protectedinherited

Definition at line 72 of file JSSTaggerBase.h.

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

◆ m_decValidEventContentKey

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

Definition at line 75 of file JSSTaggerBase.h.

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

◆ m_decValidJetContentKey

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

Definition at line 74 of file JSSTaggerBase.h.

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

◆ m_decValidKinRangeKey

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

Definition at line 73 of file JSSTaggerBase.h.

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

◆ m_decValidPtRangeHighKey

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

Definition at line 70 of file JSSTaggerBase.h.

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

◆ m_decValidPtRangeLowKey

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

Definition at line 71 of file JSSTaggerBase.h.

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

◆ m_decWeightKey

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

WriteDecorHandle keys for SF.

Definition at line 224 of file JSSTaggerBase.h.

224{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 393 of file AthCommonDataStore.h.

◆ m_dorscaling

bool JSSTaggerUtils::m_dorscaling {}
private

Definition at line 50 of file JSSTaggerUtils.h.

50{};

◆ m_efficiencyHistogramName

std::string JSSTaggerBase::m_efficiencyHistogramName
protectedinherited

Definition at line 199 of file JSSTaggerBase.h.

◆ m_efficiencyHistograms

std::map<std::string, std::unique_ptr<TH2D> > JSSTaggerBase::m_efficiencyHistograms
protectedinherited

Definition at line 205 of file JSSTaggerBase.h.

◆ m_evtStore

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

Pointer to StoreGate (event store by default)

Definition at line 390 of file AthCommonDataStore.h.

◆ m_funcMassCutHigh

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

Definition at line 185 of file JSSTaggerBase.h.

◆ m_funcMassCutLow

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

TF1 for cut functions.

Definition at line 184 of file JSSTaggerBase.h.

◆ m_funcScoreCut

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

Definition at line 186 of file JSSTaggerBase.h.

◆ m_isMC

bool JSSTaggerBase::m_isMC {}
protectedinherited

Definition at line 193 of file JSSTaggerBase.h.

193{};

◆ m_isSmallRJet

bool JSSTaggerBase::m_isSmallRJet = false
protectedinherited

Definition at line 104 of file JSSTaggerBase.h.

◆ m_jetEtaMax

float JSSTaggerBase::m_jetEtaMax {}
protectedinherited

Definition at line 133 of file JSSTaggerBase.h.

133{};

◆ m_jetPtMax

float JSSTaggerBase::m_jetPtMax {}
protectedinherited

Definition at line 132 of file JSSTaggerBase.h.

132{};

◆ m_jetPtMin

float JSSTaggerBase::m_jetPtMin {}
protectedinherited

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

Definition at line 131 of file JSSTaggerBase.h.

131{};

◆ m_kerasCalibArea

std::string JSSTaggerBase::m_kerasCalibArea
protectedinherited

Definition at line 119 of file JSSTaggerBase.h.

◆ m_kerasConfigFileName

std::string JSSTaggerBase::m_kerasConfigFileName
protectedinherited

Keras configurations for ML taggers.

Definition at line 116 of file JSSTaggerBase.h.

◆ m_kerasConfigFilePath

std::string JSSTaggerBase::m_kerasConfigFilePath
protectedinherited

Definition at line 117 of file JSSTaggerBase.h.

◆ m_kerasConfigOutputName

std::string JSSTaggerBase::m_kerasConfigOutputName
protectedinherited

Definition at line 118 of file JSSTaggerBase.h.

◆ m_max_eta

double JSSTaggerUtils::m_max_eta {}
private

Definition at line 48 of file JSSTaggerUtils.h.

48{}, m_max_eta{}, m_min_phi{}, m_max_phi{};

◆ m_max_phi

double JSSTaggerUtils::m_max_phi {}
private

Definition at line 48 of file JSSTaggerUtils.h.

48{}, m_max_eta{}, m_min_phi{}, m_max_phi{};

◆ m_min_eta

double JSSTaggerUtils::m_min_eta {}
private

Definition at line 48 of file JSSTaggerUtils.h.

48{}, m_max_eta{}, m_min_phi{}, m_max_phi{};

◆ m_min_phi

double JSSTaggerUtils::m_min_phi {}
private

Definition at line 48 of file JSSTaggerUtils.h.

48{}, m_max_eta{}, m_min_phi{}, m_max_phi{};

◆ m_MLBosonTagger

ToolHandle<AthONNX::IJSSMLTool> JSSTaggerUtils::m_MLBosonTagger {"", this}
private

Definition at line 56 of file JSSTaggerUtils.h.

56{"", this};

◆ m_MLBosonTagger_HL

ToolHandle<AthONNX::IJSSMLTool> JSSTaggerUtils::m_MLBosonTagger_HL {"", this}
private

Definition at line 60 of file JSSTaggerUtils.h.

60{"", this};

◆ m_nbins_eta

int JSSTaggerUtils::m_nbins_eta {}
private

Definition at line 47 of file JSSTaggerUtils.h.

47{}, m_nbins_phi{};

◆ m_nbins_phi

int JSSTaggerUtils::m_nbins_phi {}
private

Definition at line 47 of file JSSTaggerUtils.h.

47{}, m_nbins_phi{};

◆ m_ncolors

int JSSTaggerUtils::m_ncolors {}
private

Definition at line 49 of file JSSTaggerUtils.h.

49{};

◆ m_nWarnMax

const int JSSTaggerBase::m_nWarnMax = 10
protectedinherited

Maximum number of warnings.

Definition at line 81 of file JSSTaggerBase.h.

◆ m_nWarnVar

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

Warning counters.

Definition at line 84 of file JSSTaggerBase.h.

◆ m_ptGeV

bool JSSTaggerBase::m_ptGeV = false
protectedinherited

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

Definition at line 88 of file JSSTaggerBase.h.

◆ m_readECF1Key

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

Definition at line 157 of file JSSTaggerBase.h.

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

◆ m_readECF2Key

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

Definition at line 158 of file JSSTaggerBase.h.

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

◆ m_readECF3Key

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

Definition at line 159 of file JSSTaggerBase.h.

159{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"}
protectedinherited

Definition at line 171 of file JSSTaggerBase.h.

171{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"}
protectedinherited

Definition at line 170 of file JSSTaggerBase.h.

170{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"}
protectedinherited

Definition at line 169 of file JSSTaggerBase.h.

169{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"}
protectedinherited

Definition at line 173 of file JSSTaggerBase.h.

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

◆ m_readQwKey

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

Definition at line 164 of file JSSTaggerBase.h.

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

◆ m_readSphericityKey

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

Definition at line 167 of file JSSTaggerBase.h.

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

◆ m_readSplit12Key

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

Definition at line 161 of file JSSTaggerBase.h.

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

◆ m_readSplit23Key

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

Definition at line 162 of file JSSTaggerBase.h.

162{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"}
protectedinherited

ReadDecorHandle keys for JSS moments.

Definition at line 152 of file JSSTaggerBase.h.

152{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"}
protectedinherited

Definition at line 153 of file JSSTaggerBase.h.

153{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"}
protectedinherited

Definition at line 154 of file JSSTaggerBase.h.

154{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"}
protectedinherited

Definition at line 155 of file JSSTaggerBase.h.

155{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"}
protectedinherited

Definition at line 166 of file JSSTaggerBase.h.

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

◆ m_readTruthLabelKey

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

Truth label ReadDecorHandle key.

Definition at line 215 of file JSSTaggerBase.h.

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

◆ m_rscaling_p0

double JSSTaggerUtils::m_rscaling_p0 {}
private

Definition at line 51 of file JSSTaggerUtils.h.

51{}, m_rscaling_p1{};

◆ m_rscaling_p1

double JSSTaggerUtils::m_rscaling_p1 {}
private

Definition at line 51 of file JSSTaggerUtils.h.

51{}, m_rscaling_p1{};

◆ m_scaler

std::map<std::string, std::vector<double> > JSSTaggerUtils::m_scaler

Definition at line 43 of file JSSTaggerUtils.h.

◆ m_strMassCutHigh

std::string JSSTaggerBase::m_strMassCutHigh
protectedinherited

Definition at line 180 of file JSSTaggerBase.h.

◆ m_strMassCutLow

std::string JSSTaggerBase::m_strMassCutLow
protectedinherited

Strings for cut functions.

Definition at line 179 of file JSSTaggerBase.h.

◆ m_strScoreCut

std::string JSSTaggerBase::m_strScoreCut
protectedinherited

Definition at line 181 of file JSSTaggerBase.h.

◆ m_suppressInputDependence

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

Definition at line 175 of file JSSTaggerBase.h.

175{this, "SuppressInputDependence", false};

◆ m_suppressOutputDependence

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

Definition at line 176 of file JSSTaggerBase.h.

176{this, "SuppressOutputDependence", false};

◆ m_tagClass

TAGCLASS JSSTaggerBase::m_tagClass {Unknown}
protectedinherited

Definition at line 98 of file JSSTaggerBase.h.

98{Unknown};

◆ m_tagType

std::string JSSTaggerBase::m_tagType
protectedinherited

Definition at line 128 of file JSSTaggerBase.h.

◆ m_tmvaCalibArea

std::string JSSTaggerBase::m_tmvaCalibArea
protectedinherited

Definition at line 124 of file JSSTaggerBase.h.

◆ m_tmvaConfigFileName

std::string JSSTaggerBase::m_tmvaConfigFileName
protectedinherited

TMVA configurations for BDT taggers.

Definition at line 122 of file JSSTaggerBase.h.

◆ m_tmvaConfigFilePath

std::string JSSTaggerBase::m_tmvaConfigFilePath
protectedinherited

Definition at line 123 of file JSSTaggerBase.h.

◆ m_truthBosonContainerName

std::string JSSTaggerBase::m_truthBosonContainerName
protectedinherited

Definition at line 210 of file JSSTaggerBase.h.

◆ m_truthLabelName

std::string JSSTaggerBase::m_truthLabelName
protectedinherited

Definition at line 212 of file JSSTaggerBase.h.

◆ m_truthLabelUseTRUTH3

bool JSSTaggerBase::m_truthLabelUseTRUTH3 {}
protectedinherited

Truth label options.

Definition at line 208 of file JSSTaggerBase.h.

208{};

◆ m_truthParticleContainerName

std::string JSSTaggerBase::m_truthParticleContainerName
protectedinherited

Definition at line 209 of file JSSTaggerBase.h.

◆ m_truthTopQuarkContainerName

std::string JSSTaggerBase::m_truthTopQuarkContainerName
protectedinherited

Definition at line 211 of file JSSTaggerBase.h.

◆ m_UseConstTagger

bool JSSTaggerUtils::m_UseConstTagger {}
private

Definition at line 55 of file JSSTaggerUtils.h.

55{};

◆ m_useECFG

bool JSSTaggerBase::m_useECFG = false
protectedinherited

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

Definition at line 137 of file JSSTaggerBase.h.

◆ m_UseHLTagger

bool JSSTaggerUtils::m_UseHLTagger {}
private

Definition at line 59 of file JSSTaggerUtils.h.

59{};

◆ m_useLSeries

bool JSSTaggerBase::m_useLSeries = false
protectedinherited

Definition at line 138 of file JSSTaggerBase.h.

◆ m_useMassCut

bool JSSTaggerBase::m_useMassCut = false
protectedinherited

Flag to indicate if mass window cut is used.

Definition at line 91 of file JSSTaggerBase.h.

◆ m_useScoreCut

bool JSSTaggerBase::m_useScoreCut = false
protectedinherited

Flag to indicate if a discriminant score is used.

Definition at line 94 of file JSSTaggerBase.h.

◆ m_varHandleArraysDeclared

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

Definition at line 399 of file AthCommonDataStore.h.

◆ m_vhka

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

Definition at line 398 of file AthCommonDataStore.h.

◆ m_weightConfig

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

Histograms for scale factors.

Definition at line 203 of file JSSTaggerBase.h.

◆ m_weightConfigPath

std::string JSSTaggerBase::m_weightConfigPath
protectedinherited

Path to the SF configuration root file.

Definition at line 107 of file JSSTaggerBase.h.

◆ m_weightDecorationName

std::string JSSTaggerBase::m_weightDecorationName
protectedinherited

String for scale factor decoration names.

Definition at line 196 of file JSSTaggerBase.h.

◆ m_weightFileName

std::string JSSTaggerBase::m_weightFileName
protectedinherited

Definition at line 197 of file JSSTaggerBase.h.

◆ m_weightFlavors

std::string JSSTaggerBase::m_weightFlavors
protectedinherited

Definition at line 200 of file JSSTaggerBase.h.

◆ m_weightHistogramName

std::string JSSTaggerBase::m_weightHistogramName
protectedinherited

Definition at line 198 of file JSSTaggerBase.h.

◆ m_weightHistograms

std::map<std::string, std::unique_ptr<TH2D> > JSSTaggerBase::m_weightHistograms
protectedinherited

Definition at line 204 of file JSSTaggerBase.h.

◆ m_wkpt

std::string JSSTaggerBase::m_wkpt
protectedinherited

Tagger information.

Definition at line 127 of file JSSTaggerBase.h.


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