 |
Belle II Software
release-05-01-25
|
10 #include <tracking/ckf/svd/findlets/RelationFromSVDTracksCreator.h>
12 #include <tracking/spacePointCreation/SpacePointTrackCand.h>
13 #include <tracking/dataobjects/RecoTrack.h>
14 #include <tracking/trackFindingCDC/utilities/StringManipulation.h>
15 #include <tracking/trackFindingCDC/utilities/ReversedRange.h>
17 #include <framework/core/ModuleParamList.h>
35 moduleParamList->
addParameter(TrackFindingCDC::prefixed(prefix,
"vxdTracksStoreArrayName"),
37 "Store Array name coming from VXDTF2.");
38 moduleParamList->
addParameter(TrackFindingCDC::prefixed(prefix,
"cdcTracksStoreArrayName"),
40 "Store Array name coming from CDCTF.");
42 moduleParamList->
addParameter(TrackFindingCDC::prefixed(prefix,
"spacePointTrackCandidatesName"),
44 "Store Array name for the SpacePointTrackCandidates coming from VXDTF2.",
61 B2ASSERT(
"There should be a related SPTC!", spacePointTrackCand);
62 const std::vector<const SpacePoint*> spacePoints = spacePointTrackCand->
getSortedHits();
64 for (
const SpacePoint* spacePoint : TrackFindingCDC::reversedRange(spacePoints)) {
65 const auto hasSpacePoint = [spacePoint](
const CKFToSVDState & state) {
66 return state.getHit() == spacePoint;
69 const auto nextStateIterator = std::find_if(states.begin(), states.end(), hasSpacePoint);
70 B2ASSERT(
"State can not be none!", nextStateIterator != states.end());
76 relations.emplace_back(currentState, NAN, &nextState);
81 relations.emplace_back(&seedState, NAN, &nextState);
85 currentState = &nextState;
89 std::sort(relations.begin(), relations.end());
const std::vector< const Belle2::SpacePoint * > getSortedHits() const
get hits (space points) sorted by their respective sorting parameter
std::string m_param_vxdTracksStoreArrayName
Store Array name coming from VXDTF2.
void setRelatedSVDTrack(const RecoTrack *relatedSVDTrack)
Set the related SVD track, if we go along one of them (or a nullptr)
std::string m_param_cdcTracksStoreArrayName
Store Array name coming from CDCTF.
T * getRelated(const std::string &name="", const std::string &namedRelation="") const
Get the object to or from which this object has a relation.
void initialize() override
Receive and dispatch signal before the start of the event processing.
SpacePoint typically is build from 1 PXDCluster or 1-2 SVDClusters.
~RelationFromSVDTracksCreator()
Default destructor.
This is the Reconstruction Event-Data Model Track.
void apply(std::vector< CKFToSVDState > &seedStates, std::vector< CKFToSVDState > &states, std::vector< TrackFindingCDC::WeightedRelation< CKFToSVDState >> &relations) final
Create relations between seeds and hits or hits and hits.
void addParameter(const std::string &name, T ¶mVariable, const std::string &description, const T &defaultValue)
Adds a new parameter to the module list.
Abstract base class for different kinds of events.
void exposeParameters(ModuleParamList *moduleParamList, const std::string &prefix) final
Expose the parameters of the subfindlet.
RelationFromSVDTracksCreator()
Construct this findlet and add the subfindlet as listener.
std::string m_param_spacePointTrackCandidateName
Store Array name of the space point track candidates coming from VXDTF2.
Type for two related objects with a weight.
The Module parameter list class.
Specialized CKF State for extrapolating into the SVD.
void initialize() final
Require the store array.
StoreArray< RecoTrack > m_vxdRecoTracks
Store Array of the VXD tracks to use.
Storage for (VXD) SpacePoint-based track candidates.