ATLAS Offline Software
Loading...
Searching...
No Matches
TwoTrackVrtBDTSelector.h
Go to the documentation of this file.
1/*
2 Copyright (C) 2002-2025 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 StatusCode initialize();
46 StatusCode finalize();
47
48 bool isgood( const std::pair<const xAOD::TrackParticle*,const xAOD::TrackParticle*> tracks,
49 const xAOD::Vertex & candV,
50 std::pair<ROOT::Math::XYZTVector,ROOT::Math::XYZTVector> moms,
51 const xAOD::Vertex & tPV) const final;
52 bool isgood( const std::pair<const xAOD::TrackParticle*,const xAOD::TrackParticle*> tracks,
53 const xAOD::Vertex & candV,
54 std::pair<ROOT::Math::XYZTVector,ROOT::Math::XYZTVector> moms,
55 const xAOD::Vertex & tPV,
56 float & quality) const final;
57
58//------------------------------------------------------------------------------------------------------------------
59// Private data and functions
60//
61 private:
62
63 //-- 2-track vertex acceptance and cleaning cuts
64 Gaudi::Property<float> m_vrt2TrMassLimit{this,"Vrt2TrMassLimit",4000., "Maximal allowed mass for 2-track vertices" };
65 Gaudi::Property<float> m_vrt2TrPtMin{this, "Vrt2TrPtMin", 1000., "Minimal allowed Pt for 2-track vertices." };
66 Gaudi::Property<float> m_vrt2TrPtMax{this, "Vrt2TrPtMax", 5.e5, "Maximal allowed Pt for 2-track vertices. Calibration limit" };
67 Gaudi::Property<float> m_sel2VrtProbCut{this, "Sel2VrtProbCut", 0.02, "Cut on probability of 2-track vertex for initial selection" };
68 Gaudi::Property<float> m_maxSVRadiusCut{this, "MaxSVRadiusCut", 140., "Cut on maximal radius of SV (def = Pixel detector size)" };
69 Gaudi::Property<float> m_cosSVPVCut{this, "cosSVPVCut", 0., "Cut on cos of angle between SV-PV and full vertex momentum" };
70 //
71 //-- Pixel geometry based 2-track vertex cleaning cuts
72 Gaudi::Property<bool> m_do2TrkIBLChecks {this, "do2TrkIBLChecks", true, "IBL and B-layer hit requrirements based on the position of 2-track DV." };
73 Gaudi::Property<bool> m_useVertexCleaning{this, "useVertexCleaning", true, "Clean vertices by requiring pixel hit presence according to vertex position" };
74 Gaudi::Property<float> m_firstPixelLayerR{this, "FirstPixelLayerR", 32.0,"Radius of the first Pixel layer" };
75 //
76 //--- BDT weight for 2-track vertex selection
77 Gaudi::Property<float> m_v2tBDTCut{this, "v2tBDTCut", -0.5, "BDT cut to select 2-track vertices" };
78 Gaudi::Property<std::string> m_calibFileName{this, "CalibFileName", "Fake2TrVertexReject.MVA.v02.root", " MVA calibration file for 2-track fake vertices removal" };
79
80 std::unique_ptr<MVAUtils::BDT> m_SV2T_BDT;
81
82 ToolHandle<Trk::TrkVKalVrtFitter> m_fitSvc{this, "VertexFitterTool", "Trk::TrkVKalVrtFitter/VertexFitterTool", "Vertex Fitter tool for 2-track selector"};
83
84 static double vrtRadiusError(const Amg::Vector3D & secVrt, const std::vector<float> & vrtErr);
85 static int getIBLHit(const xAOD::TrackParticle* Part);
86 static int getBLHit(const xAOD::TrackParticle* Part);
87
88 double m_massPi{};
89 double m_massP{};
90 double m_massE{};
91 std::string m_instanceName{};
92
93//=====================
94 };
95
96} //end namespace
97
98#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
static int getIBLHit(const xAOD::TrackParticle *Part)
Gaudi::Property< float > m_cosSVPVCut
Gaudi::Property< float > m_vrt2TrPtMin
Gaudi::Property< bool > m_do2TrkIBLChecks
Gaudi::Property< std::string > m_calibFileName
bool isgood(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 final
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.