 |
ATLAS Offline Software
|
#include <TauGNNDataLoader.h>
|
| std::string | m_nm |
| | Message source name. More...
|
| |
| boost::thread_specific_ptr< MsgStream > | m_msg_tls |
| | MsgStream instance (a std::cout like with print-out levels) More...
|
| |
| std::atomic< IMessageSvc * > | m_imsg { nullptr } |
| | MessageSvc pointer. More...
|
| |
| std::atomic< MSG::Level > | m_lvl { MSG::NIL } |
| | Current logging level. More...
|
| |
| std::atomic_flag m_initialized | ATLAS_THREAD_SAFE = ATOMIC_FLAG_INIT |
| | Messaging initialized (initMessaging) More...
|
| |
Definition at line 57 of file TauGNNDataLoader.h.
◆ ScalarCalc_t
◆ ScalarCalcByRef_t
◆ TauGNNDataLoader()
| TauGNNDataLoader::TauGNNDataLoader |
( |
std::shared_ptr< const FlavorTagInference::SaltModel > |
salt_model, |
|
|
const Config & |
config |
|
) |
| |
Definition at line 10 of file TauGNNDataLoader.cxx.
22 if (in_node.name ==
config.input_layer_scalar) {
23 scalar_input_node = &in_node;
29 if (in_node.name ==
config.input_layer_tracks) {
30 track_input_node = &in_node;
33 if (in_node.name ==
config.input_layer_clusters) {
34 cluster_input_node = &in_node;
40 if (scalar_input_node) {
41 for (
const auto &in : scalar_input_node->
variables) {
45 ATH_MSG_ERROR(
"Scalar input node 'tau_vars' not found in the model input configuration");
46 throw std::runtime_error(
"Scalar input node 'tau_vars' not found in the model input configuration");
49 if (track_input_node) {
51 trk_config.
name =
"tautracks";
58 for (
const auto &in : track_input_node->
variables) {
59 if (!
config.useTRT && (in.name ==
"eProbabilityHT")) {
60 ATH_MSG_WARNING(
"Track variable 'eProbabilityHT' requested but useTRT set to false. Using 'eProbabilityHT_noTRT' instead.");
66 addVectorLoader(
config.input_layer_tracks, std::make_shared<FlavorTagInference::ConstituentLoaderTauTrack>(trk_config));
68 ATH_MSG_ERROR(
"Track input node '" +
config.input_layer_tracks +
"' not found in the model input configuration");
69 throw std::runtime_error(
"Track input node '" +
config.input_layer_tracks +
"' not found in the model input configuration");
72 if (cluster_input_node) {
74 cls_config.
name =
"tauclusters";
81 for (
const auto &in : cluster_input_node->
variables) {
84 addVectorLoader(
config.input_layer_clusters, std::make_shared<FlavorTagInference::ConstituentLoaderTauCluster>(cls_config,
config.max_dr_cluster,
config.doVertexCorrection));
86 ATH_MSG_ERROR(
"Cluster input node '" +
config.input_layer_clusters +
"' not found in the model input configuration");
87 throw std::runtime_error(
"Cluster input node '" +
config.input_layer_clusters +
"' not found in the model input configuration");
◆ ~TauGNNDataLoader()
| TauGNNDataLoader::~TauGNNDataLoader |
( |
| ) |
|
|
default |
◆ addScalarLoader()
| void FlavorTagInference::SaltModelEDMLoaderBase::addScalarLoader |
( |
const std::string & |
varName, |
|
|
std::function< float(const xAOD::IParticle *)> |
loader |
|
) |
| |
|
inlineinherited |
◆ addVectorLoader()
| void FlavorTagInference::SaltModelEDMLoaderBase::addVectorLoader |
( |
const std::string & |
vecName, |
|
|
std::shared_ptr< IConstituentsLoader > |
loader |
|
) |
| |
|
inlineinherited |
◆ DumpGnnInputs()
| void FlavorTagInference::SaltModelEDMLoaderBase::DumpGnnInputs |
( |
const SaltModelInputs & |
gnn_inputs | ) |
const |
|
inlineinherited |
Definition at line 73 of file SaltModelEDMLoaderBase.h.
75 std::cout <<
"-------- Dumping GNN Input Data --------" << std::endl;
77 for (
const auto& [
name,
inputs] : gnn_inputs) {
78 std::cout <<
"Input Name: " <<
name << std::endl;
79 std::cout <<
" vec floats: ";
80 for (
const auto& feature :
inputs.first) {
81 std::cout << feature <<
" ";
83 std::cout << std::endl;
84 std::cout <<
" vec ints : ";
85 for (
const auto&
id :
inputs.second) {
86 std::cout <<
id <<
" ";
88 std::cout << std::endl;
90 std::cout <<
"---------- END GNN Input Data ----------" << std::endl;
◆ getScalarCalc()
Definition at line 91 of file TauGNNDataLoader.cxx.
96 }
catch (
const std::out_of_range &
e) {
98 throw std::runtime_error(
"Variable '" +
name +
"' not defined");
104 throw std::runtime_error(
"Invalid TauJet pointer");
106 auto success = func(*tau,
out);
108 throw std::runtime_error(
"Error in scalar variable calculation ");
◆ initMessaging()
| void AthMessaging::initMessaging |
( |
| ) |
const |
|
privateinherited |
Initialize our message level and MessageSvc.
This method should only be called once.
Definition at line 39 of file AthMessaging.cxx.
◆ loadInputs()
| virtual SaltModelData FlavorTagInference::SaltModelEDMLoaderBase::loadInputs |
( |
const xAOD::IParticle * |
p | ) |
const |
|
inlinefinalvirtualinherited |
Definition at line 49 of file SaltModelEDMLoaderBase.h.
50 SaltModelData salt_model_data;
52 std::vector<float> scalar_feat;
54 std::string
varName = varLoader.first;
55 scalar_feat.push_back(varLoader.second(
p));
57 std::vector<int64_t> scalar_feat_dim = {1,
static_cast<int64_t
>(scalar_feat.size())};
58 Inputs scalar_inputs(scalar_feat, scalar_feat_dim);
63 std::string input_name = loader.first;
64 auto [input_data, input_objects] = loader.second->getData(*
p);
66 salt_model_data.gnn_inputs.insert({input_name, input_data});
67 salt_model_data.num_inputs += input_data.first.size();
68 salt_model_data.constituents[input_name] = input_objects;
70 return salt_model_data;
◆ msg() [1/2]
| MsgStream & asg::AsgMessaging::msg |
( |
| ) |
const |
|
inherited |
The standard message stream.
- Returns
- A reference to the default message stream of this object.
Definition at line 49 of file AsgMessaging.cxx.
50 #ifndef XAOD_STANDALONE
52 #else // not XAOD_STANDALONE
54 #endif // not XAOD_STANDALONE
◆ msg() [2/2]
| MsgStream & asg::AsgMessaging::msg |
( |
const MSG::Level |
lvl | ) |
const |
|
inherited |
The standard message stream.
- Parameters
-
| lvl | The message level to set the stream to |
- Returns
- A reference to the default message stream, set to level "lvl"
Definition at line 57 of file AsgMessaging.cxx.
58 #ifndef XAOD_STANDALONE
60 #else // not XAOD_STANDALONE
63 #endif // not XAOD_STANDALONE
◆ msgLvl()
| bool asg::AsgMessaging::msgLvl |
( |
const MSG::Level |
lvl | ) |
const |
|
inherited |
Test the output level of the object.
- Parameters
-
| lvl | The message level to test against |
- Returns
- boolean Indicting if messages at given level will be printed
-
true If messages at level "lvl" will be printed
Definition at line 41 of file AsgMessaging.cxx.
42 #ifndef XAOD_STANDALONE
43 return ::AthMessaging::msgLvl( lvl );
44 #else // not XAOD_STANDALONE
45 return m_msg.msgLevel( lvl );
46 #endif // not XAOD_STANDALONE
◆ setLevel()
| void AthMessaging::setLevel |
( |
MSG::Level |
lvl | ) |
|
|
inherited |
◆ ATLAS_THREAD_SAFE
| std::atomic_flag m_initialized AthMessaging::ATLAS_THREAD_SAFE = ATOMIC_FLAG_INIT |
|
mutableprivateinherited |
◆ graph_config
| SaltModelGraphConfig::GraphConfig FlavorTagInference::SaltModelEDMLoaderBase::graph_config |
|
inherited |
◆ m_func_map
◆ m_imsg
| std::atomic<IMessageSvc*> AthMessaging::m_imsg { nullptr } |
|
mutableprivateinherited |
◆ m_lvl
| std::atomic<MSG::Level> AthMessaging::m_lvl { MSG::NIL } |
|
mutableprivateinherited |
◆ m_msg_tls
| boost::thread_specific_ptr<MsgStream> AthMessaging::m_msg_tls |
|
mutableprivateinherited |
MsgStream instance (a std::cout like with print-out levels)
Definition at line 132 of file AthMessaging.h.
◆ m_nm
| std::string AthMessaging::m_nm |
|
privateinherited |
◆ scalarInputName
| std::string FlavorTagInference::SaltModelEDMLoaderBase::scalarInputName |
|
inherited |
◆ scalarVarLoaders
| std::vector<std::pair<std::string , std::function<float(const xAOD::IParticle* )> > > FlavorTagInference::SaltModelEDMLoaderBase::scalarVarLoaders |
|
inherited |
◆ vectorVarLoaders
| std::map<std::string , std::shared_ptr<IConstituentsLoader> > FlavorTagInference::SaltModelEDMLoaderBase::vectorVarLoaders |
|
inherited |
The documentation for this class was generated from the following files:
std::string scalarInputName
std::atomic< MSG::Level > m_lvl
Current logging level.
bool SumPtTrkFrac(const xAOD::TauJet &tau, float &out)
static const std::unordered_map< std::string, ScalarCalcByRef_t > m_func_map
SaltModelGraphConfig::GraphConfig graph_config
bool isolFrac(const xAOD::TauJet &tau, float &out)
Class providing the definition of the 4-vector interface.
std::vector< InputNodeConfig > input_sequences
std::atomic< IMessageSvc * > m_imsg
MessageSvc pointer.
IMessageSvc * getMessageSvc(bool quiet=false)
bool sumEMCellEtOverLeadTrkPt(const xAOD::TauJet &tau, float &out)
bool centFrac(const xAOD::TauJet &tau, float &out)
bool etOverPtLeadTrk(const xAOD::TauJet &tau, float &out)
void addScalarLoader(const std::string &varName, std::function< float(const xAOD::IParticle *)> loader)
string varName
end cluster ToT and charge
Class describing a tau jet.
void addVectorLoader(const std::string &vecName, std::shared_ptr< IConstituentsLoader > loader)
std::function< bool(const xAOD::TauJet &, float &)> ScalarCalcByRef_t
bool massTrkSys(const xAOD::TauJet &tau, float &out)
std::vector< std::pair< std::string, std::function< float(const xAOD::IParticle *)> > > scalarVarLoaders
std::vector< InputNodeConfig > inputs
bool trFlightPathSig(const xAOD::TauJet &tau, float &out)
Class mimicking the AthMessaging class from the offline software.
bool absipSigLeadTrk(const xAOD::TauJet &tau, float &out)
bool EMPOverTrkSysP(const xAOD::TauJet &tau, float &out)
#define ATH_MSG_WARNING(x)
std::string m_nm
Message source name.
bool mEflowApprox(const xAOD::TauJet &tau, float &out)
bool innerTrkAvgDist(const xAOD::TauJet &tau, float &out)
bool pt(const xAOD::TauJet &tau, float &out)
ScalarCalc_t getScalarCalc(const std::string &name) const
bool dRmax(const xAOD::TauJet &tau, float &out)
std::pair< std::vector< float >, std::vector< int64_t > > Inputs
bool ptRatioEflowApprox(const xAOD::TauJet &tau, float &out)
std::map< std::string, std::shared_ptr< IConstituentsLoader > > vectorVarLoaders