ATLAS Offline Software
Loading...
Searching...
No Matches
SiSPSeededTrackFinderRoI.h
Go to the documentation of this file.
1// -*- C++ -*-
2
3/*
4 Copyright (C) 2002-2023 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"
14
21
28
31
32#include <string>
33#include <atomic>
34
35namespace InDet {
36
37 // Class-algorithm for track finding in Pixels and SCT
38 // initiated by space points seeds filtering in a given
39 // RoI within the z axis
40 //
42 {
43
45 // Public methods:
47
48 public:
49
51 // @name Standard Algotithm methods
53
54 SiSPSeededTrackFinderRoI(const std::string &name, ISvcLocator *pSvcLocator);
55 virtual ~SiSPSeededTrackFinderRoI() = default;
56 virtual StatusCode initialize() override;
57 virtual StatusCode execute(const EventContext& ctx) const override;
58 virtual StatusCode finalize() override;
60
61
62 protected:
63
65 // @name Flags to configure SiSPSeededTrackFinderRoI
67
68
69 BooleanProperty m_useRoIWidth{this, "useRoIWidth", true, "Use width of RoI along z-axis"};
70 IntegerProperty m_maxNumberSeeds{this, "maxNumberSeeds", 3000000, "Max. number used seeds"};
71 IntegerProperty m_nfreeCut{this, "FreeClustersCut", 1, "Min number free clusters"};
72 BooleanProperty m_doRandomSpot{this, "doRandomSpot", false, "Low-pT tracking setting the RoI in a random position"};
73
74 StringProperty m_fieldmode{this, "MagneticFieldMode", "MapSolenoid"};
76
78 // @name Input/Output Handles
80
81 SG::WriteHandleKey<TrackCollection> m_outputTracksKey{this, "TracksLocation", "SiSPSeededTracksRoI", "Output track collection"};
82 SG::WriteHandleKey<xAOD::VertexContainer> m_vxOutputKey{this, "VxOutputName", "LowPtRoIVertices", "Output Vertex collection with per-event RoI information"};
83
85 SG::ReadCondHandleKey<InDet::BeamSpotData> m_beamSpotKey{this, "BeamSpotKey", "BeamSpotData", "SG key for beam spot"};
86 SG::ReadHandleKey<xAOD::EventInfo> m_evtKey{this, "EventInfoKey", "EventInfo"};
88
90 // @name Algorithm Tools
92
93
94 ToolHandle<ISiSpacePointsSeedMaker> m_seedsmaker{this, "SeedsTool", "InDet::SiSpacePointsSeedMaker_ATLxk/InDetSpSeedsMaker", "Space poins seed maker"};
95 ToolHandle<ISiTrackMaker> m_trackmaker{this, "TrackTool", "InDet::SiTrackMaker_xk/InDetSiTrackMaker", "Track maker"};
96 ToolHandle<Trk::IExtendedTrackSummaryTool> m_trackSummaryTool{this, "TrackSummaryTool", "InDetTrackSummaryToolNoHoleSearch"};
97
98 ToolHandle<IZWindowRoISeedTool> m_ZWindowRoISeedTool{this, "ZWindowRoISeedTool", "InDet::ZWindowRoISeedTool", "Tool to determin per-event RoI"};
99 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"};
100
101 ServiceHandle<IInDetEtaDependentCutsSvc> m_etaDependentCutsSvc{this, "EtaDependentCutsSvc", "", "if enable, further require eta-dependent selections on track candidates"};
103
105 // Protected settings
108
109
111 // Protected methods
113
120 void filterSharedTracks(std::multimap<double,Trk::Track*>&) const;
121
122 void magneticFieldInit();
123
128 bool passEtaDepCuts(const Trk::Track* track,
129 int nClusters,
130 int nFreeClusters,
131 int nPixels) const;
132
134 // @name Statistics and Debug Information
136
137
140
143 class Counter_t : public std::array<std::atomic_int, kNCounter>
144 {
145 public:
147 for (unsigned int idx=0; idx <kNCounter; ++idx) {
148 (*this)[idx] += counter[idx];
149 }
150 return *this;
151 }
152 };
153
154 mutable Counter_t m_counterTotal ATLAS_THREAD_SAFE {};
155
156 mutable std::atomic_int m_neventsTotal{0};
157 mutable std::atomic_int m_problemsTotal{0};
158
159 MsgStream& dump(MSG::Level lvl, const SiSPSeededTrackFinderRoI::Counter_t*) const;
160 MsgStream& dumptools(MsgStream& out) const;
161 MsgStream& dumpevent(MsgStream& out, const SiSPSeededTrackFinderRoI::Counter_t& counter) const;
162
164
165 };
166
167}
168
169#endif // SiSPSeededTrackFinderRoI_H
defines an "iterator" over instances of a given type in StoreGateSvc
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