ATLAS Offline Software
Loading...
Searching...
No Matches
PhysicsAnalysis
JetTagging
FlavorTagInference
Root
HitsLoader.cxx
Go to the documentation of this file.
1
/*
2
Copyright (C) 2002-2024 CERN for the benefit of the ATLAS collaboration
3
*/
4
5
#include "
FlavorTagInference/HitsLoader.h
"
6
#include "
xAODPFlow/FlowElement.h
"
7
#include "
FlavorTagInference/StringUtils.h
"
8
9
namespace
FlavorTagInference
{
10
11
12
HitsLoader::HitsLoader
(
13
const
ConstituentsInputConfig
& cfg,
14
const
FTagOptions
& options
15
):
16
IConstituentsLoader
(cfg),
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;
41
for
(
const
xAOD::TrackMeasurementValidation
*tp :
m_associator
(
jet
)) {
42
hits.push_back(tp);
43
}
44
return
hits;
45
}
46
47
Inputs
HitsLoader::getData
(
const
xAOD::IParticle
&
jet
)
const
{
48
Hits
sorted_hits =
getHitsFromJet
(
jet
);
49
return
m_seqGetter
.getFeats(
jet
, sorted_hits);
50
}
51
52
const
FTagDataDependencyNames
&
HitsLoader::getDependencies
()
const
{
53
return
m_deps
;
54
}
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
}
61
const
ConstituentsType
&
HitsLoader::getType
()
const
{
62
return
m_config
.type;
63
}
64
65
}
FlowElement.h
HitsLoader.h
StringUtils.h
ElementLink
ElementLink implementation for ROOT usage.
Definition
AthLinks/ElementLink.h:123
FlavorTagInference::HitsLoader::getUsedRemap
const std::set< std::string > & getUsedRemap() const override
Definition
HitsLoader.cxx:55
FlavorTagInference::HitsLoader::getDependencies
const FTagDataDependencyNames & getDependencies() const override
Definition
HitsLoader.cxx:52
FlavorTagInference::HitsLoader::getType
const ConstituentsType & getType() const override
Definition
HitsLoader.cxx:61
FlavorTagInference::HitsLoader::HitsLoader
HitsLoader(const ConstituentsInputConfig &, const FTagOptions &options)
Definition
HitsLoader.cxx:12
FlavorTagInference::HitsLoader::Hits
std::vector< const xAOD::TrackMeasurementValidation * > Hits
Definition
HitsLoader.h:51
FlavorTagInference::HitsLoader::getName
const std::string & getName() const override
Definition
HitsLoader.cxx:58
FlavorTagInference::HitsLoader::getHitsFromJet
std::vector< const xAOD::TrackMeasurementValidation * > getHitsFromJet(const xAOD::IParticle &jet) const
Definition
HitsLoader.cxx:36
FlavorTagInference::HitsLoader::getData
Inputs getData(const xAOD::IParticle &jet) const override
Definition
HitsLoader.cxx:47
FlavorTagInference::HitsLoader::m_seqGetter
getter_utils::SeqGetter< xAOD::TrackMeasurementValidation > m_seqGetter
Definition
HitsLoader.h:65
FlavorTagInference::HitsLoader::m_associator
std::function< TMVV(const Jet &)> m_associator
Definition
HitsLoader.h:66
FlavorTagInference::HitsLoader::TMVV
std::vector< const xAOD::TrackMeasurementValidation * > TMVV
Definition
HitsLoader.h:60
FlavorTagInference::IConstituentsLoader::m_config
ConstituentsInputConfig m_config
Definition
PhysicsAnalysis/JetTagging/FlavorTagInference/FlavorTagInference/ConstituentsLoader.h:101
FlavorTagInference::IConstituentsLoader::m_used_remap
std::set< std::string > m_used_remap
Definition
PhysicsAnalysis/JetTagging/FlavorTagInference/FlavorTagInference/ConstituentsLoader.h:102
FlavorTagInference::IConstituentsLoader::m_name
std::string m_name
Definition
PhysicsAnalysis/JetTagging/FlavorTagInference/FlavorTagInference/ConstituentsLoader.h:103
FlavorTagInference::IConstituentsLoader::IConstituentsLoader
IConstituentsLoader(const ConstituentsInputConfig &cfg)
Definition
PhysicsAnalysis/JetTagging/FlavorTagInference/FlavorTagInference/ConstituentsLoader.h:87
FlavorTagInference::IConstituentsLoader::m_deps
FTagDataDependencyNames m_deps
Definition
PhysicsAnalysis/JetTagging/FlavorTagInference/FlavorTagInference/ConstituentsLoader.h:100
SG::AuxElement::ConstAccessor
SG::ConstAccessor< T, ALLOC > ConstAccessor
Definition
AuxElement.h:570
xAOD::IParticle
Class providing the definition of the 4-vector interface.
Definition
Event/xAOD/xAODBase/xAODBase/IParticle.h:41
FlavorTagInference::getter_utils
Definition
PhysicsAnalysis/JetTagging/FlavorTagInference/FlavorTagInference/CustomGetterUtils.h:39
FlavorTagInference
This file contains "getter" functions used for accessing tagger inputs from the EDM.
Definition
CaloClusterLoader.h:27
FlavorTagInference::ConstituentsType
ConstituentsType
Definition
PhysicsAnalysis/JetTagging/FlavorTagInference/FlavorTagInference/ConstituentsLoader.h:49
FlavorTagInference::Inputs
std::pair< std::vector< float >, std::vector< int64_t > > Inputs
Definition
SaltModelEDMLoaderBase.h:25
jet
Definition
JetCalibTools_PlotJESFactors.cxx:23
xAOD
ICaloAffectedTool is abstract interface for tools checking if 4 mom is in calo affected region.
Definition
ICaloAffectedTool.h:24
xAOD::TrackMeasurementValidation
TrackMeasurementValidation_v1 TrackMeasurementValidation
Reference the current persistent version:
Definition
TrackMeasurementValidation.h:13
FlavorTagInference::ConstituentsInputConfig
Definition
PhysicsAnalysis/JetTagging/FlavorTagInference/FlavorTagInference/ConstituentsLoader.h:68
FlavorTagInference::FTagDataDependencyNames
Definition
FTagDataDependencyNames.h:12
FlavorTagInference::FTagOptions
Definition
PhysicsAnalysis/JetTagging/FlavorTagInference/FlavorTagInference/DataPrepUtilities.h:45
Generated on
for ATLAS Offline Software by
1.14.0