Belle II Software development
CKFToPXDResult.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/pxd/entities/CKFToPXDResult.h>
10
11#include <tracking/trackFindingCDC/utilities/ReversedRange.h>
12
13#include <tracking/dataobjects/RecoTrack.h>
14#include <tracking/spacePointCreation/SpacePoint.h>
15#include <pxd/dataobjects/PXDCluster.h>
16
17using namespace Belle2;
18
20 Super(path, path.back()->getMeasuredStateOnPlane())
21{
22 B2ASSERT("Path should not be empty", not path.empty());
23}
24
26{
27 unsigned int sortingParameter = 0;
28 for (const SpacePoint* spacePoint : TrackFindingCDC::reversedRange(getHits())) {
29 RelationVector<PXDCluster> relatedClusters = spacePoint->getRelationsTo<PXDCluster>();
30 for (const PXDCluster& cluster : relatedClusters) {
31 recoTrack.addPXDHit(&cluster, sortingParameter, Belle2::RecoHitInformation::c_SVDtoPXDCKF);
32 sortingParameter++;
33 }
34 }
35}
const std::vector< const SpacePoint * > & getHits() const
Getter for the stored hits.
Definition: CKFResult.h:75
CKFToPXDResult(const std::vector< TrackFindingCDC::WithWeight< const CKFToPXDState * > > &path)
Constructor using a path.
void addToRecoTrack(RecoTrack &recoTrack) const
Called in the exporter findlet for adding this to a already created reco track.
The PXD Cluster class This class stores all information about reconstructed PXD clusters The position...
Definition: PXDCluster.h:30
This is the Reconstruction Event-Data Model Track.
Definition: RecoTrack.h:79
bool addPXDHit(const UsedPXDHit *pxdHit, const unsigned int sortingParameter, OriginTrackFinder foundByTrackFinder=OriginTrackFinder::c_undefinedTrackFinder)
Adds a pxd hit with the given information to the reco track.
Definition: RecoTrack.h:258
Class for type safe access to objects that are referred to in relations.
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.