![Logo](../../ATLAS-Logo-Square-Blue-RGB.png) |
ATLAS Offline Software
|
#include <TracksLoader.h>
Definition at line 45 of file TracksLoader.h.
◆ AE
◆ IPC
◆ Jet
◆ PartLinks
◆ TPC
◆ Track
◆ TrackFilter
◆ TrackLinks
◆ TrackSequenceFilter
◆ TrackSortVar
◆ TracksLoader()
Definition at line 263 of file TracksLoader.cxx.
271 m_seqGetter(getter_utils::SeqGetter<xAOD::TrackParticle>(
285 if (!link.isValid()) {
286 throw std::logic_error(
"invalid particle link");
290 throw std::logic_error(
"iparticle does not cast to Track");
292 tracks.push_back(trk);
301 if (!link.isValid()) {
302 throw std::logic_error(
"invalid track link");
304 tracks.push_back(*link);
309 throw std::logic_error(
"Unknown TrackLinkType");
313 track_data_deps.merge(
m_seqGetter.getDependencies());
◆ getData()
◆ getDependencies()
◆ getDL2Data()
std::tuple< char, std::map< std::string, std::vector< double > > > FlavorTagDiscriminants::TracksLoader::getDL2Data |
( |
const xAOD::Jet & |
jet, |
|
|
const SG::AuxElement & |
btag, |
|
|
std::function< char(const Tracks &)> |
ip_checker |
|
) |
| const |
Definition at line 356 of file TracksLoader.cxx.
362 std::vector<const xAOD::IParticle*> flipped_tracks_ip;
365 if (ip_checker(sorted_tracks)) invalid = 1;
369 return std::make_tuple(invalid, feats);
◆ getName()
std::string FlavorTagDiscriminants::TracksLoader::getName |
( |
| ) |
const |
|
overridevirtual |
◆ getTracksFromJet()
Definition at line 320 of file TracksLoader.cxx.
324 std::vector<std::pair<double, const Track*>> tracks;
330 std::sort(tracks.begin(), tracks.end(), std::greater<>());
331 std::vector<const Track*> only_tracks;
332 only_tracks.reserve(tracks.size());
333 for (
const auto& trk: tracks) {
334 only_tracks.push_back(trk.second);
◆ getType()
◆ getUsedRemap()
std::set< std::string > FlavorTagDiscriminants::TracksLoader::getUsedRemap |
( |
| ) |
const |
|
overridevirtual |
◆ trackFilter()
Definition at line 44 of file TracksLoader.cxx.
52 auto data_deps = aug.getTrackIpDataDependencyNames();
55 std::set<std::string> track_deps;
56 auto addAccessor = [&track_deps](
const std::string&
n) {
57 AE::ConstAccessor<unsigned char>
a(
n);
61 auto pix_hits = addAccessor(
"numberOfPixelHits");
62 auto pix_holes = addAccessor(
"numberOfPixelHoles");
63 auto pix_shared = addAccessor(
"numberOfPixelSharedHits");
64 auto pix_dead = addAccessor(
"numberOfPixelDeadSensors");
65 auto sct_hits = addAccessor(
"numberOfSCTHits");
66 auto sct_holes = addAccessor(
"numberOfSCTHoles");
67 auto sct_shared = addAccessor(
"numberOfSCTSharedHits");
68 auto sct_dead = addAccessor(
"numberOfSCTDeadSensors");
72 data_deps.insert(track_deps.begin(), track_deps.end());
87 if (std::abs(
tp->eta()) > 2.5)
return false;
88 double n_module_shared = (pix_shared(*
tp) + sct_shared(*
tp) / 2);
89 if (n_module_shared > 1)
return false;
90 if (
tp->pt() <= 1
e3)
return false;
91 if (std::abs(aug.d0(*
tp)) >= 1.0)
return false;
92 if (std::abs(aug.z0SinTheta(*
tp)) >= 1.5)
return false;
93 if (pix_hits(*
tp) + pix_dead(*
tp) + sct_hits(*
tp) + sct_dead(*
tp) < 7)
return false;
94 if ((pix_holes(*
tp) + sct_holes(*
tp)) > 2)
return false;
95 if (pix_holes(*
tp) > 1)
return false;
109 if (std::abs(
tp->eta()) > 4.0)
return false;
110 if (
tp->pt() <= 1
e3)
return false;
111 if (std::abs(aug.d0(*
tp)) >= 1.0)
return false;
112 if (std::abs(aug.z0SinTheta(*
tp)) >= 1.5)
return false;
126 if (std::abs(
tp->eta()) > 4.0)
return false;
127 if (
tp->pt() <= 0.5e3)
return false;
128 if (std::abs(aug.d0(*
tp)) >= 3.5)
return false;
129 if (std::abs(aug.z0SinTheta(*
tp)) >= 5.0)
return false;
144 if (std::abs(
tp->eta()) > 2.5)
return false;
145 double n_module_shared = (pix_shared(*
tp) + sct_shared(*
tp) / 2);
146 if (n_module_shared > 1)
return false;
147 if (
tp->pt() <= 0.5e3)
return false;
148 if (std::abs(aug.d0(*
tp)) >= 3.5)
return false;
149 if (std::abs(aug.z0SinTheta(*
tp)) >= 5.0)
return false;
150 if (pix_hits(*
tp) + pix_dead(*
tp) + sct_hits(*
tp) + sct_dead(*
tp) < 7)
return false;
151 if ((pix_holes(*
tp) + sct_holes(*
tp)) > 2)
return false;
152 if (pix_holes(*
tp) > 1)
return false;
159 if (std::abs(
tp->eta()) > 2.5)
return false;
160 double n_module_shared = (pix_shared(*
tp) + sct_shared(*
tp) / 2);
161 if (n_module_shared > 1)
return false;
162 if (
tp->pt() <= 0.5e3)
return false;
163 if (pix_hits(*
tp) + pix_dead(*
tp) + sct_hits(*
tp) + sct_dead(*
tp) < 7)
return false;
164 if ((pix_holes(*
tp) + sct_holes(*
tp)) > 2)
return false;
165 if (pix_holes(*
tp) > 1)
return false;
176 if (std::abs(
tp->eta()) > 2.5)
return false;
177 double n_module_shared = (pix_shared(*
tp) + sct_shared(*
tp) / 2);
178 if (n_module_shared > 1)
return false;
179 if (
tp->pt() <= 0.5e3)
return false;
180 if (std::abs(aug.d0(*
tp)) >= 3.5)
return false;
181 if (std::abs(aug.z0SinTheta(*
tp)) >= 5.0)
return false;
182 if (pix_hits(*
tp) + pix_dead(*
tp) + sct_hits(*
tp) + sct_dead(*
tp) < 8)
return false;
183 if ((pix_holes(*
tp) + sct_holes(*
tp)) > 2)
return false;
184 if (pix_holes(*
tp) > 1)
return false;
194 if (std::abs(
tp->eta()) > 2.5)
return false;
195 if (
tp->pt() <= 0.5e3)
return false;
196 if (std::abs(aug.d0(*
tp)) >= 5.0)
return false;
197 if (std::abs(aug.z0SinTheta(*
tp)) >= 5.0)
return false;
198 if (pix_hits(*
tp) + pix_dead(*
tp) + sct_hits(*
tp) + sct_dead(*
tp) < 8)
return false;
199 if ((pix_holes(*
tp) + sct_holes(*
tp)) > 2)
return false;
200 if (pix_holes(*
tp) > 1)
return false;
205 throw std::logic_error(
"unknown track selection function");
◆ trackFlipper()
Definition at line 228 of file TracksLoader.cxx.
231 namespace ph = std::placeholders;
238 aug.getTrackIpDataDependencyNames()
244 return Tracks(tr.crbegin(), tr.crend());},
251 return Tracks(tr.crbegin(), tr.crend());},
258 throw std::logic_error(
"Unknown flip config");
◆ trackSortVar()
Definition at line 13 of file TracksLoader.cxx.
22 return [aug](
const Tp*
tp,
const Jet&) {
23 return std::abs(aug.d0(*
tp) / aug.d0Uncertainty(*
tp));
26 return [aug](
const Tp*
tp,
const Jet& j) {
27 return aug.getSignedIp(*
tp, j).ip3d_signed_d0_significance;
30 return [](
const Tp*
tp,
const Jet&) {
return tp->pt();};
32 return [aug](
const Tp*
tp,
const Jet&) {
33 return std::abs(aug.d0(*
tp));
37 throw std::logic_error(
"Unknown sort function");
◆ m_associator
◆ m_config
◆ m_deps
◆ m_name
std::string FlavorTagDiscriminants::IConstituentsLoader::m_name |
|
protectedinherited |
◆ m_seqGetter
◆ m_trackFilter
TrackFilter FlavorTagDiscriminants::TracksLoader::m_trackFilter |
|
private |
◆ m_trackFlipper
◆ m_trackSortVar
TrackSortVar FlavorTagDiscriminants::TracksLoader::m_trackSortVar |
|
private |
◆ m_used_remap
std::set<std::string> FlavorTagDiscriminants::IConstituentsLoader::m_used_remap |
|
protectedinherited |
The documentation for this class was generated from the following files:
TrackSortVar trackSortVar(ConstituentsSortOrder, const FTagOptions &)
std::pair< std::vector< float >, std::vector< int64_t > > Inputs
Basic data class defines behavior for all Jet objects The Jet class is the principal data class for...
Base class for elements of a container that can have aux data.
TrackSequenceFilter m_trackFlipper
std::pair< TrackSequenceFilter, std::set< std::string > > trackFlipper(const FTagOptions &)
Helper class to provide constant type-safe access to aux data.
std::set< std::string > bTagInputs
std::set< std::string > m_used_remap
IConstituentsLoader(ConstituentsInputConfig cfg)
@ ABS_D0_SIGNIFICANCE_DESCENDING
std::pair< TrackFilter, std::set< std::string > > trackFilter(ConstituentsSelection, const FTagOptions &)
std::function< Tracks(const SG::AuxElement &)> m_associator
Tracks getTracksFromJet(const Jet &jet, const AE &btag) const
ElementLink implementation for ROOT usage.
FTagDataDependencyNames m_deps
ConstituentsInputConfig m_config
std::set< std::string > trackInputs
void sort(typename std::reverse_iterator< DataModel_detail::iterator< DVL > > beg, typename std::reverse_iterator< DataModel_detail::iterator< DVL > > end, const Compare &comp)
Specialization of sort for DataVector/List.
TrackFilter m_trackFilter
std::vector< const xAOD::TrackParticle * > Tracks
Class describing a TrackParticle.
getter_utils::SeqGetter< xAOD::TrackParticle > m_seqGetter
Tracks negativeIpOnly(BTagTrackIpAccessor &aug, const Tracks &tracks, const xAOD::Jet &j)
@ D0_SIGNIFICANCE_DESCENDING
TrackSortVar m_trackSortVar