ATLAS Offline Software
InDetTrtTrackScoringTool.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 INDETTRTTRACKSCORINGTOOL_H
6 #define INDETTRTTRACKSCORINGTOOL_H
7 
9 #include "GaudiKernel/ServiceHandle.h"
10 #include "GaudiKernel/ToolHandle.h"
13 // MagField cache
16 // Access to mu
19 #include <string>
20 #include <vector>
21 
22 namespace Trk {
23 class Track;
24 class TrackSummary;
25 }
26 
27 class TRT_ID;
28 
29 namespace InDet {
30 
31 class ITrtDriftCircleCutTool;
32 
35  : virtual public Trk::ITrackScoringTool
36  , public AthAlgTool
37 {
38 
39 public:
40  InDetTrtTrackScoringTool(const std::string&,
41  const std::string&,
42  const IInterface*);
43  virtual ~InDetTrtTrackScoringTool() = default;
44  virtual StatusCode initialize() override;
46  virtual bool passBasicSelections( const Trk::Track& track ) const override;
47 
49  virtual Trk::TrackScore score(const Trk::Track& track, bool checkBasicSel) const override;
50 
53  const Trk::Track& track,
54  const Trk::TrackSummary& trackSum) const override;
55 
57  const Trk::TrackSummary& trackSum) const;
58 
59 private:
61 
63  bool isGoodTRT(const Trk::Track&) const;
64 
65  // Get Eta bin for eta-dependent TRT-track cuts
66  unsigned int getEtaBin(const Trk::Perigee& perigee) const;
67 
68  // Get eta- and mu-dependent nTRT cut for TRT track
69  double getMuDependentNtrtMinCut(unsigned int eta_bin) const;
70 
72  const TRT_ID* m_trtId;
73 
74  // these are used for ScoreModifiers
76 
77  std::vector<double> m_factorSigmaChi2, m_factorTrtRatio,
79 
80  std::vector<double> m_boundsSigmaChi2, m_boundsTrtRatio,
82 
84  BooleanProperty m_useAmbigFcn{this, "useAmbigFcn", true};
85  BooleanProperty m_useSigmaChi2{this, "useSigmaChi2", false};
86 
89  std::vector<Trk::TrackScore> m_summaryTypeScore;
90 
92  ToolHandle<ITrtDriftCircleCutTool> m_selectortool
93  {this, "DriftCircleCutTool", "InDet::InDetTrtDriftCircleCutTool"};
94 
95  // Read handle for conditions object to get the field cache
97  this,
98  "AtlasFieldCacheCondObj",
99  "fieldCondObj",
100  "Name of the Magnetic Field conditions object key"
101  };
102 
103  ToolHandle<ILumiBlockMuTool> m_lumiBlockMuTool{
104  this,
105  "LuminosityTool",
106  "LumiBlockMuTool/LumiBlockMuTool",
107  "Luminosity Tool"
108  };
109 
111  IntegerProperty m_minTRTonTrk
112  {this, "minTRTonTrk", 15, "minimum number of TRT hits"};
113  DoubleProperty m_maxEta{this, "maxEta", 2.1, "maximal Eta cut"};
114  DoubleProperty m_ptmin{this, "PtMin", 1.0, "Minimum Pt"};
115  BooleanProperty m_parameterization
116  {this, "UseParameterization", true, "use parameterization to cut instead of custom cut"};
117  BooleanProperty m_oldLogic
118  {this, "OldTransitionLogic", false, "use old transition hit logic"};
119  DoubleProperty m_minTRTprecision
120  {this, "minTRTPrecisionFraction", 0.5, "minimum fraction of TRT precision hits"};
121 
122  DoubleArrayProperty m_TRTTrksEtaBins
123  {this, "TRTTrksEtaBins",
124  {999., 999., 999., 999., 999., 999., 999., 999., 999., 999.},
125  "Eta bins (10 expected) for TRT-only track cuts"};
126  DoubleArrayProperty m_TRTTrksMinTRTHitsThresholds
127  {this, "TRTTrksMinTRTHitsThresholds",
128  {0., 0., 0., 0., 0., 0., 0., 0., 0., 0.},
129  "Eta-binned nTRT cut for TRT-only cuts"};
131  {this, "TRTTrksMinTRTHitsMuDependencies",
132  {0., 0., 0., 0., 0., 0., 0., 0., 0., 0.},
133  "Eta-bined Mu-dependent component for nTRT cut"};
134 };
135 
136 }
137 #endif
InDet::InDetTrtTrackScoringTool::m_boundsTrtRatio
std::vector< double > m_boundsTrtRatio
Definition: InDetTrtTrackScoringTool.h:80
InDet::InDetTrtTrackScoringTool::score
virtual Trk::TrackScore score(const Trk::Track &track, bool checkBasicSel) const override
create a score based on how good the passed track is
Definition: InDetTrtTrackScoringTool.cxx:90
InDet::InDetTrtTrackScoringTool::m_TRTTrksEtaBins
DoubleArrayProperty m_TRTTrksEtaBins
Definition: InDetTrtTrackScoringTool.h:123
TrackParameters.h
InDet::InDetTrtTrackScoringTool::m_factorTrtFittedRatio
std::vector< double > m_factorTrtFittedRatio
Definition: InDetTrtTrackScoringTool.h:78
InDet::InDetTrtTrackScoringTool::m_factorTrtRatio
std::vector< double > m_factorTrtRatio
Definition: InDetTrtTrackScoringTool.h:77
Trk::Track
The ATLAS Track class.
Definition: Tracking/TrkEvent/TrkTrack/TrkTrack/Track.h:73
AtlasFieldCacheCondObj.h
InDet::InDetTrtTrackScoringTool::m_factorSigmaChi2
std::vector< double > m_factorSigmaChi2
Definition: InDetTrtTrackScoringTool.h:77
Trk::ParametersT
Dummy class used to allow special convertors to be called for surfaces owned by a detector element.
Definition: EMErrorDetail.h:25
InDet::InDetTrtTrackScoringTool::isGoodTRT
bool isGoodTRT(const Trk::Track &) const
Decide whether standalone TRT tracks pass the minimum hit requirement.
Definition: InDetTrtTrackScoringTool.cxx:336
InDet::InDetTrtTrackScoringTool::InDetTrtTrackScoringTool
InDetTrtTrackScoringTool(const std::string &, const std::string &, const IInterface *)
Definition: InDetTrtTrackScoringTool.cxx:18
InDet
Primary Vertex Finder.
Definition: VP1ErrorUtils.h:36
Trk::ITrackScoringTool
Interface for tool to return a score from a given track.
Definition: ITrackScoringTool.h:23
InDet::InDetTrtTrackScoringTool::m_boundsSigmaChi2
std::vector< double > m_boundsSigmaChi2
Definition: InDetTrtTrackScoringTool.h:80
InDet::InDetTrtTrackScoringTool::m_minTRTprecision
DoubleProperty m_minTRTprecision
Definition: InDetTrtTrackScoringTool.h:120
ITrackScoringTool.h
InDet::InDetTrtTrackScoringTool::m_maxTrtRatio
int m_maxTrtRatio
Definition: InDetTrtTrackScoringTool.h:75
InDet::InDetTrtTrackScoringTool::m_parameterization
BooleanProperty m_parameterization
Definition: InDetTrtTrackScoringTool.h:116
InDet::InDetTrtTrackScoringTool::m_trtId
const TRT_ID * m_trtId
ID TRT helper.
Definition: InDetTrtTrackScoringTool.h:72
InDet::InDetTrtTrackScoringTool::m_maxSigmaChi2
int m_maxSigmaChi2
Definition: InDetTrtTrackScoringTool.h:75
InDet::InDetTrtTrackScoringTool::m_minTRTonTrk
IntegerProperty m_minTRTonTrk
cuts for selecting good tracks
Definition: InDetTrtTrackScoringTool.h:112
EL::StatusCode
::StatusCode StatusCode
StatusCode definition for legacy code.
Definition: PhysicsAnalysis/D3PDTools/EventLoop/EventLoop/StatusCode.h:22
InDet::InDetTrtTrackScoringTool
Concrete implementation of the ITrackScoringTool pABC.
Definition: InDetTrtTrackScoringTool.h:37
AthAlgTool.h
InDet::InDetTrtTrackScoringTool::getEtaBin
unsigned int getEtaBin(const Trk::Perigee &perigee) const
Definition: InDetTrtTrackScoringTool.cxx:417
AtlasFieldCache.h
InDet::InDetTrtTrackScoringTool::m_maxTrtFittedRatio
int m_maxTrtFittedRatio
Definition: InDetTrtTrackScoringTool.h:75
Trk::TrackScore
float TrackScore
Definition: TrackScore.h:10
InDet::InDetTrtTrackScoringTool::passBasicSelections
virtual bool passBasicSelections(const Trk::Track &track) const override
check track selections independent from TrackSummary
Definition: InDetTrtTrackScoringTool.cxx:55
InDet::InDetTrtTrackScoringTool::simpleScore
virtual Trk::TrackScore simpleScore(const Trk::Track &track, const Trk::TrackSummary &trackSum) const override
create a score based on how good the passed TrackSummary is
Definition: InDetTrtTrackScoringTool.cxx:106
InDet::InDetTrtTrackScoringTool::initialize
virtual StatusCode initialize() override
Definition: InDetTrtTrackScoringTool.cxx:35
InDet::InDetTrtTrackScoringTool::m_useSigmaChi2
BooleanProperty m_useSigmaChi2
Definition: InDetTrtTrackScoringTool.h:85
InDet::InDetTrtTrackScoringTool::m_maxEta
DoubleProperty m_maxEta
Definition: InDetTrtTrackScoringTool.h:113
doL1CaloHVCorrections.eta_bin
eta_bin
Definition: doL1CaloHVCorrections.py:368
InDet::InDetTrtTrackScoringTool::m_TRTTrksMinTRTHitsThresholds
DoubleArrayProperty m_TRTTrksMinTRTHitsThresholds
Definition: InDetTrtTrackScoringTool.h:127
Trk
Ensure that the ATLAS eigen extensions are properly loaded.
Definition: FakeTrackBuilder.h:9
Trk::TrackSummary
A summary of the information contained by a track.
Definition: Tracking/TrkEvent/TrkTrackSummary/TrkTrackSummary/TrackSummary.h:287
TrackScore.h
InDet::InDetTrtTrackScoringTool::m_ptmin
DoubleProperty m_ptmin
Definition: InDetTrtTrackScoringTool.h:114
ILumiBlockMuTool.h
InDet::InDetTrtTrackScoringTool::setupTRT_ScoreModifiers
void setupTRT_ScoreModifiers()
Definition: InDetTrtTrackScoringTool.cxx:263
InDet::InDetTrtTrackScoringTool::m_fieldCacheCondObjInputKey
SG::ReadCondHandleKey< AtlasFieldCacheCondObj > m_fieldCacheCondObjInputKey
Definition: InDetTrtTrackScoringTool.h:96
InDet::InDetTrtTrackScoringTool::~InDetTrtTrackScoringTool
virtual ~InDetTrtTrackScoringTool()=default
SG::ReadCondHandleKey< AtlasFieldCacheCondObj >
InDet::InDetTrtTrackScoringTool::m_summaryTypeScore
std::vector< Trk::TrackScore > m_summaryTypeScore
holds the scores assigned to each Trk::SummaryType from the track's Trk::TrackSummary
Definition: InDetTrtTrackScoringTool.h:89
InDet::InDetTrtTrackScoringTool::TRT_ambigScore
Trk::TrackScore TRT_ambigScore(const Trk::Track &track, const Trk::TrackSummary &trackSum) const
Definition: InDetTrtTrackScoringTool.cxx:173
InDet::InDetTrtTrackScoringTool::m_TRTTrksMinTRTHitsMuDependencies
DoubleArrayProperty m_TRTTrksMinTRTHitsMuDependencies
Definition: InDetTrtTrackScoringTool.h:131
TRT_ID
Definition: TRT_ID.h:84
InDet::InDetTrtTrackScoringTool::getMuDependentNtrtMinCut
double getMuDependentNtrtMinCut(unsigned int eta_bin) const
Definition: InDetTrtTrackScoringTool.cxx:433
InDet::InDetTrtTrackScoringTool::m_lumiBlockMuTool
ToolHandle< ILumiBlockMuTool > m_lumiBlockMuTool
Definition: InDetTrtTrackScoringTool.h:103
Track
Definition: TriggerChamberClusterOnTrackCreator.h:21
xAOD::track
@ track
Definition: TrackingPrimitives.h:512
AthAlgTool
Definition: AthAlgTool.h:26
InDet::InDetTrtTrackScoringTool::m_oldLogic
BooleanProperty m_oldLogic
Definition: InDetTrtTrackScoringTool.h:118
InDet::InDetTrtTrackScoringTool::m_selectortool
ToolHandle< ITrtDriftCircleCutTool > m_selectortool
Returns minimum number of expected TRT drift circles depending on eta.
Definition: InDetTrtTrackScoringTool.h:93
InDet::InDetTrtTrackScoringTool::m_boundsTrtFittedRatio
std::vector< double > m_boundsTrtFittedRatio
Definition: InDetTrtTrackScoringTool.h:81
InDet::InDetTrtTrackScoringTool::m_useAmbigFcn
BooleanProperty m_useAmbigFcn
use the scoring tuned to Ambiguity processing or not
Definition: InDetTrtTrackScoringTool.h:84
xAOD::TrackSummary
TrackSummary_v1 TrackSummary
Definition: Event/xAOD/xAODTracking/xAODTracking/TrackSummary.h:10