ATLAS Offline Software
InDetPRD_AssociationToolGangedPixels.h
Go to the documentation of this file.
1 /*
2  Copyright (C) 2002-2024 CERN for the benefit of the ATLAS collaboration
3 */
4 
5 #ifndef INDET_PRD_ASSOCIATIONTOOL_H
6 #define INDET_PRD_ASSOCIATIONTOOL_H
7 
9 #include "GaudiKernel/ServiceHandle.h"
13 
14 class AtlasDetectorID;
15 class Identifier;
16 
17 namespace InDet {
18 
20  class InDetPRD_AssociationToolGangedPixels : public extends<AthAlgTool, Trk::IPRD_AssociationTool>
21  {
22 
23  public:
25 
26  InDetPRD_AssociationToolGangedPixels(const std::string&,const std::string&,const IInterface*);
28  virtual StatusCode initialize() override;
29  virtual StatusCode finalize () override;
30 
33  virtual StatusCode addPRDs(const Trk::Track& track) override;
34 
37  virtual StatusCode addPRDs(Maps& maps, const Trk::Track& track) const override;
38 
41  virtual StatusCode removePRDs(Maps& maps, const Trk::Track& track) const override;
42 
46  virtual StatusCode removePRDs(const Trk::Track& track) override;
47 
52  virtual bool isUsed(const Maps& maps, const Trk::PrepRawData& prd) const override final;
53 
58  virtual bool isUsed(const Trk::PrepRawData& prd) const override;
59 
64  virtual bool isShared(const Maps& maps, const Trk::PrepRawData& prd) const override final;
65 
70  virtual bool isShared(const Trk::PrepRawData& prd) const override;
71 
79  virtual std::vector< const Trk::PrepRawData* > getPrdsOnTrack(const Trk::Track& track) const override;
80 
81  // getPrdsOnTrack with state passed explicitly.
82  virtual std::vector< const Trk::PrepRawData* > getPrdsOnTrack(const Maps& maps,
83  const Trk::Track& track) const override;
84 
89 
90  // findConnectedTracks with state passed explicitly.
91  virtual IPRD_AssociationTool::TrackSet findConnectedTracks( const Maps& maps, const Trk::Track& track) const override;
92 
98 
99  // onTracks with explicit state
100  virtual IPRD_AssociationTool::PrepRawDataTrackMapRange onTracks(const Maps& maps,
101  const Trk::PrepRawData& prd) const override;
102 
105  virtual void reset() override;
106 
107  private:
109 
110  SG::ReadHandleKey<PixelGangedClusterAmbiguities> m_pixelClusterAmbiguitiesMapName{this, "PixelClusterAmbiguitiesMapName", "PixelClusterAmbiguitiesMap"};
111 
113  BooleanProperty m_addTRToutliers{this, "addTRToutliers", false};
114 
115 };
116 
117 inline bool
119  const Trk::PrepRawData& prd) const
120 {
121  return (maps.m_prepRawDataTrackMap.count(&prd)>0);
122 }
123 
124 inline bool
126 {
127  return isUsed (m_maps, prd);
128 }
129 
130 inline bool
132  const Trk::PrepRawData& prd) const
133 {
134  return (maps.m_prepRawDataTrackMap.count(&prd)>1);
135 }
136 
137 inline bool
139 {
140  return isShared (m_maps, prd);
141 }
142 
143 
144 }
145 #endif
ReadHandleKey.h
Property holding a SG store/key/clid from which a ReadHandle is made.
InDet::InDetPRD_AssociationToolGangedPixels::onTracks
virtual Trk::IPRD_AssociationTool::PrepRawDataTrackMapRange onTracks(const Trk::PrepRawData &prd) const override
get the Tracks associated with this Trk::PrepRawData.
Definition: InDetPRD_AssociationToolGangedPixels.cxx:275
InDet::InDetPRD_AssociationToolGangedPixels::reset
virtual void reset() override
resets the tool - should be called before using tool (and maybe afterwards to free up memory)
Definition: InDetPRD_AssociationToolGangedPixels.cxx:287
Trk::Track
The ATLAS Track class.
Definition: Tracking/TrkEvent/TrkTrack/TrkTrack/Track.h:73
InDet
Primary Vertex Finder.
Definition: VP1ErrorUtils.h:36
InDet::InDetPRD_AssociationToolGangedPixels::removePRDs
virtual StatusCode removePRDs(Maps &maps, const Trk::Track &track) const override
remove the PRDs from this track from maps
Definition: InDetPRD_AssociationToolGangedPixels.cxx:86
InDet::InDetPRD_AssociationToolGangedPixels::m_addTRToutliers
BooleanProperty m_addTRToutliers
add TRT outliers in the addTrack method to avoid splits due to rejected extensions
Definition: InDetPRD_AssociationToolGangedPixels.h:113
InDet::InDetPRD_AssociationToolGangedPixels::~InDetPRD_AssociationToolGangedPixels
virtual ~InDetPRD_AssociationToolGangedPixels()
CP::TrackSet
std::set< TrackPtr > TrackSet
Definition: PhysicsAnalysis/AnalysisCommon/IsolationSelection/IsolationSelection/Defs.h:72
InDet::InDetPRD_AssociationToolGangedPixels::getPrdsOnTrack
virtual std::vector< const Trk::PrepRawData * > getPrdsOnTrack(const Trk::Track &track) const override
returns a vector of PRDs belonging to the passed track.
Definition: InDetPRD_AssociationToolGangedPixels.cxx:212
InDet::InDetPRD_AssociationToolGangedPixels::Maps
Trk::IPRD_AssociationTool::Maps Maps
Definition: InDetPRD_AssociationToolGangedPixels.h:24
SG::ReadHandleKey< PixelGangedClusterAmbiguities >
InDet::InDetPRD_AssociationToolGangedPixels::isShared
virtual bool isShared(const Maps &maps, const Trk::PrepRawData &prd) const override final
does this PRD belong to more than one track in maps?
Definition: InDetPRD_AssociationToolGangedPixels.h:131
InDet::InDetPRD_AssociationToolGangedPixels::finalize
virtual StatusCode finalize() override
Definition: InDetPRD_AssociationToolGangedPixels.cxx:29
Trk::IPRD_AssociationTool::Maps::m_prepRawDataTrackMap
IPRD_AssociationTool::PrepRawDataTrackMap m_prepRawDataTrackMap
Definition: IPRD_AssociationTool.h:58
PixelGangedClusterAmbiguities.h
InDet::InDetPRD_AssociationToolGangedPixels::InDetPRD_AssociationToolGangedPixels
InDetPRD_AssociationToolGangedPixels(const std::string &, const std::string &, const IInterface *)
Definition: InDetPRD_AssociationToolGangedPixels.cxx:16
EL::StatusCode
::StatusCode StatusCode
StatusCode definition for legacy code.
Definition: PhysicsAnalysis/D3PDTools/EventLoop/EventLoop/StatusCode.h:22
InDet::InDetPRD_AssociationToolGangedPixels::m_maps
Maps m_maps
Definition: InDetPRD_AssociationToolGangedPixels.h:108
AthAlgTool.h
Trk::IPRD_AssociationTool::PrepRawDataTrackMapRange
std::pair< ConstPRD_MapIt, ConstPRD_MapIt > PrepRawDataTrackMapRange
the first element is the beginning iterator of the range, the second is the end
Definition: IPRD_AssociationTool.h:48
InDet::InDetPRD_AssociationToolGangedPixels::isUsed
virtual bool isUsed(const Maps &maps, const Trk::PrepRawData &prd) const override final
does this PRD belong to at least one track in maps?
Definition: InDetPRD_AssociationToolGangedPixels.h:118
IPRD_AssociationTool.h
Trk::PrepRawData
Definition: PrepRawData.h:62
Trk::IPRD_AssociationTool::TrackSet
std::set< const Track * > TrackSet
Definition: IPRD_AssociationTool.h:52
InDet::InDetPRD_AssociationToolGangedPixels
Concrete Implementation of the IPRD_AssociationTool interface.
Definition: InDetPRD_AssociationToolGangedPixels.h:21
InDet::InDetPRD_AssociationToolGangedPixels::addPRDs
virtual StatusCode addPRDs(const Trk::Track &track) override
add the PRDs from this track to the store
Definition: InDetPRD_AssociationToolGangedPixels.cxx:34
InDet::InDetPRD_AssociationToolGangedPixels::initialize
virtual StatusCode initialize() override
Definition: InDetPRD_AssociationToolGangedPixels.cxx:23
xAOD::track
@ track
Definition: TrackingPrimitives.h:512
InDet::InDetPRD_AssociationToolGangedPixels::m_pixelClusterAmbiguitiesMapName
SG::ReadHandleKey< PixelGangedClusterAmbiguities > m_pixelClusterAmbiguitiesMapName
Definition: InDetPRD_AssociationToolGangedPixels.h:110
InDet::InDetPRD_AssociationToolGangedPixels::findConnectedTracks
virtual Trk::IPRD_AssociationTool::TrackSet findConnectedTracks(const Trk::Track &track) const override
returns set of tracks which share PRD with this one
Definition: InDetPRD_AssociationToolGangedPixels.cxx:164
Trk::IPRD_AssociationTool::Maps
The mutable state of the tool.
Definition: IPRD_AssociationTool.h:56
AtlasDetectorID
This class provides an interface to generate or decode an identifier for the upper levels of the dete...
Definition: AtlasDetectorID.h:57
Identifier
Definition: IdentifierFieldParser.cxx:14