![Logo](../../ATLAS-Logo-Square-Blue-RGB.png) |
ATLAS Offline Software
|
Go to the documentation of this file.
22 return [aug](
const Tp*
tp,
const Jet&) {
26 return [aug](
const Tp*
tp,
const Jet& j) {
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");
55 std::set<std::string> track_deps;
56 auto addAccessor = [&track_deps](
const std::string&
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;
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;
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;
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;
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;
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;
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");
219 for (
auto ti = tracks.crbegin(); ti != tracks.crend(); ti++) {
222 if (sip < 0) filtered.push_back(
tp);
231 namespace ph = std::placeholders;
244 return Tracks(tr.crbegin(), tr.crend());},
251 return Tracks(tr.crbegin(), tr.crend());},
258 throw std::logic_error(
"Unknown flip config");
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());
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);
339 std::tuple<std::string, Inputs, std::vector<const xAOD::IParticle*>>
347 std::vector<const xAOD::IParticle*> flipped_iparticles;
348 for (
const auto& trk: flipped_tracks) {
349 flipped_iparticles.push_back(trk);
359 std::function<
char(
const Tracks&)> ip_checker)
const{
362 std::vector<const xAOD::IParticle*> flipped_tracks_ip;
365 if (ip_checker(sorted_tracks)) invalid = 1;
369 return std::make_tuple(invalid, feats);
TrackSortVar trackSortVar(ConstituentsSortOrder, const FTagOptions &)
This file contains "getter" functions used for accessing tagger inputs from the EDM.
std::pair< std::vector< float >, std::vector< int64_t > > Inputs
Base class for elements of a container that can have aux data.
TrackSequenceFilter m_trackFlipper
double d0(const xAOD::TrackParticle &track) const
FTagDataDependencyNames getDependencies() const override
std::pair< TrackSequenceFilter, std::set< std::string > > trackFlipper(const FTagOptions &)
ICaloAffectedTool is abstract interface for tools checking if 4 mom is in calo affected region.
Helper class to provide constant type-safe access to aux data.
std::set< std::string > bTagInputs
std::function< double(const Track *, const Jet &)> TrackSortVar
std::set< std::string > m_used_remap
TrackParticle_v1 TrackParticle
Reference the current persistent version:
@ ABS_D0_SIGNIFICANCE_DESCENDING
std::set< std::string > getTrackIpDataDependencyNames() const
std::pair< TrackFilter, std::set< std::string > > trackFilter(ConstituentsSelection, const FTagOptions &)
std::tuple< char, std::map< std::string, std::vector< double > > > getDL2Data(const xAOD::Jet &jet, const SG::AuxElement &btag, std::function< char(const Tracks &)> ip_checker) const
std::function< Tracks(const SG::AuxElement &)> m_associator
Tracks getTracksFromJet(const Jet &jet, const AE &btag) const
double d0Uncertainty(const xAOD::TrackParticle &track) const
ElementLink implementation for ROOT usage.
FTagDataDependencyNames m_deps
std::string getName() const override
double z0SinTheta(const xAOD::TrackParticle &track) const
ConstituentsInputConfig m_config
std::set< std::string > trackInputs
ConstituentsType getType() const override
TrackFilter m_trackFilter
std::vector< const xAOD::TrackParticle * > Tracks
Class describing a TrackParticle.
getter_utils::SeqGetter< xAOD::TrackParticle > m_seqGetter
std::set< std::string > getUsedRemap() const override
Tracks negativeIpOnly(BTagTrackIpAccessor &aug, const Tracks &tracks, const xAOD::Jet &j)
TracksLoader(ConstituentsInputConfig, const FTagOptions &options)
std::tuple< std::string, Inputs, std::vector< const xAOD::IParticle * > > getData(const xAOD::Jet &jet, [[maybe_unused]] const SG::AuxElement &btag) const override
@ D0_SIGNIFICANCE_DESCENDING
TrackSortVar m_trackSortVar
BTagSignedIP getSignedIp(const xAOD::TrackParticle &track, const xAOD::Jet &jet) const