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
47 std::tuple<Inputs, std::vector<const xAOD::IParticle*>> HitsLoader::getData(
48 const xAOD::IParticle& jet) const {
49 Hits sorted_hits = getHitsFromJet(jet);
50 std::vector<const xAOD::IParticle*> dummy;
51 return std::make_tuple(m_seqGetter.getFeats(jet, sorted_hits), dummy);
52 }
53
57 const std::set<std::string>& HitsLoader::getUsedRemap() const {
58 return m_used_remap;
59 }
60 const std::string& HitsLoader::getName() const {
61 return m_name;
62 }
64 return m_config.type;
65 }
66
67}
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::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::vector< const xAOD::TrackMeasurementValidation * > TMVV
Definition HitsLoader.h:61
SG::ConstAccessor< T, ALLOC > ConstAccessor
Definition AuxElement.h:569
Class providing the definition of the 4-vector interface.
This file contains "getter" functions used for accessing tagger inputs from the EDM.
ICaloAffectedTool is abstract interface for tools checking if 4 mom is in calo affected region.
TrackMeasurementValidation_v1 TrackMeasurementValidation
Reference the current persistent version: