9 #include <boost/test/data/test_case.hpp> 
   10 #include <boost/test/unit_test.hpp> 
   32 using namespace Acts::UnitLiterals;
 
   39 template <
typename charge_t>
 
   41                      double l0, 
double l1, 
double time, 
double phi,
 
   44   const auto qOverP = (q != 0) ? (q / p) : (1 / 
p);
 
   64   BOOST_CHECK_EQUAL(params.
charge(), q);
 
   67 void runTest(std::shared_ptr<const Surface> 
surface, 
double l0, 
double l1,
 
   68              double time, 
double phi, 
double theta, 
double p) {
 
   70   phi = ((0 < 
theta) and (theta < 
M_PI)) ? phi : 0.0;
 
   79   pos4.segment<3>(
ePos0) = pos;
 
   92     checkParameters(params, l0, l1, time, phi, theta, p, 0_e, pos, dir);
 
   97     checkParameters(params, l0, l1, time, phi, theta, p, 0_e, pos, dir);
 
   98     BOOST_CHECK(params.covariance());
 
   99     BOOST_CHECK_EQUAL(params.covariance().value(), 
cov);
 
  111     checkParameters(params, l0, l1, time, phi, theta, p, -1_e, pos, dir);
 
  112     BOOST_CHECK(not params.covariance());
 
  116     checkParameters(params, l0, l1, time, phi, theta, p, -1_e, pos, dir);
 
  117     BOOST_CHECK(params.covariance());
 
  118     BOOST_CHECK_EQUAL(params.covariance().value(), 
cov);
 
  130     checkParameters(params, l0, l1, time, phi, theta, p, 1_e, pos, dir);
 
  131     BOOST_CHECK(not params.covariance());
 
  135     checkParameters(params, l0, l1, time, phi, theta, p, 1_e, pos, dir);
 
  136     BOOST_CHECK(params.covariance());
 
  137     BOOST_CHECK_EQUAL(params.covariance().value(), 
cov);
 
  148     AnyBoundTrackParameters params(surface, vector, -2_e);
 
  149     checkParameters(params, l0, l1, time, phi, theta, p, -2_e, pos, dir);
 
  150     BOOST_CHECK(not params.covariance());
 
  153     params = AnyBoundTrackParameters(surface, vector, -2_e, 
cov);
 
  154     checkParameters(params, l0, l1, time, phi, theta, p, -2_e, pos, dir);
 
  155     BOOST_CHECK(params.covariance());
 
  156     BOOST_CHECK_EQUAL(params.covariance().value(), 
cov);
 
  161     checkParameters(params, l0, l1, time, phi, theta, p, 0_e, pos, dir);
 
  162     BOOST_CHECK(not params.covariance());
 
  167     checkParameters(params, l0, l1, time, phi, theta, p, -1_e, pos, dir);
 
  168     BOOST_CHECK(not params.covariance());
 
  173     checkParameters(params, l0, l1, time, phi, theta, p, 1_e, pos, dir);
 
  174     BOOST_CHECK(not params.covariance());
 
  178     AnyBoundTrackParameters params(surface, 
geoCtx, pos4, dir, p, 0_e);
 
  179     checkParameters(params, l0, l1, time, phi, theta, p, 0_e, pos, dir);
 
  180     BOOST_CHECK(not params.covariance());
 
  184     AnyBoundTrackParameters params(surface, 
geoCtx, pos4, dir, p, -2_e);
 
  185     checkParameters(params, l0, l1, time, phi, theta, p, -2_e, pos, dir);
 
  186     BOOST_CHECK(not params.covariance());
 
  190     AnyBoundTrackParameters params(surface, 
geoCtx, pos4, dir, p, 3_e);
 
  191     checkParameters(params, l0, l1, time, phi, theta, p, 3_e, pos, dir);
 
  192     BOOST_CHECK(not params.covariance());
 
  199 const auto cones = bdata::make({
 
  200     Surface::makeShared<ConeSurface>(Transform3D::Identity(),
 
  203 const auto cylinders = bdata::make({
 
  204     Surface::makeShared<CylinderSurface>(Transform3D::Identity(),
 
  207 const auto discs = bdata::make({
 
  208     Surface::makeShared<DiscSurface>(Transform3D::Identity(),
 
  211 const auto perigees = bdata::make({
 
  212     Surface::makeShared<PerigeeSurface>(
Vector3D(0, 0, -1.5)),
 
  214 const auto planes = bdata::make({
 
  215     Surface::makeShared<PlaneSurface>(
Vector3D(1, 2, 3), Vector3D::UnitX()),
 
  216     Surface::makeShared<PlaneSurface>(
Vector3D(-2, -3, -4), Vector3D::UnitY()),
 
  217     Surface::makeShared<PlaneSurface>(
Vector3D(3, -4, 5), Vector3D::UnitZ()),
 
  219 const auto straws = bdata::make({
 
  220     Surface::makeShared<StrawSurface>(Transform3D::Identity(), 2.0 ,
 
  226 BOOST_AUTO_TEST_SUITE(EventDataBoundTrackParameters)
 
  229                      cones* posAngle* posPositiveNonzero* ts* phis* thetas* 
ps,
 
  230                      surface, lphi, lz, time, phi, theta, p) {
 
  233   const auto r = lz * surface->bounds().tanAlpha();
 
  235   runTest(surface, (0 < lz) ? (r * lphi) : 0.0, lz, time, phi, theta, p);
 
  240     cylinders* posSymmetric* posSymmetric* ts* phis* thetas* 
ps, surface, lrphi,
 
  241     lz, time, phi, theta, p) {
 
  242   runTest(surface, lrphi, lz, time, phi, theta, p);
 
  246                      discs* posPositive* posAngle* ts* phis* thetas* 
ps,
 
  247                      surface, lr, lphi, time, phi, theta, p) {
 
  249   runTest(surface, lr, (0 < lr) ? lphi : 0.0, time, phi, theta, p);
 
  254     perigees* posSymmetric* posSymmetric* ts* phis* thetasNoForwardBackward* 
ps,
 
  255     surface, d0, z0, time, phi, theta, p) {
 
  257   runTest(surface, d0, z0, time, phi, theta, p);
 
  261                      planes* posSymmetric* posSymmetric* ts* phis* thetas* 
ps,
 
  262                      surface, l0, l1, time, phi, theta, p) {
 
  263   runTest(surface, l0, l1, time, phi, theta, p);
 
  268     straws* posPositive* posSymmetric* ts* phis* thetasNoForwardBackward* 
ps,
 
  269     surface, lr, lz, time, phi, theta, p) {
 
  271   runTest(surface, lr, lz, time, phi, theta, p);
 
  274 BOOST_AUTO_TEST_SUITE_END()