Belle II Software  release-05-01-25
TrackFindingCDCTestWithTopology.cc
1 /**************************************************************************
2  * BASF2 (Belle Analysis Framework 2) *
3  * Copyright(C) 2014 - Belle II Collaboration *
4  * *
5  * Author: The Belle II Collaboration *
6  * Contributors: Oliver Frost <oliver.frost@desy.de> *
7  * *
8  * This software is provided "as is" without any warranty. *
9  **************************************************************************/
10 
11 #include <tracking/trackFindingCDC/testFixtures/TrackFindingCDCTestWithTopology.h>
12 
13 #include <tracking/trackFindingCDC/topology/CDCWireTopology.h>
14 #include <tracking/trackFindingCDC/topology/CDCGeometryLoader.h>
15 
16 #include <cmath>
17 
18 using namespace Belle2;
19 using namespace TrackFindingCDC;
20 
21 
23 {
26 
27  // Prepare the wires for the cdc track finders.
29 }
30 
32 {
34 }
35 
36 
37 
38 template<>
39 bool Belle2::TestHelpers::allNear<Vector3D>(const Vector3D& expected,
40  const Vector3D& actual,
41  double tolerance)
42 {
43  bool xNear = std::fabs(expected.x() - actual.x()) < tolerance;
44  bool yNear = std::fabs(expected.y() - actual.y()) < tolerance;
45  bool zNear = std::fabs(expected.z() - actual.z()) < tolerance;
46  return xNear and yNear and zNear;
47 }
Belle2::TrackFindingCDC::CDCWireTopology::getInstance
static CDCWireTopology & getInstance()
Getter for the singleton instance of the wire topology.
Definition: CDCWireTopology.cc:22
Belle2::TrackFindingCDC::Vector3D::x
double x() const
Getter for the x coordinate.
Definition: Vector3D.h:464
Belle2
Abstract base class for different kinds of events.
Definition: MillepedeAlgorithm.h:19
Belle2::TrackFindingCDC::TrackFindingCDCTestWithTopology::TearDownTestCase
static void TearDownTestCase()
Implementation of hook method to clean up the environment for all tests in this test case.
Definition: TrackFindingCDCTestWithTopology.cc:31
Belle2::TrackFindingCDC::Vector3D
A three dimensional vector.
Definition: Vector3D.h:34
Belle2::TrackFindingCDC::Vector3D::y
double y() const
Getter for the y coordinate.
Definition: Vector3D.h:476
Belle2::TrackFindingCDC::CDCGeometryLoader::closeDatabase
static void closeDatabase()
Helper function to close and reset the database - only for tests offside the standard event processin...
Definition: CDCGeometryLoader.cc:49
Belle2::TrackFindingCDC::TrackFindingCDCTestWithTopology::SetUpTestCase
static void SetUpTestCase()
Implementation of hook method to setup the environment for all tests in this test case Unpacks the wi...
Definition: TrackFindingCDCTestWithTopology.cc:22
Belle2::TrackFindingCDC::Vector3D::z
double z() const
Getter for the z coordinate.
Definition: Vector3D.h:488
Belle2::TrackFindingCDC::CDCGeometryLoader::loadDatabase
static void loadDatabase()
Helper function to open the database - only for tests offside the standard event processing.
Definition: CDCGeometryLoader.cc:23