ATLAS Offline Software
Toggle main menu visibility
Loading...
Searching...
No Matches
MuonSpectrometer
MuonPhaseII
MuonPatternRecognition
MuonPatternHelpers
MuonPatternHelpers
SegmentAmbiSolver.h
Go to the documentation of this file.
1
/*
2
Copyright (C) 2002-2024 CERN for the benefit of the ATLAS collaboration
3
*/
4
#ifndef MUONR4_MUONPATTERNHELPERS_SEGMENTAMBISOLVER_H
5
#define MUONR4_MUONPATTERNHELPERS_SEGMENTAMBISOLVER_H
6
7
#include <
AthenaBaseComps/AthMessaging.h
>
8
#include <
MuonPatternEvent/Segment.h
>
9
10
#include <vector>
11
#include <unordered_map>
12
#include <array>
13
14
namespace
MuonR4::SegmentFit
{
27
class
SegmentAmbiSolver
:
public
AthMessaging
{
28
public
:
30
struct
Config
{
33
double
selectByNDoFChi2
{5.};
35
unsigned
int
sharedPrecHits
{3};
38
bool
remLeftRightAmbi
{
false
};
39
};
40
43
SegmentAmbiSolver
(
const
std::string&name,
44
Config
&& config);
45
47
using
SegmentVec
= std::vector<std::unique_ptr<Segment>>;
52
SegmentVec
resolveAmbiguity
(
const
ActsTrk::GeometryContext
& gctx,
53
SegmentVec
&& toResolve)
const
;
54
private
:
56
const
Config
m_cfg
{};
58
enum class
Resolution
: std::uint8_t{
59
noOverlap
,
60
superSet
,
61
subSet
62
};
63
68
std::vector<int>
driftSigns
(
const
ActsTrk::GeometryContext
& gctx,
69
const
Segment
& segment,
70
const
Segment::MeasVec
& measurements)
const
;
72
using
MeasurementSet
= std::unordered_set<const xAOD::UncalibratedMeasurement*>;
75
MeasurementSet
extractPrds
(
const
Segment
& segment)
const
;
76
80
unsigned
int
countShared
(
const
MeasurementSet
& measSet1,
81
const
MeasurementSet
& measSet2)
const
;
82
85
double
redChi2
(
const
Segment
& segment)
const
;
86
87
88
89
90
};
91
}
92
93
94
#endif
AthMessaging.h
Segment.h
ActsTrk::GeometryContext
Definition
GeometryContext.h:30
AthMessaging::AthMessaging
AthMessaging(IMessageSvc *msgSvc, const std::string &name)
Constructor.
Definition
AthMessaging.cxx:13
MuonR4::SegmentFit::SegmentAmbiSolver::m_cfg
const Config m_cfg
Configuration object.
Definition
SegmentAmbiSolver.h:56
MuonR4::SegmentFit::SegmentAmbiSolver::MeasurementSet
std::unordered_set< const xAOD::UncalibratedMeasurement * > MeasurementSet
List of measurements out of which the segment is made of.
Definition
SegmentAmbiSolver.h:72
MuonR4::SegmentFit::SegmentAmbiSolver::Resolution
Resolution
Auxiliary enum to indicate the ambiguity status of the segment candidates.
Definition
SegmentAmbiSolver.h:58
MuonR4::SegmentFit::SegmentAmbiSolver::Resolution::noOverlap
@ noOverlap
Definition
SegmentAmbiSolver.h:59
MuonR4::SegmentFit::SegmentAmbiSolver::Resolution::superSet
@ superSet
No ambiguity with other candidates detected.
Definition
SegmentAmbiSolver.h:60
MuonR4::SegmentFit::SegmentAmbiSolver::Resolution::subSet
@ subSet
Ambiguity detected and the candidate is of better quality.
Definition
SegmentAmbiSolver.h:61
MuonR4::SegmentFit::SegmentAmbiSolver::resolveAmbiguity
SegmentVec resolveAmbiguity(const ActsTrk::GeometryContext &gctx, SegmentVec &&toResolve) const
Launches the ambiguity resoltuion and returns a new temporary contained containing the good candidate...
Definition
SegmentAmbiSolver.cxx:17
MuonR4::SegmentFit::SegmentAmbiSolver::countShared
unsigned int countShared(const MeasurementSet &measSet1, const MeasurementSet &measSet2) const
Counts the number of measurements that're in both sets.
Definition
SegmentAmbiSolver.cxx:121
MuonR4::SegmentFit::SegmentAmbiSolver::extractPrds
MeasurementSet extractPrds(const Segment &segment) const
Extract the Uncalibrated measurements used to build the segment.
Definition
SegmentAmbiSolver.cxx:107
MuonR4::SegmentFit::SegmentAmbiSolver::redChi2
double redChi2(const Segment &segment) const
Returns the reduced chi2 of the segment.
Definition
SegmentAmbiSolver.cxx:14
MuonR4::SegmentFit::SegmentAmbiSolver::SegmentVec
std::vector< std::unique_ptr< Segment > > SegmentVec
Abrivation of the temporary segment container.
Definition
SegmentAmbiSolver.h:47
MuonR4::SegmentFit::SegmentAmbiSolver::driftSigns
std::vector< int > driftSigns(const ActsTrk::GeometryContext &gctx, const Segment &segment, const Segment::MeasVec &measurements) const
Calculates the left-right ambiguities of the segment w.r.t each measurement.
Definition
SegmentAmbiSolver.cxx:97
MuonR4::SegmentFit::SegmentAmbiSolver::SegmentAmbiSolver
SegmentAmbiSolver(const std::string &name, Config &&config)
Constructor.
Definition
SegmentAmbiSolver.cxx:10
MuonR4::Segment
Placeholder for what will later be the muon segment EDM representation.
Definition
MuonSpectrometer/MuonPhaseII/Event/MuonPatternEvent/MuonPatternEvent/Segment.h:21
MuonR4::Segment::MeasVec
std::vector< MeasType > MeasVec
Definition
MuonSpectrometer/MuonPhaseII/Event/MuonPatternEvent/MuonPatternEvent/Segment.h:25
MuonR4::SegmentFit
Definition
MuonHoughDefs.h:34
Config
Definition
dumpNPs.cxx:47
MuonR4::SegmentFit::SegmentAmbiSolver::Config
Configuration object to stree the ambiguties.
Definition
SegmentAmbiSolver.h:30
MuonR4::SegmentFit::SegmentAmbiSolver::Config::sharedPrecHits
unsigned int sharedPrecHits
Cut on the number of shared precision hits.
Definition
SegmentAmbiSolver.h:35
MuonR4::SegmentFit::SegmentAmbiSolver::Config::selectByNDoFChi2
double selectByNDoFChi2
If two overlapping segments have both the chi2 below the threshold, the one with more degrees of free...
Definition
SegmentAmbiSolver.h:33
MuonR4::SegmentFit::SegmentAmbiSolver::Config::remLeftRightAmbi
bool remLeftRightAmbi
Two candidates with the sam number of precision hits but with different left / right ambiguities are ...
Definition
SegmentAmbiSolver.h:38
Generated on
for ATLAS Offline Software by
1.17.0