ATLAS Offline Software
Loading...
Searching...
No Matches
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
29namespace FlavorTagInference {
30
31 using namespace FlavorTagInference;
32
34 std::pair<std::string, std::vector<std::string>> hits_names
35 );
36 // Subclass for Hits loader inherited from abstract IConstituentsLoader class
38 public:
39 HitsLoader(const ConstituentsInputConfig&, const FTagOptions& options);
40 Inputs getData(const xAOD::IParticle& jet) const override;
41 const FTagDataDependencyNames& getDependencies() const override;
42 const std::set<std::string>& getUsedRemap() const override;
43 const std::string& getName() const override;
44 const ConstituentsType& getType() const override;
45 protected:
46 // typedefs
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
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::IParticle& jet) const;
64
66 std::function<TMVV(const Jet&)> m_associator;
67 };
68}
69
70#endif
const std::set< std::string > & getUsedRemap() const override
const FTagDataDependencyNames & getDependencies() const override
const ConstituentsType & getType() const override
HitsLoader(const ConstituentsInputConfig &, const FTagOptions &options)
std::vector< const xAOD::TrackMeasurementValidation * > Hits
Definition HitsLoader.h:51
const std::string & getName() const override
std::vector< const xAOD::TrackMeasurementValidation * > getHitsFromJet(const xAOD::IParticle &jet) const
std::function< NamedSeq(const Jet &, const Hits &)> SeqFromHits
Definition HitsLoader.h:54
Inputs getData(const xAOD::IParticle &jet) const override
xAOD::TrackMeasurementValidationContainer TMC
Definition HitsLoader.h:58
getter_utils::SeqGetter< xAOD::TrackMeasurementValidation > m_seqGetter
Definition HitsLoader.h:65
std::function< TMVV(const Jet &)> m_associator
Definition HitsLoader.h:66
std::pair< std::string, std::vector< double > > NamedSeq
Definition HitsLoader.h:49
std::vector< ElementLink< TMC > > HitLinks
Definition HitsLoader.h:59
std::pair< std::string, double > NamedVar
Definition HitsLoader.h:48
std::vector< const xAOD::TrackMeasurementValidation * > TMVV
Definition HitsLoader.h:60
Class providing the definition of the 4-vector interface.
This file contains "getter" functions used for accessing tagger inputs from the EDM.
ConstituentsInputConfig createHitsLoaderConfig(std::pair< std::string, std::vector< std::string > > hits_names)
std::pair< std::vector< float >, std::vector< int64_t > > Inputs
AuxElement(SG::AuxVectorData *container, size_t index)
Base class for elements of a container that can have aux data.
TrackMeasurementValidationContainer_v1 TrackMeasurementValidationContainer
Definition of the current "TrackMeasurementValidation container version".