Belle II Software development
TrackingUtilitiesTestWithTopology.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 <tracking/trackingUtilities/testFixtures/TrackingUtilitiesTestWithTopology.h>
10
11#include <cdc/topology/CDCWireTopology.h>
12#include <cdc/topology/CDCGeometryLoader.h>
13
14#include <cmath>
15
16using namespace Belle2;
17using namespace CDC;
18using namespace TrackingUtilities;
19
20
22{
25
26 // Prepare the wires for the cdc track finders.
28}
29
34
35
36
37template<>
39 const TrackingUtilities::Vector3D& actual,
40 double tolerance)
41{
42 bool xNear = std::fabs(expected.x() - actual.x()) < tolerance;
43 bool yNear = std::fabs(expected.y() - actual.y()) < tolerance;
44 bool zNear = std::fabs(expected.z() - actual.z()) < tolerance;
45 return xNear and yNear and zNear;
46}
static void closeDatabase()
Helper function to close and reset the database - only for tests offside the standard event processin...
static void loadDatabase()
Helper function to open the database - only for tests offside the standard event processing.
static CDCWireTopology & getInstance()
Getter for the singleton instance of the wire topology.
static void SetUpTestCase()
Implementation of hook method to setup the environment for all tests in this test case Unpacks the wi...
static void TearDownTestCase()
Implementation of hook method to clean up the environment for all tests in this test case.
A three dimensional vector.
Definition Vector3D.h:34
double x() const
Getter for the x coordinate.
Definition Vector3D.h:477
double y() const
Getter for the y coordinate.
Definition Vector3D.h:489
double z() const
Getter for the z coordinate.
Definition Vector3D.h:501
bool allNear< TrackingUtilities::Vector3D >(const TrackingUtilities::Vector3D &expected, const TrackingUtilities::Vector3D &actual, double tolerance)
Predicate checking that all three components of Vector3D are close by a maximal error of tolerance.
Abstract base class for different kinds of events.