ATLAS Offline Software
InDetAmbiScoringTool.h
Go to the documentation of this file.
1 /*
2  Copyright (C) 2002-2024 CERN for the benefit of the ATLAS collaboration
3 */
4 
6 // Markus Elsing
8 
9 #ifndef INDETAMBISCORINGTOOL_H
10 #define INDETAMBISCORINGTOOL_H
11 
13 #include "GaudiKernel/ToolHandle.h"
14 #include "GaudiKernel/ServiceHandle.h"
23 #include "AthenaKernel/CLASS_DEF.h"
25 // MagField cache
28 #include <vector>
29 #include <string>
31 
32 namespace Trk {
33  class Track;
34  class TrackSummary;
35 
36 }
37 class EventContext;
38 
39 namespace InDet {
40 
43  public AthAlgTool
44 {
45 
46  public:
47  InDetAmbiScoringTool(const std::string&,const std::string&,const IInterface*);
48  virtual ~InDetAmbiScoringTool () = default;
49  virtual StatusCode initialize() override;
51  virtual bool passBasicSelections( const Trk::Track& track ) const override;
52 
54  virtual Trk::TrackScore score( const Trk::Track& track, bool checkBasicSel ) const override;
55 
57  virtual Trk::TrackScore simpleScore( const Trk::Track& track, const Trk::TrackSummary& trackSum ) const override;
58  Trk::TrackScore ambigScore( const Trk::Track& track, const Trk::TrackSummary& trackSum ) const;
59 
60 
61  private:
62  void setupScoreModifiers();
63 
64 
66  bool isEmCaloCompatible(const Trk::Track& track, const EventContext& ctx) const;
67 
68 
69  //these are used for ScoreModifiers
76  std::vector<double> m_boundsSigmaChi2,
78 
80  ToolHandle<ITrtDriftCircleCutTool> m_selectortool
81  {this, "DriftCircleCutTool", "InDet::InDetTrtDriftCircleCutTool"};
82 
84  std::vector<Trk::TrackScore> m_summaryTypeScore;
85 
86  SG::ReadCondHandleKey<InDet::BeamSpotData> m_beamSpotKey { this, "BeamSpotKey", "BeamSpotData", "SG key for beam spot" };
87 
88  ToolHandle<Trk::IExtrapolator> m_extrapolator
89  {this, "Extrapolator", "Trk::Extrapolator"};
90 
91  // Read handle for conditions object to get the field cache
92  SG::ReadCondHandleKey<AtlasFieldCacheCondObj> m_fieldCacheCondObjInputKey {this, "AtlasFieldCacheCondObj", "fieldCondObj", "Name of the Magnetic Field conditions object key"};
93 
94 
96  BooleanProperty m_useAmbigFcn{this, "useAmbigFcn", true};
97  BooleanProperty m_useTRT_AmbigFcn{this, "useTRT_AmbigFcn", false};
98  BooleanProperty m_useSigmaChi2{this, "useSigmaChi2", false};
99 
100  BooleanProperty m_usePixel{this, "usePixel", true};
101  BooleanProperty m_useSCT{this, "useSCT", true};
102 
104  DoubleProperty m_minPt{this, "minPt", 500., "minimal Pt cut"};
105  DoubleProperty m_maxEta{this, "maxEta", 2.7, "maximal Eta cut"};
106  DoubleProperty m_maxRPhiImp
107  {this, "maxRPhiImp", 10., "maximal RPhi impact parameter cut"};
108  DoubleProperty m_maxZImp
109  {this, "maxZImp", 250., "maximal z impact parameter cut"};
110 
111  IntegerProperty m_minSiClusters
112  {this, "minSiClusters", 7, "minimal number of Si clusters"};
113  IntegerProperty m_maxDoubleHoles
114  {this, "maxDoubleHoles", 2, "maximum number of SCT double holes"};
115  IntegerProperty m_maxSiHoles
116  {this, "maxSiHoles", 5, "max number of Silicon (Pixel+SCT) holes"};
117  IntegerProperty m_maxPixelHoles
118  {this, "maxPixelHoles", 5, "max number of Pixel holes"};
119  IntegerProperty m_maxSctHoles
120  {this, "maxSCTHoles", 5, "max number of SCT holes"};
121  IntegerProperty m_minTRTonTrk
122  {this, "minTRTonTrk", 9, "minimum number of TRT hits"};
123  DoubleProperty m_minTRTprecision
124  {this, "minTRTPrecisionFraction", 0.5, "minimum fraction of TRT precision hits"};
125  IntegerProperty m_minPixel
126  {this, "minPixel", 0, "minimum number of pixel clusters"};
127 
128  DoubleProperty m_maxRPhiImpEM
129  {this, "maxRPhiImpEM", 50., "maximal RPhi impact parameter cut track that match EM clusters"};
130  BooleanProperty m_useEmClusSeed{this, "doEmCaloSeed", true};
131  FloatProperty m_phiWidthEm{this, "phiWidthEM", 0.075};
132  FloatProperty m_etaWidthEm{this, "etaWidthEM", 0.05};
133 
135  {this, "EMROIPhiRZContainer", "", "Name of the calo cluster ROIs in Phi,R,Z parameterization"};
136 
138  BooleanProperty m_useITkAmbigFcn{this, "useITkAmbigFcn", false};
139 
142 
143 };
144 
145 
146 } // namespace InDet
147 
148 
149 #endif
ReadHandleKey.h
Property holding a SG store/key/clid from which a ReadHandle is made.
InDet::InDetAmbiScoringTool::m_minPixel
IntegerProperty m_minPixel
Definition: InDetAmbiScoringTool.h:126
InDet::InDetAmbiScoringTool::~InDetAmbiScoringTool
virtual ~InDetAmbiScoringTool()=default
InDet::InDetAmbiScoringTool::m_boundsTrtRatio
std::vector< double > m_boundsTrtRatio
Definition: InDetAmbiScoringTool.h:77
InDet::InDetAmbiScoringTool::isEmCaloCompatible
bool isEmCaloCompatible(const Trk::Track &track, const EventContext &ctx) const
Check if the cluster is compatible with a EM cluster.
Definition: InDetAmbiScoringTool.cxx:842
TrackParameters.h
InDet::InDetAmbiScoringTool::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: InDetAmbiScoringTool.cxx:187
Trk::Track
The ATLAS Track class.
Definition: Tracking/TrkEvent/TrkTrack/TrkTrack/Track.h:73
InDet::InDetAmbiScoringTool::m_maxHits
int m_maxHits
Definition: InDetAmbiScoringTool.h:71
AtlasFieldCacheCondObj.h
InDet::InDetAmbiScoringTool::m_etaDependentCutsSvc
ServiceHandle< IInDetEtaDependentCutsSvc > m_etaDependentCutsSvc
ITk eta-dependent cuts.
Definition: InDetAmbiScoringTool.h:141
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::InDetAmbiScoringTool
Concrete implementation of the ITrackScoringTool pABC.
Definition: InDetAmbiScoringTool.h:44
InDet::InDetAmbiScoringTool::m_factorDblHoles
std::vector< double > m_factorDblHoles
Definition: InDetAmbiScoringTool.h:74
InDet::InDetAmbiScoringTool::m_maxSigmaChi2
int m_maxSigmaChi2
Definition: InDetAmbiScoringTool.h:71
InDet::InDetAmbiScoringTool::m_factorSCT_Holes
std::vector< double > m_factorSCT_Holes
Definition: InDetAmbiScoringTool.h:74
ITrtDriftCircleCutTool.h
InDet::InDetAmbiScoringTool::m_boundsSigmaChi2
std::vector< double > m_boundsSigmaChi2
Definition: InDetAmbiScoringTool.h:76
InDet::InDetAmbiScoringTool::m_useITkAmbigFcn
BooleanProperty m_useITkAmbigFcn
use the ITk scoring tuned to Ambiguity processing or not
Definition: InDetAmbiScoringTool.h:138
IExtrapolator.h
InDet::InDetAmbiScoringTool::m_factorTrtRatio
std::vector< double > m_factorTrtRatio
Definition: InDetAmbiScoringTool.h:77
ITrackScoringTool.h
SG::ReadHandleKey< ROIPhiRZContainer >
InDet::InDetAmbiScoringTool::m_extrapolator
ToolHandle< Trk::IExtrapolator > m_extrapolator
Definition: InDetAmbiScoringTool.h:89
InDet::InDetAmbiScoringTool::m_factorPixLay
std::vector< double > m_factorPixLay
Definition: InDetAmbiScoringTool.h:75
InDet::InDetAmbiScoringTool::m_maxTrtRatio
int m_maxTrtRatio
Definition: InDetAmbiScoringTool.h:71
InDet::InDetAmbiScoringTool::m_maxDblHoles
int m_maxDblHoles
Definition: InDetAmbiScoringTool.h:70
InDet::InDetAmbiScoringTool::m_maxB_LayerHits
int m_maxB_LayerHits
Definition: InDetAmbiScoringTool.h:72
InDet::InDetAmbiScoringTool::m_usePixel
BooleanProperty m_usePixel
Definition: InDetAmbiScoringTool.h:100
InDet::InDetAmbiScoringTool::m_maxSctHoles
IntegerProperty m_maxSctHoles
Definition: InDetAmbiScoringTool.h:120
InDet::InDetAmbiScoringTool::m_minTRTprecision
DoubleProperty m_minTRTprecision
Definition: InDetAmbiScoringTool.h:124
InDet::InDetAmbiScoringTool::m_factorB_LayerHits
std::vector< double > m_factorB_LayerHits
Definition: InDetAmbiScoringTool.h:75
InDet::InDetAmbiScoringTool::m_useTRT_AmbigFcn
BooleanProperty m_useTRT_AmbigFcn
Definition: InDetAmbiScoringTool.h:97
InDet::InDetAmbiScoringTool::m_maxRPhiImp
DoubleProperty m_maxRPhiImp
Definition: InDetAmbiScoringTool.h:107
InDet::InDetAmbiScoringTool::m_factorTrtFittedRatio
std::vector< double > m_factorTrtFittedRatio
Definition: InDetAmbiScoringTool.h:77
InDet::InDetAmbiScoringTool::m_summaryTypeScore
std::vector< Trk::TrackScore > m_summaryTypeScore
holds the scores assigned to each Trk::SummaryType from the track's Trk::TrackSummary
Definition: InDetAmbiScoringTool.h:84
EL::StatusCode
::StatusCode StatusCode
StatusCode definition for legacy code.
Definition: PhysicsAnalysis/D3PDTools/EventLoop/EventLoop/StatusCode.h:22
InDet::InDetAmbiScoringTool::m_caloClusterROIKey
SG::ReadHandleKey< ROIPhiRZContainer > m_caloClusterROIKey
Definition: InDetAmbiScoringTool.h:135
InDet::InDetAmbiScoringTool::m_factorPixelHits
std::vector< double > m_factorPixelHits
Definition: InDetAmbiScoringTool.h:75
InDet::InDetAmbiScoringTool::setupScoreModifiers
void setupScoreModifiers()
Definition: InDetAmbiScoringTool.cxx:552
InDet::InDetAmbiScoringTool::m_maxSiHoles
IntegerProperty m_maxSiHoles
Definition: InDetAmbiScoringTool.h:116
InDet::InDetAmbiScoringTool::ambigScore
Trk::TrackScore ambigScore(const Trk::Track &track, const Trk::TrackSummary &trackSum) const
Definition: InDetAmbiScoringTool.cxx:331
AthAlgTool.h
AtlasFieldCache.h
InDet::InDetAmbiScoringTool::m_etaWidthEm
FloatProperty m_etaWidthEm
Definition: InDetAmbiScoringTool.h:132
Trk::TrackScore
float TrackScore
Definition: TrackScore.h:10
InDet::InDetAmbiScoringTool::m_minPt
DoubleProperty m_minPt
cuts for selecting good tracks
Definition: InDetAmbiScoringTool.h:104
InDet::InDetAmbiScoringTool::m_factorSigmaChi2
std::vector< double > m_factorSigmaChi2
Definition: InDetAmbiScoringTool.h:75
ROIPhiRZContainer.h
InDet::InDetAmbiScoringTool::m_phiWidthEm
FloatProperty m_phiWidthEm
Definition: InDetAmbiScoringTool.h:131
Trk
Ensure that the ATLAS eigen extensions are properly loaded.
Definition: FakeTrackBuilder.h:9
InDet::InDetAmbiScoringTool::m_minTRTonTrk
IntegerProperty m_minTRTonTrk
Definition: InDetAmbiScoringTool.h:122
Trk::TrackSummary
A summary of the information contained by a track.
Definition: Tracking/TrkEvent/TrkTrackSummary/TrkTrackSummary/TrackSummary.h:287
TrackScore.h
InDet::InDetAmbiScoringTool::m_maxDoubleHoles
IntegerProperty m_maxDoubleHoles
Definition: InDetAmbiScoringTool.h:114
InDet::InDetAmbiScoringTool::m_maxSCT_Holes
int m_maxSCT_Holes
Definition: InDetAmbiScoringTool.h:70
InDet::InDetAmbiScoringTool::m_selectortool
ToolHandle< ITrtDriftCircleCutTool > m_selectortool
Returns minimum number of expected TRT drift circles depending on eta.
Definition: InDetAmbiScoringTool.h:81
InDet::InDetAmbiScoringTool::m_factorPixHoles
std::vector< double > m_factorPixHoles
Definition: InDetAmbiScoringTool.h:74
InDet::InDetAmbiScoringTool::InDetAmbiScoringTool
InDetAmbiScoringTool(const std::string &, const std::string &, const IInterface *)
Definition: InDetAmbiScoringTool.cxx:22
SG::ReadCondHandleKey< InDet::BeamSpotData >
InDet::InDetAmbiScoringTool::m_maxPixelHoles
IntegerProperty m_maxPixelHoles
Definition: InDetAmbiScoringTool.h:118
InDet::InDetAmbiScoringTool::m_factorHits
std::vector< double > m_factorHits
Definition: InDetAmbiScoringTool.h:74
InDet::InDetAmbiScoringTool::m_maxPixHoles
int m_maxPixHoles
Definition: InDetAmbiScoringTool.h:70
InDet::InDetAmbiScoringTool::m_maxZImp
DoubleProperty m_maxZImp
Definition: InDetAmbiScoringTool.h:109
InDet::InDetAmbiScoringTool::m_maxRPhiImpEM
DoubleProperty m_maxRPhiImpEM
Definition: InDetAmbiScoringTool.h:129
InDet::InDetAmbiScoringTool::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: InDetAmbiScoringTool.cxx:168
InDet::InDetAmbiScoringTool::m_fieldCacheCondObjInputKey
SG::ReadCondHandleKey< AtlasFieldCacheCondObj > m_fieldCacheCondObjInputKey
Definition: InDetAmbiScoringTool.h:92
InDet::InDetAmbiScoringTool::m_maxEta
DoubleProperty m_maxEta
Definition: InDetAmbiScoringTool.h:105
InDet::InDetAmbiScoringTool::m_useSCT
BooleanProperty m_useSCT
Definition: InDetAmbiScoringTool.h:101
InDet::InDetAmbiScoringTool::m_factorGangedFakes
std::vector< double > m_factorGangedFakes
Definition: InDetAmbiScoringTool.h:75
Track
Definition: TriggerChamberClusterOnTrackCreator.h:21
IOVSvcDefs.h
defines and typedefs for IOVSvc
BeamSpotData.h
xAOD::track
@ track
Definition: TrackingPrimitives.h:512
AthAlgTool
Definition: AthAlgTool.h:26
InDet::InDetAmbiScoringTool::m_minSiClusters
IntegerProperty m_minSiClusters
Definition: InDetAmbiScoringTool.h:112
InDet::InDetAmbiScoringTool::initialize
virtual StatusCode initialize() override
Definition: InDetAmbiScoringTool.cxx:56
InDet::InDetAmbiScoringTool::m_useAmbigFcn
BooleanProperty m_useAmbigFcn
use the scoring tuned to Ambiguity processing or not
Definition: InDetAmbiScoringTool.h:96
InDet::InDetAmbiScoringTool::m_boundsTrtFittedRatio
std::vector< double > m_boundsTrtFittedRatio
Definition: InDetAmbiScoringTool.h:77
IInDetEtaDependentCutsSvc.h
InDet::InDetAmbiScoringTool::m_maxGangedFakes
int m_maxGangedFakes
Definition: InDetAmbiScoringTool.h:73
InDet::InDetAmbiScoringTool::m_maxPixelHits
int m_maxPixelHits
Definition: InDetAmbiScoringTool.h:72
CLASS_DEF.h
macros to associate a CLID to a type
InDet::InDetAmbiScoringTool::m_beamSpotKey
SG::ReadCondHandleKey< InDet::BeamSpotData > m_beamSpotKey
Definition: InDetAmbiScoringTool.h:86
InDet::InDetAmbiScoringTool::m_maxPixLay
int m_maxPixLay
Definition: InDetAmbiScoringTool.h:73
xAOD::TrackSummary
TrackSummary_v1 TrackSummary
Definition: Event/xAOD/xAODTracking/xAODTracking/TrackSummary.h:10
InDet::InDetAmbiScoringTool::passBasicSelections
virtual bool passBasicSelections(const Trk::Track &track) const override
check track selections independent from TrackSummary
Definition: InDetAmbiScoringTool.cxx:92
ServiceHandle
Definition: ClusterMakerTool.h:37
InDet::InDetAmbiScoringTool::m_maxTrtFittedRatio
int m_maxTrtFittedRatio
Definition: InDetAmbiScoringTool.h:72
InDet::InDetAmbiScoringTool::m_useEmClusSeed
BooleanProperty m_useEmClusSeed
Definition: InDetAmbiScoringTool.h:130
InDet::InDetAmbiScoringTool::m_useSigmaChi2
BooleanProperty m_useSigmaChi2
Definition: InDetAmbiScoringTool.h:98