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

#include <LundNetTagger.h>

Inheritance diagram for LundNetTagger:
Collaboration diagram for LundNetTagger:

Public Member Functions

 LundNetTagger (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
 Decorate single jet with tagging info.
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.

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

Private Types

typedef ServiceHandle< StoreGateSvc > StoreGateSvc_t

Private Member Functions

bool buildOnnxInputs (const xAOD::Jet &jet, std::vector< float > &out_x_float, std::vector< int64_t > &out_edge_index_int64, std::vector< int64_t > &out_batch_int64, std::vector< int64_t > &out_counts_int64, std::vector< float > &out_Ntrk_float) const
 Helper to build ONNX inputs (batch_size=1).
Gaudi::Details::PropertyBase & declareGaudiProperty (Gaudi::Property< T, V, H > &hndl, const SG::VarHandleKeyType &)
 specialization for handling Gaudi::Property<SG::VarHandleKey>

Private Attributes

Gaudi::Property< std::string > m_inputJetContainer
Gaudi::Property< std::string > m_prefix
Gaudi::Property< float > m_kTSelection
Gaudi::Property< std::string > m_scoreName
Gaudi::Property< int > m_expectedBatchSize
SG::WriteDecorHandleKey< xAOD::JetContainer > m_validDecorKey
SG::WriteDecorHandleKey< xAOD::JetContainer > m_classNDecorKey
SG::WriteDecorHandleKey< xAOD::JetContainer > m_scoreOneDecorKey
SG::WriteDecorHandleKey< xAOD::JetContainer > m_scoreTwoDecorKey
SG::WriteDecorHandleKey< xAOD::JetContainer > m_scoreThreeDecorKey
SG::WriteDecorHandleKey< xAOD::JetContainer > m_scoreFourDecorKey
SG::WriteDecorHandleKey< xAOD::JetContainer > m_scoreFiveDecorKey
Gaudi::Property< float > m_mean_z { this, "MeanZ", 2.0568479032747313f, "mean z (for normalization)" }
Gaudi::Property< float > m_std_z { this, "StdZ", 1.4450598054504056f, "std z (for normalization)" }
Gaudi::Property< float > m_mean_dr { this, "MeanDR", 3.8597358364389427f, "mean dr (for normalization)" }
Gaudi::Property< float > m_std_dr { this, "StdDR", 2.2748462855901073f, "std dr (for normalization)" }
Gaudi::Property< float > m_mean_kt { this, "MeanKT", -2.379904791478249f, "mean kt (for normalization)" }
Gaudi::Property< float > m_std_kt { this, "StdKT", 2.940813577366582f, "std kt (for normalization)" }
Gaudi::Property< float > m_mean_ntrk { this, "MeanNtrk", 57.588158609500134f, "mean Ntrk" }
Gaudi::Property< float > m_std_ntrk { this, "StdNtrk", 23.900100132781983f, "std Ntrk" }
std::string m_resolvedModelPath
Gaudi::Property< std::string > m_modelPath
std::unique_ptr< Ort::Env > m_env
std::unique_ptr< Ort::Session > m_session
unsigned int m_classN = 0
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 20 of file LundNetTagger.h.

Member Typedef Documentation

◆ StoreGateSvc_t

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

Definition at line 376 of file AthCommonDataStore.h.

Member Enumeration Documentation

◆ TAGCLASS

enum JSSTaggerBase::TAGCLASS
protectedinherited

TAGTYPE enum.

Enumerator
Unknown 
WBoson 
ZBoson 
TopQuark 

Definition at line 96 of file JSSTaggerBase.h.

Constructor & Destructor Documentation

◆ LundNetTagger()

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

Constructor.

Definition at line 19 of file LundNetTagger.cxx.

19 :
20 JSSTaggerBase( name )
21{}
JSSTaggerBase(const std::string &name)
Default constructor - to be used in all derived classes.

Member Function Documentation

◆ buildOnnxInputs()

bool LundNetTagger::buildOnnxInputs ( const xAOD::Jet & jet,
std::vector< float > & out_x_float,
std::vector< int64_t > & out_edge_index_int64,
std::vector< int64_t > & out_batch_int64,
std::vector< int64_t > & out_counts_int64,
std::vector< float > & out_Ntrk_float ) const
private

Helper to build ONNX inputs (batch_size=1).

Definition at line 490 of file LundNetTagger.cxx.

495 {
496 // Clear outputs
497 out_x_float.clear();
498 out_edge_index_int64.clear();
499 out_batch_int64.clear();
500 out_counts_int64.clear();
501 out_Ntrk_float.clear();
502
503 auto tryGetVectorFloat = [&](const std::string& baseName, std::vector<float>& out)->bool {
504 std::string withPref = m_prefix.value() + baseName;
505 if (jet.getAttribute(withPref, out)) {
506 ATH_MSG_DEBUG("Found attribute: " << withPref << " (used)");
507 return true;
508 }
509 if (jet.getAttribute(baseName, out)) {
510 ATH_MSG_DEBUG("Found attribute: " << baseName << " (used)");
511 return true;
512 }
513 ATH_MSG_DEBUG("Attribute not found: " << withPref << " nor " << baseName);
514 return false;
515 };
516
517 auto tryGetVectorInt = [&](const std::string& baseName, std::vector<int>& out)->bool {
518 std::string withPref = m_prefix.value() + baseName;
519 if (jet.getAttribute(withPref, out)) {
520 ATH_MSG_DEBUG("Found attribute: " << withPref << " (used)");
521 return true;
522 }
523 if (jet.getAttribute(baseName, out)) {
524 ATH_MSG_DEBUG("Found attribute: " << baseName << " (used)");
525 return true;
526 }
527 ATH_MSG_DEBUG("Attribute not found: " << withPref << " nor " << baseName);
528 return false;
529 };
530
531 auto tryGetInt = [&](const std::string& baseName, int& out)->bool {
532 std::string withPref = m_prefix.value() + baseName;
533 if (jet.getAttribute(withPref, out)) {
534 ATH_MSG_DEBUG("Found attribute: " << withPref << " (used)");
535 return true;
536 }
537 if (jet.getAttribute(baseName, out)) {
538 ATH_MSG_DEBUG("Found attribute: " << baseName << " (used)");
539 return true;
540 }
541 ATH_MSG_DEBUG("Attribute not found: " << withPref << " nor " << baseName);
542 return false;
543 };
544
545 // Read Lund decorations (try prefixed and unprefixed names)
546 std::vector<float> lnR, lnkT, z;
547 std::vector<int> idp1, idp2;
548 int nSplits = 0;
549
550 bool ok_lnR = tryGetVectorFloat("LundAllLnR", lnR);
551 bool ok_lnkT = tryGetVectorFloat("LundAllLnKT", lnkT);
552 bool ok_z = tryGetVectorFloat("LundAllZ", z);
553 bool ok_idp1 = tryGetVectorInt("LundAllIDP1", idp1);
554 bool ok_idp2 = tryGetVectorInt("LundAllIDP2", idp2);
555 bool ok_nsp = tryGetInt("nSplits", nSplits);
556
557 if (!(ok_lnR && ok_lnkT && ok_z && ok_idp1 && ok_idp2 && ok_nsp)) {
558 ATH_MSG_DEBUG("Missing one or more Lund decorations (lnR/lnkT/z/idp1/idp2/nSplits). Aborting build.");
559 return false;
560 }
561
562 size_t n_nodes = lnR.size();
563 if (n_nodes == 0) {
564 ATH_MSG_DEBUG("Lund decorations present but zero-length vectors.");
565 return false;
566 }
567
568 // Determine Ntrk: try various attribute names (try prefixed first, then unprefixed)
569 float ntrk_f = 0.f;
570 int tmp_ntrk_i = 0;
571 bool gotNtrk = false;
572 // Candidate names commonly used
573 std::vector<std::string> ntrkCandidates = { "LRJ_Nconst_Charged", "nTrk", "Ntrk", "NTracks" };
574 for (auto &cand : ntrkCandidates) {
575 std::string withPref = m_prefix.value() + cand;
576 if (jet.getAttribute(withPref, tmp_ntrk_i)) { ntrk_f = static_cast<float>(tmp_ntrk_i); gotNtrk = true; ATH_MSG_DEBUG("Using Ntrk attr: " << withPref); break; }
577 if (jet.getAttribute(cand, tmp_ntrk_i)) { ntrk_f = static_cast<float>(tmp_ntrk_i); gotNtrk = true; ATH_MSG_DEBUG("Using Ntrk attr: " << cand); break; }
578 }
579 if (!gotNtrk) {
580 const auto & links = jet.constituentLinks();
581 for (size_t i = 0; i < jet.numConstituents(); ++i) {
582 const xAOD::IParticle* p = *links[i];
583 const xAOD::FlowElement* fe = dynamic_cast<const xAOD::FlowElement*>(p);
584 if (fe && fe->isCharged()) ntrk_f += 1.f;
585 }
586 ATH_MSG_DEBUG("Computed Ntrk from constituents: " << ntrk_f);
587 }
588
589 // Build node mask based on kTSelection.
590 // m_kTSelection is a Gaudi Property<float> — get the value for comparison.
591 float kTsel_val = m_kTSelection;
592 float ln_kTcut = (kTsel_val > 0.f) ? std::log(std::max(1e-12f, kTsel_val)) : -1e9f;
593
594 std::vector<char> mask(n_nodes, 0);
595 size_t n_selected = 0;
596 for (size_t i = 0; i < n_nodes; ++i) {
597 float lnk = lnkT[i];
598 if (lnk > ln_kTcut) { mask[i] = 1; ++n_selected; }
599 else mask[i] = 0;
600 }
601
602 if (n_selected < 1) {
603 ATH_MSG_DEBUG("No nodes passed kT selection (n_selected=" << n_selected << ").");
604 return false;
605 }
606
607 // Build feature matrix x: [ln(1/dR), ln(kt), ln(1/z)] then standardize
608 out_x_float.reserve(n_selected * 3);
609 for (size_t i = 0; i < n_nodes; ++i) {
610 if (!mask[i]) continue;
611 float f_ln1overdR = lnR[i];
612 float f_lnkT = lnkT[i];
613 float zval = std::max(1e-6f, z[i]);
614 float f_ln1overz = -std::log(zval);
615
616 float z_std = (f_ln1overz - m_mean_z) / m_std_z;
617 float kt_std = (f_lnkT - m_mean_kt) / m_std_kt;
618 float dr_std = (f_ln1overdR - m_mean_dr) / m_std_dr;
619
620 out_x_float.push_back(dr_std);
621 out_x_float.push_back(z_std);
622 out_x_float.push_back(kt_std);
623 }
624
625 // Reindex old->new for masked nodes
626 std::vector<int> old2new(n_nodes, -1);
627 int new_idx = 0;
628 for (size_t i = 0; i < n_nodes; ++i) {
629 if (mask[i]) old2new[i] = new_idx++;
630 }
631
632
633 std::vector<int64_t> srcs;
634 std::vector<int64_t> dsts;
635
636 // Build edges (only include edges where both endpoints survive)
637 for (size_t child = 0; child < n_nodes; ++child) {
638 if (!mask[child]) continue;
639 int new_child = old2new[child];
640 int p1 = (child < idp1.size()) ? idp1[child] : -1;
641 int p2 = (child < idp2.size()) ? idp2[child] : -1;
642 if (p1 >= 0 && p1 < static_cast<int>(n_nodes) && old2new[p1] >= 0) {
643
644 int new_parent = old2new[p1];
645
646 // parent -> child
647 srcs.push_back(static_cast<int64_t>(new_parent));
648 dsts.push_back(static_cast<int64_t>(new_child));
649
650 // child -> parent (bidirectional)
651 srcs.push_back(static_cast<int64_t>(new_child));
652 dsts.push_back(static_cast<int64_t>(new_parent));
653 }
654 if (p2 >= 0 && p2 < static_cast<int>(n_nodes) && old2new[p2] >= 0) {
655 int new_parent = old2new[p2];
656
657 // parent -> child
658 srcs.push_back(static_cast<int64_t>(new_parent));
659 dsts.push_back(static_cast<int64_t>(new_child));
660
661 // child -> parent (bidirectional)
662 srcs.push_back(static_cast<int64_t>(new_child));
663 dsts.push_back(static_cast<int64_t>(new_parent));
664 }
665 }
666
667 size_t E = srcs.size(); // number of directed edges
668 out_edge_index_int64.clear();
669 out_edge_index_int64.reserve(2 * E);
670
671 // First row: all sources
672 out_edge_index_int64.insert(out_edge_index_int64.end(),
673 srcs.begin(),
674 srcs.end());
675
676 // Second row: all destinations
677 out_edge_index_int64.insert(out_edge_index_int64.end(),
678 dsts.begin(),
679 dsts.end());
680
681 // batch vector: all nodes belong to graph 0
682 for (int64_t i = 0; i < new_idx; ++i) out_batch_int64.push_back(0);
683
684 // counts: [num_nodes_selected]
685 out_counts_int64.push_back(static_cast<int64_t>(new_idx));
686
687 // Ntrk: normalize as in Python
688 float ntrk_std = (ntrk_f - m_mean_ntrk) / m_std_ntrk;
689 //out_Ntrk_float.push_back(ntrk_std);
690 const int64_t batch_size = m_expectedBatchSize; // Gaudi::Property
691 out_Ntrk_float.reserve(batch_size);
692 for (int64_t i = 0; i < batch_size; ++i) {
693 out_Ntrk_float.push_back(ntrk_std);
694 }
695 // Final sanity checks
696 if (out_x_float.empty() || out_counts_int64.empty()) {
697 ATH_MSG_DEBUG("After masking, nothing to evaluate.");
698 return false;
699 }
700
701 ATH_MSG_DEBUG("Built ONNX input: nodes=" << new_idx
702 << " edges=" << (out_edge_index_int64.size()/2)
703 << " ntrk=" << ntrk_f);
704
705 return true;
706}
#define ATH_MSG_DEBUG(x,...)
#define z
Gaudi::Property< float > m_mean_kt
Gaudi::Property< float > m_std_ntrk
Gaudi::Property< float > m_std_dr
Gaudi::Property< float > m_mean_dr
Gaudi::Property< int > m_expectedBatchSize
Gaudi::Property< float > m_mean_z
Gaudi::Property< float > m_mean_ntrk
Gaudi::Property< std::string > m_prefix
Gaudi::Property< float > m_std_kt
Gaudi::Property< float > m_std_z
Gaudi::Property< float > m_kTSelection
const hsize_t batch_size
Definition defaults.h:9
FlowElement_v1 FlowElement
Definition of the current "pfo version".
Definition FlowElement.h:16

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

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

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

◆ declareGaudiProperty()

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

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

Definition at line 156 of file AthCommonDataStore.h.

158 {
160 hndl.value(),
161 hndl.documentation());
162
163 }
Gaudi::Details::PropertyBase & declareProperty(Gaudi::Property< T, V, H > &t)

◆ 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 LundNetTagger::decorate ( const xAOD::JetContainer & jets) const
overridevirtual

Decorate jet collection with tagging info.

Loop over jet collection and decorate each jet.

Reimplemented from JSSTaggerBase.

Definition at line 116 of file LundNetTagger.cxx.

116 {
117
118 SG::WriteDecorHandle<xAOD::JetContainer, char> validDecor(m_validDecorKey);
119 SG::WriteDecorHandle<xAOD::JetContainer, int> classNDecor(m_classNDecorKey);
120 SG::WriteDecorHandle<xAOD::JetContainer, float> scoreOneDecor(m_scoreOneDecorKey);
121 SG::WriteDecorHandle<xAOD::JetContainer, float> scoreTwoDecor(m_scoreTwoDecorKey);
122 SG::WriteDecorHandle<xAOD::JetContainer, float> scoreThreeDecor(m_scoreThreeDecorKey);
123 SG::WriteDecorHandle<xAOD::JetContainer, float> scoreFourDecor(m_scoreFourDecorKey);
124 SG::WriteDecorHandle<xAOD::JetContainer, float> scoreFiveDecor(m_scoreFiveDecorKey);
125 // ONNX helpers
126 Ort::AllocatorWithDefaultOptions allocator;
127 auto memory_info =
128 Ort::MemoryInfo::CreateCpu(OrtArenaAllocator, OrtMemTypeDefault);
129
130 for (const xAOD::Jet* jptr : jets) {
131
132 const xAOD::Jet& jet = *jptr;
133
134 validDecor(*jptr) = 0;
135 classNDecor(*jptr) = -99;
136 scoreOneDecor(*jptr) = -999.9f; // Initialize bad entry
137 scoreTwoDecor(*jptr) = -999.9f;
138 scoreThreeDecor(*jptr) = -999.9f;
139 scoreFourDecor(*jptr) = -999.9f;
140 scoreFiveDecor(*jptr) = -999.9f;
141 // ---------------------------
142 // Build inputs
143 // ---------------------------
144 std::vector<float> x_flat; // [num_nodes * 3]
145 std::vector<int64_t> edge_index_flat; // [2 * num_edges]
146 std::vector<int64_t> batch_vec; // [num_nodes]
147 std::vector<int64_t> counts_vec; // unused but kept
148 std::vector<float> Ntrk_vec; // [1]
149
150 bool ok = buildOnnxInputs(
151 jet, x_flat, edge_index_flat, batch_vec, counts_vec, Ntrk_vec
152 );
153
154 if (!ok) {
155 ATH_MSG_DEBUG("Skipping jet: couldn't build inputs");
156 continue;
157 }
158
159 const int64_t num_nodes = batch_vec.size();
160
161 if (num_nodes == 0 || x_flat.size() != static_cast<size_t>(num_nodes * 3)) {
162 ATH_MSG_WARNING("Inconsistent node inputs");
163 continue;
164 }
165
166 // ---------------------------
167 // Create ONNX tensors
168 // ---------------------------
169 const int64_t min_nodes = 2;
170
171 if (num_nodes < min_nodes) {
172 ATH_MSG_DEBUG("Skipping jet: num_nodes < 2");
173 continue;
174 }
175
176 const int64_t num_edges = edge_index_flat.size() / 2;
177 if (num_edges < 1) {
178 ATH_MSG_DEBUG("Skipping jet: no edges in graph");
179 continue;
180 }
181
182 // x : [num_nodes, 3]
183 std::vector<int64_t> x_shape = { num_nodes, 3 };
184 Ort::Value x_tensor =
185 Ort::Value::CreateTensor<float>(
186 memory_info,
187 x_flat.data(),
188 x_flat.size(),
189 x_shape.data(),
190 x_shape.size()
191 );
192
193 // edge_index : [2, num_edges]
194 std::vector<int64_t> ei_shape = {
195 2,
196 static_cast<int64_t>(edge_index_flat.size() / 2)
197 };
198 Ort::Value edge_tensor =
199 Ort::Value::CreateTensor<int64_t>(
200 memory_info,
201 edge_index_flat.data(),
202 edge_index_flat.size(),
203 ei_shape.data(),
204 ei_shape.size()
205 );
206
207 // batch : [num_nodes]
208 std::vector<int64_t> batch_shape = { num_nodes };
209 Ort::Value batch_tensor =
210 Ort::Value::CreateTensor<int64_t>(
211 memory_info,
212 batch_vec.data(),
213 batch_vec.size(),
214 batch_shape.data(),
215 batch_shape.size()
216 );
217
218 // Ntrk : [batch_size]
219 std::vector<int64_t> ntrk_shape = {static_cast<int64_t>(Ntrk_vec.size())};
220 Ort::Value ntrk_tensor =
221 Ort::Value::CreateTensor<float>(
222 memory_info,
223 Ntrk_vec.data(),
224 Ntrk_vec.size(),
225 ntrk_shape.data(),
226 ntrk_shape.size()
227 );
228 std::array<Ort::Value, 4> input_tensors = {
229 std::move(x_tensor),
230 std::move(edge_tensor),
231 std::move(batch_tensor),
232 std::move(ntrk_tensor)
233 };
234
235 std::array<const char*, 4> input_names = {
236 "x",
237 "edge_index",
238 "batch",
239 "Ntrk"
240 };
241
242 std::array<const char*, 1> output_names = {
243 "output"
244 };
245
246 // ---------------------------
247 // Run inference
248 // ---------------------------
249 std::vector<Ort::Value> output_tensors;
250 try {
251 output_tensors = m_session->Run(
252 Ort::RunOptions{nullptr},
253 input_names.data(),
254 input_tensors.data(),
255 input_tensors.size(),
256 output_names.data(),
257 output_names.size()
258 );
259 }
260 catch (const Ort::Exception& e) {
261 ATH_MSG_ERROR("ONNX Runtime exception: " << e.what());
262 continue;
263 }
264
265 // ---------------------------
266 // Read output
267 // ---------------------------
268 if (output_tensors.empty() || !output_tensors.front().IsTensor()) {
269 ATH_MSG_WARNING("Invalid output tensor");
270 continue;
271 }
272
273 float* out_data =
274 output_tensors.front().GetTensorMutableData<float>();
275
276 std::vector<float> score_vec(5, -999.9f); // Supports upto 5 maximum
277 for(unsigned int i = 0; i < m_classN; i++){
278 score_vec[i] = out_data[i]; // Fill the score_vec
279 }
280
281 validDecor(*jptr) = 1;
282 classNDecor(*jptr) = m_classN;
283 scoreOneDecor(*jptr) = score_vec[0]; // Supports multi-class
284 scoreTwoDecor(*jptr) = score_vec[1];
285 scoreThreeDecor(*jptr) = score_vec[2];
286 scoreFourDecor(*jptr) = score_vec[3];
287 scoreFiveDecor(*jptr) = score_vec[4];
288
289 // Printout the all score_vec
290 ATH_MSG_DEBUG("Jet decorated with LundNet score_vec:");
291 ATH_MSG_DEBUG(" score_vec[0] : " << score_vec[0]);
292 ATH_MSG_DEBUG(" score_vec[1] : " << score_vec[1]);
293 ATH_MSG_DEBUG(" score_vec[2] : " << score_vec[2]);
294 ATH_MSG_DEBUG(" score_vec[3] : " << score_vec[3]);
295 ATH_MSG_DEBUG(" score_vec[4] : " << score_vec[4]);
296 }
297
298 return StatusCode::SUCCESS;
299}
#define ATH_MSG_ERROR(x,...)
#define ATH_MSG_WARNING(x,...)
std::unique_ptr< Ort::Session > m_session
SG::WriteDecorHandleKey< xAOD::JetContainer > m_scoreThreeDecorKey
SG::WriteDecorHandleKey< xAOD::JetContainer > m_validDecorKey
SG::WriteDecorHandleKey< xAOD::JetContainer > m_scoreFourDecorKey
bool buildOnnxInputs(const xAOD::Jet &jet, std::vector< float > &out_x_float, std::vector< int64_t > &out_edge_index_int64, std::vector< int64_t > &out_batch_int64, std::vector< int64_t > &out_counts_int64, std::vector< float > &out_Ntrk_float) const
Helper to build ONNX inputs (batch_size=1).
SG::WriteDecorHandleKey< xAOD::JetContainer > m_scoreTwoDecorKey
SG::WriteDecorHandleKey< xAOD::JetContainer > m_scoreFiveDecorKey
SG::WriteDecorHandleKey< xAOD::JetContainer > m_classNDecorKey
SG::WriteDecorHandleKey< xAOD::JetContainer > m_scoreOneDecorKey
unsigned int m_classN
Jet_v1 Jet
Definition of the current "jet version".

◆ decorateJSSRatios()

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

Create write decor handles

WTA N-subjettiness ratios

ECF ratios

Definition at line 511 of file JSSTaggerBase.cxx.

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

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

660 {
661
662 int indexPV = -1;
663
664 const xAOD::VertexContainer* vxCont = nullptr;
665 if ( evtStore()->retrieve( vxCont, "PrimaryVertices" ).isFailure() ) {
666 ATH_MSG_WARNING( "Unable to retrieve primary vertex container PrimaryVertices" );
667 }
668 else {
669 int vtx_counter = 0;
670 for ( const auto *vx : *vxCont ) {
671 if ( vx->vertexType()==xAOD::VxType::PriVtx ) {
672 indexPV = vtx_counter;
673 break;
674 }
675 vtx_counter++;
676 }
677 }
678
679 return indexPV;
680
681}
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 286 of file JSSTaggerBase.cxx.

286 {
287
288 ATH_MSG_INFO( "Using config file : " << m_configFile );
289
291 std::string configPath;
292
293 if ( m_calibArea.compare("Local") == 0 ) {
295 }
296 else if ( m_calibArea.find("eos") != std::string::npos) {
298 configPath = (m_calibArea+"/"+m_configFile);
299 }
300 else {
301 configPath = PathResolverFindCalibFile("BoostedJetTaggers/"+m_calibArea+"/"+m_configFile);
302 }
303
305 FileStat_t fStats;
306 int fSuccess = gSystem->GetPathInfo(configPath.c_str(), fStats);
307 if ( fSuccess ) {
308 ATH_MSG_ERROR( "Recommendations file " << m_configFile << " could not be found" );
309 return StatusCode::FAILURE;
310 }
311 else {
312 ATH_MSG_DEBUG( "Recommendations file was found : " << configPath );
313 }
314
315 if ( m_configReader.ReadFile( configPath.c_str(), EEnvLevel(0) ) ) {
316 ATH_MSG_ERROR( "Error while reading config file : "<< configPath );
317 return StatusCode::FAILURE;
318 }
319
320 return StatusCode::SUCCESS;
321
322}
#define ATH_MSG_INFO(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.

◆ getKey()

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

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

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

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

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

Definition at line 119 of file AsgTool.cxx.

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

◆ getName()

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

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

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

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

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

Definition at line 106 of file AsgTool.cxx.

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

◆ getProperty()

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

Get one of the tool's properties.

◆ getSF()

std::pair< double, double > JSSTaggerBase::getSF ( const xAOD::Jet & jet,
const std::string & truthLabelStr ) const
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 796 of file JSSTaggerBase.cxx.

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

◆ getTruthLabelStr()

std::string JSSTaggerBase::getTruthLabelStr ( const xAOD::Jet & jet,
asg::AcceptData & acceptData ) const
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 855 of file JSSTaggerBase.cxx.

855 {
857 std::string truthLabelStr;
858
860 SG::ReadDecorHandle<xAOD::JetContainer, int> readTruthLabel(m_readTruthLabelKey);
861 LargeRJetTruthLabel::TypeEnum jetContainment = LargeRJetTruthLabel::intToEnum(readTruthLabel(jet));
862
864 if ( m_weightHistograms.count("t_qqb") ) {
865
867 if ( jetContainment==LargeRJetTruthLabel::tqqb ) {
868 truthLabelStr = "t_qqb";
869 }
871 else if ( jetContainment==LargeRJetTruthLabel::notruth || jetContainment==LargeRJetTruthLabel::qcd ) {
872 truthLabelStr = "q";
873 }
874
875 }
877 else if ( m_weightHistograms.count("V_qq_passMpassD2") ) {
878
880 if ( jetContainment==LargeRJetTruthLabel::tqqb || jetContainment==LargeRJetTruthLabel::other_From_t ) {
881 truthLabelStr = "t_";
882 }
884 else if ( jetContainment==LargeRJetTruthLabel::Wqq || jetContainment==LargeRJetTruthLabel::Zqq || jetContainment==LargeRJetTruthLabel::Wqq_From_t ) {
885 truthLabelStr = "V_qq_";
886 }
888 else if ( jetContainment==LargeRJetTruthLabel::notruth || jetContainment==LargeRJetTruthLabel::qcd ) {
889 truthLabelStr = "q_";
890 }
891
893 if ( acceptData.getCutResult("PassMassLow") && acceptData.getCutResult("PassMassHigh") && acceptData.getCutResult("PassD2") ) {
894 truthLabelStr += "passMpassD2";
895 }
897 else if ( !(acceptData.getCutResult("PassMassLow") && acceptData.getCutResult("PassMassHigh")) && acceptData.getCutResult("PassD2") ) {
898 truthLabelStr += "failMpassD2";
899 }
901 else if ( acceptData.getCutResult("PassMassLow") && acceptData.getCutResult("PassMassHigh") && !acceptData.getCutResult("PassD2") ) {
902 truthLabelStr += "passMfailD2";
903 }
905 else{
906 truthLabelStr += "failMfailD2";
907 }
908
909 }
910
912 else if ( m_weightHistograms.count("V_qq") ) {
913
915 if ( jetContainment==LargeRJetTruthLabel::tqqb || jetContainment==LargeRJetTruthLabel::other_From_t ) {
916 truthLabelStr = "t";
917 }
919 else if ( jetContainment==LargeRJetTruthLabel::Wqq || jetContainment==LargeRJetTruthLabel::Zqq || jetContainment==LargeRJetTruthLabel::Wqq_From_t ) {
920 truthLabelStr = "V_qq";
921 }
923 else if ( jetContainment==LargeRJetTruthLabel::notruth || jetContainment==LargeRJetTruthLabel::qcd ) {
924 truthLabelStr = "q";
925 }
926 }
927
928 // inclusive top tagger
929 else {
931 if ( jetContainment==LargeRJetTruthLabel::tqqb || jetContainment==LargeRJetTruthLabel::other_From_t || jetContainment==LargeRJetTruthLabel::Wqq_From_t ) {
932 truthLabelStr = "t";
933 }
935 else if ( jetContainment==LargeRJetTruthLabel::notruth || jetContainment==LargeRJetTruthLabel::qcd ) {
936 truthLabelStr = "q";
937 }
938
939 }
940
941 return truthLabelStr;
942}
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 684 of file JSSTaggerBase.cxx.

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

◆ getWeight()

StatusCode JSSTaggerBase::getWeight ( const xAOD::Jet & jet,
bool passSel,
asg::AcceptData & acceptData ) const
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 722 of file JSSTaggerBase.cxx.

722 {
723 if ( !m_calcSF ) return StatusCode::SUCCESS;
724
725 float weight = 1.0;
726 float effSF = 1.0;
727 float sigeffSF = 1.0;
728 float efficiency = 1.0;
729
730 if ( m_isMC ) {
731
732 std::string truthLabelStr = getTruthLabelStr( jet, acceptData );
733 std::tie(effSF, efficiency) = getSF( jet, truthLabelStr );
734
735 // calculate signal efficiency SF
736 if ( m_weightHistograms.count("t_qqb") ) {
737 sigeffSF = getSF(jet, "t_qqb").first;
738 } else if ( m_weightHistograms.count("V_qq") ) {
739 sigeffSF = getSF(jet, "V_qq").first;
740 } else if ( m_weightHistograms.count("t") ){
741 sigeffSF = getSF(jet, "t").first;
742 } else {
743 sigeffSF = 1.0;
744 }
745
747 if ( m_weightFlavors.find("fail") != std::string::npos ) {
748 weight = effSF;
749 }
750
751 else {
752
754 if ( passSel ) {
755 weight = effSF;
756 }
757
759 else {
761 if ( m_efficiencyHistogramName.empty() ) {
762 weight = 1.0;
763 }
764 else if ( efficiency < 1.0 ) {
765 weight = ( 1. - effSF * efficiency ) / ( 1. - efficiency );
766 }
767 else {
768 weight = 1.0;
769 }
770 }
771 }
772
773 }
774
775 else {
776 weight = 1.0;
777 }
778
780 SG::WriteDecorHandle<xAOD::JetContainer, float> decWeight(m_decWeightKey);
781 SG::WriteDecorHandle<xAOD::JetContainer, float> decEfficiency(m_decEfficiencyKey);
782 SG::WriteDecorHandle<xAOD::JetContainer, float> decEffSF(m_decEffSFKey);
783 SG::WriteDecorHandle<xAOD::JetContainer, float> decSigeffSF(m_decSigeffSFKey);
784
786 decWeight(jet) = weight;
787 decEfficiency(jet) = efficiency;
788 decEffSF(jet) = effSF;
789 decSigeffSF(jet) = sigeffSF;
790
791 return StatusCode::SUCCESS;
792
793}
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 LundNetTagger::initialize ( void )
overridevirtual

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

Call base class initialize

Reimplemented from JSSTaggerBase.

Definition at line 23 of file LundNetTagger.cxx.

23 {
24
25 ATH_MSG_INFO("Initializing LundNetTagger");
26
27 ATH_MSG_INFO("Loading ONNX model from: " << m_modelPath);
28 // -------------------------
29 // Create ONNX Runtime session
30 // -------------------------
31 Ort::SessionOptions sessionOptions;
32 sessionOptions.SetIntraOpNumThreads(1);
33 sessionOptions.SetGraphOptimizationLevel(ORT_ENABLE_BASIC);
34
35 // Recommended in Athena to reduce memory usage
36 sessionOptions.DisableCpuMemArena();
37
38 m_env = std::make_unique<Ort::Env>(
39 ORT_LOGGING_LEVEL_WARNING,
40 "LundNetGNN"
41 );
44
45 if (m_resolvedModelPath.empty()) {
46 ATH_MSG_ERROR("Could not resolve ONNX model path: " << m_modelPath);
47 return StatusCode::FAILURE;
48 }
49
50 try {
51 m_session = std::make_unique<Ort::Session>(
52 *m_env,
53 m_resolvedModelPath.c_str(),
54 sessionOptions
55 );
56 } catch (const Ort::Exception& e) {
57 ATH_MSG_ERROR("Failed to create ONNX Runtime session: " << e.what());
58 return StatusCode::FAILURE;
59 }
60
61 ATH_MSG_INFO("ONNX Runtime session successfully created");
62
63 size_t numOutputs = m_session->GetOutputCount();
64 ATH_MSG_DEBUG("Number of ONNX outputs: " << numOutputs);
65
66 Ort::TypeInfo typeInfo = m_session->GetOutputTypeInfo(0);
67 auto tensorInfo = typeInfo.GetTensorTypeAndShapeInfo();
68 std::vector<int64_t> shape = tensorInfo.GetShape();
69 ATH_MSG_DEBUG("ONNX output shape: [" << shape[0] << " , " << shape[1] << " ]");
70
71 m_classN = shape[1]; // Check m_classN here
72
73
74 // -------------------------
75 // Decorations
76 // -------------------------
77 ATH_MSG_INFO("InputJetContainer: " << m_inputJetContainer);
78 ATH_MSG_INFO("Prefix: " << m_prefix);
79 ATH_MSG_INFO("kT selection: " << m_kTSelection);
80 ATH_MSG_INFO("scoreName: " << m_scoreName);
81 std::string decorFull =
82 m_inputJetContainer.value() + "." +
83 m_prefix.value() +
84 m_scoreName.value();
85 std::string validDecorFull =
86 decorFull + "LundNetValid";
87 std::string classNDecorFull =
88 decorFull + "LundNetClassN";
89
90 m_validDecorKey = validDecorFull;
91 m_classNDecorKey = classNDecorFull;
92 m_scoreOneDecorKey = decorFull + "LundNetScoreP1";
93 m_scoreTwoDecorKey = decorFull + "LundNetScoreP2";
94 m_scoreThreeDecorKey = decorFull + "LundNetScoreP3";
95 m_scoreFourDecorKey = decorFull + "LundNetScoreP4";
96 m_scoreFiveDecorKey = decorFull + "LundNetScoreP5";
97
98 ATH_CHECK(m_validDecorKey.initialize());
99 ATH_CHECK(m_classNDecorKey.initialize());
100 ATH_CHECK(m_scoreOneDecorKey.initialize());
101 ATH_CHECK(m_scoreTwoDecorKey.initialize());
102 ATH_CHECK(m_scoreThreeDecorKey.initialize());
103 ATH_CHECK(m_scoreFourDecorKey.initialize());
104 ATH_CHECK(m_scoreFiveDecorKey.initialize());
105
106 ATH_MSG_INFO("Will write decoration: " << decorFull);
107
110
111 ATH_MSG_INFO( "LundNetTagger tool initialized" );
112
113 return StatusCode::SUCCESS;
114}
#define ATH_CHECK
Evaluate an expression and check for errors.
virtual StatusCode initialize() override
Initialize the tool.
Gaudi::Property< std::string > m_scoreName
Gaudi::Property< std::string > m_modelPath
std::string m_resolvedModelPath
Gaudi::Property< std::string > m_inputJetContainer
std::unique_ptr< Ort::Env > m_env
static std::string find_file(const std::string &logical_file_name, const std::string &search_path)

◆ inputHandles()

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

Return this algorithm's input handles.

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

◆ modify()

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

Concrete implementation of the function inherited from IJetModifier.

Implements IJetModifier.

Definition at line 32 of file IJetDecorator.h.

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

◆ msg()

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

Definition at line 24 of file AthCommonMsg.h.

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

◆ msg_level_name()

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

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

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

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

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

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

Definition at line 101 of file AsgTool.cxx.

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

◆ msgLvl()

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

Definition at line 30 of file AthCommonMsg.h.

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

◆ outputHandles()

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

Return this algorithm's output handles.

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

◆ passKinRange()

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

Check if jet passes kinematic constraints.

Definition at line 343 of file JSSTaggerBase.cxx.

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

◆ print()

◆ printCuts()

void JSSTaggerBase::printCuts ( ) const
protectedinherited

Print configured cuts.

Definition at line 944 of file JSSTaggerBase.cxx.

944 {
945 ATH_MSG_INFO( "After tagging, you will have access to the following cuts as an asg::AcceptData : (<NCut>) <cut> : <description>)" );
946 int nCuts = m_acceptInfo.getNCuts();
947 for ( int iCut=0; iCut < nCuts; iCut++ ) {
948 std::string cut_string = "";
949 cut_string += " (";
950 cut_string += std::to_string(iCut);
951 cut_string += ") ";
952 cut_string += m_acceptInfo.getCutName(iCut).data();
953 cut_string += " : ";
954 cut_string += m_acceptInfo.getCutDescription(iCut).data();
955 ATH_MSG_INFO( cut_string );
956 }
957}
asg::AcceptInfo m_acceptInfo
Object that stores the results for a jet.

◆ renounce()

std::enable_if_t< std::is_void_v< std::result_of_t< decltype(&T::renounce)(T)> > &&!std::is_base_of_v< SG::VarHandleKeyArray, T > &&std::is_base_of_v< Gaudi::DataHandle, T >, void > AthCommonDataStore< AthCommonMsg< AlgTool > >::renounce ( T & h)
inlineprotectedinherited

Definition at line 368 of file AthCommonDataStore.h.

369 {
370 h.renounce();
372 }
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 352 of file AthCommonDataStore.h.

352 {
354 }

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

325 {
326
328 acceptData.clear();
329
331 acceptData.setCutResult( "ValidJetContent", true );
332 acceptData.setCutResult( "ValidEventContent", true );
333
334 acceptData.setCutResult( "ValidPtRangeHigh", true );
335 acceptData.setCutResult( "ValidPtRangeLow" , true );
336 acceptData.setCutResult( "ValidEtaRange" , true );
337
338 return StatusCode::SUCCESS;
339
340}
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 LundNetTagger::tag ( const xAOD::Jet & jet) const
overridevirtual

Decorate single jet with tagging info.

Create asg::AcceptData object

Reset the AcceptData cut results

Check basic kinematic selection

Implements JSSTaggerBase.

Definition at line 302 of file LundNetTagger.cxx.

302 {
304 asg::AcceptData acceptData( &m_acceptInfo );
305
307 ATH_CHECK( resetCuts( acceptData ) );
309 ATH_CHECK( checkKinRange( jet, acceptData ) );
310
311 SG::WriteDecorHandle<xAOD::JetContainer, char> validDecor(m_validDecorKey);
312 SG::WriteDecorHandle<xAOD::JetContainer, int> classNDecor(m_classNDecorKey);
313 SG::WriteDecorHandle<xAOD::JetContainer, float> scoreOneDecor(m_scoreOneDecorKey);
314 SG::WriteDecorHandle<xAOD::JetContainer, float> scoreTwoDecor(m_scoreTwoDecorKey);
315 SG::WriteDecorHandle<xAOD::JetContainer, float> scoreThreeDecor(m_scoreThreeDecorKey);
316 SG::WriteDecorHandle<xAOD::JetContainer, float> scoreFourDecor(m_scoreFourDecorKey);
317 SG::WriteDecorHandle<xAOD::JetContainer, float> scoreFiveDecor(m_scoreFiveDecorKey);
318 // ONNX helpers
319 Ort::AllocatorWithDefaultOptions allocator;
320 auto memory_info =
321 Ort::MemoryInfo::CreateCpu(OrtArenaAllocator, OrtMemTypeDefault);
322
323 validDecor(jet) = 0;
324 classNDecor(jet) = -99;
325 scoreOneDecor(jet) = -999.9f; // Initialize bad entry
326 scoreTwoDecor(jet) = -999.9f;
327 scoreThreeDecor(jet) = -999.9f;
328 scoreFourDecor(jet) = -999.9f;
329 scoreFiveDecor(jet) = -999.9f;
330 // ---------------------------
331 // Build inputs
332 // ---------------------------
333 std::vector<float> x_flat; // [num_nodes * 3]
334 std::vector<int64_t> edge_index_flat; // [2 * num_edges]
335 std::vector<int64_t> batch_vec; // [num_nodes]
336 std::vector<int64_t> counts_vec; // unused but kept
337 std::vector<float> Ntrk_vec; // [1]
338
339 bool ok = buildOnnxInputs(
340 jet, x_flat, edge_index_flat, batch_vec, counts_vec, Ntrk_vec
341 );
342
343 if (!ok) {
344 ATH_MSG_DEBUG("Skipping jet: couldn't build inputs");
345 return StatusCode::SUCCESS;
346 }
347
348 const int64_t num_nodes = batch_vec.size();
349
350 if (num_nodes == 0 || x_flat.size() != static_cast<size_t>(num_nodes * 3)) {
351 ATH_MSG_WARNING("Inconsistent node inputs");
352 return StatusCode::SUCCESS;
353 }
354
355 // ---------------------------
356 // Create ONNX tensors
357 // ---------------------------
358 const int64_t min_nodes = 2;
359
360 if (num_nodes < min_nodes) {
361 ATH_MSG_DEBUG("Skipping jet: num_nodes < 2");
362 return StatusCode::SUCCESS;
363 }
364
365 const int64_t num_edges = edge_index_flat.size() / 2;
366 if (num_edges < 1) {
367 ATH_MSG_DEBUG("Skipping jet: no edges in graph");
368 return StatusCode::SUCCESS;
369 }
370
371 // x : [num_nodes, 3]
372 std::vector<int64_t> x_shape = { num_nodes, 3 };
373 Ort::Value x_tensor =
374 Ort::Value::CreateTensor<float>(
375 memory_info,
376 x_flat.data(),
377 x_flat.size(),
378 x_shape.data(),
379 x_shape.size()
380 );
381
382 // edge_index : [2, num_edges]
383 std::vector<int64_t> ei_shape = {
384 2,
385 static_cast<int64_t>(edge_index_flat.size() / 2)
386 };
387 Ort::Value edge_tensor =
388 Ort::Value::CreateTensor<int64_t>(
389 memory_info,
390 edge_index_flat.data(),
391 edge_index_flat.size(),
392 ei_shape.data(),
393 ei_shape.size()
394 );
395
396 // batch : [num_nodes]
397 std::vector<int64_t> batch_shape = { num_nodes };
398 Ort::Value batch_tensor =
399 Ort::Value::CreateTensor<int64_t>(
400 memory_info,
401 batch_vec.data(),
402 batch_vec.size(),
403 batch_shape.data(),
404 batch_shape.size()
405 );
406
407 // Ntrk : [batch_size]
408 std::vector<int64_t> ntrk_shape = {static_cast<int64_t>(Ntrk_vec.size())};
409 Ort::Value ntrk_tensor =
410 Ort::Value::CreateTensor<float>(
411 memory_info,
412 Ntrk_vec.data(),
413 Ntrk_vec.size(),
414 ntrk_shape.data(),
415 ntrk_shape.size()
416 );
417 std::array<Ort::Value, 4> input_tensors = {
418 std::move(x_tensor),
419 std::move(edge_tensor),
420 std::move(batch_tensor),
421 std::move(ntrk_tensor)
422 };
423
424 std::array<const char*, 4> input_names = {
425 "x",
426 "edge_index",
427 "batch",
428 "Ntrk"
429 };
430
431 std::array<const char*, 1> output_names = {
432 "output"
433 };
434
435 // ---------------------------
436 // Run inference
437 // ---------------------------
438 std::vector<Ort::Value> output_tensors;
439 try {
440 output_tensors = m_session->Run(
441 Ort::RunOptions{nullptr},
442 input_names.data(),
443 input_tensors.data(),
444 input_tensors.size(),
445 output_names.data(),
446 output_names.size()
447 );
448 }
449 catch (const Ort::Exception& e) {
450 ATH_MSG_ERROR("ONNX Runtime exception: " << e.what());
451 return StatusCode::SUCCESS;
452 }
453
454 // ---------------------------
455 // Read output
456 // ---------------------------
457 if (output_tensors.empty() || !output_tensors.front().IsTensor()) {
458 ATH_MSG_WARNING("Invalid output tensor");
459 return StatusCode::SUCCESS;
460 }
461
462 float* out_data =
463 output_tensors.front().GetTensorMutableData<float>();
464
465 std::vector<float> score_vec(5, -999.9f); // Supports upto 5 maximum
466 for(unsigned int i = 0; i < m_classN; i++){
467 score_vec[i] = out_data[i]; // Fill the score_vec
468 }
469
470 validDecor(jet) = 1;
471 classNDecor(jet) = m_classN;
472 scoreOneDecor(jet) = score_vec[0]; // Supports multi-class
473 scoreTwoDecor(jet) = score_vec[1];
474 scoreThreeDecor(jet) = score_vec[2];
475 scoreFourDecor(jet) = score_vec[3];
476 scoreFiveDecor(jet) = score_vec[4];
477
478 // Printout the all score_vec
479 ATH_MSG_DEBUG("Jet decorated with LundNet score_vec:");
480 ATH_MSG_DEBUG(" score_vec[0] : " << score_vec[0]);
481 ATH_MSG_DEBUG(" score_vec[1] : " << score_vec[1]);
482 ATH_MSG_DEBUG(" score_vec[2] : " << score_vec[2]);
483 ATH_MSG_DEBUG(" score_vec[3] : " << score_vec[3]);
484 ATH_MSG_DEBUG(" score_vec[4] : " << score_vec[4]);
485
486 return StatusCode::SUCCESS;
487
488}
StatusCode checkKinRange(const xAOD::Jet &jet, asg::AcceptData &acceptData) const
Check and record if jet passes kinematic constraints.
StatusCode resetCuts(asg::AcceptData &acceptData) const
Reset cuts.

◆ updateVHKA()

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

Definition at line 298 of file AthCommonDataStore.h.

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

Member Data Documentation

◆ m_acceptInfo

asg::AcceptInfo JSSTaggerBase::m_acceptInfo
protectedinherited

Object that stores the results for a jet.

Definition at line 65 of file JSSTaggerBase.h.

◆ m_calcSF

bool JSSTaggerBase::m_calcSF {}
protectedinherited

Flag to calculate scale factor.

Definition at line 193 of file JSSTaggerBase.h.

193{};

◆ m_calibArea

std::string JSSTaggerBase::m_calibArea
protectedinherited

Location where config files live on cvmfs.

Definition at line 112 of file JSSTaggerBase.h.

◆ m_classN

unsigned int LundNetTagger::m_classN = 0
private

Definition at line 106 of file LundNetTagger.h.

◆ m_classNDecorKey

SG::WriteDecorHandleKey<xAOD::JetContainer> LundNetTagger::m_classNDecorKey
private
Initial value:
{
this, "ClassNDecor", "", "LundNet output nodeN inference"
}

Definition at line 67 of file LundNetTagger.h.

67 {
68 this, "ClassNDecor", "", "LundNet output nodeN inference"
69 };

◆ m_configFile

std::string JSSTaggerBase::m_configFile
protectedinherited

Configuration file name.

Definition at line 109 of file JSSTaggerBase.h.

◆ m_configReader

TEnv JSSTaggerBase::m_configReader
protectedinherited

TEnv instance to read config files.

Definition at line 62 of file JSSTaggerBase.h.

◆ m_containerName

std::string JSSTaggerBase::m_containerName
protectedinherited

Configurable members.

Jet container name

Definition at line 102 of file JSSTaggerBase.h.

◆ m_decC2Key

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

Definition at line 144 of file JSSTaggerBase.h.

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

◆ m_decCutMHighKey

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

Definition at line 220 of file JSSTaggerBase.h.

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

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

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

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

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

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

◆ m_decL2Key

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

Definition at line 147 of file JSSTaggerBase.h.

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

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

◆ m_decorationName

std::string JSSTaggerBase::m_decorationName
protectedinherited

Decoration name.

Definition at line 188 of file JSSTaggerBase.h.

◆ m_decPassMassKey

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

Definition at line 76 of file JSSTaggerBase.h.

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

◆ m_decPassScoreKey

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

Definition at line 77 of file JSSTaggerBase.h.

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

◆ m_decScoreCutKey

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

Definition at line 221 of file JSSTaggerBase.h.

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

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

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

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

◆ m_decTau21WTAKey

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

WriteDecorHandle keys for JSS moments.

Definition at line 140 of file JSSTaggerBase.h.

140{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 141 of file JSSTaggerBase.h.

141{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 142 of file JSSTaggerBase.h.

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

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

◆ m_decValidEventContentKey

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

Definition at line 74 of file JSSTaggerBase.h.

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

◆ m_decValidJetContentKey

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

Definition at line 73 of file JSSTaggerBase.h.

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

◆ m_decValidKinRangeKey

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

Definition at line 72 of file JSSTaggerBase.h.

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

◆ m_decValidPtRangeHighKey

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

Definition at line 69 of file JSSTaggerBase.h.

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

◆ m_decValidPtRangeLowKey

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

Definition at line 70 of file JSSTaggerBase.h.

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

◆ m_decWeightKey

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

WriteDecorHandle keys for SF.

Definition at line 225 of file JSSTaggerBase.h.

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

◆ m_detStore

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

Pointer to StoreGate (detector store by default).

Definition at line 381 of file AthCommonDataStore.h.

◆ m_efficiencyHistogramName

std::string JSSTaggerBase::m_efficiencyHistogramName
protectedinherited

Definition at line 200 of file JSSTaggerBase.h.

◆ m_efficiencyHistograms

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

Definition at line 206 of file JSSTaggerBase.h.

◆ m_env

std::unique_ptr<Ort::Env> LundNetTagger::m_env
private

Definition at line 102 of file LundNetTagger.h.

◆ m_evtStore

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

Pointer to StoreGate (event store by default).

Definition at line 378 of file AthCommonDataStore.h.

◆ m_expectedBatchSize

Gaudi::Property<int> LundNetTagger::m_expectedBatchSize
private
Initial value:
{
this,
"ExpectedBatchSize",
1,
"Batch size expected by the ONNX model (from training/export)"
}

Definition at line 57 of file LundNetTagger.h.

57 {
58 this,
59 "ExpectedBatchSize",
60 1,
61 "Batch size expected by the ONNX model (from training/export)"
62 };

◆ m_funcMassCutHigh

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

Definition at line 184 of file JSSTaggerBase.h.

◆ m_funcMassCutLow

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

TF1 for cut functions.

Definition at line 183 of file JSSTaggerBase.h.

◆ m_funcScoreCut

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

Definition at line 185 of file JSSTaggerBase.h.

◆ m_inputJetContainer

Gaudi::Property<std::string> LundNetTagger::m_inputJetContainer
private
Initial value:
{
this, "InputJetContainer", "AntiKt10UFO",
"Name of input jet container"
}

Definition at line 38 of file LundNetTagger.h.

38 {
39 this, "InputJetContainer", "AntiKt10UFO",
40 "Name of input jet container"
41 };

◆ m_isMC

bool JSSTaggerBase::m_isMC {}
protectedinherited

Definition at line 194 of file JSSTaggerBase.h.

194{};

◆ m_isSmallRJet

bool JSSTaggerBase::m_isSmallRJet = false
protectedinherited

Definition at line 103 of file JSSTaggerBase.h.

◆ m_jetEtaMax

float JSSTaggerBase::m_jetEtaMax {}
protectedinherited

Definition at line 132 of file JSSTaggerBase.h.

132{};

◆ m_jetPtMax

float JSSTaggerBase::m_jetPtMax {}
protectedinherited

Definition at line 131 of file JSSTaggerBase.h.

131{};

◆ m_jetPtMin

float JSSTaggerBase::m_jetPtMin {}
protectedinherited

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

Definition at line 130 of file JSSTaggerBase.h.

130{};

◆ m_kerasCalibArea

std::string JSSTaggerBase::m_kerasCalibArea
protectedinherited

Definition at line 118 of file JSSTaggerBase.h.

◆ m_kerasConfigFileName

std::string JSSTaggerBase::m_kerasConfigFileName
protectedinherited

Keras configurations for ML taggers.

Definition at line 115 of file JSSTaggerBase.h.

◆ m_kerasConfigFilePath

std::string JSSTaggerBase::m_kerasConfigFilePath
protectedinherited

Definition at line 116 of file JSSTaggerBase.h.

◆ m_kerasConfigOutputName

std::string JSSTaggerBase::m_kerasConfigOutputName
protectedinherited

Definition at line 117 of file JSSTaggerBase.h.

◆ m_kTSelection

Gaudi::Property<float> LundNetTagger::m_kTSelection
private
Initial value:
{
this, "kTSelection", -1000.f,
"kT cut to apply (same meaning as kT_Cut in python loader)"
}

Definition at line 47 of file LundNetTagger.h.

47 {
48 this, "kTSelection", -1000.f,
49 "kT cut to apply (same meaning as kT_Cut in python loader)"
50 };

◆ m_mean_dr

Gaudi::Property<float> LundNetTagger::m_mean_dr { this, "MeanDR", 3.8597358364389427f, "mean dr (for normalization)" }
private

Definition at line 89 of file LundNetTagger.h.

89{ this, "MeanDR", 3.8597358364389427f, "mean dr (for normalization)" };

◆ m_mean_kt

Gaudi::Property<float> LundNetTagger::m_mean_kt { this, "MeanKT", -2.379904791478249f, "mean kt (for normalization)" }
private

Definition at line 91 of file LundNetTagger.h.

91{ this, "MeanKT", -2.379904791478249f, "mean kt (for normalization)" };

◆ m_mean_ntrk

Gaudi::Property<float> LundNetTagger::m_mean_ntrk { this, "MeanNtrk", 57.588158609500134f, "mean Ntrk" }
private

Definition at line 93 of file LundNetTagger.h.

93{ this, "MeanNtrk", 57.588158609500134f, "mean Ntrk" };

◆ m_mean_z

Gaudi::Property<float> LundNetTagger::m_mean_z { this, "MeanZ", 2.0568479032747313f, "mean z (for normalization)" }
private

Definition at line 87 of file LundNetTagger.h.

87{ this, "MeanZ", 2.0568479032747313f, "mean z (for normalization)" };

◆ m_modelPath

Gaudi::Property<std::string> LundNetTagger::m_modelPath
private
Initial value:
{
this,
"ModelPath",
"",
"Path to the ONNX model"
}

Definition at line 96 of file LundNetTagger.h.

96 {
97 this,
98 "ModelPath",
99 "",
100 "Path to the ONNX model"
101 };

◆ m_nWarnMax

const int JSSTaggerBase::m_nWarnMax = 10
protectedinherited

Maximum number of warnings.

Definition at line 80 of file JSSTaggerBase.h.

◆ m_nWarnVar

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

Warning counters.

Definition at line 83 of file JSSTaggerBase.h.

◆ m_prefix

Gaudi::Property<std::string> LundNetTagger::m_prefix
private
Initial value:
{
this, "Prefix", "",
"Prefix used by LundVariablesTool decorations"
}

Definition at line 43 of file LundNetTagger.h.

43 {
44 this, "Prefix", "",
45 "Prefix used by LundVariablesTool decorations"
46 };

◆ m_ptGeV

bool JSSTaggerBase::m_ptGeV = false
protectedinherited

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

Definition at line 87 of file JSSTaggerBase.h.

◆ m_readECF1Key

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

Definition at line 156 of file JSSTaggerBase.h.

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

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

158{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 170 of file JSSTaggerBase.h.

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

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

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

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

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

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

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

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

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

152{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 153 of file JSSTaggerBase.h.

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

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

165{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 216 of file JSSTaggerBase.h.

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

◆ m_resolvedModelPath

std::string LundNetTagger::m_resolvedModelPath
private

Definition at line 95 of file LundNetTagger.h.

◆ m_scoreDecorationName

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

Definition at line 189 of file JSSTaggerBase.h.

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

◆ m_scoreFiveDecorKey

SG::WriteDecorHandleKey<xAOD::JetContainer> LundNetTagger::m_scoreFiveDecorKey
private
Initial value:
{
this, "ScoreFiveDecorKey", "", "Score five decoration key"
}

Definition at line 83 of file LundNetTagger.h.

83 {
84 this, "ScoreFiveDecorKey", "", "Score five decoration key"
85 };

◆ m_scoreFourDecorKey

SG::WriteDecorHandleKey<xAOD::JetContainer> LundNetTagger::m_scoreFourDecorKey
private
Initial value:
{
this, "ScoreFourDecorKey", "", "Score four decoration key"
}

Definition at line 80 of file LundNetTagger.h.

80 {
81 this, "ScoreFourDecorKey", "", "Score four decoration key"
82 };

◆ m_scoreName

Gaudi::Property<std::string> LundNetTagger::m_scoreName
private
Initial value:
{
this, "ScoreDecoration", "LundNetScore",
"Name of the decoration (without container prefix). Final decoration will be <container>.<prefix><ScoreDecoration>"
}

Definition at line 52 of file LundNetTagger.h.

52 {
53 this, "ScoreDecoration", "LundNetScore",
54 "Name of the decoration (without container prefix). Final decoration will be <container>.<prefix><ScoreDecoration>"
55 };

◆ m_scoreOneDecorKey

SG::WriteDecorHandleKey<xAOD::JetContainer> LundNetTagger::m_scoreOneDecorKey
private
Initial value:
{
this, "ScoreOneDecorKey", "", "Score one decoration key"
}

Definition at line 71 of file LundNetTagger.h.

71 {
72 this, "ScoreOneDecorKey", "", "Score one decoration key"
73 };

◆ m_scoreThreeDecorKey

SG::WriteDecorHandleKey<xAOD::JetContainer> LundNetTagger::m_scoreThreeDecorKey
private
Initial value:
{
this, "ScoreThreeDecorKey", "", "Score three decoration key"
}

Definition at line 77 of file LundNetTagger.h.

77 {
78 this, "ScoreThreeDecorKey", "", "Score three decoration key"
79 };

◆ m_scoreTwoDecorKey

SG::WriteDecorHandleKey<xAOD::JetContainer> LundNetTagger::m_scoreTwoDecorKey
private
Initial value:
{
this, "ScoreTwoDecorKey", "", "Score two decoration key"
}

Definition at line 74 of file LundNetTagger.h.

74 {
75 this, "ScoreTwoDecorKey", "", "Score two decoration key"
76 };

◆ m_session

std::unique_ptr<Ort::Session> LundNetTagger::m_session
private

Definition at line 103 of file LundNetTagger.h.

◆ m_std_dr

Gaudi::Property<float> LundNetTagger::m_std_dr { this, "StdDR", 2.2748462855901073f, "std dr (for normalization)" }
private

Definition at line 90 of file LundNetTagger.h.

90{ this, "StdDR", 2.2748462855901073f, "std dr (for normalization)" };

◆ m_std_kt

Gaudi::Property<float> LundNetTagger::m_std_kt { this, "StdKT", 2.940813577366582f, "std kt (for normalization)" }
private

Definition at line 92 of file LundNetTagger.h.

92{ this, "StdKT", 2.940813577366582f, "std kt (for normalization)" };

◆ m_std_ntrk

Gaudi::Property<float> LundNetTagger::m_std_ntrk { this, "StdNtrk", 23.900100132781983f, "std Ntrk" }
private

Definition at line 94 of file LundNetTagger.h.

94{ this, "StdNtrk", 23.900100132781983f, "std Ntrk" };

◆ m_std_z

Gaudi::Property<float> LundNetTagger::m_std_z { this, "StdZ", 1.4450598054504056f, "std z (for normalization)" }
private

Definition at line 88 of file LundNetTagger.h.

88{ this, "StdZ", 1.4450598054504056f, "std z (for normalization)" };

◆ m_strMassCutHigh

std::string JSSTaggerBase::m_strMassCutHigh
protectedinherited

Definition at line 179 of file JSSTaggerBase.h.

◆ m_strMassCutLow

std::string JSSTaggerBase::m_strMassCutLow
protectedinherited

Strings for cut functions.

Definition at line 178 of file JSSTaggerBase.h.

◆ m_strScoreCut

std::string JSSTaggerBase::m_strScoreCut
protectedinherited

Definition at line 180 of file JSSTaggerBase.h.

◆ m_suppressInputDependence

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

Definition at line 174 of file JSSTaggerBase.h.

174{this, "SuppressInputDependence", false};

◆ m_suppressOutputDependence

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

Definition at line 175 of file JSSTaggerBase.h.

175{this, "SuppressOutputDependence", false};

◆ m_tagClass

TAGCLASS JSSTaggerBase::m_tagClass {Unknown}
protectedinherited

Definition at line 97 of file JSSTaggerBase.h.

97{Unknown};

◆ m_tagType

std::string JSSTaggerBase::m_tagType
protectedinherited

Definition at line 127 of file JSSTaggerBase.h.

◆ m_tmvaCalibArea

std::string JSSTaggerBase::m_tmvaCalibArea
protectedinherited

Definition at line 123 of file JSSTaggerBase.h.

◆ m_tmvaConfigFileName

std::string JSSTaggerBase::m_tmvaConfigFileName
protectedinherited

TMVA configurations for BDT taggers.

Definition at line 121 of file JSSTaggerBase.h.

◆ m_tmvaConfigFilePath

std::string JSSTaggerBase::m_tmvaConfigFilePath
protectedinherited

Definition at line 122 of file JSSTaggerBase.h.

◆ m_truthBosonContainerName

std::string JSSTaggerBase::m_truthBosonContainerName
protectedinherited

Definition at line 211 of file JSSTaggerBase.h.

◆ m_truthLabelName

std::string JSSTaggerBase::m_truthLabelName
protectedinherited

Definition at line 213 of file JSSTaggerBase.h.

◆ m_truthLabelUseTRUTH3

bool JSSTaggerBase::m_truthLabelUseTRUTH3 {}
protectedinherited

Truth label options.

Definition at line 209 of file JSSTaggerBase.h.

209{};

◆ m_truthParticleContainerName

std::string JSSTaggerBase::m_truthParticleContainerName
protectedinherited

Definition at line 210 of file JSSTaggerBase.h.

◆ m_truthTopQuarkContainerName

std::string JSSTaggerBase::m_truthTopQuarkContainerName
protectedinherited

Definition at line 212 of file JSSTaggerBase.h.

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

◆ m_useLSeries

bool JSSTaggerBase::m_useLSeries = false
protectedinherited

Definition at line 137 of file JSSTaggerBase.h.

◆ m_useMassCut

bool JSSTaggerBase::m_useMassCut = false
protectedinherited

Flag to indicate if mass window cut is used.

Definition at line 90 of file JSSTaggerBase.h.

◆ m_useScoreCut

bool JSSTaggerBase::m_useScoreCut = false
protectedinherited

Flag to indicate if a discriminant score is used.

Definition at line 93 of file JSSTaggerBase.h.

◆ m_validDecorKey

SG::WriteDecorHandleKey<xAOD::JetContainer> LundNetTagger::m_validDecorKey
private
Initial value:
{
this, "ValidDecor", "", "Valid LundNet inference"
}

Definition at line 64 of file LundNetTagger.h.

64 {
65 this, "ValidDecor", "", "Valid LundNet inference"
66 };

◆ m_varHandleArraysDeclared

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

Definition at line 387 of file AthCommonDataStore.h.

◆ m_vhka

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

Definition at line 386 of file AthCommonDataStore.h.

◆ m_weightConfig

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

Histograms for scale factors.

Definition at line 204 of file JSSTaggerBase.h.

◆ m_weightConfigPath

std::string JSSTaggerBase::m_weightConfigPath
protectedinherited

Path to the SF configuration root file.

Definition at line 106 of file JSSTaggerBase.h.

◆ m_weightDecorationName

std::string JSSTaggerBase::m_weightDecorationName
protectedinherited

String for scale factor decoration names.

Definition at line 197 of file JSSTaggerBase.h.

◆ m_weightFileName

std::string JSSTaggerBase::m_weightFileName
protectedinherited

Definition at line 198 of file JSSTaggerBase.h.

◆ m_weightFlavors

std::string JSSTaggerBase::m_weightFlavors
protectedinherited

Definition at line 201 of file JSSTaggerBase.h.

◆ m_weightHistogramName

std::string JSSTaggerBase::m_weightHistogramName
protectedinherited

Definition at line 199 of file JSSTaggerBase.h.

◆ m_weightHistograms

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

Definition at line 205 of file JSSTaggerBase.h.

◆ m_wkpt

std::string JSSTaggerBase::m_wkpt
protectedinherited

Tagger information.

Definition at line 126 of file JSSTaggerBase.h.


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