Belle II Software development
RelationFromSVDTracksCreator Class Referenceabstract

Simplified relation creator only creating relations between states of CDC Reco Track seeds and states with SpacePoints, that: (a) for the seed states: connect every seed with every lst hit of the SVD Reco Tracks (b) for the hit states: are in the same SVD Reco Track and follow each other directly. More...

#include <RelationFromSVDTracksCreator.h>

Inheritance diagram for RelationFromSVDTracksCreator:
Findlet< CKFToSVDState, CKFToSVDState, TrackFindingCDC::WeightedRelation< CKFToSVDState > > CompositeProcessingSignalListener ProcessingSignalListener

Public Types

using Super = TrackFindingCDC::Findlet< CKFToSVDState, CKFToSVDState, TrackFindingCDC::WeightedRelation< CKFToSVDState > >
 The parent findlet.
 
using IOTypes = std::tuple< AIOTypes... >
 Types that should be served to apply on invokation.
 
using IOVectors = std::tuple< std::vector< AIOTypes >... >
 Vector types that should be served to apply on invokation.
 

Public Member Functions

 RelationFromSVDTracksCreator ()
 Construct this findlet and add the subfindlet as listener.
 
void initialize () final
 Require the store array.
 
 ~RelationFromSVDTracksCreator ()
 Default destructor.
 
void exposeParameters (ModuleParamList *moduleParamList, const std::string &prefix) final
 Expose the parameters of the subfindlet.
 
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.
 
virtual std::string getDescription ()
 Brief description of the purpose of the concret findlet.
 
virtual void apply (ToVector< AIOTypes > &... ioVectors)=0
 Main function executing the algorithm.
 
void beginRun () override
 Receive and dispatch signal for the beginning of a new run.
 
void beginEvent () override
 Receive and dispatch signal for the start of a new event.
 
void endRun () override
 Receive and dispatch signal for the end of the run.
 
void terminate () override
 Receive and dispatch Signal for termination of the event processing.
 

Protected Types

using ToVector = typename ToVectorImpl< T >::Type
 Short hand for ToRangeImpl.
 

Protected Member Functions

void addProcessingSignalListener (ProcessingSignalListener *psl)
 Register a processing signal listener to be notified.
 
int getNProcessingSignalListener ()
 Get the number of currently registered listeners.
 

Private Attributes

std::string m_param_vxdTracksStoreArrayName = "VXDRecoTracks"
 Store Array name coming from VXDTF2.
 
std::string m_param_cdcTracksStoreArrayName = "CDCRecoTracks"
 Store Array name coming from CDCTF.
 
std::string m_param_spacePointTrackCandidateName = "SPTrackCands"
 Store Array name of the space point track candidates coming from VXDTF2.
 
StoreArray< RecoTrackm_vxdRecoTracks
 Store Array of the VXD tracks to use.
 
std::vector< ProcessingSignalListener * > m_subordinaryProcessingSignalListeners
 References to subordinary signal processing listener contained in this findlet.
 
bool m_initialized = false
 Flag to keep track whether initialization happend before.
 
bool m_terminated = false
 Flag to keep track whether termination happend before.
 
std::string m_initializedAs
 Name of the type during initialisation.
 

Detailed Description

Simplified relation creator only creating relations between states of CDC Reco Track seeds and states with SpacePoints, that: (a) for the seed states: connect every seed with every lst hit of the SVD Reco Tracks (b) for the hit states: are in the same SVD Reco Track and follow each other directly.

So if one travels the path of the relations, one would perfectly travel the path of one SVD track.

Definition at line 32 of file RelationFromSVDTracksCreator.h.

Member Typedef Documentation

◆ IOTypes

using IOTypes = std::tuple<AIOTypes...>
inherited

Types that should be served to apply on invokation.

Definition at line 30 of file Findlet.h.

◆ IOVectors

using IOVectors = std::tuple< std::vector<AIOTypes>... >
inherited

Vector types that should be served to apply on invokation.

Definition at line 53 of file Findlet.h.

◆ Super

◆ ToVector

using ToVector = typename ToVectorImpl<T>::Type
protectedinherited

Short hand for ToRangeImpl.

Definition at line 49 of file Findlet.h.

Constructor & Destructor Documentation

◆ RelationFromSVDTracksCreator()

Construct this findlet and add the subfindlet as listener.

Definition at line 19 of file RelationFromSVDTracksCreator.cc.

20{
21}

Member Function Documentation

◆ addProcessingSignalListener()

void addProcessingSignalListener ( ProcessingSignalListener psl)
protectedinherited

Register a processing signal listener to be notified.

Definition at line 55 of file CompositeProcessingSignalListener.cc.

56{
58}
std::vector< ProcessingSignalListener * > m_subordinaryProcessingSignalListeners
References to subordinary signal processing listener contained in this findlet.

◆ apply()

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.

Definition at line 46 of file RelationFromSVDTracksCreator.cc.

48{
49 for (const RecoTrack& vxdRecoTrack : m_vxdRecoTracks) {
50 if (vxdRecoTrack.getRelated<RecoTrack>(m_param_cdcTracksStoreArrayName)) {
51 continue;
52 }
53
54 CKFToSVDState* currentState = nullptr;
55
56 const SpacePointTrackCand* spacePointTrackCand =
58
59 B2ASSERT("There should be a related SPTC!", spacePointTrackCand);
60 const std::vector<const SpacePoint*> spacePoints = spacePointTrackCand->getSortedHits();
61
62 for (const SpacePoint* spacePoint : TrackFindingCDC::reversedRange(spacePoints)) {
63 const auto hasSpacePoint = [spacePoint](const CKFToSVDState & state) {
64 return state.getHit() == spacePoint;
65 };
66
67 const auto nextStateIterator = std::find_if(states.begin(), states.end(), hasSpacePoint);
68 B2ASSERT("State can not be none!", nextStateIterator != states.end());
69
70 CKFToSVDState& nextState = *nextStateIterator;
71 nextState.setRelatedSVDTrack(&vxdRecoTrack);
72
73 if (currentState) {
74 relations.emplace_back(currentState, NAN, &nextState);
75 } else {
76 for (CKFToSVDState& seedState : seedStates) {
77 // We are not setting the related SVD track of the first state!
78 relations.emplace_back(&seedState, NAN, &nextState);
79 }
80 }
81
82 currentState = &nextState;
83 }
84 }
85
86 std::sort(relations.begin(), relations.end());
87}
Specialized CKF State for extrapolating into the SVD.
Definition: CKFToSVDState.h:27
void setRelatedSVDTrack(const RecoTrack *relatedSVDTrack)
Set the related SVD track, if we go along one of them (or a nullptr)
This is the Reconstruction Event-Data Model Track.
Definition: RecoTrack.h:79
std::string m_param_spacePointTrackCandidateName
Store Array name of the space point track candidates coming from VXDTF2.
std::string m_param_cdcTracksStoreArrayName
Store Array name coming from CDCTF.
StoreArray< RecoTrack > m_vxdRecoTracks
Store Array of the VXD tracks to use.
T * getRelated(const std::string &name="", const std::string &namedRelation="") const
Get the object to or from which this object has a relation.
Storage for (VXD) SpacePoint-based track candidates.
const std::vector< const Belle2::SpacePoint * > getSortedHits() const
get hits (space points) sorted by their respective sorting parameter
SpacePoint typically is build from 1 PXDCluster or 1-2 SVDClusters.
Definition: SpacePoint.h:42

◆ beginEvent()

void beginEvent ( )
overridevirtualinherited

Receive and dispatch signal for the start of a new event.

Reimplemented from ProcessingSignalListener.

Reimplemented in SpacePointTagger< Belle2::CKFToPXDResult, Belle2::PXDCluster >, SpacePointTagger< Belle2::CKFToSVDResult, Belle2::SVDCluster >, BaseEventTimeExtractor< RecoTrack * >, BaseEventTimeExtractor< TrackFindingCDC::CDCWireHit & >, SharingHitsMatcher< Belle2::TrackFindingCDC::CDCTrack, Belle2::TrackFindingCDC::CDCSegment2D >, MCSymmetric< BaseAxialSegmentPairFilter >, MCSymmetric< BaseFacetFilter >, MCSymmetric< BaseFacetRelationFilter >, MCSymmetric< BaseSegmentPairFilter >, MCSymmetric< BaseSegmentPairRelationFilter >, MCSymmetric< BaseSegmentRelationFilter >, MCSymmetric< BaseSegmentTripleFilter >, MCSymmetric< BaseSegmentTripleRelationFilter >, MCSymmetric< BaseTrackRelationFilter >, StoreVectorSwapper< Belle2::TrackFindingCDC::CDCFacet >, StoreVectorSwapper< Belle2::TrackFindingCDC::CDCWireHit, true >, StoreVectorSwapper< Belle2::TrackFindingCDC::CDCSegment2D >, StoreVectorSwapper< Belle2::TrackFindingCDC::CDCTrack >, StoreVectorSwapper< Belle2::TrackFindingCDC::CDCSegmentPair >, StoreVectorSwapper< Belle2::TrackFindingCDC::CDCSegmentTriple >, RecoTrackStorer, ROIFinder, and SVDHoughTracking.

Definition at line 31 of file CompositeProcessingSignalListener.cc.

32{
35 psl->beginEvent();
36 }
37}
Interface for an algorithm part that needs to receive the module processing signals.
virtual void beginEvent()
Receive signal for the start of a new event.

◆ beginRun()

void beginRun ( )
overridevirtualinherited

Receive and dispatch signal for the beginning of a new run.

Reimplemented from ProcessingSignalListener.

Reimplemented in LayerRelationFilter< AFilter >, FourHitFilter, QualityIndicatorFilter, ThreeHitFilter, TwoHitVirtualIPFilter, TwoHitVirtualIPQIFilter, RecoTrackStorer, ROIFinder, SpacePointLoaderAndPreparer, and TrackCandidateResultRefiner.

Definition at line 23 of file CompositeProcessingSignalListener.cc.

24{
27 psl->beginRun();
28 }
29}
virtual void beginRun()
Receive signal for the beginning of a new run.

◆ endRun()

void endRun ( )
overridevirtualinherited

Receive and dispatch signal for the end of the run.

Reimplemented from ProcessingSignalListener.

Definition at line 39 of file CompositeProcessingSignalListener.cc.

40{
42 psl->endRun();
43 }
45}
virtual void endRun()
Receive signal for the end of the run.

◆ exposeParameters()

void exposeParameters ( ModuleParamList moduleParamList,
const std::string &  prefix 
)
finalvirtual

Expose the parameters of the subfindlet.

Reimplemented from Findlet< CKFToSVDState, CKFToSVDState, TrackFindingCDC::WeightedRelation< CKFToSVDState > >.

Definition at line 31 of file RelationFromSVDTracksCreator.cc.

32{
33 moduleParamList->addParameter(TrackFindingCDC::prefixed(prefix, "vxdTracksStoreArrayName"),
35 "Store Array name for tracks coming from VXDTF2.");
36 moduleParamList->addParameter(TrackFindingCDC::prefixed(prefix, "cdcTracksStoreArrayName"),
38 "Store Array name for tracks coming from CDCTF.");
39
40 moduleParamList->addParameter(TrackFindingCDC::prefixed(prefix, "spacePointTrackCandidatesName"),
42 "Store Array name for the SpacePointTrackCandidates coming from VXDTF2.",
44}
std::string m_param_vxdTracksStoreArrayName
Store Array name coming from VXDTF2.
void addParameter(const std::string &name, T &paramVariable, const std::string &description, const T &defaultValue)
Adds a new parameter to the module list.

◆ getDescription()

virtual std::string getDescription ( )
inlinevirtualinherited

Brief description of the purpose of the concret findlet.

Definition at line 60 of file Findlet.h.

61 {
62 return "(no description)";
63 }

◆ getNProcessingSignalListener()

int getNProcessingSignalListener ( )
protectedinherited

Get the number of currently registered listeners.

Definition at line 60 of file CompositeProcessingSignalListener.cc.

61{
63}

◆ initialize()

void initialize ( )
finalvirtual

Require the store array.

Reimplemented from ProcessingSignalListener.

Definition at line 23 of file RelationFromSVDTracksCreator.cc.

24{
27}
bool isRequired(const std::string &name="")
Ensure this array/object has been registered previously.
void initialize() override
Receive and dispatch signal before the start of the event processing.

◆ terminate()

void terminate ( )
overridevirtualinherited

Receive and dispatch Signal for termination of the event processing.

Reimplemented from ProcessingSignalListener.

Reimplemented in StereoHitTrackQuadTreeMatcher< Belle2::TrackFindingCDC::HyperHough >, StereoHitTrackQuadTreeMatcher< Belle2::TrackFindingCDC::QuadraticLegendre >, and StereoHitTrackQuadTreeMatcher< Belle2::TrackFindingCDC::Z0TanLambdaLegendre >.

Definition at line 47 of file CompositeProcessingSignalListener.cc.

48{
50 psl->terminate();
51 }
53}
virtual void terminate()
Receive Signal for termination of the event processing.

Member Data Documentation

◆ m_initialized

bool m_initialized = false
privateinherited

Flag to keep track whether initialization happend before.

Definition at line 52 of file ProcessingSignalListener.h.

◆ m_initializedAs

std::string m_initializedAs
privateinherited

Name of the type during initialisation.

Definition at line 58 of file ProcessingSignalListener.h.

◆ m_param_cdcTracksStoreArrayName

std::string m_param_cdcTracksStoreArrayName = "CDCRecoTracks"
private

Store Array name coming from CDCTF.

Definition at line 60 of file RelationFromSVDTracksCreator.h.

◆ m_param_spacePointTrackCandidateName

std::string m_param_spacePointTrackCandidateName = "SPTrackCands"
private

Store Array name of the space point track candidates coming from VXDTF2.

Definition at line 62 of file RelationFromSVDTracksCreator.h.

◆ m_param_vxdTracksStoreArrayName

std::string m_param_vxdTracksStoreArrayName = "VXDRecoTracks"
private

Store Array name coming from VXDTF2.

Definition at line 58 of file RelationFromSVDTracksCreator.h.

◆ m_subordinaryProcessingSignalListeners

std::vector<ProcessingSignalListener*> m_subordinaryProcessingSignalListeners
privateinherited

References to subordinary signal processing listener contained in this findlet.

Definition at line 52 of file CompositeProcessingSignalListener.h.

◆ m_terminated

bool m_terminated = false
privateinherited

Flag to keep track whether termination happend before.

Definition at line 55 of file ProcessingSignalListener.h.

◆ m_vxdRecoTracks

StoreArray<RecoTrack> m_vxdRecoTracks
private

Store Array of the VXD tracks to use.

Definition at line 66 of file RelationFromSVDTracksCreator.h.


The documentation for this class was generated from the following files: