ATLAS Offline Software
Loading...
Searching...
No Matches
HitsLoader.cxx
Go to the documentation of this file.
1/*
2Copyright (C) 2002-2024 CERN for the benefit of the ATLAS collaboration
3*/
4
8
9namespace FlavorTagInference {
10
11
13 const ConstituentsInputConfig& cfg,
14 const FTagOptions& options
15 ):
17 m_seqGetter(getter_utils::SeqGetter<xAOD::TrackMeasurementValidation>(
18 cfg.inputs, options))
19 {
20 SG::AuxElement::ConstAccessor<HitLinks> acc("hitsAssociatedWithJet");
21 m_associator = [acc](const xAOD::IParticle& jet) -> TMVV {
22 TMVV hits;
23 for (const ElementLink<TMC>& link : acc(jet)){
24 if (!link.isValid()) {
25 throw std::logic_error("invalid hits link");
26 }
27 hits.push_back(*link);
28 }
29 return hits;
30 };
31
32 m_used_remap = m_seqGetter.getUsedRemap();
33 m_name = cfg.name;
34 }
35
36 std::vector<const xAOD::TrackMeasurementValidation*> HitsLoader::getHitsFromJet(
37 const xAOD::IParticle& jet
38 ) const
39 {
40 std::vector<const xAOD::TrackMeasurementValidation*> hits;
42 hits.push_back(tp);
43 }
44 return hits;
45 }
46
48 Hits sorted_hits = getHitsFromJet(jet);
49 return m_seqGetter.getFeats(jet, sorted_hits);
50 }
51
55 const std::set<std::string>& HitsLoader::getUsedRemap() const {
56 return m_used_remap;
57 }
58 const std::string& HitsLoader::getName() const {
59 return m_name;
60 }
62 return m_config.type;
63 }
64
65}
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
Inputs getData(const xAOD::IParticle &jet) const override
getter_utils::SeqGetter< xAOD::TrackMeasurementValidation > m_seqGetter
Definition HitsLoader.h:65
std::function< TMVV(const Jet &)> m_associator
Definition HitsLoader.h:66
std::vector< const xAOD::TrackMeasurementValidation * > TMVV
Definition HitsLoader.h:60
SG::ConstAccessor< T, ALLOC > ConstAccessor
Definition AuxElement.h:570
Class providing the definition of the 4-vector interface.
This file contains "getter" functions used for accessing tagger inputs from the EDM.
std::pair< std::vector< float >, std::vector< int64_t > > Inputs
ICaloAffectedTool is abstract interface for tools checking if 4 mom is in calo affected region.
TrackMeasurementValidation_v1 TrackMeasurementValidation
Reference the current persistent version: