ATLAS Offline Software
Namespaces | Classes | Typedefs | Functions
FlavorTagDiscriminants Namespace Reference

Namespaces

 defaults
 
 hbb_key
 
 TruthDecoratorHelpers
 

Classes

class  BacklinkAlg
 
class  BTagAugmenterTool
 
class  BTaggingBuilderAlg
 
class  BTagMuonAugmenter
 
class  BTagMuonAugmenterTool
 
class  BTagTrackLinkCopyAlg
 
class  CAccDec
 
class  CountIParticleAlg
 
class  CountTrackParticleAlg
 
class  DL2
 
class  DL2HighLevel
 
struct  DL2Properties
 
class  DL2Tool
 
class  FTagGhostElectronAssociationAlg
 an algorithm for adding ghost electrons to jets More...
 
class  GNNAuxTaskDecoratorAlg
 
struct  HbbGraphConfig
 
class  HbbTag
 
struct  HbbTagConfig
 
struct  HbbTagProperties
 
class  HbbTagTool
 
class  HitDecoratorAlg
 
class  JetHitAssociationAlg
 
class  LinkCounterAlg
 
class  PoorMansIpAugmenterAlg
 
class  SoftElectronDecoratorAlg
 
class  SoftElectronTruthDecoratorAlg
 
class  TrackClassifier
 
class  TrackLeptonDecoratorAlg
 
class  TrackTruthDecoratorAlg
 
class  TruthParticleDecoratorAlg
 
class  VRJetOverlapDecoratorTool
 

Typedefs

using FlipTagConfig = FlavorTagInference::FlipTagConfig
 
typedef SG::AuxElement AE
 

Functions

HbbGraphConfig getHbbGraphConfig (const lwt::GraphConfig &cfg)
 

Typedef Documentation

◆ AE

Definition at line 38 of file BTagMuonAugmenter.h.

◆ FlipTagConfig

Definition at line 18 of file BTagMuonAugmenter.h.

Function Documentation

◆ getHbbGraphConfig()

HbbGraphConfig FlavorTagDiscriminants::getHbbGraphConfig ( const lwt::GraphConfig &  cfg)

Definition at line 29 of file HbbGraphConfig.cxx.

29  {
30  namespace hk = FlavorTagDiscriminants::hbb_key;
31  HbbGraphConfig k;
32  k.n_subjets = 0;
33  std::regex subjet_match(hk::subjet + "[0-9]+");
34  std::string first_match;
35  for (const auto& node: graph_cfg.inputs) {
36  for (const auto& var: node.variables) {
37  const std::string& name = var.name;
38  k.defaults[node.name][name] = node.defaults.at(name);
39  }
40  if (node.name == hk::fatjet) {
41  for (const auto& var: node.variables) {
42  k.fatjet.insert(var.name);
43  }
44  } else if (std::regex_match(node.name, subjet_match)) {
45  std::set<std::string> subjet_set;
46  for (const auto& var: node.variables) {
47  subjet_set.insert(var.name);
48  }
49  if (k.n_subjets == 0) {
50  k.subjet = subjet_set;
51  first_match = node.name;
52  } else if (k.subjet != subjet_set) {
53  std::string error = "mismatch in subjet keys: we expect the same"
54  " variables to be read from each subjet. ";
55  error.append("first subjet (" + first_match + ") "
56  + formatSet(k.subjet) + ", match "
57  + std::to_string(k.n_subjets)
58  + ", (" + node.name + ") " + formatSet(subjet_set));
59  throw std::runtime_error(error);
60  }
61  k.n_subjets++;
62  } else {
63  throw std::runtime_error("no way to match '" + node.name + "'");
64  }
65  }
66  return k;
67  }
beamspotnt.var
var
Definition: bin/beamspotnt.py:1394
FlavorTagDiscriminants::hbb_key::subjet
const std::string subjet
Definition: HbbConstants.h:18
PrepareReferenceFile.regex
regex
Definition: PrepareReferenceFile.py:43
FlavorTagDiscriminants::hbb_key
Definition: HbbConstants.h:14
node::name
void name(const std::string &n)
Definition: node.h:37
name
std::string name
Definition: Control/AthContainers/Root/debug.cxx:240
ActsTrk::to_string
std::string to_string(const DetectorType &type)
Definition: GeometryDefs.h:34
FlavorTagDiscriminants::hbb_key::fatjet
const std::string fatjet
Definition: HbbConstants.h:19
error
Definition: IImpactPoint3dEstimator.h:70
node
Definition: node.h:21
fitman.k
k
Definition: fitman.py:528