File indexing completed on 2023-03-17 13:02:43
0001
0002
0003
0004
0005
0006
0007
0008
0009
0010
0011
0012 #include <cppunit/extensions/HelperMacros.h>
0013 #include <Geometry/DTGeometry/interface/DTTopology.h>
0014
0015 class testDTTopology : public CppUnit::TestFixture {
0016 CPPUNIT_TEST_SUITE(testDTTopology);
0017
0018 CPPUNIT_TEST(testDTTopologyMeth);
0019
0020 CPPUNIT_TEST_SUITE_END();
0021
0022 public:
0023 void testDTTopologyMeth();
0024
0025
0026
0027 };
0028
0029
0030 CPPUNIT_TEST_SUITE_REGISTRATION(testDTTopology);
0031
0032 void testDTTopology::testDTTopologyMeth() {
0033 int firstWire1 = 1;
0034 int nChannels = 48;
0035 float length = 20.;
0036
0037 DTTopology topology(firstWire1, nChannels, length);
0038
0039 CPPUNIT_ASSERT(firstWire1 == topology.firstChannel());
0040 CPPUNIT_ASSERT(nChannels == topology.channels());
0041 CPPUNIT_ASSERT(3 == topology.channel(LocalPoint(topology.wirePosition(3), 0, 0)));
0042 CPPUNIT_ASSERT(3 == topology.measurementPosition(LocalPoint(topology.wirePosition(3), 0, 0)).x());
0043 CPPUNIT_ASSERT(3 == topology.channel(topology.localPosition(
0044 topology.measurementPosition(LocalPoint(topology.wirePosition(3), 0, 0)))));
0045 }
0046
0047 #include <Utilities/Testing/interface/CppUnit_testdriver.icpp>