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 std::tuple<Inputs, std::vector<const xAOD::IParticle*>> getData(
41 const xAOD::IParticle& jet ) const override ;
42 const FTagDataDependencyNames& getDependencies() const override;
43 const std::set<std::string>& getUsedRemap() const override;
44 const std::string& getName() const override;
45 const ConstituentsType& getType() const override;
46 protected:
47 // typedefs
49 typedef std::pair<std::string, double> NamedVar;
50 typedef std::pair<std::string, std::vector<double> > NamedSeq;
51 // hit typedefs
52 typedef std::vector<const xAOD::TrackMeasurementValidation*> Hits;
53
54 // getter function
55 typedef std::function<NamedSeq(const Jet&, const Hits&)> SeqFromHits;
56
57 // usings for Hits getter
60 using HitLinks = std::vector<ElementLink<TMC>>;
61 using TMVV = std::vector<const xAOD::TrackMeasurementValidation*>;
62
63
64 std::vector<const xAOD::TrackMeasurementValidation*> getHitsFromJet(const xAOD::IParticle& jet) const;
65
67 std::function<TMVV(const Jet&)> m_associator;
68 };
69}
70
71#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:52
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:55
xAOD::TrackMeasurementValidationContainer TMC
Definition HitsLoader.h:59
std::tuple< Inputs, std::vector< const xAOD::IParticle * > > getData(const xAOD::IParticle &jet) const override
getter_utils::SeqGetter< xAOD::TrackMeasurementValidation > m_seqGetter
Definition HitsLoader.h:66
std::function< TMVV(const Jet &)> m_associator
Definition HitsLoader.h:67
std::pair< std::string, std::vector< double > > NamedSeq
Definition HitsLoader.h:50
std::vector< ElementLink< TMC > > HitLinks
Definition HitsLoader.h:60
std::pair< std::string, double > NamedVar
Definition HitsLoader.h:49
std::vector< const xAOD::TrackMeasurementValidation * > TMVV
Definition HitsLoader.h:61
Base class for elements of a container that can have aux data.
Definition AuxElement.h:483
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)
TrackMeasurementValidationContainer_v1 TrackMeasurementValidationContainer
Definition of the current "TrackMeasurementValidation container version".