Loading [MathJax]/extensions/tex2jax.js
ATLAS Offline Software
Main Page
Related Pages
Modules
Namespaces
Namespace List
Namespace Members
All
_
a
b
c
d
e
f
g
h
i
j
k
l
m
n
o
p
q
r
s
t
u
v
w
x
y
z
Functions
_
a
b
c
d
e
f
g
h
i
j
k
l
m
n
o
p
q
r
s
t
u
v
w
x
y
z
Variables
_
a
b
c
d
e
f
g
h
i
j
k
l
m
n
o
p
q
r
s
t
u
v
w
x
y
z
Typedefs
a
b
c
d
e
f
g
h
i
j
k
l
m
n
o
p
q
r
s
t
u
v
w
x
z
Enumerations
a
b
c
d
e
f
g
h
i
j
k
l
m
n
o
p
q
r
s
t
u
v
w
z
Enumerator
a
b
c
d
e
f
g
h
i
j
k
l
m
n
o
p
q
r
s
t
u
v
w
x
y
z
Classes
Class List
Class Index
Class Hierarchy
Class Members
All
:
_
a
b
c
d
e
f
g
h
i
j
k
l
m
n
o
p
q
r
s
t
u
v
w
x
y
z
~
Functions
_
a
b
c
d
e
f
g
h
i
j
k
l
m
n
o
p
q
r
s
t
u
v
w
x
y
z
~
Variables
_
a
b
c
d
e
f
g
h
i
j
k
l
m
n
o
p
q
r
s
t
u
v
w
x
y
z
Typedefs
_
a
b
c
d
e
f
g
h
i
j
k
l
m
n
o
p
q
r
s
t
u
v
w
x
y
z
Enumerations
a
b
c
d
e
f
g
h
i
j
k
l
m
n
o
p
q
r
s
t
u
v
w
x
y
z
Enumerator
a
b
c
d
e
f
g
h
i
j
k
l
m
n
o
p
q
r
s
t
u
v
w
x
y
z
Properties
Related Functions
:
a
b
c
d
e
f
g
h
i
j
l
m
n
o
p
r
s
t
v
w
x
z
Files
File List
File Members
All
$
_
a
b
c
d
e
f
g
h
i
j
k
l
m
n
o
p
q
r
s
t
u
v
w
x
y
z
Functions
_
a
b
c
d
e
f
g
h
i
j
l
m
n
o
p
q
r
s
t
u
v
w
x
z
Variables
$
a
b
c
d
e
f
g
h
i
j
k
l
m
n
o
p
q
r
s
t
u
v
w
x
y
z
Typedefs
a
b
c
d
e
f
g
h
i
j
l
m
n
o
p
q
r
s
t
u
v
w
x
z
Enumerations
a
b
c
d
e
f
g
h
i
l
m
n
o
p
r
s
t
v
x
z
Enumerator
a
b
c
d
e
f
g
h
i
j
k
l
m
n
o
p
q
r
s
t
u
v
w
x
y
z
Macros
_
a
b
c
d
e
f
g
h
i
j
k
l
m
n
o
p
q
r
s
t
u
v
w
x
y
z
GitLab
LXR
•
All
Classes
Namespaces
Files
Functions
Variables
Typedefs
Enumerations
Enumerator
Properties
Friends
Macros
Modules
Pages
Trigger
TrigAnalysis
TriggerMatchingTool
Root
MinimalSumAssociation.cxx
Go to the documentation of this file.
1
// Dear emacs, this is -*- c++ -*-
2
3
/*
4
Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration
5
*/
6
7
#include "
MinimalSumAssociation.h
"
8
#include "
munkres.h
"
9
10
11
MinimalSumAssociation::MinimalSumAssociation
() :
asg
::AsgMessaging(
"MinimalSumAssociation"
){
12
msg
().setLevel(
MSG::DEBUG
);
13
}
14
15
IAssociationStrategy::index_assignment_t
MinimalSumAssociation::associate
(
const
std::vector<std::vector<double> >&
matrix
){
16
IAssociationStrategy::index_assignment_t
resultmap;
17
int
nrows =
matrix
.size();
18
int
ncols =
matrix
.at(0).size();
19
20
auto
workmatrix =
matrix
;
21
//if we have more columns than rows we pad the matrix to make it square
22
if
(nrows < ncols){
23
for
(
int
i
= (ncols - nrows);
i
> 0;
i
--){
24
workmatrix.push_back(std::vector<double>(ncols,0));
25
}
26
}
27
28
munkres::vec_type
costs;
29
costs.reserve(ncols);
30
munkres
munk(workmatrix);
31
32
bool
debug
=
false
;
33
auto
result
= munk.
run
(costs,
debug
);
34
35
//result is indexed by row
36
//i.e. when matrix is matrxi[reco][trig]
37
//it maps reco particle at index i to trig particle at index
38
//result[i]
39
for
(
int
i
= 0;
i
< nrows;++
i
){
40
resultmap[
i
] =
result
[
i
];
41
}
42
43
return
resultmap;
44
}
get_generator_info.result
result
Definition:
get_generator_info.py:21
munkres
Definition:
munkres.h:17
asg
Definition:
DataHandleTestTool.h:28
munkres.h
IAssociationStrategy::index_assignment_t
std::map< unsigned int, unsigned int > index_assignment_t
Definition:
IAssociationStrategy.h:16
munkres::run
result_type run(vec_type &costvector, bool debug=false)
Definition:
munkres.cxx:20
lumiFormat.i
int i
Definition:
lumiFormat.py:85
MinimalSumAssociation::MinimalSumAssociation
MinimalSumAssociation()
Definition:
MinimalSumAssociation.cxx:11
asg::AsgMessaging::msg
MsgStream & msg() const
The standard message stream.
Definition:
AsgMessaging.cxx:49
MinimalSumAssociation::associate
index_assignment_t associate(const std::vector< std::vector< double > > &matrix)
Definition:
MinimalSumAssociation.cxx:15
munkres::vec_type
std::vector< double > vec_type
Definition:
munkres.h:19
debug
const bool debug
Definition:
MakeUncertaintyPlots.cxx:53
python.testIfMatch.matrix
matrix
Definition:
testIfMatch.py:66
DEBUG
#define DEBUG
Definition:
page_access.h:11
MinimalSumAssociation.h
Generated on Fri Mar 21 2025 21:14:47 for ATLAS Offline Software by
1.8.18