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 >, std::less<> > m_weightHistograms
std::map< std::string, std::unique_ptr< TH2D >, std::less<> > 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 99 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 400 of file JSSTaggerBase.cxx.

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

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

272 {
273
274 for ( const auto *jet : jets ) {
275 ATH_CHECK( tag(*jet) );
276 }
277
278 return StatusCode::SUCCESS;
279
280}
#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 508 of file JSSTaggerBase.cxx.

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

631 {
632
633 int indexPV = -1;
634
635 const xAOD::VertexContainer* vxCont = nullptr;
636 if ( evtStore()->retrieve( vxCont, "PrimaryVertices" ).isFailure() ) {
637 ATH_MSG_WARNING( "Unable to retrieve primary vertex container PrimaryVertices" );
638 }
639 else {
640 int vtx_counter = 0;
641 for ( const auto *vx : *vxCont ) {
642 if ( vx->vertexType()==xAOD::VxType::PriVtx ) {
643 indexPV = vtx_counter;
644 break;
645 }
646 vtx_counter++;
647 }
648 }
649
650 return indexPV;
651
652}
#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 283 of file JSSTaggerBase.cxx.

283 {
284
285 ATH_MSG_INFO( "Using config file : " << m_configFile );
286
288 std::string configPath;
289
290 if ( m_calibArea.compare("Local") == 0 ) {
292 }
293 else if ( m_calibArea.find("eos") != std::string::npos) {
295 configPath = (m_calibArea+"/"+m_configFile);
296 }
297 else {
298 configPath = PathResolverFindCalibFile("BoostedJetTaggers/"+m_calibArea+"/"+m_configFile);
299 }
300
302 FileStat_t fStats;
303 int fSuccess = gSystem->GetPathInfo(configPath.c_str(), fStats);
304 if ( fSuccess ) {
305 ATH_MSG_ERROR( "Recommendations file " << m_configFile << " could not be found" );
306 return StatusCode::FAILURE;
307 }
308 else {
309 ATH_MSG_DEBUG( "Recommendations file was found : " << configPath );
310 }
311
312 if ( m_configReader.ReadFile( configPath.c_str(), EEnvLevel(0) ) ) {
313 ATH_MSG_ERROR( "Error while reading config file : "<< configPath );
314 return StatusCode::FAILURE;
315 }
316
317 return StatusCode::SUCCESS;
318
319}
#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 SG::AuxElement::ConstAccessor<std::vector<ElementLink<DataVector<xAOD::IParticle>>>> towersAcc("GhostTower");
268
269 for(const xAOD::Jet *jet : jets){
270
271 // init value
272 float score (-99.);
273
274 // get constituents
275 std::vector<xAOD::JetConstituent> constituents = jet -> getConstituents().asSTLVector();
276 std::sort( constituents.begin(), constituents.end(), DescendingPtSorterConstituents) ;
277
278 int MaxConstituents (100);
279 std::vector<xAOD::JetConstituent> constituentsForModel;
280
281 if( constituents.size() > 100 )
282 constituentsForModel = std::vector<xAOD::JetConstituent> (constituents.begin(), constituents.begin() + MaxConstituents);
283 else
284 constituentsForModel = constituents;
285
286 // get towers
287 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{std::move(m), std::move(pT), std::move(eta), std::move(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(std::move(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
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(std::move(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 = std::move(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 = static_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 = static_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 = std::move(constituentsForModel);
238 csts_combined.erase( std::remove_if( csts_combined.begin(), csts_combined.end(),
239 [] (xAOD::JetConstituent constituent){
240 const xAOD::FlowElement* ufo = static_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, std::move(csts_charged) );
246 TH2D ImageNeutral = MakeJetImage("Neutral" , jet, std::move(csts_neutral) );
247 TH2D ImageCombined = MakeJetImage("Combined", jet, std::move(csts_combined));
248
249 std::vector<TH2D> Images = {ImageCharged, ImageNeutral, ImageCombined};
250
251 // evaluate the model
252 score = m_MLBosonTagger -> retrieveConstituentsScore(std::move(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::Event both provide ways for getting the SG::sgkey_t key for an object that is in the store, based on a bare pointer. But they provide different interfaces for doing so.

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

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

Definition at line 119 of file AsgTool.cxx.

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

◆ getName()

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

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

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

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

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

Definition at line 106 of file AsgTool.cxx.

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

◆ GetPolarisationScore()

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

Implements IJSSTaggerUtils.

Definition at line 991 of file JSSTaggerUtils.cxx.

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

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

◆ GetTopConstScore()

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

Implements IJSSTaggerUtils.

Definition at line 669 of file JSSTaggerUtils.cxx.

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

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

826 {
828 std::string truthLabelStr;
829
831 SG::ReadDecorHandle<xAOD::JetContainer, int> readTruthLabel(m_readTruthLabelKey);
832 LargeRJetTruthLabel::TypeEnum jetContainment = LargeRJetTruthLabel::intToEnum(readTruthLabel(jet));
833
835 if ( m_weightHistograms.count("t_qqb") ) {
836
838 if ( jetContainment==LargeRJetTruthLabel::tqqb ) {
839 truthLabelStr = "t_qqb";
840 }
842 else if ( jetContainment==LargeRJetTruthLabel::notruth || jetContainment==LargeRJetTruthLabel::qcd ) {
843 truthLabelStr = "q";
844 }
845
846 }
848 else if ( m_weightHistograms.count("V_qq_passMpassD2") ) {
849
851 if ( jetContainment==LargeRJetTruthLabel::tqqb || jetContainment==LargeRJetTruthLabel::other_From_t ) {
852 truthLabelStr = "t_";
853 }
855 else if ( jetContainment==LargeRJetTruthLabel::Wqq || jetContainment==LargeRJetTruthLabel::Zqq || jetContainment==LargeRJetTruthLabel::Wqq_From_t ) {
856 truthLabelStr = "V_qq_";
857 }
859 else if ( jetContainment==LargeRJetTruthLabel::notruth || jetContainment==LargeRJetTruthLabel::qcd ) {
860 truthLabelStr = "q_";
861 }
862
864 if ( acceptData.getCutResult("PassMassLow") && acceptData.getCutResult("PassMassHigh") && acceptData.getCutResult("PassD2") ) {
865 truthLabelStr += "passMpassD2";
866 }
868 else if ( !(acceptData.getCutResult("PassMassLow") && acceptData.getCutResult("PassMassHigh")) && acceptData.getCutResult("PassD2") ) {
869 truthLabelStr += "failMpassD2";
870 }
872 else if ( acceptData.getCutResult("PassMassLow") && acceptData.getCutResult("PassMassHigh") && !acceptData.getCutResult("PassD2") ) {
873 truthLabelStr += "passMfailD2";
874 }
876 else{
877 truthLabelStr += "failMfailD2";
878 }
879
880 }
881
883 else if ( m_weightHistograms.count("V_qq") ) {
884
886 if ( jetContainment==LargeRJetTruthLabel::tqqb || jetContainment==LargeRJetTruthLabel::other_From_t ) {
887 truthLabelStr = "t";
888 }
890 else if ( jetContainment==LargeRJetTruthLabel::Wqq || jetContainment==LargeRJetTruthLabel::Zqq || jetContainment==LargeRJetTruthLabel::Wqq_From_t ) {
891 truthLabelStr = "V_qq";
892 }
894 else if ( jetContainment==LargeRJetTruthLabel::notruth || jetContainment==LargeRJetTruthLabel::qcd ) {
895 truthLabelStr = "q";
896 }
897 }
898
899 // inclusive top tagger
900 else {
902 if ( jetContainment==LargeRJetTruthLabel::tqqb || jetContainment==LargeRJetTruthLabel::other_From_t || jetContainment==LargeRJetTruthLabel::Wqq_From_t ) {
903 truthLabelStr = "t";
904 }
906 else if ( jetContainment==LargeRJetTruthLabel::notruth || jetContainment==LargeRJetTruthLabel::qcd ) {
907 truthLabelStr = "q";
908 }
909
910 }
911
912 return truthLabelStr;
913}
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 655 of file JSSTaggerBase.cxx.

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

◆ GetWConstScore()

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

Implements IJSSTaggerUtils.

Definition at line 870 of file JSSTaggerUtils.cxx.

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

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

693 {
694 if ( !m_calcSF ) return StatusCode::SUCCESS;
695
696 float weight = 1.0;
697 float effSF = 1.0;
698 float sigeffSF = 1.0;
699 float efficiency = 1.0;
700
701 if ( m_isMC ) {
702
703 std::string truthLabelStr = getTruthLabelStr( jet, acceptData );
704 std::tie(effSF, efficiency) = getSF( jet, truthLabelStr );
705
706 // calculate signal efficiency SF
707 if ( m_weightHistograms.count("t_qqb") ) {
708 sigeffSF = getSF(jet, "t_qqb").first;
709 } else if ( m_weightHistograms.count("V_qq") ) {
710 sigeffSF = getSF(jet, "V_qq").first;
711 } else if ( m_weightHistograms.count("t") ){
712 sigeffSF = getSF(jet, "t").first;
713 } else {
714 sigeffSF = 1.0;
715 }
716
718 if ( m_weightFlavors.find("fail") != std::string::npos ) {
719 weight = effSF;
720 }
721
722 else {
723
725 if ( passSel ) {
726 weight = effSF;
727 }
728
730 else {
732 if ( m_efficiencyHistogramName.empty() ) {
733 weight = 1.0;
734 }
735 else if ( efficiency < 1.0 ) {
736 weight = ( 1. - effSF * efficiency ) / ( 1. - efficiency );
737 }
738 else {
739 weight = 1.0;
740 }
741 }
742 }
743
744 }
745
746 else {
747 weight = 1.0;
748 }
749
751 SG::WriteDecorHandle<xAOD::JetContainer, float> decWeight(m_decWeightKey);
752 SG::WriteDecorHandle<xAOD::JetContainer, float> decEfficiency(m_decEfficiencyKey);
753 SG::WriteDecorHandle<xAOD::JetContainer, float> decEffSF(m_decEffSFKey);
754 SG::WriteDecorHandle<xAOD::JetContainer, float> decSigeffSF(m_decSigeffSFKey);
755
757 decWeight(jet) = weight;
758 decEfficiency(jet) = efficiency;
759 decEffSF(jet) = effSF;
760 decSigeffSF(jet) = sigeffSF;
761
762 return StatusCode::SUCCESS;
763
764}
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 = std::move(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 = std::move(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 if (SumPT == 0.)[[unlikely]]{
639 throw std::runtime_error("SumPT is zero in JSSTaggerUtils::MakeJetImage");
640 }
641 for( auto& cst : constituents ){
642 eta = cst -> eta() - jet -> eta() ;
643 phi = cst -> phi() - jet -> phi() ;
644 pT = cst -> pt() ;
645
646 // apply r-scaling
647 if( m_dorscaling ){
648 eta *= 1. / (m_rscaling_p0 + m_rscaling_p1/jet->pt());
649 phi *= 1. / (m_rscaling_p0 + m_rscaling_p1/jet->pt());
650 }
651
652 BinEta = Image -> GetXaxis() -> FindBin(eta);
653 BinPhi = Image -> GetYaxis() -> FindBin(phi);
654
655 z = pT / SumPT ;
656
657 int x = m_nbins_phi+1-BinPhi, y = BinEta; // transpose + flip
658
659 double current_z = Image -> GetBinContent( x, y );
660
661 if( eta>m_min_eta && eta<m_max_eta && phi>m_min_phi && phi<m_max_phi ) // avoid overflow pixels
662 Image -> SetBinContent( x, y, current_z += z );
663 }
664
665 return *Image;
666
667 }
#define y
#define x
#define z
#define unlikely(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 340 of file JSSTaggerBase.cxx.

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

◆ print()

◆ printCuts()

void JSSTaggerBase::printCuts ( ) const
protectedinherited

Print configured cuts.

Definition at line 915 of file JSSTaggerBase.cxx.

915 {
916 ATH_MSG_INFO( "After tagging, you will have access to the following cuts as an asg::AcceptData : (<NCut>) <cut> : <description>)" );
917 int nCuts = m_acceptInfo.getNCuts();
918 for ( int iCut=0; iCut < nCuts; iCut++ ) {
919 std::string cut_string = "";
920 cut_string += " (";
921 cut_string += std::to_string(iCut);
922 cut_string += ") ";
923 cut_string += m_acceptInfo.getCutName(iCut).data();
924 cut_string += " : ";
925 cut_string += m_acceptInfo.getCutDescription(iCut).data();
926 ATH_MSG_INFO( cut_string );
927 }
928}
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 322 of file JSSTaggerBase.cxx.

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

◆ sysInitialize()

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

Perform system initialization for an algorithm.

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

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

◆ sysStart()

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

Handle START transition.

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

◆ tag()

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 68 of file JSSTaggerBase.h.

◆ m_calcSF

bool JSSTaggerBase::m_calcSF {}
protectedinherited

Flag to calculate scale factor.

Definition at line 194 of file JSSTaggerBase.h.

194{};

◆ m_calibArea

std::string JSSTaggerBase::m_calibArea
protectedinherited

Location where config files live on cvmfs.

Definition at line 115 of file JSSTaggerBase.h.

◆ m_configFile

std::string JSSTaggerBase::m_configFile
protectedinherited

Configuration file name.

Definition at line 112 of file JSSTaggerBase.h.

◆ m_configReader

TEnv JSSTaggerBase::m_configReader
protectedinherited

TEnv instance to read config files.

Definition at line 65 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 105 of file JSSTaggerBase.h.

◆ m_decC2Key

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

Definition at line 147 of file JSSTaggerBase.h.

147{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 221 of file JSSTaggerBase.h.

221{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 220 of file JSSTaggerBase.h.

220{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 148 of file JSSTaggerBase.h.

148{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 149 of file JSSTaggerBase.h.

149{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 227 of file JSSTaggerBase.h.

227{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 228 of file JSSTaggerBase.h.

228{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 150 of file JSSTaggerBase.h.

150{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 151 of file JSSTaggerBase.h.

151{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 191 of file JSSTaggerBase.h.

◆ m_decPassMassKey

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

Definition at line 79 of file JSSTaggerBase.h.

79{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 80 of file JSSTaggerBase.h.

80{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 222 of file JSSTaggerBase.h.

222{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 223 of file JSSTaggerBase.h.

223{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 229 of file JSSTaggerBase.h.

229{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 71 of file JSSTaggerBase.h.

71{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 143 of file JSSTaggerBase.h.

143{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 144 of file JSSTaggerBase.h.

144{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 145 of file JSSTaggerBase.h.

145{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 74 of file JSSTaggerBase.h.

74{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 77 of file JSSTaggerBase.h.

77{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 76 of file JSSTaggerBase.h.

76{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 75 of file JSSTaggerBase.h.

75{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 72 of file JSSTaggerBase.h.

72{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 73 of file JSSTaggerBase.h.

73{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 226 of file JSSTaggerBase.h.

226{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 201 of file JSSTaggerBase.h.

◆ m_efficiencyHistograms

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

Definition at line 207 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 187 of file JSSTaggerBase.h.

◆ m_funcMassCutLow

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

TF1 for cut functions.

Definition at line 186 of file JSSTaggerBase.h.

◆ m_funcScoreCut

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

Definition at line 188 of file JSSTaggerBase.h.

◆ m_isMC

bool JSSTaggerBase::m_isMC {}
protectedinherited

Definition at line 195 of file JSSTaggerBase.h.

195{};

◆ m_isSmallRJet

bool JSSTaggerBase::m_isSmallRJet = false
protectedinherited

Definition at line 106 of file JSSTaggerBase.h.

◆ m_jetEtaMax

float JSSTaggerBase::m_jetEtaMax {}
protectedinherited

Definition at line 135 of file JSSTaggerBase.h.

135{};

◆ m_jetPtMax

float JSSTaggerBase::m_jetPtMax {}
protectedinherited

Definition at line 134 of file JSSTaggerBase.h.

134{};

◆ m_jetPtMin

float JSSTaggerBase::m_jetPtMin {}
protectedinherited

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

Definition at line 133 of file JSSTaggerBase.h.

133{};

◆ m_kerasCalibArea

std::string JSSTaggerBase::m_kerasCalibArea
protectedinherited

Definition at line 121 of file JSSTaggerBase.h.

◆ m_kerasConfigFileName

std::string JSSTaggerBase::m_kerasConfigFileName
protectedinherited

Keras configurations for ML taggers.

Definition at line 118 of file JSSTaggerBase.h.

◆ m_kerasConfigFilePath

std::string JSSTaggerBase::m_kerasConfigFilePath
protectedinherited

Definition at line 119 of file JSSTaggerBase.h.

◆ m_kerasConfigOutputName

std::string JSSTaggerBase::m_kerasConfigOutputName
protectedinherited

Definition at line 120 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 83 of file JSSTaggerBase.h.

◆ m_nWarnVar

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

Warning counters.

Definition at line 86 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 90 of file JSSTaggerBase.h.

◆ m_readECF1Key

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

Definition at line 159 of file JSSTaggerBase.h.

159{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 160 of file JSSTaggerBase.h.

160{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 161 of file JSSTaggerBase.h.

161{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 173 of file JSSTaggerBase.h.

173{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 172 of file JSSTaggerBase.h.

172{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 171 of file JSSTaggerBase.h.

171{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 175 of file JSSTaggerBase.h.

175{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 166 of file JSSTaggerBase.h.

166{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 169 of file JSSTaggerBase.h.

169{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 163 of file JSSTaggerBase.h.

163{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 164 of file JSSTaggerBase.h.

164{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 154 of file JSSTaggerBase.h.

154{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 155 of file JSSTaggerBase.h.

155{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 156 of file JSSTaggerBase.h.

156{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 157 of file JSSTaggerBase.h.

157{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 168 of file JSSTaggerBase.h.

168{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 217 of file JSSTaggerBase.h.

217{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 182 of file JSSTaggerBase.h.

◆ m_strMassCutLow

std::string JSSTaggerBase::m_strMassCutLow
protectedinherited

Strings for cut functions.

Definition at line 181 of file JSSTaggerBase.h.

◆ m_strScoreCut

std::string JSSTaggerBase::m_strScoreCut
protectedinherited

Definition at line 183 of file JSSTaggerBase.h.

◆ m_suppressInputDependence

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

Definition at line 177 of file JSSTaggerBase.h.

177{this, "SuppressInputDependence", false};

◆ m_suppressOutputDependence

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

Definition at line 178 of file JSSTaggerBase.h.

178{this, "SuppressOutputDependence", false};

◆ m_tagClass

TAGCLASS JSSTaggerBase::m_tagClass {Unknown}
protectedinherited

Definition at line 100 of file JSSTaggerBase.h.

100{Unknown};

◆ m_tagType

std::string JSSTaggerBase::m_tagType
protectedinherited

Definition at line 130 of file JSSTaggerBase.h.

◆ m_tmvaCalibArea

std::string JSSTaggerBase::m_tmvaCalibArea
protectedinherited

Definition at line 126 of file JSSTaggerBase.h.

◆ m_tmvaConfigFileName

std::string JSSTaggerBase::m_tmvaConfigFileName
protectedinherited

TMVA configurations for BDT taggers.

Definition at line 124 of file JSSTaggerBase.h.

◆ m_tmvaConfigFilePath

std::string JSSTaggerBase::m_tmvaConfigFilePath
protectedinherited

Definition at line 125 of file JSSTaggerBase.h.

◆ m_truthBosonContainerName

std::string JSSTaggerBase::m_truthBosonContainerName
protectedinherited

Definition at line 212 of file JSSTaggerBase.h.

◆ m_truthLabelName

std::string JSSTaggerBase::m_truthLabelName
protectedinherited

Definition at line 214 of file JSSTaggerBase.h.

◆ m_truthLabelUseTRUTH3

bool JSSTaggerBase::m_truthLabelUseTRUTH3 {}
protectedinherited

Truth label options.

Definition at line 210 of file JSSTaggerBase.h.

210{};

◆ m_truthParticleContainerName

std::string JSSTaggerBase::m_truthParticleContainerName
protectedinherited

Definition at line 211 of file JSSTaggerBase.h.

◆ m_truthTopQuarkContainerName

std::string JSSTaggerBase::m_truthTopQuarkContainerName
protectedinherited

Definition at line 213 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 139 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 140 of file JSSTaggerBase.h.

◆ m_useMassCut

bool JSSTaggerBase::m_useMassCut = false
protectedinherited

Flag to indicate if mass window cut is used.

Definition at line 93 of file JSSTaggerBase.h.

◆ m_useScoreCut

bool JSSTaggerBase::m_useScoreCut = false
protectedinherited

Flag to indicate if a discriminant score is used.

Definition at line 96 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 205 of file JSSTaggerBase.h.

◆ m_weightConfigPath

std::string JSSTaggerBase::m_weightConfigPath
protectedinherited

Path to the SF configuration root file.

Definition at line 109 of file JSSTaggerBase.h.

◆ m_weightDecorationName

std::string JSSTaggerBase::m_weightDecorationName
protectedinherited

String for scale factor decoration names.

Definition at line 198 of file JSSTaggerBase.h.

◆ m_weightFileName

std::string JSSTaggerBase::m_weightFileName
protectedinherited

Definition at line 199 of file JSSTaggerBase.h.

◆ m_weightFlavors

std::string JSSTaggerBase::m_weightFlavors
protectedinherited

Definition at line 202 of file JSSTaggerBase.h.

◆ m_weightHistogramName

std::string JSSTaggerBase::m_weightHistogramName
protectedinherited

Definition at line 200 of file JSSTaggerBase.h.

◆ m_weightHistograms

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

Definition at line 206 of file JSSTaggerBase.h.

◆ m_wkpt

std::string JSSTaggerBase::m_wkpt
protectedinherited

Tagger information.

Definition at line 129 of file JSSTaggerBase.h.


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