ATLAS Offline Software
Loading...
Searching...
No Matches
TwoTrackVrtBDTSelector.h
Go to the documentation of this file.
1/*
2 Copyright (C) 2002-2026 CERN for the benefit of the ATLAS collaboration
3*/
4
5//
6// TwoTrackVrtBDTSelector.h - Description
7//
8/*
9 Tool for selection of good two track vertex for inclusive secondary vertex reconstruction
10
11 Author: Vadim Kostyukhin
12 e-mail: vadim.kostyukhin@cern.ch
13-----------------------------------------------------------------------------*/
14
15#ifndef _VKalVrt_TwoTrackVrtBDTSelector_H
16#define _VKalVrt_TwoTrackVrtBDTSelector_H
17// Normal STL and physical vectors
18#include <vector>
19// Gaudi includes
21#include "GaudiKernel/ToolHandle.h"
22#include "GaudiKernel/ServiceHandle.h"
23//
26
27
28namespace Trk{ class TrkVKalVrtFitter; }
29
30namespace MVAUtils{ class BDT; }
31
32
33//------------------------------------------------------------------------
34namespace Rec{
35
37 {
38
39 public:
40 /* Constructor */
41 TwoTrackVrtBDTSelector(const std::string& type, const std::string& name, const IInterface* parent);
42 /* Destructor */
44
45 virtual StatusCode initialize() override;
46 virtual StatusCode finalize() override;
47
48 virtual bool isgood( const EventContext& ctx,
49 const std::pair<const xAOD::TrackParticle*,const xAOD::TrackParticle*> tracks,
50 const xAOD::Vertex & candV,
51 std::pair<ROOT::Math::XYZTVector,ROOT::Math::XYZTVector> moms,
52 const xAOD::Vertex & tPV) const override final;
53 virtual bool isgood( const EventContext& ctx,
54 const std::pair<const xAOD::TrackParticle*,const xAOD::TrackParticle*> tracks,
55 const xAOD::Vertex & candV,
56 std::pair<ROOT::Math::XYZTVector,ROOT::Math::XYZTVector> moms,
57 const xAOD::Vertex & tPV,
58 float & quality) const override final;
59
60//------------------------------------------------------------------------------------------------------------------
61// Private data and functions
62//
63 private:
64
65 //-- 2-track vertex acceptance and cleaning cuts
66 Gaudi::Property<float> m_vrt2TrMassLimit{this,"Vrt2TrMassLimit",4000., "Maximal allowed mass for 2-track vertices" };
67 Gaudi::Property<float> m_vrt2TrPtMin{this, "Vrt2TrPtMin", 1000., "Minimal allowed Pt for 2-track vertices." };
68 Gaudi::Property<float> m_vrt2TrPtMax{this, "Vrt2TrPtMax", 5.e5, "Maximal allowed Pt for 2-track vertices. Calibration limit" };
69 Gaudi::Property<float> m_sel2VrtProbCut{this, "Sel2VrtProbCut", 0.02, "Cut on probability of 2-track vertex for initial selection" };
70 Gaudi::Property<float> m_maxSVRadiusCut{this, "MaxSVRadiusCut", 140., "Cut on maximal radius of SV (def = Pixel detector size)" };
71 Gaudi::Property<float> m_cosSVPVCut{this, "cosSVPVCut", 0., "Cut on cos of angle between SV-PV and full vertex momentum" };
72 //
73 //-- Pixel geometry based 2-track vertex cleaning cuts
74 Gaudi::Property<bool> m_do2TrkIBLChecks {this, "do2TrkIBLChecks", true, "IBL and B-layer hit requrirements based on the position of 2-track DV." };
75 Gaudi::Property<bool> m_useVertexCleaning{this, "useVertexCleaning", true, "Clean vertices by requiring pixel hit presence according to vertex position" };
76 Gaudi::Property<float> m_firstPixelLayerR{this, "FirstPixelLayerR", 32.0,"Radius of the first Pixel layer" };
77 //
78 //--- BDT weight for 2-track vertex selection
79 Gaudi::Property<float> m_v2tBDTCut{this, "v2tBDTCut", -0.5, "BDT cut to select 2-track vertices" };
80 Gaudi::Property<std::string> m_calibFileName{this, "CalibFileName", "Fake2TrVertexReject.MVA.v02.root", " MVA calibration file for 2-track fake vertices removal" };
81
82 std::unique_ptr<MVAUtils::BDT> m_SV2T_BDT;
83
84 ToolHandle<Trk::TrkVKalVrtFitter> m_fitSvc{this, "VertexFitterTool", "Trk::TrkVKalVrtFitter/VertexFitterTool", "Vertex Fitter tool for 2-track selector"};
85
86 static double vrtRadiusError(const Amg::Vector3D & secVrt, const std::vector<float> & vrtErr);
87 static int getIBLHit(const xAOD::TrackParticle* Part);
88 static int getBLHit(const xAOD::TrackParticle* Part);
89
90 double m_massPi{};
91 double m_massP{};
92 double m_massE{};
93 std::string m_instanceName{};
94
95//=====================
96 };
97
98} //end namespace
99
100#endif
AthAlgTool(const std::string &type, const std::string &name, const IInterface *parent)
Constructor with parameters:
Simplified Boosted Regression Tree, support TMVA, lgbm, and xgboost.
Gaudi::Property< bool > m_useVertexCleaning
Gaudi::Property< float > m_vrt2TrMassLimit
Gaudi::Property< float > m_maxSVRadiusCut
ToolHandle< Trk::TrkVKalVrtFitter > m_fitSvc
std::unique_ptr< MVAUtils::BDT > m_SV2T_BDT
virtual StatusCode initialize() override
static int getIBLHit(const xAOD::TrackParticle *Part)
virtual bool isgood(const EventContext &ctx, const std::pair< const xAOD::TrackParticle *, const xAOD::TrackParticle * > tracks, const xAOD::Vertex &candV, std::pair< ROOT::Math::XYZTVector, ROOT::Math::XYZTVector > moms, const xAOD::Vertex &tPV) const override final
virtual StatusCode finalize() override
Gaudi::Property< float > m_cosSVPVCut
Gaudi::Property< float > m_vrt2TrPtMin
Gaudi::Property< bool > m_do2TrkIBLChecks
Gaudi::Property< std::string > m_calibFileName
static int getBLHit(const xAOD::TrackParticle *Part)
Gaudi::Property< float > m_firstPixelLayerR
Gaudi::Property< float > m_sel2VrtProbCut
Gaudi::Property< float > m_vrt2TrPtMax
static double vrtRadiusError(const Amg::Vector3D &secVrt, const std::vector< float > &vrtErr)
TwoTrackVrtBDTSelector(const std::string &type, const std::string &name, const IInterface *parent)
Gaudi::Property< float > m_v2tBDTCut
Eigen::Matrix< double, 3, 1 > Vector3D
Gaudi Tools.
Ensure that the ATLAS eigen extensions are properly loaded.
TrackParticle_v1 TrackParticle
Reference the current persistent version:
Vertex_v1 Vertex
Define the latest version of the vertex class.