ATLAS Offline Software
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
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
54
const
FTagDataDependencyNames
&
HitsLoader::getDependencies
()
const
{
55
return
m_deps
;
56
}
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
}
63
const
ConstituentsType
&
HitsLoader::getType
()
const
{
64
return
m_config
.
type
;
65
}
66
67
}
TRTCalib_Extractor.hits
hits
Definition:
TRTCalib_Extractor.py:35
FlavorTagInference::HitsLoader::TMVV
std::vector< const xAOD::TrackMeasurementValidation * > TMVV
Definition:
HitsLoader.h:61
FlavorTagInference::IConstituentsLoader
Definition:
PhysicsAnalysis/JetTagging/FlavorTagInference/FlavorTagInference/ConstituentsLoader.h:77
FlavorTagInference
This file contains "getter" functions used for accessing tagger inputs from the EDM.
Definition:
PhysicsAnalysis/JetTagging/FlavorTagInference/FlavorTagInference/ConstituentsLoader.h:27
xAOD::TrackMeasurementValidation
TrackMeasurementValidation_v1 TrackMeasurementValidation
Reference the current persistent version:
Definition:
TrackMeasurementValidation.h:13
FlavorTagInference::HitsLoader::getUsedRemap
const std::set< std::string > & getUsedRemap() const override
Definition:
HitsLoader.cxx:57
ParticleTest.tp
tp
Definition:
ParticleTest.py:25
FlavorTagInference::FTagOptions
Definition:
PhysicsAnalysis/JetTagging/FlavorTagInference/FlavorTagInference/DataPrepUtilities.h:45
xAOD
ICaloAffectedTool is abstract interface for tools checking if 4 mom is in calo affected region.
Definition:
ICaloAffectedTool.h:24
SG::ConstAccessor
Helper class to provide constant type-safe access to aux data.
Definition:
ConstAccessor.h:55
xAOD::IParticle
Class providing the definition of the 4-vector interface.
Definition:
Event/xAOD/xAODBase/xAODBase/IParticle.h:41
postInclude.inputs
inputs
Definition:
postInclude.SortInput.py:15
xAOD::TrackMeasurementValidation_v1
Class describing a TrackMeasurementValidation.
Definition:
TrackMeasurementValidation_v1.h:27
jet
Definition:
JetCalibTools_PlotJESFactors.cxx:23
FlavorTagInference::HitsLoader::HitsLoader
HitsLoader(const ConstituentsInputConfig &, const FTagOptions &options)
Definition:
HitsLoader.cxx:12
FlowElement.h
FlavorTagInference::IConstituentsLoader::m_deps
FTagDataDependencyNames m_deps
Definition:
PhysicsAnalysis/JetTagging/FlavorTagInference/FlavorTagInference/ConstituentsLoader.h:91
FlavorTagInference::ConstituentsInputConfig
Definition:
PhysicsAnalysis/JetTagging/FlavorTagInference/FlavorTagInference/ConstituentsLoader.h:61
StringUtils.h
CalibDbCompareRT.dummy
dummy
Definition:
CalibDbCompareRT.py:59
FlavorTagInference::FTagDataDependencyNames
Definition:
FTagDataDependencyNames.h:12
AthenaPoolTestRead.acc
acc
Definition:
AthenaPoolTestRead.py:16
python.AtlRunQueryLib.options
options
Definition:
AtlRunQueryLib.py:378
FlavorTagInference::HitsLoader::m_associator
std::function< TMVV(const Jet &)> m_associator
Definition:
HitsLoader.h:67
FlavorTagInference::HitsLoader::m_seqGetter
getter_utils::SeqGetter< xAOD::TrackMeasurementValidation > m_seqGetter
Definition:
HitsLoader.h:66
ElementLink
ElementLink implementation for ROOT usage.
Definition:
AthLinks/ElementLink.h:123
FlavorTagInference::ConstituentsType
ConstituentsType
Definition:
PhysicsAnalysis/JetTagging/FlavorTagInference/FlavorTagInference/ConstituentsLoader.h:47
FlavorTagInference::HitsLoader::getType
const ConstituentsType & getType() const override
Definition:
HitsLoader.cxx:63
FlavorTagInference::HitsLoader::getHitsFromJet
std::vector< const xAOD::TrackMeasurementValidation * > getHitsFromJet(const xAOD::IParticle &jet) const
Definition:
HitsLoader.cxx:36
WriteCaloSwCorrections.cfg
cfg
Definition:
WriteCaloSwCorrections.py:23
HitsLoader.h
FlavorTagInference::HitsLoader::getName
const std::string & getName() const override
Definition:
HitsLoader.cxx:60
FlavorTagInference::IConstituentsLoader::m_config
ConstituentsInputConfig m_config
Definition:
PhysicsAnalysis/JetTagging/FlavorTagInference/FlavorTagInference/ConstituentsLoader.h:92
FlavorTagInference::HitsLoader::Hits
std::vector< const xAOD::TrackMeasurementValidation * > Hits
Definition:
HitsLoader.h:52
FlavorTagInference::HitsLoader::getDependencies
const FTagDataDependencyNames & getDependencies() const override
Definition:
HitsLoader.cxx:54
FlavorTagInference::ConstituentsInputConfig::type
ConstituentsType type
Definition:
PhysicsAnalysis/JetTagging/FlavorTagInference/FlavorTagInference/ConstituentsLoader.h:64
FlavorTagInference::HitsLoader::getData
std::tuple< Inputs, std::vector< const xAOD::IParticle * > > getData(const xAOD::IParticle &jet) const override
Definition:
HitsLoader.cxx:47
FlavorTagInference::IConstituentsLoader::m_used_remap
std::set< std::string > m_used_remap
Definition:
PhysicsAnalysis/JetTagging/FlavorTagInference/FlavorTagInference/ConstituentsLoader.h:93
FlavorTagInference::IConstituentsLoader::m_name
std::string m_name
Definition:
PhysicsAnalysis/JetTagging/FlavorTagInference/FlavorTagInference/ConstituentsLoader.h:94
Generated on Tue Sep 30 2025 21:10:47 for ATLAS Offline Software by
1.8.18