ATLAS Offline Software
ElectronsLoader.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 Electrons from the vertex
5  and extract their features for the NN evaluation.
6 */
7 
8 #ifndef INDET_ELECTRONS_LOADER_H
9 #define INDET_ELECTRONS_LOADER_H
10 
11 // local includes
14 
15 // EDM includes
16 #include "xAODTracking/VertexFwd.h"
17 #include "xAODEgamma/Electron.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 Electrons 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::Electron*> Electrons;
46  typedef std::vector<const xAOD::IParticle*> Particles;
47  typedef std::function<double(const xAOD::Electron*,
49 
50  // getter function
51  typedef std::function<NamedSeq(const Vertex&, const Electrons&)> SeqFromElectrons;
52 
53  // usings for Electron getter
54  using AE = SG::AuxElement;
56  using PartLinks = std::vector<ElementLink<IPC>>;
57  using IPV = std::vector<const xAOD::Electron*>;
58 
60 
61  std::vector<const xAOD::Electron*> getElectronsFromVertex(const xAOD::Vertex& vertex) const;
62 
65  std::function<IPV(const Vertex&)> m_associator;
66  };
67 }
68 
69 #endif
ConstituentsLoader.h
InDetGNNHardScatterSelection::ElectronsLoader::Vertex
xAOD::Vertex Vertex
Definition: ElectronsLoader.h:41
IParticle.h
SG::AuxElement
Base class for elements of a container that can have aux data.
Definition: AuxElement.h:472
InDetGNNHardScatterSelection::ElectronsLoader::PartLinks
std::vector< ElementLink< IPC > > PartLinks
Definition: ElectronsLoader.h:56
InDetGNNHardScatterSelection::ConstituentsInputConfig
Definition: InnerDetector/InDetRecTools/InDetGNNHardScatterSelection/InDetGNNHardScatterSelection/ConstituentsLoader.h:45
InDetGNNHardScatterSelection::ConstituentsType
ConstituentsType
Definition: InnerDetector/InDetRecTools/InDetGNNHardScatterSelection/InDetGNNHardScatterSelection/ConstituentsLoader.h:31
InDetGNNHardScatterSelection::ElectronsLoader::IPV
std::vector< const xAOD::Electron * > IPV
Definition: ElectronsLoader.h:57
InDetGNNHardScatterSelection::ElectronsLoader::m_customSequenceGetter
getter_utils::CustomSequenceGetter< xAOD::Electron > m_customSequenceGetter
Definition: ElectronsLoader.h:64
InDetGNNHardScatterSelection::IConstituentsLoader
Definition: InnerDetector/InDetRecTools/InDetGNNHardScatterSelection/InDetGNNHardScatterSelection/ConstituentsLoader.h:61
InDetGNNHardScatterSelection::ElectronsLoader::m_iparticleSortVar
ElectronSortVar m_iparticleSortVar
Definition: ElectronsLoader.h:63
InDetGNNHardScatterSelection::ConstituentsSortOrder
ConstituentsSortOrder
Definition: InnerDetector/InDetRecTools/InDetGNNHardScatterSelection/InDetGNNHardScatterSelection/ConstituentsLoader.h:25
InDetGNNHardScatterSelection::ElectronsLoader::getData
std::tuple< std::string, FlavorTagDiscriminants::Inputs, std::vector< const xAOD::IParticle * > > getData(const xAOD::Vertex &vertex) const override
Definition: ElectronsLoader.cxx:65
InDetGNNHardScatterSelection::ElectronsLoader::NamedVar
std::pair< std::string, double > NamedVar
Definition: ElectronsLoader.h:42
ElectronContainer.h
InDetGNNHardScatterSelection::ElectronsLoader::SeqFromElectrons
std::function< NamedSeq(const Vertex &, const Electrons &)> SeqFromElectrons
Definition: ElectronsLoader.h:51
CustomGetterUtils.h
InDetGNNHardScatterSelection::ElectronsLoader::getElectronsFromVertex
std::vector< const xAOD::Electron * > getElectronsFromVertex(const xAOD::Vertex &vertex) const
Definition: ElectronsLoader.cxx:49
xAOD::double
double
Definition: CompositeParticle_v1.cxx:159
DataVector
Derived DataVector<T>.
Definition: DataVector.h:581
InDetGNNHardScatterSelection::ElectronsLoader::ElectronsLoader
ElectronsLoader(ConstituentsInputConfig)
Definition: ElectronsLoader.cxx:27
xAOD::ElectronContainer
ElectronContainer_v1 ElectronContainer
Definition of the current "electron container version".
Definition: Event/xAOD/xAODEgamma/xAODEgamma/ElectronContainer.h:17
InDetGNNHardScatterSelection::ElectronsLoader::getType
ConstituentsType getType() const override
Definition: ElectronsLoader.cxx:78
InDetGNNHardScatterSelection::ElectronsLoader
Definition: ElectronsLoader.h:32
InDetGNNHardScatterSelection::ElectronsLoader::m_associator
std::function< IPV(const Vertex &)> m_associator
Definition: ElectronsLoader.h:65
xAOD::Electron_v1
Definition: Electron_v1.h:34
VertexFwd.h
InDetGNNHardScatterSelection::ElectronsLoader::Particles
std::vector< const xAOD::IParticle * > Particles
Definition: ElectronsLoader.h:46
Trk::vertex
@ vertex
Definition: MeasurementType.h:21
xAOD::Vertex_v1
Class describing a Vertex.
Definition: Vertex_v1.h:42
InDetGNNHardScatterSelection::ElectronsLoader::getName
std::string getName() const override
Definition: ElectronsLoader.cxx:75
InDetGNNHardScatterSelection
Definition: InnerDetector/InDetRecTools/InDetGNNHardScatterSelection/InDetGNNHardScatterSelection/ConstituentsLoader.h:22
InDetGNNHardScatterSelection::ElectronsLoader::NamedSeq
std::pair< std::string, std::vector< double > > NamedSeq
Definition: ElectronsLoader.h:43
InDetGNNHardScatterSelection::ElectronsLoader::ElectronSortVar
std::function< double(const xAOD::Electron *, const Vertex &)> ElectronSortVar
Definition: ElectronsLoader.h:48
Electron.h
InDetGNNHardScatterSelection::ElectronsLoader::iparticleSortVar
ElectronSortVar iparticleSortVar(ConstituentsSortOrder)
Definition: ElectronsLoader.cxx:13
InDetGNNHardScatterSelection::ElectronsLoader::Electrons
std::vector< const xAOD::Electron * > Electrons
Definition: ElectronsLoader.h:45
InDetGNNHardScatterSelection::getter_utils::CustomSequenceGetter
Template class to extract features from sequence of constituents.
Definition: InnerDetector/InDetRecTools/InDetGNNHardScatterSelection/InDetGNNHardScatterSelection/CustomGetterUtils.h:81