ATLAS Offline Software
Loading...
Searching...
No Matches
SiSPSeededTrackFinderRoI.h
Go to the documentation of this file.
1// -*- C++ -*-
2
3/*
4 Copyright (C) 2002-2026 CERN for the benefit of the ATLAS collaboration
5*/
6
7
8#ifndef SiSPSeededTrackFinderRoI_H
9#define SiSPSeededTrackFinderRoI_H
10
12#include "GaudiKernel/ToolHandle.h"
13
20
27
30
31#include <string>
32#include <atomic>
33
34namespace InDet {
35
36 // Class-algorithm for track finding in Pixels and SCT
37 // initiated by space points seeds filtering in a given
38 // RoI within the z axis
39 //
41 {
42
44 // Public methods:
46
47 public:
48
50 // @name Standard Algotithm methods
52
53 SiSPSeededTrackFinderRoI(const std::string &name, ISvcLocator *pSvcLocator);
54 virtual ~SiSPSeededTrackFinderRoI() = default;
55 virtual StatusCode initialize() override;
56 virtual StatusCode execute(const EventContext& ctx) const override;
57 virtual StatusCode finalize() override;
59
60
61 protected:
62
64 // @name Flags to configure SiSPSeededTrackFinderRoI
66
67
68 BooleanProperty m_useRoIWidth{this, "useRoIWidth", true, "Use width of RoI along z-axis"};
69 IntegerProperty m_maxNumberSeeds{this, "maxNumberSeeds", 3000000, "Max. number used seeds"};
70 IntegerProperty m_nfreeCut{this, "FreeClustersCut", 1, "Min number free clusters"};
71 BooleanProperty m_doRandomSpot{this, "doRandomSpot", false, "Low-pT tracking setting the RoI in a random position"};
72
73 StringProperty m_fieldmode{this, "MagneticFieldMode", "MapSolenoid"};
75
77 // @name Input/Output Handles
79
80 SG::WriteHandleKey<TrackCollection> m_outputTracksKey{this, "TracksLocation", "SiSPSeededTracksRoI", "Output track collection"};
81 SG::WriteHandleKey<xAOD::VertexContainer> m_vxOutputKey{this, "VxOutputName", "LowPtRoIVertices", "Output Vertex collection with per-event RoI information"};
82
84 SG::ReadCondHandleKey<InDet::BeamSpotData> m_beamSpotKey{this, "BeamSpotKey", "BeamSpotData", "SG key for beam spot"};
85 SG::ReadHandleKey<xAOD::EventInfo> m_evtKey{this, "EventInfoKey", "EventInfo"};
87
89 // @name Algorithm Tools
91
92
93 ToolHandle<ISiSpacePointsSeedMaker> m_seedsmaker{this, "SeedsTool", "InDet::SiSpacePointsSeedMaker_ATLxk/InDetSpSeedsMaker", "Space poins seed maker"};
94 ToolHandle<ISiTrackMaker> m_trackmaker{this, "TrackTool", "InDet::SiTrackMaker_xk/InDetSiTrackMaker", "Track maker"};
95 ToolHandle<Trk::IExtendedTrackSummaryTool> m_trackSummaryTool{this, "TrackSummaryTool", "InDetTrackSummaryToolNoHoleSearch"};
96
97 ToolHandle<IZWindowRoISeedTool> m_ZWindowRoISeedTool{this, "ZWindowRoISeedTool", "InDet::ZWindowRoISeedTool", "Tool to determin per-event RoI"};
98 ToolHandle<IZWindowRoISeedTool> m_RandomRoISeedTool{this, "RandomRoISeedTool", "InDet::RandomRoISeedTool", "Tool to run using additional RoIs randomly chosen away from the main one if doRandomSpot is set"};
99
100 ServiceHandle<IInDetEtaDependentCutsSvc> m_etaDependentCutsSvc{this, "EtaDependentCutsSvc", "", "if enable, further require eta-dependent selections on track candidates"};
102
104 // Protected settings
107
108
110 // Protected methods
112
119 void filterSharedTracks(std::multimap<double,Trk::Track*>&) const;
120
121 void magneticFieldInit();
122
127 bool passEtaDepCuts(const Trk::Track* track,
128 int nClusters,
129 int nFreeClusters,
130 int nPixels) const;
131
133 // @name Statistics and Debug Information
135
136
139
142 class Counter_t : public std::array<std::atomic_int, kNCounter>
143 {
144 public:
146 for (unsigned int idx=0; idx <kNCounter; ++idx) {
147 (*this)[idx] += counter[idx];
148 }
149 return *this;
150 }
151 };
152
153 mutable Counter_t m_counterTotal ATLAS_THREAD_SAFE {};
154
155 mutable std::atomic_int m_neventsTotal{0};
156 mutable std::atomic_int m_problemsTotal{0};
157
158 MsgStream& dump(MSG::Level lvl, const SiSPSeededTrackFinderRoI::Counter_t*) const;
159 MsgStream& dumptools(MsgStream& out) const;
160 MsgStream& dumpevent(MsgStream& out, const SiSPSeededTrackFinderRoI::Counter_t& counter) const;
161
163
164 };
165
166}
167
168#endif // SiSPSeededTrackFinderRoI_H
An algorithm that can be simultaneously executed in multiple threads.
Counter_t & operator+=(const Counter_t &counter)
std::atomic_int m_neventsTotal
Number events.
ToolHandle< Trk::IExtendedTrackSummaryTool > m_trackSummaryTool
SG::WriteHandleKey< xAOD::VertexContainer > m_vxOutputKey
virtual StatusCode initialize() override
void filterSharedTracks(std::multimap< double, Trk::Track * > &) const
cleans up the collection of quality filtered tracks.
std::atomic_int m_problemsTotal
Number events with number seeds > maxNumber.
MsgStream & dumpevent(MsgStream &out, const SiSPSeededTrackFinderRoI::Counter_t &counter) const
SG::ReadHandleKey< xAOD::EventInfo > m_evtKey
bool passEtaDepCuts(const Trk::Track *track, int nClusters, int nFreeClusters, int nPixels) const
apply eta-dependent selections
ToolHandle< ISiSpacePointsSeedMaker > m_seedsmaker
SiSPSeededTrackFinderRoI(const std::string &name, ISvcLocator *pSvcLocator)
MsgStream & dumptools(MsgStream &out) const
SG::WriteHandleKey< TrackCollection > m_outputTracksKey
ServiceHandle< IInDetEtaDependentCutsSvc > m_etaDependentCutsSvc
Trk::MagneticFieldProperties m_fieldprop
SG::ReadHandleKey< Trk::PRDtoTrackMap > m_prdToTrackMap
ToolHandle< ISiTrackMaker > m_trackmaker
virtual StatusCode execute(const EventContext &ctx) const override
ToolHandle< IZWindowRoISeedTool > m_RandomRoISeedTool
SG::ReadCondHandleKey< InDet::BeamSpotData > m_beamSpotKey
virtual ~SiSPSeededTrackFinderRoI()=default
ToolHandle< IZWindowRoISeedTool > m_ZWindowRoISeedTool
virtual StatusCode finalize() override
Property holding a SG store/key/clid from which a ReadHandle is made.
Property holding a SG store/key/clid from which a WriteHandle is made.
magnetic field properties to steer the behavior of the extrapolation
Primary Vertex Finder.
-event-from-file