ATLAS Offline Software
InDetIterativePriVxFinderTool.h
Go to the documentation of this file.
1 /*
2  Copyright (C) 2002-2022 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 
161 
164 
167 
169  unsigned int m_maxTracks;
170 
171  void SGError(const std::string& errService);
172 
177  virtual void printParameterSettings();
178 
179 }; // end of class definitions
180 } // end of namespace definitions
181 #endif
182 
covarianceTool.ndf
ndf
Definition: covarianceTool.py:678
IVertexSeedFinder.h
InDet::InDetIterativePriVxFinderTool::m_maxVertices
double m_maxVertices
Definition: InDetIterativePriVxFinderTool.h:160
VertexContainerFwd.h
python.PerfMonSerializer.p
def p
Definition: PerfMonSerializer.py:743
InDet::InDetIterativePriVxFinderTool::m_splitVerticesTrkInvFraction
int m_splitVerticesTrkInvFraction
Integer: 1.
Definition: InDetIterativePriVxFinderTool.h:163
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::m_useBeamConstraint
bool m_useBeamConstraint
Definition: InDetIterativePriVxFinderTool.h:157
InDet::InDetIterativePriVxFinderTool::countTracksAndNdf
static void countTracksAndNdf(xAOD::Vertex *myxAODVertex, double &ndf, int &ntracks)
Definition: InDetIterativePriVxFinderTool.cxx:920
InDet
DUMMY Primary Vertex Finder.
Definition: VP1ErrorUtils.h:36
InDet::InDetIterativePriVxFinderTool::m_reassignTracksAfterFirstFit
bool m_reassignTracksAfterFirstFit
Definition: InDetIterativePriVxFinderTool.h:166
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:844
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:830
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:880
IVertexFinder.h
InDet::InDetIterativePriVxFinderTool::m_createSplitVertices
bool m_createSplitVertices
Definition: InDetIterativePriVxFinderTool.h:162
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
AthAlgTool.h
TrackCollection.h
InDet::InDetIterativePriVxFinderTool::printParameterSettings
virtual void printParameterSettings()
Internal method to print the parameters setting.
Definition: InDetIterativePriVxFinderTool.cxx:836
InDet::InDetIterativePriVxFinderTool::m_iVertexFitter
ToolHandle< Trk::IVertexFitter > m_iVertexFitter
Definition: InDetIterativePriVxFinderTool.h:126
Trk::ParametersBase
Definition: ParametersBase.h:55
DataVector< Trk::Track >
IInDetTrackSelectionTool.h
InDet::InDetIterativePriVxFinderTool::m_significanceCutSeeding
double m_significanceCutSeeding
Definition: InDetIterativePriVxFinderTool.h:158
ReadCondHandleKey.h
Trk
Ensure that the ATLAS eigen extensions are properly loaded.
Definition: FakeTrackBuilder.h:9
InDet::InDetIterativePriVxFinderTool::m_maxTracks
unsigned int m_maxTracks
Definition: InDetIterativePriVxFinderTool.h:169
InDet::InDetIterativePriVxFinderTool::m_maximumChi2cutForSeeding
double m_maximumChi2cutForSeeding
Definition: InDetIterativePriVxFinderTool.h:159
InDet::InDetIterativePriVxFinderTool::m_doMaxTracksCut
bool m_doMaxTracksCut
Definition: InDetIterativePriVxFinderTool.h:168
InDet::InDetIterativePriVxFinderTool::removeCompatibleTracks
void removeCompatibleTracks(xAOD::Vertex *myxAODVertex, std::vector< const Trk::TrackParameters * > &perigeesToFit, std::vector< Trk::ITrackLink * > &seedTracks) const
Definition: InDetIterativePriVxFinderTool.cxx:946
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:90
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::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:150
InDet::InDetIterativePriVxFinderTool::compatibility
double compatibility(const Trk::TrackParameters &measPerigee, const xAOD::Vertex &vertex) const
Definition: InDetIterativePriVxFinderTool.cxx:850
TrackParticleContainerFwd.h
InDet::InDetIterativePriVxFinderTool::~InDetIterativePriVxFinderTool
virtual ~InDetIterativePriVxFinderTool()
Destructor.
InDet::InDetIterativePriVxFinderTool::m_trkFilter
ToolHandle< InDet::IInDetTrackSelectionTool > m_trkFilter
Definition: InDetIterativePriVxFinderTool.h:129