ATLAS Offline Software
InDetConversionTrackSelectorTool.h
Go to the documentation of this file.
1 /*
2  Copyright (C) 2002-2024 CERN for the benefit of the ATLAS collaboration
3 */
4 
5 #ifndef InDetTrackSelectorTool_InDetConversionTrackSelectorTool_H
6 #define InDetTrackSelectorTool_InDetConversionTrackSelectorTool_H
7 
12 #include "GaudiKernel/EventContext.h"
13 #include "GaudiKernel/ToolHandle.h"
24 namespace Trk {
25 class Vertex;
26 class Track;
27 class TrackParticleBase;
28 }
29 
30 namespace InDet {
31 
33  : virtual public Trk::ITrackSelectorTool
34  , public AthAlgTool
35 {
36 
37 public:
38  virtual StatusCode initialize() override;
39 
40  InDetConversionTrackSelectorTool(const std::string& t,
41  const std::string& n,
42  const IInterface* p);
43 
45 
47  virtual bool decision(const Trk::Track& track,
48  const Trk::Vertex* vertex) const override final;
49 
51  virtual bool decision(const Trk::TrackParticleBase& track,
52  const Trk::Vertex* vertex) const override final;
53 
54  virtual bool decision(const xAOD::TrackParticle&,
55  const xAOD::Vertex*) const override final;
56 
57 private:
59  {
60  uint8_t val;
61  if (!tp.summaryValue(val, type))
62  return 0;
63  return val > 0 ? val : 0;
64  }
65 
66  // Get Eta bin for eta-dependent TRT-track cuts
67  unsigned int getEtaBin(const Trk::Perigee& perigee) const;
68 
69  Amg::Vector3D getPosOrBeamSpot(const EventContext& ctx,
70  const xAOD::Vertex*) const;
71 
72  ToolHandle<Trk::IExtrapolator> m_extrapolator{ this,
73  "Extrapolator",
74  "",
75  "Extrapolator Tool" };
77  this,
78  "BeamSpotKey",
79  "BeamSpotData",
80  "SG key for beam spot"
81  };
82  SG::ReadHandleKey<xAOD::EventInfo> m_eventInfo_key{this, "EventInfo", "EventInfo", "Input event information"};
83  Gaudi::Property<bool> m_useEventInfoBs{this,"UseEventInfoBS",false};
84  Trk::Vertex* getBeamSpot(const EventContext& ctx) const;
86  DoubleProperty m_maxSiD0
87  {this, "maxSiD0", 35., "Maximal d0 at (0,0,0) for tracks with Si hits"};
88  DoubleProperty m_maxTrtD0
89  {this, "maxTrtD0", 100., "Maximal d0 at (0,0,0) for standalone TRT tracks"};
90  DoubleProperty m_maxSiZ0{this, "maxSiZ0", 200., "Maximal z0 at (0,0,0)"};
91  DoubleProperty m_maxTrtZ0
92  {this, "maxTrtZ0", 1200., "Maximal z0 at (0,0,0) for standalone TRT tracks"};
93  DoubleProperty m_minPt{this, "minPt", 500., "Minimum Pt of tracks"};
94  DoubleProperty m_trRatio1
95  {this, "RatioCut1", 0.5, "TR ratio for tracks with 15 or less TRT hits"};
96  DoubleProperty m_trRatio2
97  {this, "RatioCut2", 0.1, "TR ratio for tracks with 16 to 25 TRT hits"};
98  DoubleProperty m_trRatio3
99  {this, "RatioCut3", 0.05, "TR ratio for tracks with 26 or more TRT hits"};
100  DoubleProperty m_trRatioTRT
101  {this, "RatioTRT", 0.1, "TR ratio for all TRT only tracks"};
102 
103  DoubleArrayProperty m_TRTTrksEtaBins
104  {this, "TRTTrksEtaBins",
105  {999., 999., 999., 999., 999., 999., 999., 999., 999., 999.},
106  "Eta bins (10 expected) for TRT-only track cuts"};
107  DoubleArrayProperty m_TRTTrksBinnedRatioTRT
108  {this, "TRTTrksBinnedRatioTRT", {0., 0., 0., 0., 0., 0., 0., 0., 0., 0.},
109  "Eta-binned eProbabilityHT for TRT-only track cuts"};
110 
111  DoubleProperty m_trRatioV0
112  {this, "RatioV0", 1., "TR ratio for pion selection during V0 reconstruction"};
113  DoubleProperty m_sD0_Si
114  {this, "significanceD0_Si", 2., "Cut on D0 significance of Si tracks"};
115  DoubleProperty m_sD0_Trt
116  {this, "significanceD0_Trt", 0.5, "Cut on D0 significance of TRT tracks"};
117  DoubleProperty m_sZ0_Trt
118  {this, "significanceZ0_Trt", 3., "Cut on Z0 significance of TRT tracks"};
119 
120  BooleanProperty m_isConv{this, "IsConversion", true, "Conversion flag"};
121  BooleanProperty m_PIDonlyForXe
122  {this, "PIDonlyForXe", false, "Only check TRT PID if all hits are Xe hits"};
123 
124 }; // end of class definitions
125 } // end of namespace definitions
126 
127 #endif
Trk::ITrackSelectorTool
The abstract interface base class for track selector tools.
Definition: ITrackSelectorTool.h:35
InDet::InDetConversionTrackSelectorTool::m_extrapolator
ToolHandle< Trk::IExtrapolator > m_extrapolator
Definition: InDetConversionTrackSelectorTool.h:72
Trk::Vertex
Definition: Tracking/TrkEvent/VxVertex/VxVertex/Vertex.h:26
InDet::InDetConversionTrackSelectorTool::m_minPt
DoubleProperty m_minPt
Definition: InDetConversionTrackSelectorTool.h:93
InDet::InDetConversionTrackSelectorTool::~InDetConversionTrackSelectorTool
virtual ~InDetConversionTrackSelectorTool()=default
xAOD::Vertex
Vertex_v1 Vertex
Define the latest version of the vertex class.
Definition: Event/xAOD/xAODTracking/xAODTracking/Vertex.h:16
xAOD::uint8_t
uint8_t
Definition: Muon_v1.cxx:557
Trk::Track
The ATLAS Track class.
Definition: Tracking/TrkEvent/TrkTrack/TrkTrack/Track.h:73
Trk::ParametersT
Dummy class used to allow special convertors to be called for surfaces owned by a detector element.
Definition: EMErrorDetail.h:25
InDet
Primary Vertex Finder.
Definition: VP1ErrorUtils.h:36
InDet::InDetConversionTrackSelectorTool::m_sD0_Trt
DoubleProperty m_sD0_Trt
Definition: InDetConversionTrackSelectorTool.h:116
ParticleTest.tp
tp
Definition: ParticleTest.py:25
IExtrapolator.h
read_hist_ntuple.t
t
Definition: read_hist_ntuple.py:5
SG::ReadHandleKey< xAOD::EventInfo >
InDet::InDetConversionTrackSelectorTool::m_trRatio1
DoubleProperty m_trRatio1
Definition: InDetConversionTrackSelectorTool.h:95
Trk::TrackParticleBase
Definition: TrackParticleBase.h:41
InDet::InDetConversionTrackSelectorTool::m_beamSpotKey
SG::ReadCondHandleKey< InDet::BeamSpotData > m_beamSpotKey
Definition: InDetConversionTrackSelectorTool.h:76
InDet::InDetConversionTrackSelectorTool::m_TRTTrksEtaBins
DoubleArrayProperty m_TRTTrksEtaBins
Definition: InDetConversionTrackSelectorTool.h:104
python.utils.AtlRunQueryDQUtils.p
p
Definition: AtlRunQueryDQUtils.py:210
xAOD::SummaryType
SummaryType
Enumerates the different types of information stored in Summary.
Definition: TrackingPrimitives.h:228
InDet::InDetConversionTrackSelectorTool::m_trRatioV0
DoubleProperty m_trRatioV0
Definition: InDetConversionTrackSelectorTool.h:112
InDet::InDetConversionTrackSelectorTool
Definition: InDetConversionTrackSelectorTool.h:35
InDet::InDetConversionTrackSelectorTool::m_TRTTrksBinnedRatioTRT
DoubleArrayProperty m_TRTTrksBinnedRatioTRT
Definition: InDetConversionTrackSelectorTool.h:108
InDet::InDetConversionTrackSelectorTool::m_eventInfo_key
SG::ReadHandleKey< xAOD::EventInfo > m_eventInfo_key
Definition: InDetConversionTrackSelectorTool.h:82
InDet::InDetConversionTrackSelectorTool::initialize
virtual StatusCode initialize() override
Definition: InDetConversionTrackSelectorTool.cxx:28
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
Trk
Ensure that the ATLAS eigen extensions are properly loaded.
Definition: FakeTrackBuilder.h:9
InDet::InDetConversionTrackSelectorTool::InDetConversionTrackSelectorTool
InDetConversionTrackSelectorTool(const std::string &t, const std::string &n, const IInterface *p)
Definition: InDetConversionTrackSelectorTool.cxx:21
Amg::Vector3D
Eigen::Matrix< double, 3, 1 > Vector3D
Definition: GeoPrimitives.h:47
InDet::InDetConversionTrackSelectorTool::m_sZ0_Trt
DoubleProperty m_sZ0_Trt
Definition: InDetConversionTrackSelectorTool.h:118
EventInfo.h
InDet::InDetConversionTrackSelectorTool::getPosOrBeamSpot
Amg::Vector3D getPosOrBeamSpot(const EventContext &ctx, const xAOD::Vertex *) const
Definition: InDetConversionTrackSelectorTool.cxx:314
InDet::InDetConversionTrackSelectorTool::m_maxTrtZ0
DoubleProperty m_maxTrtZ0
Definition: InDetConversionTrackSelectorTool.h:92
SG::ReadCondHandleKey< InDet::BeamSpotData >
TrackParticle.h
Trk::vertex
@ vertex
Definition: MeasurementType.h:21
InDet::InDetConversionTrackSelectorTool::getCount
int getCount(const xAOD::TrackParticle &tp, xAOD::SummaryType type) const
Definition: InDetConversionTrackSelectorTool.h:58
xAOD::Vertex_v1
Class describing a Vertex.
Definition: Vertex_v1.h:42
InDet::InDetConversionTrackSelectorTool::getEtaBin
unsigned int getEtaBin(const Trk::Perigee &perigee) const
Definition: InDetConversionTrackSelectorTool.cxx:62
InDet::InDetConversionTrackSelectorTool::m_maxTrtD0
DoubleProperty m_maxTrtD0
Definition: InDetConversionTrackSelectorTool.h:89
InDet::InDetConversionTrackSelectorTool::getBeamSpot
Trk::Vertex * getBeamSpot(const EventContext &ctx) const
Definition: InDetConversionTrackSelectorTool.cxx:37
InDet::InDetConversionTrackSelectorTool::decision
virtual bool decision(const Trk::Track &track, const Trk::Vertex *vertex) const override final
Select a Trk::Track
Definition: InDetConversionTrackSelectorTool.cxx:78
Pythia8_RapidityOrderMPI.val
val
Definition: Pythia8_RapidityOrderMPI.py:14
python.CaloScaleNoiseConfig.type
type
Definition: CaloScaleNoiseConfig.py:78
InDet::InDetConversionTrackSelectorTool::m_trRatio2
DoubleProperty m_trRatio2
Definition: InDetConversionTrackSelectorTool.h:97
InDet::InDetConversionTrackSelectorTool::m_maxSiZ0
DoubleProperty m_maxSiZ0
Definition: InDetConversionTrackSelectorTool.h:90
InDet::InDetConversionTrackSelectorTool::m_trRatioTRT
DoubleProperty m_trRatioTRT
Definition: InDetConversionTrackSelectorTool.h:101
Track
Definition: TriggerChamberClusterOnTrackCreator.h:21
BeamSpotData.h
InDet::InDetConversionTrackSelectorTool::m_isConv
BooleanProperty m_isConv
Definition: InDetConversionTrackSelectorTool.h:120
xAOD::track
@ track
Definition: TrackingPrimitives.h:512
xAOD::TrackParticle_v1
Class describing a TrackParticle.
Definition: TrackParticle_v1.h:43
AthAlgTool
Definition: AthAlgTool.h:26
ITrackSelectorTool.h
InDet::InDetConversionTrackSelectorTool::m_PIDonlyForXe
BooleanProperty m_PIDonlyForXe
Definition: InDetConversionTrackSelectorTool.h:122
InDet::InDetConversionTrackSelectorTool::m_sD0_Si
DoubleProperty m_sD0_Si
Definition: InDetConversionTrackSelectorTool.h:114
InDet::InDetConversionTrackSelectorTool::m_trRatio3
DoubleProperty m_trRatio3
Definition: InDetConversionTrackSelectorTool.h:99
InDet::InDetConversionTrackSelectorTool::m_maxSiD0
DoubleProperty m_maxSiD0
Properties for track selection:all cuts are ANDed.
Definition: InDetConversionTrackSelectorTool.h:87
InDet::InDetConversionTrackSelectorTool::m_useEventInfoBs
Gaudi::Property< bool > m_useEventInfoBs
Definition: InDetConversionTrackSelectorTool.h:83