ATLAS Offline Software
InDetAdaptiveMultiSecVtxFinderTool.h
Go to the documentation of this file.
1 /*
2  Copyright (C) 2019-2023 CERN for the benefit of the ATLAS collaboration
3 */
4 // Author: Neza Ribaric <neza.ribaric@cern.ch>
5 
6 /***************************************************************************
7  InDetAdaptiveMultiSecVtxFinderTool.cxx - Description
8  -------------------
9  begin : 01-12-2022
10  authors : Neza Ribaric ( Lancaster University )
11  information : Tool for Secondary Vertex Finding using AdaptiveMultivertexFitter and InDetTrackSelection
12  ***************************************************************************
13 
14  *
15  * This class provides an implementation for a secondary
16  * vertex finding tool, which uses the Adaptive Multi Vertex
17  * Fitter to find and fit multiple secondary vertices.
18  *
19  ***************************************************************************/
20 
23 #include "GaudiKernel/ServiceHandle.h"
24 #include "GaudiKernel/ToolHandle.h"
29 #include "TrkParticleBase/TrackParticleBaseCollection.h" // type def ...
30 #include "TrkTrack/TrackCollection.h" // type def ...
37 #include "xAODTracking/VertexFwd.h"
38 
39 namespace Trk {
40 
41  class Track;
42  class TrackParticleBase;
43  class ITrackLink;
44  class IVertexSeedFinder;
45  class IImpactPoint3dEstimator;
46  class IVertexLinearizedTrackFactory;
47 } // namespace Trk
48 //
49 //
50 namespace InDet {
51  class IInDetTrackSelectionTool;
52 
54  : public extends<AthAlgTool, IAdaptiveMultiSecVertexFinder> // mutable variables are used without protection.
55  {
56  public:
60  using extends::extends;
61 
62  InDetAdaptiveMultiSecVtxFinderTool(const std::string& t, const std::string& n, const IInterface* p);
63 
69 
70  StatusCode initialize() override;
71  StatusCode finalize() override;
72 
73  std::pair<xAOD::VertexContainer*, xAOD::VertexAuxContainer*> findVertex(
74  const xAOD::TrackParticleContainer* trackParticles) override;
75 
76  void setPrimaryVertexPosition(double, double, double) override;
77 
78  private:
79  std::pair<xAOD::VertexContainer*, xAOD::VertexAuxContainer*> doVertexing(const std::vector<Trk::ITrackLink*>& trackVector);
80  float findCompatibleTracks(Amg::Vector3D& seedVertex, Trk::ITrackLink* trkIter) const;
81  void countTracksAndNdf(xAOD::Vertex* myxAODVertex, float& ndf, int& ntracks) const;
82  bool checkFit(xAOD::Vertex* actualCandidate) const;
83  int removeTracksFromSeeds(xAOD::Vertex* actualCandidate, std::vector<Trk::ITrackLink*>& seedTracks) const;
84  void removeClosestTrack(Amg::Vector3D& seedVertex, std::vector<Trk::ITrackLink*>& seedTracks, int& nFound) const;
85 
86  bool V0check(const std::vector<Amg::Vector3D>& momenta, const Amg::Vector3D& posi) const;
87  const std::vector<Amg::Vector3D> getVertexMomenta(xAOD::Vertex* myxAODVertex) const;
88 
89 
90  ToolHandle<Trk::AdaptiveMultiVertexFitter> m_VertexFitter{this, "VertexFitterTool", "Trk::AdaptiveMultiVertexFitter", "Multi Vertex Fitter"};
91  ToolHandle<InDet::IInDetTrackSelectionTool> m_trkFilter{this, "BaseTrackSelector", "InDet::DetailedTrackSelectToolRelax", "Base track selection tool"};
92  ToolHandle<InDet::IInDetTrackSelectionTool> m_SVtrkFilter{this, "SecVtxTrackSelector", "InDet::SecVtxTrackSelector", "SV track selection tool"};
93 
94  ToolHandle<Trk::IVertexSeedFinder> m_SeedFinder{this, "SeedFinder", "Trk::IndexedCrossDistancesSeedFinder", "Seed finder"};
95  ToolHandle<Trk::IImpactPoint3dEstimator> m_ImpactPoint3dEstimator{this, "ImpactPoint3dEstimator", "Trk::ImpactPoint3dEstimator", "Impact point estimator"};
96 
97  // declareInterface<IAdaptiveMultiSecVertexFinder>(this);
98  FloatProperty m_privtxRef{this, "MomentumProjectionOnDirection", -999999.9, "pri vtx ref"};
99  DoubleProperty m_significanceCutSeeding{this, "significanceCutSeeding", 10, "significanceCutSeeding"};
100  DoubleProperty m_minWghtAtVtx{this, "minTrackWeightAtVtx", 0., "minTrackWeightAtVtx"};
101  DoubleProperty m_maxIterations{this, "maxVertices", 25, "max iterations"};
103 
104  }; // end of class definitions
105 } // namespace InDet
covarianceTool.ndf
ndf
Definition: covarianceTool.py:678
IVertexSeedFinder.h
TrackParticleBaseCollection.h
python.tests.PyTestsLib.finalize
def finalize(self)
_info( "content of StoreGate..." ) self.sg.dump()
Definition: PyTestsLib.py:50
VertexContainerFwd.h
InDet::InDetAdaptiveMultiSecVtxFinderTool
Definition: InDetAdaptiveMultiSecVtxFinderTool.h:55
TrackParameters.h
ATLAS_NOT_THREAD_SAFE
#define ATLAS_NOT_THREAD_SAFE
getNoisyStrip() Find noisy strips from hitmaps and write out into xml/db formats
Definition: checker_macros.h:212
IImpactPoint3dEstimator.h
IInDetAdaptiveMultiSecVtxFinderTool.h
InDet
Primary Vertex Finder.
Definition: VP1ErrorUtils.h:36
initialize
void initialize()
Definition: run_EoverP.cxx:894
AdaptiveMultiVertexFitter.h
read_hist_ntuple.t
t
Definition: read_hist_ntuple.py:5
IVertexFinder.h
python.utils.AtlRunQueryDQUtils.p
p
Definition: AtlRunQueryDQUtils.py:210
beamspotman.n
n
Definition: beamspotman.py:731
EL::StatusCode
::StatusCode StatusCode
StatusCode definition for legacy code.
Definition: PhysicsAnalysis/D3PDTools/EventLoop/EventLoop/StatusCode.h:22
AthAlgTool.h
TrackCollection.h
InDet::InDetAdaptiveMultiSecVtxFinderTool::m_privtx
Amg::Vector3D m_privtx
Definition: InDetAdaptiveMultiSecVtxFinderTool.h:102
DataVector
Derived DataVector<T>.
Definition: DataVector.h:581
IInDetTrackSelectionTool.h
Trk
Ensure that the ATLAS eigen extensions are properly loaded.
Definition: FakeTrackBuilder.h:9
InDet::InDetAdaptiveMultiSecVtxFinderTool::~InDetAdaptiveMultiSecVtxFinderTool
virtual ~InDetAdaptiveMultiSecVtxFinderTool()=default
Destructor.
Amg::Vector3D
Eigen::Matrix< double, 3, 1 > Vector3D
Definition: GeoPrimitives.h:47
VertexFwd.h
xAOD::Vertex_v1
Class describing a Vertex.
Definition: Vertex_v1.h:42
TrackParticleFwd.h
Track
Definition: TriggerChamberClusterOnTrackCreator.h:21
checker_macros.h
Define macros for attributes used to control the static checker.
TrackParticleContainerFwd.h