ATLAS Offline Software
FlowElementsLoader.h
Go to the documentation of this file.
1 /*
2  Copyright (C) 2002-2025 CERN for the benefit of the ATLAS collaboration
3 
4  This is a subclass of IConstituentsLoader. It is used to load the FlowElements from the jet
5  and extract their features for the NN evaluation.
6 */
7 
8 #ifndef FLOW_ELEMENTS_LOADER_H
9 #define FLOW_ELEMENTS_LOADER_H
10 
11 // local includes
14 
15 // EDM includes
16 #include "xAODJet/JetFwd.h"
17 #include "xAODPFlow/FlowElement.h"
18 
19 // STL includes
20 #include <string>
21 #include <vector>
22 #include <functional>
23 
24 namespace FlavorTagInference {
25 
26  // Subclass for IParticles loader inherited from abstract IConstituentsLoader class
28  public:
30  std::tuple<std::string, Inputs, std::vector<const xAOD::IParticle*>> getData(
31  const xAOD::Jet& jet ) const override ;
32  const FTagDataDependencyNames& getDependencies() const override;
33  const std::set<std::string>& getUsedRemap() const override;
34  const std::string& getName() const override;
35  const ConstituentsType& getType() const override;
36  protected:
37  // typedefs
38  typedef xAOD::Jet Jet;
39  typedef std::pair<std::string, double> NamedVar;
40  typedef std::pair<std::string, std::vector<double> > NamedSeq;
41  // FlowElement typedefs
42  typedef std::vector<const xAOD::FlowElement*> FlowElements;
43  typedef std::function<double(const xAOD::FlowElement*,
45 
46  // getter function
47  typedef std::function<NamedSeq(const Jet&, const FlowElements&)> SeqFromFlowElements;
48 
49  // usings for IParticle getter
50  using AE = SG::AuxElement;
52  using PartLinks = std::vector<ElementLink<IPC>>;
53  using FEV = std::vector<const xAOD::FlowElement*>;
54 
56 
57  std::vector<const xAOD::FlowElement*> getFlowElementsFromJet(const xAOD::Jet& jet) const;
58 
61  std::function<FEV(const Jet&)> m_associator;
62  };
63 }
64 
65 #endif
ConstituentsLoader.h
FlavorTagInference::IConstituentsLoader
Definition: PhysicsAnalysis/JetTagging/FlavorTagInference/FlavorTagInference/ConstituentsLoader.h:77
FlavorTagInference
This file contains "getter" functions used for accessing tagger inputs from the EDM.
Definition: AssociationEnums.h:11
FlavorTagInference::FlowElementsLoader::Jet
xAOD::Jet Jet
Definition: FlowElementsLoader.h:38
SG::AuxElement
Base class for elements of a container that can have aux data.
Definition: AuxElement.h:483
FlavorTagInference::FlowElementsLoader::FlowElements
std::vector< const xAOD::FlowElement * > FlowElements
Definition: FlowElementsLoader.h:42
FlavorTagInference::getter_utils::SeqGetter
Template class to extract features from sequence of constituents.
Definition: PhysicsAnalysis/JetTagging/FlavorTagInference/FlavorTagInference/CustomGetterUtils.h:69
FlavorTagInference::FlowElementsLoader::FlowElementSortVar
std::function< double(const xAOD::FlowElement *, const Jet &)> FlowElementSortVar
Definition: FlowElementsLoader.h:44
xAOD::IParticleContainer
DataVector< IParticle > IParticleContainer
Simple convenience declaration of IParticleContainer.
Definition: xAOD/xAODBase/xAODBase/IParticleContainer.h:32
FlavorTagInference::FTagOptions
Definition: PhysicsAnalysis/JetTagging/FlavorTagInference/FlavorTagInference/DataPrepUtilities.h:46
FlavorTagInference::FlowElementsLoader::m_seqGetter
getter_utils::SeqGetter< xAOD::FlowElement > m_seqGetter
Definition: FlowElementsLoader.h:60
FlavorTagInference::FlowElementsLoader::getType
const ConstituentsType & getType() const override
Definition: FlowElementsLoader.cxx:90
FlavorTagInference::FlowElementsLoader::m_associator
std::function< FEV(const Jet &)> m_associator
Definition: FlowElementsLoader.h:61
FlavorTagInference::FlowElementsLoader::FlowElementsLoader
FlowElementsLoader(const ConstituentsInputConfig &cfg, const FTagOptions &options)
Definition: FlowElementsLoader.cxx:28
FlavorTagInference::FlowElementsLoader::PartLinks
std::vector< ElementLink< IPC > > PartLinks
Definition: FlowElementsLoader.h:52
FlavorTagInference::FlowElementsLoader::m_flowElementSortVar
FlowElementSortVar m_flowElementSortVar
Definition: FlowElementsLoader.h:59
FlavorTagInference::FlowElementsLoader::FEV
std::vector< const xAOD::FlowElement * > FEV
Definition: FlowElementsLoader.h:53
FlavorTagInference::FlowElementsLoader::getDependencies
const FTagDataDependencyNames & getDependencies() const override
Definition: FlowElementsLoader.cxx:81
FlavorTagInference::FlowElementsLoader::getName
const std::string & getName() const override
Definition: FlowElementsLoader.cxx:87
FlavorTagInference::ConstituentsSortOrder
ConstituentsSortOrder
Definition: PhysicsAnalysis/JetTagging/FlavorTagInference/FlavorTagInference/ConstituentsLoader.h:32
jet
Definition: JetCalibTools_PlotJESFactors.cxx:23
FlowElement.h
FlavorTagInference::ConstituentsInputConfig
Definition: PhysicsAnalysis/JetTagging/FlavorTagInference/FlavorTagInference/ConstituentsLoader.h:61
FlavorTagInference::FlowElementsLoader::NamedSeq
std::pair< std::string, std::vector< double > > NamedSeq
Definition: FlowElementsLoader.h:40
FlavorTagInference::FTagDataDependencyNames
Definition: FTagDataDependencyNames.h:12
python.AtlRunQueryLib.options
options
Definition: AtlRunQueryLib.py:378
xAOD::double
double
Definition: CompositeParticle_v1.cxx:159
FlavorTagInference::FlowElementsLoader::getData
std::tuple< std::string, Inputs, std::vector< const xAOD::IParticle * > > getData(const xAOD::Jet &jet) const override
Definition: FlowElementsLoader.cxx:73
DataVector
Derived DataVector<T>.
Definition: DataVector.h:794
FlavorTagInference::FlowElementsLoader::SeqFromFlowElements
std::function< NamedSeq(const Jet &, const FlowElements &)> SeqFromFlowElements
Definition: FlowElementsLoader.h:47
FlavorTagInference::ConstituentsType
ConstituentsType
Definition: PhysicsAnalysis/JetTagging/FlavorTagInference/FlavorTagInference/ConstituentsLoader.h:48
FlavorTagInference::FlowElementsLoader
Definition: FlowElementsLoader.h:27
WriteCaloSwCorrections.cfg
cfg
Definition: WriteCaloSwCorrections.py:23
JetFwd.h
FlavorTagInference::FlowElementsLoader::flowElementSortVar
FlowElementSortVar flowElementSortVar(ConstituentsSortOrder)
Definition: FlowElementsLoader.cxx:14
xAOD::Jet_v1
Class describing a jet.
Definition: Jet_v1.h:57
CustomGetterUtils.h
FlavorTagInference::FlowElementsLoader::getFlowElementsFromJet
std::vector< const xAOD::FlowElement * > getFlowElementsFromJet(const xAOD::Jet &jet) const
Definition: FlowElementsLoader.cxx:57
FlavorTagInference::FlowElementsLoader::NamedVar
std::pair< std::string, double > NamedVar
Definition: FlowElementsLoader.h:39
FlavorTagInference::FlowElementsLoader::getUsedRemap
const std::set< std::string > & getUsedRemap() const override
Definition: FlowElementsLoader.cxx:84
xAOD::FlowElement_v1
A detector object made of other lower level object(s)
Definition: FlowElement_v1.h:25