10 #include <tracking/ckf/svd/utilities/SVDMCUtil.h>
12 #include <tracking/ckf/svd/entities/CKFToSVDState.h>
13 #include <tracking/mcMatcher/TrackMatchLookUp.h>
14 #include <tracking/dataobjects/RecoTrack.h>
15 #include <svd/dataobjects/SVDCluster.h>
16 #include <tracking/spacePointCreation/SpacePoint.h>
17 #include <tracking/trackFindingCDC/utilities/Algorithms.h>
18 #include <tracking/trackFindingCDC/numerics/WithWeight.h>
24 const auto isSameMCTrack = [&mcRecoTrack](
const RecoTrack & clusterRecoTrack) {
25 return &clusterRecoTrack == mcRecoTrack;
29 const std::string& mcRecoTrackStoreArrayName = mcRecoTrack->
getArrayName();
32 const auto& relatedMCTracksToCluster = relatedCluster.getRelationsTo<
RecoTrack>(mcRecoTrackStoreArrayName);
33 if (not TrackFindingCDC::any(relatedMCTracksToCluster, isSameMCTrack)) {
41 B2ASSERT(
"Invalid MC information", recoHitInformationOfHit);
48 const auto& itToFirstEntryInDetector = std::find_if(recoHitInformationList.begin(), recoHitInformationList.end(),
50 return hitInformation->getTrackingDetector() == detector;
52 const auto& itToFirstEntryAfterDetector = std::find_if(itToFirstEntryInDetector, recoHitInformationList.end(),
54 return hitInformation->getTrackingDetector() != detector;
57 if (itToFirstEntryAfterDetector == recoHitInformationList.end()) {
63 const auto* firstHitAfterDetector = *itToFirstEntryAfterDetector;
64 return firstHitAfterDetector->getSortingParameter() >= recoHitInformationOfHit->
getSortingParameter();
70 const auto hitIsCorrectSpecialisation = [
this, mcRecoTrack](
const SpacePoint * spacePoint) {
74 const unsigned int numberOfCorrectHits = std::count_if(hits.begin(), hits.end(), hitIsCorrectSpecialisation);
75 return numberOfCorrectHits;
80 const RecoTrack* seed = states.front()->getSeed();
82 B2ASSERT(
"Path without a seed?", seed);
84 if (states.size() <= 1) {
89 const std::string& seedTrackStoreArrayName = seed->getArrayName();
96 B2DEBUG(100,
"Seed is a fake");
100 std::vector<const SpacePoint*> spacePoints;
102 const SpacePoint* spacePoint = state->getHit();
104 spacePoints.push_back(spacePoint);
110 B2DEBUG(100,
"Have found " << numberOfCorrectHits <<
" correct out of " << spacePoints.size() <<
" hits");
111 return numberOfCorrectHits == spacePoints.size();