ATLAS Offline Software
Loading...
Searching...
No Matches
HitsSelectorAlg.h
Go to the documentation of this file.
1/*
2 Copyright (C) 2002-2026 CERN for the benefit of the ATLAS collaboration
3*/
4
5#ifndef HITS_SELECTOR_ALG_HH
6#define HITS_SELECTOR_ALG_HH
7
8// FrameWork includes
10
11// Containers
14
15// Read and write handle keys
19
20#include "AthLinks/ElementLink.h"
21
22#include <string>
23#include <vector>
24
25namespace FlavorTagDiscriminants {
26
37
38 public:
39 HitsSelectorAlg(const std::string& name, ISvcLocator* svcLoc);
40
41 virtual StatusCode initialize() override;
42 virtual StatusCode execute(const EventContext& ctx) const override;
43
44 private:
47
48 struct SortedHit {
50 float dphi{};
51 };
52
53 // Jet input
55 this, "jetContainer", "AntiKt4EMPFlowJets", "Input jets"};
56
57 // Per-jet input associations, empty to skip that subdetector
59 this, "PixelAssociation", m_jetsKey, "hitsForBTaggingPixel", "Name of Pixel association key, empty to skip Pixel hits"};
60
62 this, "SCTAssociation", m_jetsKey, "hitsForBTaggingSCT", "Name of SCT association key, empty to skip SCT hits"};
63
64 // Hit containers the associations point into
66 this, "pixelHitContainer", "PixelClusters", "Pixel hit container"};
67
69 this, "SCTHitContainer", "SCT_Clusters", "SCT hit container"};
70
71 // Per-hit decorations, read via the links above
73 this, "pixelHitX", m_pixelHitsKey, "HitsXRelToBeamspot", "Pixel hit x coordinate"};
74
76 this, "pixelHitY", m_pixelHitsKey, "HitsYRelToBeamspot", "Pixel hit y coordinate"};
77
79 this, "pixelCleanHit", m_pixelHitsKey, "isCleanHit", "Pixel clean hit flag"};
80
82 this, "SCTHitX", m_sctHitsKey, "HitsXRelToBeamspot", "SCT hit x coordinate"};
83
85 this, "SCTHitY", m_sctHitsKey, "HitsYRelToBeamspot", "SCT hit y coordinate"};
86
88 this, "SCTCleanHit", m_sctHitsKey, "isCleanHit", "SCT clean hit flag"};
89
90 // Output decoration
92 this, "hitAssociation", m_jetsKey, "hitsForBTagging", "Name of combined association key"};
93
94 // Parameters
95 Gaudi::Property<int> m_maxHits{
96 this, "maxHits", 200, "Max hits to keep"};
97
98 bool m_usePixel{true};
99 bool m_useSCT{true};
100
101 StatusCode collectHits(
102 const EventContext& ctx,
107 const xAOD::JetContainer& jets,
108 std::vector<std::vector<SortedHit>>& hitsPerJet) const;
109 };
110
111}
112
113#endif
Property holding a SG store/key/clid/attr name from which a ReadDecorHandle is made.
Property holding a SG store/key/clid from which a ReadHandle is made.
Property holding a SG store/key/clid/attr name from which a WriteDecorHandle is made.
An algorithm that can be simultaneously executed in multiple threads.
SG::ReadDecorHandleKey< xAOD::JetContainer > m_pixelAssocKey
SG::ReadDecorHandleKey< HitContainer > m_pixelHitXKey
virtual StatusCode initialize() override
SG::ReadHandleKey< HitContainer > m_sctHitsKey
SG::ReadDecorHandleKey< xAOD::JetContainer > m_sctAssocKey
HitsSelectorAlg(const std::string &name, ISvcLocator *svcLoc)
StatusCode collectHits(const EventContext &ctx, const SG::ReadDecorHandleKey< xAOD::JetContainer > &assocKey, const SG::ReadDecorHandleKey< HitContainer > &xKey, const SG::ReadDecorHandleKey< HitContainer > &yKey, const SG::ReadDecorHandleKey< HitContainer > &cleanKey, const xAOD::JetContainer &jets, std::vector< std::vector< SortedHit > > &hitsPerJet) const
virtual StatusCode execute(const EventContext &ctx) const override
SG::ReadDecorHandleKey< HitContainer > m_sctCleanKey
SG::ReadDecorHandleKey< HitContainer > m_pixelHitYKey
ElementLink< HitContainer > HitLink
SG::ReadHandleKey< HitContainer > m_pixelHitsKey
SG::ReadDecorHandleKey< HitContainer > m_pixelCleanKey
SG::ReadHandleKey< xAOD::JetContainer > m_jetsKey
SG::ReadDecorHandleKey< HitContainer > m_sctHitXKey
SG::WriteDecorHandleKey< xAOD::JetContainer > m_hitAssocKey
xAOD::TrackMeasurementValidationContainer HitContainer
SG::ReadDecorHandleKey< HitContainer > m_sctHitYKey
Property holding a SG store/key/clid/attr name from which a ReadDecorHandle is made.
Property holding a SG store/key/clid from which a ReadHandle is made.
Property holding a SG store/key/clid/attr name from which a WriteDecorHandle is made.
JetContainer_v1 JetContainer
Definition of the current "jet container version".
TrackMeasurementValidationContainer_v1 TrackMeasurementValidationContainer
Definition of the current "TrackMeasurementValidation container version".