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 
93  virtual std::pair<xAOD::VertexContainer*, xAOD::VertexAuxContainer*>
94  findVertex(const EventContext& ctx,
95  const TrackCollection* trackTES) const override;
99  virtual std::pair<xAOD::VertexContainer*, xAOD::VertexAuxContainer*>
100  findVertex(const EventContext& ctx,
101  const xAOD::TrackParticleContainer* trackParticles) const override;
102 
103  virtual StatusCode finalize() override;
104 
105 private:
106  std::pair<xAOD::VertexContainer*, xAOD::VertexAuxContainer*> findVertex(
107  const EventContext& ctx,
108  const std::vector<Trk::ITrackLink*>& trackVector) const;
109 
111  xAOD::Vertex* myxAODVertex,
112  std::vector<const Trk::TrackParameters*>& perigeesToFit,
113  std::vector<Trk::ITrackLink*>& seedTracks) const;
114 
115  void removeAllFrom(std::vector<const Trk::TrackParameters*>& perigeesToFit,
116  std::vector<Trk::ITrackLink*>& seedTracks) const;
117 
118  double compatibility(const Trk::TrackParameters& measPerigee,
119  const xAOD::Vertex& vertex) const;
120 
121  static void countTracksAndNdf(xAOD::Vertex* myxAODVertex,
122  double& ndf,
123  int& ntracks) ;
124 
125  ToolHandle<Trk::IVertexFitter> m_iVertexFitter{ this,
126  "VertexFitterTool",
127  "Trk::AdaptiveVertexFitter" };
128  ToolHandle<InDet::IInDetTrackSelectionTool> m_trkFilter{
129  this,
130  "TrackSelector",
131  "InDet::InDetTrackSelection"
132  };
133 
134  ToolHandle<Trk::IVertexSeedFinder> m_SeedFinder{ this,
135  "SeedFinder",
136  "Trk::ZScanSeedFinder" };
137  ToolHandle<Trk::IImpactPoint3dEstimator> m_ImpactPoint3dEstimator{
138  this,
139  "ImpactPoint3dEstimator",
140  "Trk::ImpactPoint3dEstimator"
141  };
142 
143  ToolHandle<Trk::IVertexLinearizedTrackFactory> m_LinearizedTrackFactory{
144  this,
145  "LinearizedTrackFactory",
146  "Trk::FullLinearizedTrackFactory"
147  };
148 
150  this,
151  "BeamSpotKey",
152  "BeamSpotData",
153  "SG key for beam spot"
154  };
155 
156  BooleanProperty m_useBeamConstraint{this, "useBeamConstraint", false};
158  {this, "significanceCutSeeding", 10.};
160  {this, "maximumChi2cutForSeeding", 36.};
161  IntegerProperty m_maxVertices{this, "maxVertices", 25};
162 
163  BooleanProperty m_createSplitVertices{this, "createSplitVertices", false};
165  {this, "splitVerticesTrkInvFraction", 2, "inverse fraction to split tracks (1:N)"};
166 
168  {this, "reassignTracksAfterFirstFit", false};
169 
170  BooleanProperty m_doMaxTracksCut{this, "doMaxTracksCut", false};
171  UnsignedIntegerProperty m_maxTracks{this, "MaxTracks", 5000};
172 
176  void printParameterSettings();
177 
178 }; // end of class definitions
179 } // end of namespace definitions
180 #endif
181 
covarianceTool.ndf
ndf
Definition: covarianceTool.py:678
InDet::InDetIterativePriVxFinderTool::m_maxVertices
IntegerProperty m_maxVertices
Definition: InDetIterativePriVxFinderTool.h:161
IVertexSeedFinder.h
VertexContainerFwd.h
TrackParameters.h
IImpactPoint3dEstimator.h
InDet::InDetIterativePriVxFinderTool::countTracksAndNdf
static void countTracksAndNdf(xAOD::Vertex *myxAODVertex, double &ndf, int &ntracks)
Definition: InDetIterativePriVxFinderTool.cxx:894
InDet
Primary Vertex Finder.
Definition: VP1ErrorUtils.h:36
InDet::InDetIterativePriVxFinderTool::m_beamSpotKey
SG::ReadCondHandleKey< InDet::BeamSpotData > m_beamSpotKey
Definition: InDetIterativePriVxFinderTool.h:149
InDet::InDetIterativePriVxFinderTool::m_significanceCutSeeding
DoubleProperty m_significanceCutSeeding
Definition: InDetIterativePriVxFinderTool.h:158
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:809
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:854
IVertexFinder.h
InDet::InDetIterativePriVxFinderTool::m_createSplitVertices
BooleanProperty m_createSplitVertices
Definition: InDetIterativePriVxFinderTool.h:163
python.utils.AtlRunQueryDQUtils.p
p
Definition: AtlRunQueryDQUtils.py:209
InDet::InDetIterativePriVxFinderTool::m_doMaxTracksCut
BooleanProperty m_doMaxTracksCut
Definition: InDetIterativePriVxFinderTool.h:170
InDet::InDetIterativePriVxFinderTool::m_reassignTracksAfterFirstFit
BooleanProperty m_reassignTracksAfterFirstFit
Definition: InDetIterativePriVxFinderTool.h:168
beamspotman.n
n
Definition: beamspotman.py:729
InDet::InDetIterativePriVxFinderTool::m_LinearizedTrackFactory
ToolHandle< Trk::IVertexLinearizedTrackFactory > m_LinearizedTrackFactory
Definition: InDetIterativePriVxFinderTool.h:143
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:160
AthAlgTool.h
TrackCollection.h
InDet::InDetIterativePriVxFinderTool::printParameterSettings
void printParameterSettings()
Internal method to print the parameters setting.
Definition: InDetIterativePriVxFinderTool.cxx:815
InDet::InDetIterativePriVxFinderTool::m_iVertexFitter
ToolHandle< Trk::IVertexFitter > m_iVertexFitter
Definition: InDetIterativePriVxFinderTool.h:125
Trk::ParametersBase
Definition: ParametersBase.h:55
DataVector< Trk::Track >
IInDetTrackSelectionTool.h
columnar::final
CM final
Definition: ColumnAccessor.h:106
ReadCondHandleKey.h
InDet::InDetIterativePriVxFinderTool::m_useBeamConstraint
BooleanProperty m_useBeamConstraint
Definition: InDetIterativePriVxFinderTool.h:156
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:920
IVertexFitter.h
VertexFwd.h
SG::ReadCondHandleKey< InDet::BeamSpotData >
InDet::InDetIterativePriVxFinderTool::m_ImpactPoint3dEstimator
ToolHandle< Trk::IImpactPoint3dEstimator > m_ImpactPoint3dEstimator
Definition: InDetIterativePriVxFinderTool.h:137
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:134
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:171
InDet::InDetIterativePriVxFinderTool::findVertex
virtual std::pair< xAOD::VertexContainer *, xAOD::VertexAuxContainer * > findVertex(const EventContext &ctx, const TrackCollection *trackTES) const override
Finding method for Trk::Track collection.
Definition: InDetIterativePriVxFinderTool.cxx:130
InDet::InDetIterativePriVxFinderTool::compatibility
double compatibility(const Trk::TrackParameters &measPerigee, const xAOD::Vertex &vertex) const
Definition: InDetIterativePriVxFinderTool.cxx:824
TrackParticleContainerFwd.h
InDet::InDetIterativePriVxFinderTool::~InDetIterativePriVxFinderTool
virtual ~InDetIterativePriVxFinderTool()
Destructor.
InDet::InDetIterativePriVxFinderTool::m_trkFilter
ToolHandle< InDet::IInDetTrackSelectionTool > m_trkFilter
Definition: InDetIterativePriVxFinderTool.h:128
InDet::InDetIterativePriVxFinderTool::m_splitVerticesTrkInvFraction
IntegerProperty m_splitVerticesTrkInvFraction
Definition: InDetIterativePriVxFinderTool.h:165