ATLAS Offline Software
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 
28 namespace Trk{ class TrkVKalVrtFitter; }
29 
30 namespace MVAUtils{ class BDT; }
31 
32 
33 //------------------------------------------------------------------------
34 namespace Rec{
35 
37  {
38 
39  public:
40  /* Constructor */
41  TwoTrackVrtBDTSelector(const std::string& type, const std::string& name, const IInterface* parent);
42  /* Destructor */
43  virtual ~TwoTrackVrtBDTSelector();
44 
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
Rec::TwoTrackVrtBDTSelector::m_useVertexCleaning
Gaudi::Property< bool > m_useVertexCleaning
Definition: TwoTrackVrtBDTSelector.h:73
Rec::TwoTrackVrtBDTSelector::finalize
StatusCode finalize()
Definition: TwoTrackVrtBDTSelector.cxx:70
Rec::TwoTrackVrtBDTSelector::m_massP
double m_massP
Definition: TwoTrackVrtBDTSelector.h:89
Rec::TwoTrackVrtBDTSelector::isgood
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
Definition: TwoTrackVrtBDTSelector.cxx:77
ITwoTrackVertexSelector.h
MVAUtils
Definition: InDetTrkInJetType.h:48
Rec::TwoTrackVrtBDTSelector::m_cosSVPVCut
Gaudi::Property< float > m_cosSVPVCut
Definition: TwoTrackVrtBDTSelector.h:69
Rec::TwoTrackVrtBDTSelector::m_calibFileName
Gaudi::Property< std::string > m_calibFileName
Definition: TwoTrackVrtBDTSelector.h:78
Rec::TwoTrackVrtBDTSelector::m_vrt2TrPtMin
Gaudi::Property< float > m_vrt2TrPtMin
Definition: TwoTrackVrtBDTSelector.h:65
Rec::TwoTrackVrtBDTSelector::m_fitSvc
ToolHandle< Trk::TrkVKalVrtFitter > m_fitSvc
Definition: TwoTrackVrtBDTSelector.h:82
Rec::TwoTrackVrtBDTSelector::m_sel2VrtProbCut
Gaudi::Property< float > m_sel2VrtProbCut
Definition: TwoTrackVrtBDTSelector.h:67
Rec::TwoTrackVrtBDTSelector::m_maxSVRadiusCut
Gaudi::Property< float > m_maxSVRadiusCut
Definition: TwoTrackVrtBDTSelector.h:68
Rec::ITwoTrackVertexSelector
Definition: ITwoTrackVertexSelector.h:33
Rec::TwoTrackVrtBDTSelector::initialize
StatusCode initialize()
Definition: TwoTrackVrtBDTSelector.cxx:49
Rec::TwoTrackVrtBDTSelector
Definition: TwoTrackVrtBDTSelector.h:37
Rec::TwoTrackVrtBDTSelector::m_SV2T_BDT
std::unique_ptr< MVAUtils::BDT > m_SV2T_BDT
Definition: TwoTrackVrtBDTSelector.h:80
python.CaloAddPedShiftConfig.type
type
Definition: CaloAddPedShiftConfig.py:42
TrkVKalVrtFitter.h
Rec::TwoTrackVrtBDTSelector::m_instanceName
std::string m_instanceName
Definition: TwoTrackVrtBDTSelector.h:91
Rec::TwoTrackVrtBDTSelector::m_firstPixelLayerR
Gaudi::Property< float > m_firstPixelLayerR
Definition: TwoTrackVrtBDTSelector.h:74
Rec::TwoTrackVrtBDTSelector::~TwoTrackVrtBDTSelector
virtual ~TwoTrackVrtBDTSelector()
Definition: TwoTrackVrtBDTSelector.cxx:44
Rec
Name: MuonSpContainer.h Package : offline/Reconstruction/MuonIdentification/muonEvent.
Definition: FakeTrackBuilder.h:10
EL::StatusCode
::StatusCode StatusCode
StatusCode definition for legacy code.
Definition: PhysicsAnalysis/D3PDTools/EventLoop/EventLoop/StatusCode.h:22
AthAlgTool.h
test_pyathena.parent
parent
Definition: test_pyathena.py:15
Trk
Ensure that the ATLAS eigen extensions are properly loaded.
Definition: FakeTrackBuilder.h:9
Rec::TwoTrackVrtBDTSelector::m_vrt2TrPtMax
Gaudi::Property< float > m_vrt2TrPtMax
Definition: TwoTrackVrtBDTSelector.h:66
name
std::string name
Definition: Control/AthContainers/Root/debug.cxx:240
Rec::TwoTrackVrtBDTSelector::m_do2TrkIBLChecks
Gaudi::Property< bool > m_do2TrkIBLChecks
Definition: TwoTrackVrtBDTSelector.h:72
Amg::Vector3D
Eigen::Matrix< double, 3, 1 > Vector3D
Definition: GeoPrimitives.h:47
Rec::TwoTrackVrtBDTSelector::m_massPi
double m_massPi
Definition: TwoTrackVrtBDTSelector.h:88
Rec::TwoTrackVrtBDTSelector::vrtRadiusError
static double vrtRadiusError(const Amg::Vector3D &secVrt, const std::vector< float > &vrtErr)
Definition: TwoTrackVrtBDTSelector.cxx:161
Rec::TwoTrackVrtBDTSelector::m_massE
double m_massE
Definition: TwoTrackVrtBDTSelector.h:90
Rec::TwoTrackVrtBDTSelector::TwoTrackVrtBDTSelector
TwoTrackVrtBDTSelector(const std::string &type, const std::string &name, const IInterface *parent)
Definition: TwoTrackVrtBDTSelector.cxx:26
xAOD::Vertex_v1
Class describing a Vertex.
Definition: Vertex_v1.h:42
python.TrackLeptonConfig.quality
quality
Definition: TrackLeptonConfig.py:16
Rec::TwoTrackVrtBDTSelector::m_v2tBDTCut
Gaudi::Property< float > m_v2tBDTCut
Definition: TwoTrackVrtBDTSelector.h:77
DetType::Part
Part
Definition: DetType.h:14
Rec::TwoTrackVrtBDTSelector::m_vrt2TrMassLimit
Gaudi::Property< float > m_vrt2TrMassLimit
Definition: TwoTrackVrtBDTSelector.h:64
xAOD::TrackParticle_v1
Class describing a TrackParticle.
Definition: TrackParticle_v1.h:43
Rec::TwoTrackVrtBDTSelector::getBLHit
static int getBLHit(const xAOD::TrackParticle *Part)
Definition: TwoTrackVrtBDTSelector.cxx:183
AthAlgTool
Definition: AthAlgTool.h:26
Rec::TwoTrackVrtBDTSelector::getIBLHit
static int getIBLHit(const xAOD::TrackParticle *Part)
Definition: TwoTrackVrtBDTSelector.cxx:174
xAOD::DiTauJetParameters::BDT
@ BDT
Definition: DiTauDefs.h:44