Belle II Software development
CKFToSVDResult.cc
1/**************************************************************************
2 * basf2 (Belle II Analysis Software Framework) *
3 * Author: The Belle II Collaboration *
4 * *
5 * See git log for contributors and copyright holders. *
6 * This file is licensed under LGPL-3.0, see LICENSE.md. *
7 **************************************************************************/
8
9#include <tracking/ckf/svd/entities/CKFToSVDResult.h>
10
11#include <tracking/trackFindingCDC/utilities/ReversedRange.h>
12
13#include <tracking/dataobjects/RecoTrack.h>
14#include <tracking/spacePointCreation/SpacePoint.h>
15#include <svd/dataobjects/SVDCluster.h>
16
17using namespace Belle2;
18
20 Super(path, path.back()->getMeasuredStateOnPlane())
21{
22 B2ASSERT("Path should not be empty", not path.empty());
23
25 const RecoTrack* relatedSVDTrack = state->getRelatedSVDTrack();
27 B2ASSERT("There is a state with a different VXD track in it!", m_relatedSVDRecoTrack == relatedSVDTrack);
28 } else {
29 m_relatedSVDRecoTrack = relatedSVDTrack;
30 }
31 }
32}
33
35{
36 unsigned int sortingParameter = 0;
37 for (const SpacePoint* spacePoint : TrackFindingCDC::reversedRange(getHits())) {
38 RelationVector<SVDCluster> relatedClusters = spacePoint->getRelationsTo<SVDCluster>();
39 for (const SVDCluster& cluster : relatedClusters) {
40 recoTrack.addSVDHit(&cluster, sortingParameter, Belle2::RecoHitInformation::c_CDCtoSVDCKF);
41 sortingParameter++;
42 }
43 }
44}
45
47{
49}
const std::vector< const SpacePoint * > & getHits() const
Getter for the stored hits.
Definition: CKFResult.h:75
CKFToSVDResult(const std::vector< TrackFindingCDC::WithWeight< const CKFToSVDState * > > &path)
Constructor using a path.
const RecoTrack * m_relatedSVDRecoTrack
The related SVD track, if we go along one of them (or a nullptr)
const RecoTrack * getRelatedSVDRecoTrack() const
Return the related SVD track, if we go along one of them.
void addToRecoTrack(RecoTrack &recoTrack) const
Called in the exporter findlet for adding this to a already created reco track.
This is the Reconstruction Event-Data Model Track.
Definition: RecoTrack.h:79
bool addSVDHit(const UsedSVDHit *svdHit, const unsigned int sortingParameter, OriginTrackFinder foundByTrackFinder=OriginTrackFinder::c_undefinedTrackFinder)
Adds a svd hit with the given information to the reco track.
Definition: RecoTrack.h:272
Class for type safe access to objects that are referred to in relations.
The SVD Cluster class This class stores all information about reconstructed SVD clusters.
Definition: SVDCluster.h:29
SpacePoint typically is build from 1 PXDCluster or 1-2 SVDClusters.
Definition: SpacePoint.h:42
A mixin class to attach a weight to an object.
Definition: WithWeight.h:24
Abstract base class for different kinds of events.