Belle II Software development
TrackFindingCDCTestWithTopology.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/trackFindingCDC/testFixtures/TrackFindingCDCTestWithTopology.h>
10
11#include <tracking/trackFindingCDC/topology/CDCWireTopology.h>
12#include <tracking/trackFindingCDC/topology/CDCGeometryLoader.h>
13
14#include <cmath>
15
16using namespace Belle2;
17
18
20{
23
24 // Prepare the wires for the cdc track finders.
26}
27
29{
31}
32
33
34
35template<>
37 const TrackFindingCDC::Vector3D& actual,
38 double tolerance)
39{
40 bool xNear = std::fabs(expected.x() - actual.x()) < tolerance;
41 bool yNear = std::fabs(expected.y() - actual.y()) < tolerance;
42 bool zNear = std::fabs(expected.z() - actual.z()) < tolerance;
43 return xNear and yNear and zNear;
44}
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:33
double x() const
Getter for the x coordinate.
Definition: Vector3D.h:472
double y() const
Getter for the y coordinate.
Definition: Vector3D.h:484
double z() const
Getter for the z coordinate.
Definition: Vector3D.h:496
bool allNear< TrackFindingCDC::Vector3D >(const TrackFindingCDC::Vector3D &expected, const TrackFindingCDC::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.