Belle II Software
development
overlapMatrixCreator.cc
1
/**************************************************************************
2
* basf2 (Belle II Analysis Software Framework) *
3
* Author: The Belle II Collaboration *
4
* *
5
* See git log for contributors and copyright holders. *
6
* This file is licensed under LGPL-3.0, see LICENSE.md. *
7
**************************************************************************/
8
9
#include <gtest/gtest.h>
10
11
#include <tracking/trackFindingVXD/trackSetEvaluator/OverlapMatrixCreator.h>
12
13
using namespace
std
;
14
using namespace
Belle2
;
15
16
18
class
OverlapMatrixCreatorTest
:
public
::testing::Test {
19
protected
:
21
vector<vector <unsigned short> >
hitRelatedTracks
=
22
//hit 0 1 2 3 4 5 6 7 8 9
23
{{1, 2, 3}, {0, 5, 7}, {5}, {1, 5, 9}, {1}, {4}, {4}, {7, 8, 9}, {8}, {0, 1}};
24
25
vector<vector <unsigned short> >
smallOverlapTestMatrix
=
26
//track 0 1 2 3 4 5 6 7 8 9
27
{{1, 5, 7}, {0, 2, 3, 5, 9}, {1, 3}, {1, 2}, {}, {0, 1, 7, 9}, {}, {0, 5, 8, 9}, {7, 9}, {1, 5, 7, 8}};
28
30
vector<vector <unsigned short> >
hitRelatedTracks2
=
31
{{0, 1, 2, 3}, {1, 2, 3}, {3, 4, 5, 6}, {2, 4}, {3, 5}};
32
33
vector<vector <unsigned short> >
allowOneOverlapTestMatrix
=
34
{{}, {2, 3}, {1, 3}, {1, 2, 5}, {}, {3}, {}};
35
37
vector<vector <unsigned short> >
hitRelatedTracks3
=
38
{{0, 1, 2, 3}, {1, 2, 3}, {3, 4, 5, 6}, {2, 3, 4}, {3, 5}};
39
40
vector<vector <unsigned short> >
allowTwoOverlapTestMatrix
=
41
{{}, {}, {3}, {2}, {}, {}, {}};
42
};
43
44
TEST_F(
OverlapMatrixCreatorTest
, TestGetter)
45
{
46
OverlapMatrixCreator
overlapMatrixCreator(hitRelatedTracks, 10);
47
EXPECT_EQ(smallOverlapTestMatrix, overlapMatrixCreator.getOverlapMatrix());
48
49
OverlapMatrixCreator
overlapMatrixCreator2(hitRelatedTracks2, 7);
50
EXPECT_EQ(allowOneOverlapTestMatrix, overlapMatrixCreator2.getOverlapMatrix(1));
51
52
OverlapMatrixCreator
overlapMatrixCreator3(hitRelatedTracks3, 7);
53
EXPECT_EQ(allowTwoOverlapTestMatrix, overlapMatrixCreator3.getOverlapMatrix(2));
54
}
Belle2::OverlapMatrixCreator
Creates a vector of vectors, that knows which track is conflicting with which other.
Definition
OverlapMatrixCreator.h:19
OverlapMatrixCreatorTest
Test the overlap-matrix creator using known input.
Definition
overlapMatrixCreator.cc:18
OverlapMatrixCreatorTest::hitRelatedTracks2
vector< vector< unsigned short > > hitRelatedTracks2
Another hitRelatedTracks matrix with multiple double overlaps:
Definition
overlapMatrixCreator.cc:30
OverlapMatrixCreatorTest::hitRelatedTracks
vector< vector< unsigned short > > hitRelatedTracks
A hitRelatedTracks matrix for Testing purposes:
Definition
overlapMatrixCreator.cc:21
OverlapMatrixCreatorTest::allowOneOverlapTestMatrix
vector< vector< unsigned short > > allowOneOverlapTestMatrix
and its overlap matrix which allows for 1 cluster overlaps
Definition
overlapMatrixCreator.cc:33
OverlapMatrixCreatorTest::hitRelatedTracks3
vector< vector< unsigned short > > hitRelatedTracks3
This time, we want to check for double overlaps.
Definition
overlapMatrixCreator.cc:37
OverlapMatrixCreatorTest::allowTwoOverlapTestMatrix
vector< vector< unsigned short > > allowTwoOverlapTestMatrix
and its overlap matrix which allows for 2 cluster overlaps
Definition
overlapMatrixCreator.cc:40
OverlapMatrixCreatorTest::smallOverlapTestMatrix
vector< vector< unsigned short > > smallOverlapTestMatrix
Corresponding overlap matrix for testing purposes: [assumes sorting].
Definition
overlapMatrixCreator.cc:25
Belle2
Abstract base class for different kinds of events.
Definition
MillepedeAlgorithm.h:17
std
STL namespace.
tracking
trackFindingVXD
trackSetEvaluator
tests
overlapMatrixCreator.cc
Generated on Mon Sep 1 2025 03:01:31 for Belle II Software by
1.13.2