ATLAS Offline Software
GNNToolifiers.cxx
Go to the documentation of this file.
1 /*
2 + Copyright (C) 2002-2024 CERN for the benefit of the ATLAS collaboration
3 */
4 
8 
9 #include "AsgTools/AsgTool.h"
10 
11 namespace FlavorTagDiscriminants {
13  t.declareProperty("flipTagConfig", props->flipTagConfig,
14  "flip configuration used for calibration");
15  t.declareProperty("variableRemapping", props->variableRemapping,
16  "user-defined mapping to rename the vars stored in the NN");
17  t.declareProperty("trackLinkType", props->trackLinkType,
18  "access tracks as IParticleContainer or as TrackParticleContainer");
19  t.declareProperty("defaultOutputValue", props->default_output_value);
20  t.declareProperty("defaultOutputValues", props->default_output_values);
21  t.declareProperty("defaultZeroTracks", props->default_zero_tracks);
22  }
23 
26  if (props.flipTagConfig.size() > 0) {
27  opts.flip_config = flipTagConfigFromString(props.flipTagConfig);
28  }
29  opts.variable_remapping = props.variableRemapping;
30  if (props.trackLinkType.size() > 0) {
31  opts.track_link_type = trackLinkTypeFromString(props.trackLinkType);
32  }
33  opts.default_output_value = props.default_output_value;
34  {
35  const auto& d = props.default_output_values;
36  opts.default_output_values.insert(d.begin(), d.end());
37  }
38  opts.default_zero_tracks = props.default_zero_tracks;
39  return opts;
40  }
41 
42 }
asg::AsgTool
Base class for the dual-use tool implementation classes.
Definition: AsgTool.h:47
FlavorTagDiscriminants::GNNToolProperties::flipTagConfig
std::string flipTagConfig
Definition: GNNToolifiers.h:23
FlavorTagDiscriminants
This file contains "getter" functions used for accessing tagger inputs from the EDM.
Definition: AssociationEnums.h:11
FlavorTagDiscriminants::GNNOptions
Definition: GNNOptions.h:16
FlavorTagDiscriminants::GNNToolProperties::trackLinkType
std::string trackLinkType
Definition: GNNToolifiers.h:25
hist_file_dump.d
d
Definition: hist_file_dump.py:137
read_hist_ntuple.t
t
Definition: read_hist_ntuple.py:5
FlavorTagDiscriminants::GNNToolProperties::default_output_value
float default_output_value
Definition: GNNToolifiers.h:26
FlipTagEnums.h
GNNOptions.h
FlavorTagDiscriminants::GNNToolProperties
Definition: GNNToolifiers.h:22
FlavorTagDiscriminants::trackLinkTypeFromString
TrackLinkType trackLinkTypeFromString(const std::string &)
Definition: AssociationEnums.cxx:15
FlavorTagDiscriminants::GNNToolProperties::default_output_values
std::map< std::string, double > default_output_values
Definition: GNNToolifiers.h:27
FlavorTagDiscriminants::flipTagConfigFromString
FlipTagConfig flipTagConfigFromString(const std::string &)
Definition: FlipTagEnums.cxx:15
FlavorTagDiscriminants::GNNToolProperties::default_zero_tracks
bool default_zero_tracks
Definition: GNNToolifiers.h:28
GNNToolifiers.h
FlavorTagDiscriminants::GNNToolProperties::variableRemapping
std::map< std::string, std::string > variableRemapping
Definition: GNNToolifiers.h:24
AsgTool.h
athena.opts
opts
Definition: athena.py:88
FlavorTagDiscriminants::getOptions
GNNOptions getOptions(const GNNToolProperties &)
Definition: GNNToolifiers.cxx:24
FlavorTagDiscriminants::propify
void propify(asg::AsgTool &tool, GNNToolProperties *props)
Definition: GNNToolifiers.cxx:12