ATLAS Offline Software
MuonsLoader.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 Muons from the vertex
5  and extract their features for the NN evaluation.
6 */
7 
8 #ifndef INDET_MUONS_LOADER_H
9 #define INDET_MUONS_LOADER_H
10 
11 // local includes
14 
15 // EDM includes
16 #include "xAODTracking/VertexFwd.h"
17 #include "xAODMuon/Muon.h"
18 #include "xAODMuon/MuonContainer.h"
19 #include "xAODBase/IParticle.h"
20 
21 // STL includes
22 #include <string>
23 #include <vector>
24 #include <functional>
25 #include <exception>
26 #include <type_traits>
27 #include <regex>
28 
30 
31  // Subclass for Muons loader inherited from abstract IConstituentsLoader class
33  public:
35  std::tuple<std::string, FlavorTagDiscriminants::Inputs, std::vector<const xAOD::IParticle*>> getData(
36  const xAOD::Vertex& vertex) const override ;
37  std::string getName() const override;
38  ConstituentsType getType() const override;
39  protected:
40  // typedefs
42  typedef std::pair<std::string, double> NamedVar;
43  typedef std::pair<std::string, std::vector<double> > NamedSeq;
44  // iparticle typedefs
45  typedef std::vector<const xAOD::Muon*> Muons;
46  typedef std::vector<const xAOD::IParticle*> Particles;
47  typedef std::function<double(const xAOD::Muon*,
48  const Vertex&)> MuonSortVar;
49 
50  // usings for Muon getter
51  using AE = SG::AuxElement;
53  using PartLinks = std::vector<ElementLink<IPC>>;
54  using IPV = std::vector<const xAOD::Muon*>;
55 
57 
58  std::vector<const xAOD::Muon*> getMuonsFromVertex(const xAOD::Vertex& vertex) const;
59 
62  std::function<IPV(const Vertex&)> m_associator;
63  };
64 }
65 
66 #endif
ConstituentsLoader.h
InDetGNNHardScatterSelection::MuonsLoader::getMuonsFromVertex
std::vector< const xAOD::Muon * > getMuonsFromVertex(const xAOD::Vertex &vertex) const
Definition: MuonsLoader.cxx:49
IParticle.h
xAOD::MuonContainer
MuonContainer_v1 MuonContainer
Definition of the current "Muon container version".
Definition: Event/xAOD/xAODMuon/xAODMuon/MuonContainer.h:14
Muon.h
SG::AuxElement
Base class for elements of a container that can have aux data.
Definition: AuxElement.h:472
InDetGNNHardScatterSelection::ConstituentsInputConfig
Definition: InnerDetector/InDetRecTools/InDetGNNHardScatterSelection/InDetGNNHardScatterSelection/ConstituentsLoader.h:45
InDetGNNHardScatterSelection::ConstituentsType
ConstituentsType
Definition: InnerDetector/InDetRecTools/InDetGNNHardScatterSelection/InDetGNNHardScatterSelection/ConstituentsLoader.h:31
InDetGNNHardScatterSelection::IConstituentsLoader
Definition: InnerDetector/InDetRecTools/InDetGNNHardScatterSelection/InDetGNNHardScatterSelection/ConstituentsLoader.h:61
xAOD::Muon_v1
Class describing a Muon.
Definition: Muon_v1.h:38
InDetGNNHardScatterSelection::MuonsLoader::NamedSeq
std::pair< std::string, std::vector< double > > NamedSeq
Definition: MuonsLoader.h:43
InDetGNNHardScatterSelection::ConstituentsSortOrder
ConstituentsSortOrder
Definition: InnerDetector/InDetRecTools/InDetGNNHardScatterSelection/InDetGNNHardScatterSelection/ConstituentsLoader.h:25
InDetGNNHardScatterSelection::MuonsLoader::getType
ConstituentsType getType() const override
Definition: MuonsLoader.cxx:78
InDetGNNHardScatterSelection::MuonsLoader::m_associator
std::function< IPV(const Vertex &)> m_associator
Definition: MuonsLoader.h:62
InDetGNNHardScatterSelection::MuonsLoader::Muons
std::vector< const xAOD::Muon * > Muons
Definition: MuonsLoader.h:45
InDetGNNHardScatterSelection::MuonsLoader::IPV
std::vector< const xAOD::Muon * > IPV
Definition: MuonsLoader.h:54
InDetGNNHardScatterSelection::MuonsLoader
Definition: MuonsLoader.h:32
CustomGetterUtils.h
xAOD::double
double
Definition: CompositeParticle_v1.cxx:159
DataVector
Derived DataVector<T>.
Definition: DataVector.h:581
InDetGNNHardScatterSelection::MuonsLoader::Vertex
xAOD::Vertex Vertex
Definition: MuonsLoader.h:41
InDetGNNHardScatterSelection::MuonsLoader::m_iparticleSortVar
MuonSortVar m_iparticleSortVar
Definition: MuonsLoader.h:60
InDetGNNHardScatterSelection::MuonsLoader::iparticleSortVar
MuonSortVar iparticleSortVar(ConstituentsSortOrder)
Definition: MuonsLoader.cxx:13
InDetGNNHardScatterSelection::MuonsLoader::m_customSequenceGetter
getter_utils::CustomSequenceGetter< xAOD::Muon > m_customSequenceGetter
Definition: MuonsLoader.h:61
InDetGNNHardScatterSelection::MuonsLoader::getName
std::string getName() const override
Definition: MuonsLoader.cxx:75
VertexFwd.h
MuonContainer.h
InDetGNNHardScatterSelection::MuonsLoader::Particles
std::vector< const xAOD::IParticle * > Particles
Definition: MuonsLoader.h:46
Trk::vertex
@ vertex
Definition: MeasurementType.h:21
InDetGNNHardScatterSelection::MuonsLoader::getData
std::tuple< std::string, FlavorTagDiscriminants::Inputs, std::vector< const xAOD::IParticle * > > getData(const xAOD::Vertex &vertex) const override
Definition: MuonsLoader.cxx:65
xAOD::Vertex_v1
Class describing a Vertex.
Definition: Vertex_v1.h:42
InDetGNNHardScatterSelection
Definition: InnerDetector/InDetRecTools/InDetGNNHardScatterSelection/InDetGNNHardScatterSelection/ConstituentsLoader.h:22
InDetGNNHardScatterSelection::MuonsLoader::MuonsLoader
MuonsLoader(ConstituentsInputConfig)
Definition: MuonsLoader.cxx:27
InDetGNNHardScatterSelection::MuonsLoader::NamedVar
std::pair< std::string, double > NamedVar
Definition: MuonsLoader.h:42
InDetGNNHardScatterSelection::MuonsLoader::PartLinks
std::vector< ElementLink< IPC > > PartLinks
Definition: MuonsLoader.h:53
InDetGNNHardScatterSelection::MuonsLoader::MuonSortVar
std::function< double(const xAOD::Muon *, const Vertex &)> MuonSortVar
Definition: MuonsLoader.h:48
InDetGNNHardScatterSelection::getter_utils::CustomSequenceGetter
Template class to extract features from sequence of constituents.
Definition: InnerDetector/InDetRecTools/InDetGNNHardScatterSelection/InDetGNNHardScatterSelection/CustomGetterUtils.h:81