ATLAS Offline Software
Toggle main menu visibility
Loading...
Searching...
No Matches
MuonSpectrometer
MuonReconstruction
MuonRecEvent
MuonHoughPatternEvent
src
MuonHoughTransformSteering.cxx
Go to the documentation of this file.
1
/*
2
Copyright (C) 2002-2023 CERN for the benefit of the ATLAS collaboration
3
*/
4
5
#include "
MuonHoughPatternEvent/MuonHoughTransformSteering.h
"
6
7
#include "
AthenaKernel/getMessageSvc.h
"
8
#include "GaudiKernel/MsgStream.h"
9
#include "
MuonHoughPatternEvent/MuonHoughPattern.h
"
10
#include "
MuonHoughPatternEvent/MuonHoughTransformer.h
"
11
12
MuonHoughTransformSteering::MuonHoughTransformSteering
(std::unique_ptr<MuonHoughTransformer> houghtransformer) :
13
AthMessaging
{
"MuonHoughTransformSteering"
},
14
m_houghtransformer
{
std
::move(houghtransformer)} {}
15
16
MuonHoughTransformSteering::~MuonHoughTransformSteering
() =
default
;
17
18
MuonHoughPatternCollection
MuonHoughTransformSteering::constructHoughPatterns
(
const
MuonHoughHitContainer
& event,
double
residu_mm,
19
double
residu_grad,
int
max_patterns)
const
{
20
MuonHoughPatternCollection
houghpatterns;
21
houghpatterns.reserve(max_patterns);
22
std::vector<std::pair<int, int> > maxima =
m_houghtransformer
->getMaxima(max_patterns);
// sector,binnumber , sorted vector
23
24
for
(
const
auto
& [sector, binnumber] : maxima) {
25
if
(binnumber == -1) {
26
ATH_MSG_VERBOSE
(
"binnumber == -1 (no max found), max patterns = "
<< max_patterns );
27
break
;
28
}
29
std::unique_ptr<MuonHoughPattern> houghpattern =
constructHoughPattern
(event, binnumber, residu_mm,
30
residu_grad, sector);
31
houghpatterns.emplace_back(std::move(houghpattern));
32
}
33
34
// subtract all hits that were just added to a pattern
35
// m_houghtransformer->fill(event,true);
36
37
return
houghpatterns;
38
}
39
40
std::unique_ptr<MuonHoughPattern>
MuonHoughTransformSteering::constructHoughPattern
(
const
MuonHoughHitContainer
& event,
double
residu_mm,
41
double
residu_grad,
int
maximum_number)
const
{
42
ATH_MSG_DEBUG
(
"MuonHoughTransformSteering::constructHoughPattern (start) "
);
43
44
std::unique_ptr<MuonHoughPattern> houghpattern =
m_houghtransformer
->associateHitsToMaximum(event, residu_mm, residu_grad,
45
maximum_number);
46
47
ATH_MSG_DEBUG
(
"MuonHoughTransformSteering::constructHoughPattern (end) "
);
48
49
return
houghpattern;
50
}
51
52
std::unique_ptr<MuonHoughPattern>
MuonHoughTransformSteering::constructHoughPattern
(
const
MuonHoughHitContainer
& event, std::pair<double, double> coords,
53
double
residu_mm,
double
residu_grad,
int
sector)
const
{
54
return
m_houghtransformer
->associateHitsToCoords(event, coords, residu_mm, residu_grad, sector);
55
}
56
57
std::unique_ptr<MuonHoughPattern>
MuonHoughTransformSteering::constructHoughPattern
(
const
MuonHoughHitContainer
& event,
int
binnumber,
double
residu_mm,
58
double
residu_grad,
int
sector)
const
{
59
return
m_houghtransformer
->associateHitsToBinnumber(event, binnumber, residu_mm, residu_grad, sector);
60
}
61
62
void
MuonHoughTransformSteering::fill
(
const
MuonHoughHitContainer
& event) {
m_houghtransformer
->fill(event); }
63
64
void
MuonHoughTransformSteering::resetHisto
() {
m_houghtransformer
->resetHisto(); }
ATH_MSG_VERBOSE
#define ATH_MSG_VERBOSE(x)
Definition
AthMsgStreamMacros.h:28
ATH_MSG_DEBUG
#define ATH_MSG_DEBUG(x)
Definition
AthMsgStreamMacros.h:29
MuonHoughPatternCollection
std::vector< std::unique_ptr< MuonHoughPattern > > MuonHoughPatternCollection
This typedef represents a collection and container of MuonHoughPattern objects.
Definition
MuonHoughPatternCollection.h:13
MuonHoughPattern.h
MuonHoughTransformSteering.h
MuonHoughTransformer.h
AthMessaging::AthMessaging
AthMessaging(IMessageSvc *msgSvc, const std::string &name)
Constructor.
Definition
AthMessaging.cxx:13
MuonHoughHitContainer
Definition
MuonHoughHitContainer.h:15
MuonHoughTransformSteering::constructHoughPattern
std::unique_ptr< MuonHoughPattern > constructHoughPattern(const MuonHoughHitContainer &event, double residu_mm, double residu_grad, int maximum_number) const
construct hough pattern on a certain maxima number of histogram
Definition
MuonHoughTransformSteering.cxx:40
MuonHoughTransformSteering::constructHoughPatterns
MuonHoughPatternCollection constructHoughPatterns(const MuonHoughHitContainer &event, double residu_mm, double residu_grad, int max_patterns) const
construct hough patterns
Definition
MuonHoughTransformSteering.cxx:18
MuonHoughTransformSteering::~MuonHoughTransformSteering
~MuonHoughTransformSteering()
destructor
MuonHoughTransformSteering::MuonHoughTransformSteering
MuonHoughTransformSteering(std::unique_ptr< MuonHoughTransformer >)
Class is build as Strategy, Context pattern.
Definition
MuonHoughTransformSteering.cxx:12
MuonHoughTransformSteering::fill
void fill(const MuonHoughHitContainer &event)
fill histograms
Definition
MuonHoughTransformSteering.cxx:62
MuonHoughTransformSteering::m_houghtransformer
std::unique_ptr< MuonHoughTransformer > m_houghtransformer
the actual houghtransform
Definition
MuonHoughTransformSteering.h:57
MuonHoughTransformSteering::resetHisto
void resetHisto()
reset histograms
Definition
MuonHoughTransformSteering.cxx:64
getMessageSvc.h
singleton-like access to IMessageSvc via open function and helper
std
STL namespace.
Generated on
for ATLAS Offline Software by
1.17.0