ATLAS Offline Software
Toggle main menu visibility
Loading...
Searching...
No Matches
Trigger
TrigT1
Muon
L0MuonMDTTools
src
CompactSegmentFinderTool.h
Go to the documentation of this file.
1
/*
2
Copyright (C) 2002-2026 CERN for the benefit of the ATLAS collaboration
3
*/
4
5
#ifndef L0MuonMDTTools_COMPACTSEGMENTFINDERTOOL_H
6
#define L0MuonMDTTools_COMPACTSEGMENTFINDERTOOL_H
7
#include "
AthenaBaseComps/AthAlgTool.h
"
8
9
// local includes
10
#include "
xAODMuonPrepData/MdtDriftCircleContainer.h
"
11
#include "
L0MuonMDTTools/IL0MDTSegmentFinderTool.h
"
12
#include "
L0MuonMDTTools/L0MDTSegment.h
"
13
#include "
MuonIdHelpers/IMuonIdHelperSvc.h
"
14
#include "
ActsGeometryInterfaces/GeometryContext.h
"
15
#include "
MuonReadoutGeometryR4/MdtReadoutElement.h
"
16
#include <optional>
17
18
// namespace for the L0MDTS related classes
19
namespace
L0MDT
{
20
34
class
CompactSegmentFinderTool
:
public
extends<AthAlgTool, IL0MDTSegmentFinderTool> {
35
36
public
:
37
using
base_class::base_class;
38
virtual
~CompactSegmentFinderTool
()
override
=
default
;
39
41
virtual
StatusCode
initialize
()
override
;
42
52
virtual
StatusCode
findSegments
(
const
std::vector<const xAOD::MdtDriftCircle*>& driftCircles,
53
const
ActsTrk::GeometryContext
& gctx,
float
m,
float
b,
54
std::vector<L0MDT::Segment>& segments)
const override
;
55
56
private
:
57
59
Gaudi::Property<float>
m_clusterTolerance
{
this
,
"ClusterTolerance"
, 5.f,
60
"Maximum allowed distance in intercept space when attaching a hit to an existing cluster"
};
61
63
Gaudi::Property<int>
m_maxClusters
{
this
,
"MaxClusters"
, 6,
64
"Maximum number of temporary clusters allowed during clustering"
};
65
67
Gaudi::Property<bool>
m_debugClusters
{
this
,
"DebugClusters"
,
false
,
68
"Enable debug printout of cluster content and selection"
};
69
83
struct
HitInfo
{
84
const
xAOD::MdtDriftCircle
*
dc
{
nullptr
};
85
float
z
{0.f};
86
float
r
{0.f};
87
float
driftRadius
{0.f};
88
float
bPlus
{0.f};
89
float
bMinus
{0.f};
90
float
deltaZ
{0.f};
91
float
deltaR
{0.f};
92
int
multilayer
{0};
93
};
94
103
struct
Cluster
{
104
float
refB
{0.f};
105
std::vector<std::size_t>
hitIndices
;
106
std::vector<bool>
plusFlags
;
107
};
108
117
struct
FitResult
{
118
float
m
{0.f};
119
float
b
{0.f};
120
float
chi2
{0.f};
121
bool
valid
{
false
};
122
};
123
133
virtual
StatusCode
buildHitInfo
(
const
std::vector<const xAOD::MdtDriftCircle*>& driftCircles,
134
const
ActsTrk::GeometryContext
& gctx,
float
m,
135
std::vector<HitInfo>& hitInfos)
const
;
136
144
void
clusterHits
(
const
std::vector<HitInfo>& hitInfos,
145
const
std::vector<std::size_t>& orderedIndices,
146
std::vector<Cluster>& clusters)
const
;
147
149
ServiceHandle<Muon::IMuonIdHelperSvc>
m_idHelperSvc
{
150
this
,
"MuonIdHelperSvc"
,
"Muon::MuonIdHelperSvc/MuonIdHelperSvc"
};
151
159
std::optional<Cluster>
chooseBestCluster
(
const
std::vector<Cluster>& clusters,
float
b)
const
;
160
171
FitResult
fitLine
(
const
std::vector<float>& zVals,
172
const
std::vector<float>& rVals,
173
float
sigma = 1.f / 8.f)
const
;
174
};
175
176
}
// end of namespace
177
#endif
AthAlgTool.h
GeometryContext.h
IL0MDTSegmentFinderTool.h
IMuonIdHelperSvc.h
L0MDTSegment.h
MdtDriftCircleContainer.h
MdtReadoutElement.h
ActsTrk::GeometryContext
Definition
GeometryContext.h:30
L0MDT::CompactSegmentFinderTool
Definition
CompactSegmentFinderTool.h:34
L0MDT::CompactSegmentFinderTool::findSegments
virtual StatusCode findSegments(const std::vector< const xAOD::MdtDriftCircle * > &driftCircles, const ActsTrk::GeometryContext &gctx, float m, float b, std::vector< L0MDT::Segment > &segments) const override
Main segment finding entry point.
Definition
CompactSegmentFinderTool.cxx:53
L0MDT::CompactSegmentFinderTool::chooseBestCluster
std::optional< Cluster > chooseBestCluster(const std::vector< Cluster > &clusters, float b) const
Select the best cluster among the available candidates.
Definition
CompactSegmentFinderTool.cxx:310
L0MDT::CompactSegmentFinderTool::~CompactSegmentFinderTool
virtual ~CompactSegmentFinderTool() override=default
L0MDT::CompactSegmentFinderTool::m_maxClusters
Gaudi::Property< int > m_maxClusters
Maximum number of temporary clusters allowed during clustering.
Definition
CompactSegmentFinderTool.h:63
L0MDT::CompactSegmentFinderTool::buildHitInfo
virtual StatusCode buildHitInfo(const std::vector< const xAOD::MdtDriftCircle * > &driftCircles, const ActsTrk::GeometryContext &gctx, float m, std::vector< HitInfo > &hitInfos) const
Build the compact per-hit representation used by the algorithm.
Definition
CompactSegmentFinderTool.cxx:196
L0MDT::CompactSegmentFinderTool::m_idHelperSvc
ServiceHandle< Muon::IMuonIdHelperSvc > m_idHelperSvc
MDT identifier helper service.
Definition
CompactSegmentFinderTool.h:149
L0MDT::CompactSegmentFinderTool::fitLine
FitResult fitLine(const std::vector< float > &zVals, const std::vector< float > &rVals, float sigma=1.f/8.f) const
Fit a straight line in the (z, R) plane.
Definition
CompactSegmentFinderTool.cxx:341
L0MDT::CompactSegmentFinderTool::m_debugClusters
Gaudi::Property< bool > m_debugClusters
Debug flag for printing cluster content and selection.
Definition
CompactSegmentFinderTool.h:67
L0MDT::CompactSegmentFinderTool::clusterHits
void clusterHits(const std::vector< HitInfo > &hitInfos, const std::vector< std::size_t > &orderedIndices, std::vector< Cluster > &clusters) const
Cluster ordered hits in intercept space.
Definition
CompactSegmentFinderTool.cxx:257
L0MDT::CompactSegmentFinderTool::m_clusterTolerance
Gaudi::Property< float > m_clusterTolerance
Maximum allowed distance in intercept space when attaching a hit to an existing cluster.
Definition
CompactSegmentFinderTool.h:59
L0MDT::CompactSegmentFinderTool::initialize
virtual StatusCode initialize() override
Standard Athena initialize method.
Definition
CompactSegmentFinderTool.cxx:46
ServiceHandle
Definition
ClusterMakerTool.h:36
L0MDT
Compact Segment Finder algorithm overview.
Definition
IL0MDTSegmentFinderTool.h:13
xAOD::MdtDriftCircle
MdtDriftCircle_v1 MdtDriftCircle
Definition
MdtDriftCircleFwd.h:11
L0MDT::CompactSegmentFinderTool::Cluster
Temporary cluster of hit intercept hypotheses.
Definition
CompactSegmentFinderTool.h:103
L0MDT::CompactSegmentFinderTool::Cluster::plusFlags
std::vector< bool > plusFlags
Definition
CompactSegmentFinderTool.h:106
L0MDT::CompactSegmentFinderTool::Cluster::refB
float refB
Definition
CompactSegmentFinderTool.h:104
L0MDT::CompactSegmentFinderTool::Cluster::hitIndices
std::vector< std::size_t > hitIndices
Definition
CompactSegmentFinderTool.h:105
L0MDT::CompactSegmentFinderTool::FitResult
Output of the final straight-line fit.
Definition
CompactSegmentFinderTool.h:117
L0MDT::CompactSegmentFinderTool::FitResult::m
float m
Definition
CompactSegmentFinderTool.h:118
L0MDT::CompactSegmentFinderTool::FitResult::valid
bool valid
Definition
CompactSegmentFinderTool.h:121
L0MDT::CompactSegmentFinderTool::FitResult::chi2
float chi2
Definition
CompactSegmentFinderTool.h:120
L0MDT::CompactSegmentFinderTool::FitResult::b
float b
Definition
CompactSegmentFinderTool.h:119
L0MDT::CompactSegmentFinderTool::HitInfo
Compact representation of one MDT hit used by the clustering and fit steps.
Definition
CompactSegmentFinderTool.h:83
L0MDT::CompactSegmentFinderTool::HitInfo::dc
const xAOD::MdtDriftCircle * dc
Definition
CompactSegmentFinderTool.h:84
L0MDT::CompactSegmentFinderTool::HitInfo::deltaR
float deltaR
Definition
CompactSegmentFinderTool.h:91
L0MDT::CompactSegmentFinderTool::HitInfo::r
float r
Definition
CompactSegmentFinderTool.h:86
L0MDT::CompactSegmentFinderTool::HitInfo::multilayer
int multilayer
Definition
CompactSegmentFinderTool.h:92
L0MDT::CompactSegmentFinderTool::HitInfo::z
float z
Definition
CompactSegmentFinderTool.h:85
L0MDT::CompactSegmentFinderTool::HitInfo::driftRadius
float driftRadius
Definition
CompactSegmentFinderTool.h:87
L0MDT::CompactSegmentFinderTool::HitInfo::bPlus
float bPlus
Definition
CompactSegmentFinderTool.h:88
L0MDT::CompactSegmentFinderTool::HitInfo::deltaZ
float deltaZ
Definition
CompactSegmentFinderTool.h:90
L0MDT::CompactSegmentFinderTool::HitInfo::bMinus
float bMinus
Definition
CompactSegmentFinderTool.h:89
Generated on
for ATLAS Offline Software by
1.17.0