ATLAS Offline Software
InDetIterativePriVxFinderTool.h
Go to the documentation of this file.
1 /*
2  Copyright (C) 2002-2024 CERN for the benefit of the ATLAS collaboration
3 */
4 
33 // implemented using as template the InDetPriVxFinderTool class of A. Wildauer
34 // and F. Akesson
35 
36 #ifndef INDETPRIVXFINDERTOOL_INDETITERATIVEPRIVXFINDERTOOL_H
37 #define INDETPRIVXFINDERTOOL_INDETITERATIVEPRIVXFINDERTOOL_H
38 
41 #include "GaudiKernel/ToolHandle.h"
45 #include "TrkTrack/TrackCollection.h" // type def ...
53 #include "xAODTracking/VertexFwd.h"
54 
60 
61 namespace Trk {
62 class Track;
63 class ITrackLink;
64 }
65 
66 namespace InDet {
67 
69  : public AthAlgTool
70  , virtual public IVertexFinder
71 {
72 
73 public:
78  InDetIterativePriVxFinderTool(const std::string& t,
79  const std::string& n,
80  const IInterface* p);
81 
87 
88  virtual StatusCode initialize() override;
89 
96  virtual std::pair<xAOD::VertexContainer*, xAOD::VertexAuxContainer*>
97  findVertex(const EventContext& ctx,
98  const TrackCollection* trackTES) const override;
99 
100  virtual std::pair<xAOD::VertexContainer*, xAOD::VertexAuxContainer*>
101  findVertex(const EventContext& ctx,
102  const xAOD::TrackParticleContainer* trackParticles) const override;
103 
104  virtual StatusCode finalize() override;
105 
106 private:
107  std::pair<xAOD::VertexContainer*, xAOD::VertexAuxContainer*> findVertex(
108  const EventContext& ctx,
109  const std::vector<Trk::ITrackLink*>& trackVector) const;
110 
112  xAOD::Vertex* myxAODVertex,
113  std::vector<const Trk::TrackParameters*>& perigeesToFit,
114  std::vector<Trk::ITrackLink*>& seedTracks) const;
115 
116  void removeAllFrom(std::vector<const Trk::TrackParameters*>& perigeesToFit,
117  std::vector<Trk::ITrackLink*>& seedTracks) const;
118 
119  double compatibility(const Trk::TrackParameters& measPerigee,
120  const xAOD::Vertex& vertex) const;
121 
122  static void countTracksAndNdf(xAOD::Vertex* myxAODVertex,
123  double& ndf,
124  int& ntracks) ;
125 
126  ToolHandle<Trk::IVertexFitter> m_iVertexFitter{ this,
127  "VertexFitterTool",
128  "Trk::AdaptiveVertexFitter" };
129  ToolHandle<InDet::IInDetTrackSelectionTool> m_trkFilter{
130  this,
131  "TrackSelector",
132  "InDet::InDetTrackSelection"
133  };
134 
135  ToolHandle<Trk::IVertexSeedFinder> m_SeedFinder{ this,
136  "SeedFinder",
137  "Trk::ZScanSeedFinder" };
138  ToolHandle<Trk::IImpactPoint3dEstimator> m_ImpactPoint3dEstimator{
139  this,
140  "ImpactPoint3dEstimator",
141  "Trk::ImpactPoint3dEstimator"
142  };
143 
144  ToolHandle<Trk::IVertexLinearizedTrackFactory> m_LinearizedTrackFactory{
145  this,
146  "LinearizedTrackFactory",
147  "Trk::FullLinearizedTrackFactory"
148  };
149 
151  this,
152  "BeamSpotKey",
153  "BeamSpotData",
154  "SG key for beam spot"
155  };
156 
157  BooleanProperty m_useBeamConstraint{this, "useBeamConstraint", false};
159  {this, "significanceCutSeeding", 10.};
161  {this, "maximumChi2cutForSeeding", 36.};
162  IntegerProperty m_maxVertices{this, "maxVertices", 25};
163 
164  BooleanProperty m_createSplitVertices{this, "createSplitVertices", false};
166  {this, "splitVerticesTrkInvFraction", 2, "inverse fraction to split tracks (1:N)"};
167 
169  {this, "reassignTracksAfterFirstFit", false};
170 
171  BooleanProperty m_doMaxTracksCut{this, "doMaxTracksCut", false};
172  UnsignedIntegerProperty m_maxTracks{this, "MaxTracks", 5000};
173 
174  void SGError(const std::string& errService);
175 
180  virtual void printParameterSettings();
181 
182 }; // end of class definitions
183 } // end of namespace definitions
184 #endif
185 
covarianceTool.ndf
ndf
Definition: covarianceTool.py:678
InDet::InDetIterativePriVxFinderTool::m_maxVertices
IntegerProperty m_maxVertices
Definition: InDetIterativePriVxFinderTool.h:162
IVertexSeedFinder.h
VertexContainerFwd.h
TrackParameters.h
InDet::IVertexFinder::findVertex
virtual std::pair< xAOD::VertexContainer *, xAOD::VertexAuxContainer * > findVertex(const EventContext &ctx, const TrackCollection *trackTES) const =0
Find vertex from Trk::TrackCollection.
IImpactPoint3dEstimator.h
InDet::InDetIterativePriVxFinderTool::countTracksAndNdf
static void countTracksAndNdf(xAOD::Vertex *myxAODVertex, double &ndf, int &ntracks)
Definition: InDetIterativePriVxFinderTool.cxx:900
InDet
Primary Vertex Finder.
Definition: VP1ErrorUtils.h:36
InDet::InDetIterativePriVxFinderTool::m_beamSpotKey
SG::ReadCondHandleKey< InDet::BeamSpotData > m_beamSpotKey
Definition: InDetIterativePriVxFinderTool.h:150
InDet::InDetIterativePriVxFinderTool::SGError
void SGError(const std::string &errService)
Definition: InDetIterativePriVxFinderTool.cxx:824
InDet::InDetIterativePriVxFinderTool::m_significanceCutSeeding
DoubleProperty m_significanceCutSeeding
Definition: InDetIterativePriVxFinderTool.h:159
InDet::InDetIterativePriVxFinderTool
Definition: InDetIterativePriVxFinderTool.h:71
read_hist_ntuple.t
t
Definition: read_hist_ntuple.py:5
InDet::InDetIterativePriVxFinderTool::finalize
virtual StatusCode finalize() override
Definition: InDetIterativePriVxFinderTool.cxx:810
InDet::IVertexFinder
Definition: IVertexFinder.h:70
InDet::InDetIterativePriVxFinderTool::removeAllFrom
void removeAllFrom(std::vector< const Trk::TrackParameters * > &perigeesToFit, std::vector< Trk::ITrackLink * > &seedTracks) const
Definition: InDetIterativePriVxFinderTool.cxx:860
IVertexFinder.h
InDet::InDetIterativePriVxFinderTool::m_createSplitVertices
BooleanProperty m_createSplitVertices
Definition: InDetIterativePriVxFinderTool.h:164
python.utils.AtlRunQueryDQUtils.p
p
Definition: AtlRunQueryDQUtils.py:210
InDet::InDetIterativePriVxFinderTool::m_doMaxTracksCut
BooleanProperty m_doMaxTracksCut
Definition: InDetIterativePriVxFinderTool.h:171
InDet::InDetIterativePriVxFinderTool::m_reassignTracksAfterFirstFit
BooleanProperty m_reassignTracksAfterFirstFit
Definition: InDetIterativePriVxFinderTool.h:169
beamspotman.n
n
Definition: beamspotman.py:731
InDet::InDetIterativePriVxFinderTool::m_LinearizedTrackFactory
ToolHandle< Trk::IVertexLinearizedTrackFactory > m_LinearizedTrackFactory
Definition: InDetIterativePriVxFinderTool.h:144
InDet::InDetIterativePriVxFinderTool::InDetIterativePriVxFinderTool
InDetIterativePriVxFinderTool(const std::string &t, const std::string &n, const IInterface *p)
Constructor.
Definition: InDetIterativePriVxFinderTool.cxx:58
EL::StatusCode
::StatusCode StatusCode
StatusCode definition for legacy code.
Definition: PhysicsAnalysis/D3PDTools/EventLoop/EventLoop/StatusCode.h:22
InDet::InDetIterativePriVxFinderTool::m_maximumChi2cutForSeeding
DoubleProperty m_maximumChi2cutForSeeding
Definition: InDetIterativePriVxFinderTool.h:161
AthAlgTool.h
TrackCollection.h
InDet::InDetIterativePriVxFinderTool::printParameterSettings
virtual void printParameterSettings()
Internal method to print the parameters setting.
Definition: InDetIterativePriVxFinderTool.cxx:816
InDet::InDetIterativePriVxFinderTool::m_iVertexFitter
ToolHandle< Trk::IVertexFitter > m_iVertexFitter
Definition: InDetIterativePriVxFinderTool.h:126
Trk::ParametersBase
Definition: ParametersBase.h:55
DataVector< Trk::Track >
IInDetTrackSelectionTool.h
ReadCondHandleKey.h
InDet::InDetIterativePriVxFinderTool::m_useBeamConstraint
BooleanProperty m_useBeamConstraint
Definition: InDetIterativePriVxFinderTool.h:157
Trk
Ensure that the ATLAS eigen extensions are properly loaded.
Definition: FakeTrackBuilder.h:9
InDet::InDetIterativePriVxFinderTool::removeCompatibleTracks
void removeCompatibleTracks(xAOD::Vertex *myxAODVertex, std::vector< const Trk::TrackParameters * > &perigeesToFit, std::vector< Trk::ITrackLink * > &seedTracks) const
Definition: InDetIterativePriVxFinderTool.cxx:926
IVertexFitter.h
VertexFwd.h
SG::ReadCondHandleKey< InDet::BeamSpotData >
InDet::InDetIterativePriVxFinderTool::m_ImpactPoint3dEstimator
ToolHandle< Trk::IImpactPoint3dEstimator > m_ImpactPoint3dEstimator
Definition: InDetIterativePriVxFinderTool.h:138
InDet::InDetIterativePriVxFinderTool::initialize
virtual StatusCode initialize() override
Definition: InDetIterativePriVxFinderTool.cxx:70
Trk::vertex
@ vertex
Definition: MeasurementType.h:21
InDet::InDetIterativePriVxFinderTool::m_SeedFinder
ToolHandle< Trk::IVertexSeedFinder > m_SeedFinder
Definition: InDetIterativePriVxFinderTool.h:135
xAOD::Vertex_v1
Class describing a Vertex.
Definition: Vertex_v1.h:42
TrackParticleFwd.h
IVertexLinearizedTrackFactory.h
Track
Definition: TriggerChamberClusterOnTrackCreator.h:21
BeamSpotData.h
AthAlgTool
Definition: AthAlgTool.h:26
InDet::InDetIterativePriVxFinderTool::m_maxTracks
UnsignedIntegerProperty m_maxTracks
Definition: InDetIterativePriVxFinderTool.h:172
InDet::InDetIterativePriVxFinderTool::findVertex
virtual std::pair< xAOD::VertexContainer *, xAOD::VertexAuxContainer * > findVertex(const EventContext &ctx, const TrackCollection *trackTES) const override
Find vertex from Trk::TrackCollection.
Definition: InDetIterativePriVxFinderTool.cxx:130
InDet::InDetIterativePriVxFinderTool::compatibility
double compatibility(const Trk::TrackParameters &measPerigee, const xAOD::Vertex &vertex) const
Definition: InDetIterativePriVxFinderTool.cxx:830
TrackParticleContainerFwd.h
InDet::InDetIterativePriVxFinderTool::~InDetIterativePriVxFinderTool
virtual ~InDetIterativePriVxFinderTool()
Destructor.
InDet::InDetIterativePriVxFinderTool::m_trkFilter
ToolHandle< InDet::IInDetTrackSelectionTool > m_trkFilter
Definition: InDetIterativePriVxFinderTool.h:129
InDet::InDetIterativePriVxFinderTool::m_splitVerticesTrkInvFraction
IntegerProperty m_splitVerticesTrkInvFraction
Definition: InDetIterativePriVxFinderTool.h:166