7 #include <boost/program_options.hpp>
31 std::vector<std::pair<long unsigned int, double>>
chi2Cuts;
34 template <
typename track_state_t>
38 if(not state.hasCalibrated() or not state.hasPredicted())
43 auto distance = (state.calibrated() - state.projector() * state.predicted()).norm();
46 const auto& projector = state.projector();
47 const auto& predictedCov = state.predictedCovariance();
48 const auto& stateCov = state.effectiveCalibratedCovariance();
52 double chi2 = ((state.calibrated() - state.projector() * state.predicted()).transpose() *
53 (( stateCov + projector * predictedCov * projector.transpose())).inverse() * (state.calibrated() - state.projector() * state.predicted()))
58 std::cout <<
"geoid : " << state.referenceSurface().geometryId() << std::endl;
59 std::cout <<
"Distance between prediction and measurement is: " << distance << std::endl;
60 std::cout <<
"chi2 " << chi2 << std::endl;
63 auto volID = state.referenceSurface().geometryId().volume();
69 std::cout <<
"VolID : " << volID <<
" checking against " << pair.first
70 <<
", chicut " << pair.second <<
" with chi2 " << chi2 << std::endl;
73 if(volID == pair.first)
75 return chi2 >= pair.second;
85 namespace ActsExamples {
99 const std::vector<ActsExamples::TrkrClusterSourceLink>&,
105 const std::vector<ActsExamples::TrkrClusterSourceLink>&,
108 const std::vector<const Acts::Surface*>&)>;