ATLAS Offline Software
Toggle main menu visibility
Loading...
Searching...
No Matches
Trigger
TrigT1
Muon
L0MuonMDTTools
src
LegendreSegmentFinderTool.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_LEGENDRESEGMENTFINDERTOOL_H
6
#define L0MuonMDTTools_LEGENDRESEGMENTFINDERTOOL_H
7
8
#include "
AthenaBaseComps/AthAlgTool.h
"
9
10
// local includes
11
#include "
xAODMuonPrepData/MdtDriftCircleContainer.h
"
12
#include "
L0MuonMDTTools/IL0MDTSegmentFinderTool.h
"
13
#include "
L0MuonMDTTools/L0MDTSegment.h
"
14
#include "
ActsGeometryInterfaces/GeometryContext.h
"
15
16
// C++ std
17
#include <vector>
18
#include <cstddef>
19
20
namespace
L0MDT
{
21
22
class
LegendreSegmentFinderTool
:
public
extends<AthAlgTool, IL0MDTSegmentFinderTool> {
23
public
:
24
using
base_class::base_class;
25
virtual
~LegendreSegmentFinderTool
()
override
=
default
;
26
27
virtual
StatusCode
initialize
()
override
;
28
29
virtual
StatusCode
findSegments
(
const
std::vector<const xAOD::MdtDriftCircle*>& driftCircles,
30
const
ActsTrk::GeometryContext
& gctx,
31
float
m,
32
float
b,
33
std::vector<L0MDT::Segment>& segments)
const override
;
34
35
private
:
36
// Per-hit information in the current reconstruction plane
37
struct
HitInfo
{
38
const
xAOD::MdtDriftCircle
*
dc
{
nullptr
};
39
float
z
{0.f};
40
float
R
{0.f};
41
float
driftRadius
{0.f};
42
};
43
44
// One Legendre-space bin
45
struct
BinCell
{
46
int
entries
{0};
47
std::vector<const xAOD::MdtDriftCircle*>
hits
;
48
std::vector<float>
zVals
;
49
std::vector<float>
RVals
;
50
};
51
52
// Descriptor of the maximum bin
53
struct
MaxBin
{
54
int
thetaBin
{-1};
55
int
rBin
{-1};
56
int
entries
{0};
57
bool
valid
{
false
};
58
};
59
60
// Final fit result
61
struct
FitResult
{
62
float
m
{0.f};
63
float
b
{0.f};
64
float
chi2
{0.f};
65
bool
valid
{
false
};
66
};
67
68
// Parameters defining the Legendre-space window around the RPC seed
69
struct
LegendreSpacePars
{
70
float
thetaMin
{0.f};
71
float
thetaMax
{0.f};
72
float
rMin
{0.f};
73
float
rMax
{0.f};
74
float
seedTheta
{0.f};
75
float
seedR
{0.f};
76
};
77
78
StatusCode
buildHitInfo
(
const
std::vector<const xAOD::MdtDriftCircle*>& driftCircles,
79
const
ActsTrk::GeometryContext
& gctx,
80
std::vector<HitInfo>& hitInfos)
const
;
81
82
LegendreSpacePars
setLegendreSpacePars
(
float
seedM,
float
seedB)
const
;
83
84
void
fillBin
(std::vector<std::vector<BinCell>>&
bins
,
85
int
thetaBin,
86
int
rBin,
87
const
xAOD::MdtDriftCircle
* dc,
88
float
zPoint,
89
float
rPoint)
const
;
90
91
void
fillSinogram
(
const
std::vector<HitInfo>& hitInfos,
92
float
thetaMin,
93
float
rMin,
94
std::vector<std::vector<BinCell>>&
bins
)
const
;
95
96
bool
findMaxBin
(
const
std::vector<std::vector<BinCell>>&
bins
,
97
MaxBin& maxBin)
const
;
98
99
FitResult
extractSegmentFromMaxBin
(
const
MaxBin& maxBin,
100
float
thetaMin,
101
float
rMin)
const
;
102
103
FitResult
fitLine
(
const
std::vector<float>& zVals,
104
const
std::vector<float>& RVals,
105
float
sigma = 1.f / 8.f)
const
;
106
107
int
findBin
(
float
value,
float
min
,
float
binSize,
int
nBins)
const
;
108
109
private
:
110
// Minimal Legendre settings for the first Athena implementation
111
int
m_thetaBins
{64};
112
float
m_thetaRes
{0.002f};
113
int
m_rBins
{64};
114
float
m_rRes
{2.0f};
115
int
m_minEntriesInMaxBin
{3};
116
bool
m_doRefit
{
true
};
117
bool
m_debugLegendre
{
false
};
118
};
119
120
}
// namespace L0MDT
121
122
#endif
AthAlgTool.h
GeometryContext.h
IL0MDTSegmentFinderTool.h
L0MDTSegment.h
MdtDriftCircleContainer.h
bins
static const std::vector< std::string > bins
Definition
MuonTriggerSFFilesTest.cxx:22
min
#define min(a, b)
Definition
cfImp.cxx:40
ActsTrk::GeometryContext
Definition
GeometryContext.h:30
L0MDT::LegendreSegmentFinderTool
Definition
LegendreSegmentFinderTool.h:22
L0MDT::LegendreSegmentFinderTool::m_doRefit
bool m_doRefit
Definition
LegendreSegmentFinderTool.h:116
L0MDT::LegendreSegmentFinderTool::m_thetaBins
int m_thetaBins
Definition
LegendreSegmentFinderTool.h:111
L0MDT::LegendreSegmentFinderTool::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
Definition
LegendreSegmentFinderTool.cxx:301
L0MDT::LegendreSegmentFinderTool::extractSegmentFromMaxBin
FitResult extractSegmentFromMaxBin(const MaxBin &maxBin, float thetaMin, float rMin) const
Definition
LegendreSegmentFinderTool.cxx:237
L0MDT::LegendreSegmentFinderTool::initialize
virtual StatusCode initialize() override
Definition
LegendreSegmentFinderTool.cxx:44
L0MDT::LegendreSegmentFinderTool::m_thetaRes
float m_thetaRes
Definition
LegendreSegmentFinderTool.h:112
L0MDT::LegendreSegmentFinderTool::fillBin
void fillBin(std::vector< std::vector< BinCell > > &bins, int thetaBin, int rBin, const xAOD::MdtDriftCircle *dc, float zPoint, float rPoint) const
Definition
LegendreSegmentFinderTool.cxx:124
L0MDT::LegendreSegmentFinderTool::fitLine
FitResult fitLine(const std::vector< float > &zVals, const std::vector< float > &RVals, float sigma=1.f/8.f) const
Definition
LegendreSegmentFinderTool.cxx:260
L0MDT::LegendreSegmentFinderTool::m_minEntriesInMaxBin
int m_minEntriesInMaxBin
Definition
LegendreSegmentFinderTool.h:115
L0MDT::LegendreSegmentFinderTool::findBin
int findBin(float value, float min, float binSize, int nBins) const
Definition
LegendreSegmentFinderTool.cxx:117
L0MDT::LegendreSegmentFinderTool::setLegendreSpacePars
LegendreSpacePars setLegendreSpacePars(float seedM, float seedB) const
Definition
LegendreSegmentFinderTool.cxx:88
L0MDT::LegendreSegmentFinderTool::m_rRes
float m_rRes
Definition
LegendreSegmentFinderTool.h:114
L0MDT::LegendreSegmentFinderTool::fillSinogram
void fillSinogram(const std::vector< HitInfo > &hitInfos, float thetaMin, float rMin, std::vector< std::vector< BinCell > > &bins) const
Definition
LegendreSegmentFinderTool.cxx:149
L0MDT::LegendreSegmentFinderTool::findMaxBin
bool findMaxBin(const std::vector< std::vector< BinCell > > &bins, MaxBin &maxBin) const
Definition
LegendreSegmentFinderTool.cxx:189
L0MDT::LegendreSegmentFinderTool::buildHitInfo
StatusCode buildHitInfo(const std::vector< const xAOD::MdtDriftCircle * > &driftCircles, const ActsTrk::GeometryContext &gctx, std::vector< HitInfo > &hitInfos) const
Definition
LegendreSegmentFinderTool.cxx:56
L0MDT::LegendreSegmentFinderTool::~LegendreSegmentFinderTool
virtual ~LegendreSegmentFinderTool() override=default
L0MDT::LegendreSegmentFinderTool::m_rBins
int m_rBins
Definition
LegendreSegmentFinderTool.h:113
L0MDT::LegendreSegmentFinderTool::m_debugLegendre
bool m_debugLegendre
Definition
LegendreSegmentFinderTool.h:117
L0MDT
Compact Segment Finder algorithm overview.
Definition
IL0MDTSegmentFinderTool.h:13
xAOD::MdtDriftCircle
MdtDriftCircle_v1 MdtDriftCircle
Definition
MdtDriftCircleFwd.h:11
L0MDT::LegendreSegmentFinderTool::BinCell
Definition
LegendreSegmentFinderTool.h:45
L0MDT::LegendreSegmentFinderTool::BinCell::RVals
std::vector< float > RVals
Definition
LegendreSegmentFinderTool.h:49
L0MDT::LegendreSegmentFinderTool::BinCell::hits
std::vector< const xAOD::MdtDriftCircle * > hits
Definition
LegendreSegmentFinderTool.h:47
L0MDT::LegendreSegmentFinderTool::BinCell::entries
int entries
Definition
LegendreSegmentFinderTool.h:46
L0MDT::LegendreSegmentFinderTool::BinCell::zVals
std::vector< float > zVals
Definition
LegendreSegmentFinderTool.h:48
L0MDT::LegendreSegmentFinderTool::FitResult
Definition
LegendreSegmentFinderTool.h:61
L0MDT::LegendreSegmentFinderTool::FitResult::b
float b
Definition
LegendreSegmentFinderTool.h:63
L0MDT::LegendreSegmentFinderTool::FitResult::m
float m
Definition
LegendreSegmentFinderTool.h:62
L0MDT::LegendreSegmentFinderTool::FitResult::valid
bool valid
Definition
LegendreSegmentFinderTool.h:65
L0MDT::LegendreSegmentFinderTool::FitResult::chi2
float chi2
Definition
LegendreSegmentFinderTool.h:64
L0MDT::LegendreSegmentFinderTool::HitInfo
Definition
LegendreSegmentFinderTool.h:37
L0MDT::LegendreSegmentFinderTool::HitInfo::dc
const xAOD::MdtDriftCircle * dc
Definition
LegendreSegmentFinderTool.h:38
L0MDT::LegendreSegmentFinderTool::HitInfo::driftRadius
float driftRadius
Definition
LegendreSegmentFinderTool.h:41
L0MDT::LegendreSegmentFinderTool::HitInfo::R
float R
Definition
LegendreSegmentFinderTool.h:40
L0MDT::LegendreSegmentFinderTool::HitInfo::z
float z
Definition
LegendreSegmentFinderTool.h:39
L0MDT::LegendreSegmentFinderTool::LegendreSpacePars
Definition
LegendreSegmentFinderTool.h:69
L0MDT::LegendreSegmentFinderTool::LegendreSpacePars::thetaMax
float thetaMax
Definition
LegendreSegmentFinderTool.h:71
L0MDT::LegendreSegmentFinderTool::LegendreSpacePars::thetaMin
float thetaMin
Definition
LegendreSegmentFinderTool.h:70
L0MDT::LegendreSegmentFinderTool::LegendreSpacePars::seedTheta
float seedTheta
Definition
LegendreSegmentFinderTool.h:74
L0MDT::LegendreSegmentFinderTool::LegendreSpacePars::seedR
float seedR
Definition
LegendreSegmentFinderTool.h:75
L0MDT::LegendreSegmentFinderTool::LegendreSpacePars::rMax
float rMax
Definition
LegendreSegmentFinderTool.h:73
L0MDT::LegendreSegmentFinderTool::LegendreSpacePars::rMin
float rMin
Definition
LegendreSegmentFinderTool.h:72
L0MDT::LegendreSegmentFinderTool::MaxBin
Definition
LegendreSegmentFinderTool.h:53
L0MDT::LegendreSegmentFinderTool::MaxBin::valid
bool valid
Definition
LegendreSegmentFinderTool.h:57
L0MDT::LegendreSegmentFinderTool::MaxBin::rBin
int rBin
Definition
LegendreSegmentFinderTool.h:55
L0MDT::LegendreSegmentFinderTool::MaxBin::thetaBin
int thetaBin
Definition
LegendreSegmentFinderTool.h:54
L0MDT::LegendreSegmentFinderTool::MaxBin::entries
int entries
Definition
LegendreSegmentFinderTool.h:56
Generated on
for ATLAS Offline Software by
1.17.0