@@ -508,6 +508,7 @@ TEST_P(PropagatorWithRkStepperDirectNavigator, direct_navigator) {
508
508
// Propagate the entire detector
509
509
// state.do_debug = true;
510
510
ASSERT_TRUE (p.propagate (state, actor_states));
511
+ // std::cout << "Normal Navigation" << std::endl;
511
512
// std::cout << state.debug_stream.str() << std::endl;
512
513
513
514
if (seqs_device.size () > 0 ) {
@@ -518,8 +519,13 @@ TEST_P(PropagatorWithRkStepperDirectNavigator, direct_navigator) {
518
519
direct_propagator_t ::state direct_forward_state (track, bfield, det,
519
520
seqs_device);
520
521
522
+ // direct_forward_state.do_debug = true;
521
523
ASSERT_TRUE (
522
524
direct_p.propagate (direct_forward_state, direct_actor_states));
525
+ // std::cout << "Direct navigaiton in forward direction" <<
526
+ // std::endl; std::cout << direct_forward_state.debug_stream.str()
527
+ // << std::endl;
528
+
523
529
// Check if all surfaces in the sequence are encountered
524
530
ASSERT_TRUE (direct_forward_state._navigation .is_complete ());
525
531
@@ -529,6 +535,21 @@ TEST_P(PropagatorWithRkStepperDirectNavigator, direct_navigator) {
529
535
direct_backward_state._navigation .set_direction (
530
536
detray::navigation::direction::e_backward);
531
537
538
+ const auto ptc = state._stepping .particle_hypothesis ();
539
+ ASSERT_EQ (
540
+ ptc.pdg_num (),
541
+ direct_forward_state._stepping .particle_hypothesis ().pdg_num ());
542
+ const auto q = ptc.charge ();
543
+
544
+ // The initial momentum should be higher than the momentum at the
545
+ // last surface
546
+ ASSERT_GE (track.p (q),
547
+ static_cast <float >(state._stepping .bound_params ().p (q)));
548
+ ASSERT_FLOAT_EQ (
549
+ static_cast <float >(state._stepping .bound_params ().p (q)),
550
+ static_cast <float >(
551
+ direct_forward_state._stepping .bound_params ().p (q)));
552
+
532
553
ASSERT_TRUE (
533
554
direct_p.propagate (direct_backward_state, direct_actor_states));
534
555
// Check if all surfaces in the sequence are encountered
0 commit comments