ATLAS Offline Software
HitsLoader.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 jet
5  and extract their features for the NN evaluation. For now it supports only neutral flow objects.
6  Charged flow objects have experimental support and are not recommended for use.
7 */
8 
9 #ifndef HITS_LOADER_H
10 #define HITS_LOADER_H
11 
12 // local includes
15 
16 // EDM includes
17 #include "xAODJet/JetFwd.h"
18 #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 
29 namespace FlavorTagDiscriminants {
30 
32  std::pair<std::string, std::vector<std::string>> hits_names
33  );
34  // Subclass for Hits loader inherited from abstract IConstituentsLoader class
36  public:
38  std::tuple<std::string, Inputs, std::vector<const xAOD::IParticle*>> getData(
39  const xAOD::Jet& jet,
40  [[maybe_unused]] const SG::AuxElement& btag) const override ;
42  std::set<std::string> getUsedRemap() const override;
43  std::string getName() const override;
44  ConstituentsType getType() const override;
45  protected:
46  // typedefs
47  typedef xAOD::Jet Jet;
48  typedef std::pair<std::string, double> NamedVar;
49  typedef std::pair<std::string, std::vector<double> > NamedSeq;
50  // hit typedefs
51  typedef std::vector<const xAOD::TrackMeasurementValidation*> Hits;
52 
53  // getter function
54  typedef std::function<NamedSeq(const Jet&, const Hits&)> SeqFromHits;
55 
56  // usings for Hits getter
57  using AE = SG::AuxElement;
59  using HitLinks = std::vector<ElementLink<TMC>>;
60  using TMVV = std::vector<const xAOD::TrackMeasurementValidation*>;
61 
62 
63  std::vector<const xAOD::TrackMeasurementValidation*> getHitsFromJet(const xAOD::Jet& jet) const;
64 
66  std::function<TMVV(const Jet&)> m_associator;
67  };
68 }
69 
70 #endif
FlavorTagDiscriminants::HitsLoader::NamedVar
std::pair< std::string, double > NamedVar
Definition: HitsLoader.h:48
xAOD::TrackMeasurementValidationContainer
TrackMeasurementValidationContainer_v1 TrackMeasurementValidationContainer
Definition of the current "TrackMeasurementValidation container version".
Definition: TrackMeasurementValidationContainer.h:14
FlavorTagDiscriminants::ConstituentsInputConfig
Definition: PhysicsAnalysis/JetTagging/FlavorTagDiscriminants/FlavorTagDiscriminants/ConstituentsLoader.h:60
IParticle.h
FlavorTagDiscriminants
This file contains "getter" functions used for accessing tagger inputs from the EDM.
Definition: AssociationEnums.h:11
FlavorTagDiscriminants::IConstituentsLoader
Definition: PhysicsAnalysis/JetTagging/FlavorTagDiscriminants/FlavorTagDiscriminants/ConstituentsLoader.h:76
FlavorTagDiscriminants::HitsLoader::getDependencies
FTagDataDependencyNames getDependencies() const override
Definition: HitsLoader.cxx:55
SG::AuxElement
Base class for elements of a container that can have aux data.
Definition: AuxElement.h:483
FlavorTagDiscriminants::getter_utils::SeqGetter
Template class to extract features from sequence of constituents.
Definition: PhysicsAnalysis/JetTagging/FlavorTagDiscriminants/FlavorTagDiscriminants/CustomGetterUtils.h:72
FlavorTagDiscriminants::HitsLoader::HitsLoader
HitsLoader(const ConstituentsInputConfig &, const FTagOptions &options)
Definition: HitsLoader.cxx:12
FlavorTagDiscriminants::HitsLoader::Hits
std::vector< const xAOD::TrackMeasurementValidation * > Hits
Definition: HitsLoader.h:51
CustomGetterUtils.h
FlavorTagDiscriminants::HitsLoader
Definition: HitsLoader.h:35
jet
Definition: JetCalibTools_PlotJESFactors.cxx:23
FlavorTagDiscriminants::FTagDataDependencyNames
Definition: FTagDataDependencyNames.h:12
FlavorTagDiscriminants::HitsLoader::getType
ConstituentsType getType() const override
Definition: HitsLoader.cxx:64
FlavorTagDiscriminants::HitsLoader::HitLinks
std::vector< ElementLink< TMC > > HitLinks
Definition: HitsLoader.h:59
python.AtlRunQueryLib.options
options
Definition: AtlRunQueryLib.py:379
DataVector
Derived DataVector<T>.
Definition: DataVector.h:794
FlavorTagDiscriminants::createHitsLoaderConfig
ConstituentsInputConfig createHitsLoaderConfig(std::pair< std::string, std::vector< std::string >> hits_names)
ConstituentsLoader.h
JetFwd.h
FlavorTagDiscriminants::FTagOptions
Definition: PhysicsAnalysis/JetTagging/FlavorTagDiscriminants/FlavorTagDiscriminants/DataPrepUtilities.h:45
xAOD::Jet_v1
Class describing a jet.
Definition: Jet_v1.h:57
FlavorTagDiscriminants::HitsLoader::getUsedRemap
std::set< std::string > getUsedRemap() const override
Definition: HitsLoader.cxx:58
FlavorTagDiscriminants::HitsLoader::getHitsFromJet
std::vector< const xAOD::TrackMeasurementValidation * > getHitsFromJet(const xAOD::Jet &jet) const
Definition: HitsLoader.cxx:36
FlavorTagDiscriminants::HitsLoader::getData
std::tuple< std::string, Inputs, std::vector< const xAOD::IParticle * > > getData(const xAOD::Jet &jet, [[maybe_unused]] const SG::AuxElement &btag) const override
Definition: HitsLoader.cxx:47
TrackMeasurementValidationContainer.h
FlavorTagDiscriminants::HitsLoader::SeqFromHits
std::function< NamedSeq(const Jet &, const Hits &)> SeqFromHits
Definition: HitsLoader.h:54
FlavorTagDiscriminants::HitsLoader::NamedSeq
std::pair< std::string, std::vector< double > > NamedSeq
Definition: HitsLoader.h:49
FlavorTagDiscriminants::ConstituentsType
ConstituentsType
Definition: PhysicsAnalysis/JetTagging/FlavorTagDiscriminants/FlavorTagDiscriminants/ConstituentsLoader.h:48
FlavorTagDiscriminants::HitsLoader::m_associator
std::function< TMVV(const Jet &)> m_associator
Definition: HitsLoader.h:66
FlavorTagDiscriminants::HitsLoader::TMVV
std::vector< const xAOD::TrackMeasurementValidation * > TMVV
Definition: HitsLoader.h:60
FlavorTagDiscriminants::HitsLoader::Jet
xAOD::Jet Jet
Definition: HitsLoader.h:47
FlavorTagDiscriminants::HitsLoader::getName
std::string getName() const override
Definition: HitsLoader.cxx:61
FlavorTagDiscriminants::HitsLoader::m_seqGetter
getter_utils::SeqGetter< xAOD::TrackMeasurementValidation > m_seqGetter
Definition: HitsLoader.h:65