Loading [MathJax]/extensions/tex2jax.js
ATLAS Offline Software
All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Modules Pages
IParticlesLoader.h
Go to the documentation of this file.
1 /*
2  Copyright (C) 2002-2024 CERN for the benefit of the ATLAS collaboration
3 
4  This is a subclass of IConstituentsLoader. It is used to load the general IParticles from the vertex
5  and extract their features for the NN evaluation.
6 */
7 
8 #ifndef INDET_IPARTICLES_LOADER_H
9 #define INDET_IPARTICLES_LOADER_H
10 
11 // local includes
14 
15 // EDM includes
16 #include "xAODTracking/VertexFwd.h"
17 
18 // STL includes
19 #include <string>
20 #include <vector>
21 #include <functional>
22 #include <exception>
23 #include <type_traits>
24 #include <regex>
25 
27 
28  // Subclass for IParticles loader inherited from abstract IConstituentsLoader class
30  public:
32  std::tuple<std::string, FlavorTagInference::Inputs, std::vector<const xAOD::IParticle*>> getData(
33  const xAOD::Vertex& vertex) const override ;
34  std::string getName() const override;
35  ConstituentsType getType() const override;
36  protected:
37  // typedefs
39  typedef std::pair<std::string, double> NamedVar;
40  typedef std::pair<std::string, std::vector<double> > NamedSeq;
41  // iparticle typedefs
42  typedef std::vector<const xAOD::IParticle*> IParticles;
43  typedef std::function<double(const xAOD::IParticle*,
45 
46  // getter function
47  typedef std::function<NamedSeq(const Vertex&, const IParticles&)> SeqFromIParticles;
48 
49  // usings for IParticle getter
50  using AE = SG::AuxElement;
52  using PartLinks = std::vector<ElementLink<IPC>>;
53  using IPV = std::vector<const xAOD::IParticle*>;
54 
56 
57  std::vector<const xAOD::IParticle*> getIParticlesFromVertex(const xAOD::Vertex& vertex) const;
58 
61  std::function<IPV(const Vertex&)> m_associator;
62  };
63 }
64 
65 #endif
ConstituentsLoader.h
InDetGNNHardScatterSelection::IParticlesLoader::IParticleSortVar
std::function< double(const xAOD::IParticle *, const Vertex &)> IParticleSortVar
Definition: IParticlesLoader.h:44
InDetGNNHardScatterSelection::IParticlesLoader::IParticlesLoader
IParticlesLoader(const ConstituentsInputConfig &)
Definition: IParticlesLoader.cxx:27
InDetGNNHardScatterSelection::IParticlesLoader::IPV
std::vector< const xAOD::IParticle * > IPV
Definition: IParticlesLoader.h:53
SG::AuxElement
Base class for elements of a container that can have aux data.
Definition: AuxElement.h:483
xAOD::IParticleContainer
DataVector< IParticle > IParticleContainer
Simple convenience declaration of IParticleContainer.
Definition: xAOD/xAODBase/xAODBase/IParticleContainer.h:32
InDetGNNHardScatterSelection::ConstituentsInputConfig
Definition: InnerDetector/InDetRecTools/InDetGNNHardScatterSelection/InDetGNNHardScatterSelection/ConstituentsLoader.h:45
InDetGNNHardScatterSelection::ConstituentsType
ConstituentsType
Definition: InnerDetector/InDetRecTools/InDetGNNHardScatterSelection/InDetGNNHardScatterSelection/ConstituentsLoader.h:31
xAOD::IParticle
Class providing the definition of the 4-vector interface.
Definition: Event/xAOD/xAODBase/xAODBase/IParticle.h:41
InDetGNNHardScatterSelection::IParticlesLoader::SeqFromIParticles
std::function< NamedSeq(const Vertex &, const IParticles &)> SeqFromIParticles
Definition: IParticlesLoader.h:47
InDetGNNHardScatterSelection::IConstituentsLoader
Definition: InnerDetector/InDetRecTools/InDetGNNHardScatterSelection/InDetGNNHardScatterSelection/ConstituentsLoader.h:61
InDetGNNHardScatterSelection::IParticlesLoader::getType
ConstituentsType getType() const override
Definition: IParticlesLoader.cxx:74
InDetGNNHardScatterSelection::ConstituentsSortOrder
ConstituentsSortOrder
Definition: InnerDetector/InDetRecTools/InDetGNNHardScatterSelection/InDetGNNHardScatterSelection/ConstituentsLoader.h:25
InDetGNNHardScatterSelection::IParticlesLoader::m_associator
std::function< IPV(const Vertex &)> m_associator
Definition: IParticlesLoader.h:61
InDetGNNHardScatterSelection::IParticlesLoader::iparticleSortVar
IParticleSortVar iparticleSortVar(ConstituentsSortOrder)
Definition: IParticlesLoader.cxx:13
InDetGNNHardScatterSelection::IParticlesLoader
Definition: IParticlesLoader.h:29
InDetGNNHardScatterSelection::IParticlesLoader::m_customSequenceGetter
getter_utils::CustomSequenceGetter< xAOD::IParticle > m_customSequenceGetter
Definition: IParticlesLoader.h:60
InDetGNNHardScatterSelection::IParticlesLoader::NamedSeq
std::pair< std::string, std::vector< double > > NamedSeq
Definition: IParticlesLoader.h:40
InDetGNNHardScatterSelection::IParticlesLoader::Vertex
xAOD::Vertex Vertex
Definition: IParticlesLoader.h:38
CustomGetterUtils.h
InDetGNNHardScatterSelection::IParticlesLoader::PartLinks
std::vector< ElementLink< IPC > > PartLinks
Definition: IParticlesLoader.h:52
xAOD::double
double
Definition: CompositeParticle_v1.cxx:159
DataVector
Derived DataVector<T>.
Definition: DataVector.h:794
InDetGNNHardScatterSelection::IParticlesLoader::NamedVar
std::pair< std::string, double > NamedVar
Definition: IParticlesLoader.h:39
InDetGNNHardScatterSelection::IParticlesLoader::getName
std::string getName() const override
Definition: IParticlesLoader.cxx:71
VertexFwd.h
xAOD::Vertex_v1
Class describing a Vertex.
Definition: Vertex_v1.h:42
InDetGNNHardScatterSelection
Definition: InnerDetector/InDetRecTools/InDetGNNHardScatterSelection/InDetGNNHardScatterSelection/ConstituentsLoader.h:22
InDetGNNHardScatterSelection::IParticlesLoader::getIParticlesFromVertex
std::vector< const xAOD::IParticle * > getIParticlesFromVertex(const xAOD::Vertex &vertex) const
Definition: IParticlesLoader.cxx:49
InDetGNNHardScatterSelection::IParticlesLoader::IParticles
std::vector< const xAOD::IParticle * > IParticles
Definition: IParticlesLoader.h:42
InDetGNNHardScatterSelection::IParticlesLoader::m_iparticleSortVar
IParticleSortVar m_iparticleSortVar
Definition: IParticlesLoader.h:59
InDetGNNHardScatterSelection::getter_utils::CustomSequenceGetter< xAOD::IParticle >
InDetGNNHardScatterSelection::IParticlesLoader::getData
std::tuple< std::string, FlavorTagInference::Inputs, std::vector< const xAOD::IParticle * > > getData(const xAOD::Vertex &vertex) const override
Definition: IParticlesLoader.cxx:65