8#include <tracking/ckf/cdc/filters/pathPairs/MCTruthCDCPathPairFilter.h>
9#include <tracking/dataobjects/RecoTrack.h>
17 std::sort(correctHits.begin(), correctHits.end());
19 unsigned int numberOfCorrectHits = 0;
21 for (
const auto& state : path) {
26 const auto* wireHit = state.getWireHit();
27 const auto* cdcHit = wireHit->getHit();
29 if (std::binary_search(correctHits.begin(), correctHits.end(), cdcHit)) {
30 numberOfCorrectHits++;
34 return numberOfCorrectHits;
40 const auto& lhs = *pair.first;
41 const auto& rhs = *pair.second;
43 const auto& lhsSeed = lhs.front();
44 const auto& rhsSeed = rhs.front();
46 const auto* lhsMCRecoTrack = lhsSeed.getMCRecoTrack();
47 const auto* rhsMCRecoTrack = rhsSeed.getMCRecoTrack();
50 if (not lhsMCRecoTrack and rhsMCRecoTrack) {
52 }
else if (lhsMCRecoTrack and not rhsMCRecoTrack) {
54 }
else if (not lhsMCRecoTrack and not rhsMCRecoTrack) {
60 const unsigned int lhsCorrectHits = countCorrectHits(lhs, lhsMCRecoTrack);
61 const unsigned int rhsCorrectHits = countCorrectHits(rhs, rhsMCRecoTrack);
64 if (lhsCorrectHits > rhsCorrectHits) {
66 }
else if (lhsCorrectHits < rhsCorrectHits) {
71 const unsigned int lhsSize = lhs.size();
72 const unsigned int rhsSize = rhs.size();
76 if (lhsSize > rhsSize) {
78 }
else if (lhsSize < rhsSize) {
84 const double lhsLastArcLength = lhs.back().getArcLength();
85 const double rhsLastArcLength = rhs.back().getArcLength();
87 return lhsLastArcLength < rhsLastArcLength;
TrackFindingCDC::Weight operator()(const BaseCDCPathPairFilter::Object &pair) final
Input: pair of paths, returns 1 if pair.first to be selected, 0 otherwise.
This is the Reconstruction Event-Data Model Track.
std::vector< Belle2::RecoTrack::UsedCDCHit * > getCDCHitList() const
Return an unsorted list of cdc hits.
AObject Object
Type of the object to be analysed.
std::vector< CDCCKFState > CDCCKFPath
Shortcut for the collection of CDC CKF-algorithm states.
Abstract base class for different kinds of events.