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
 The parent findlet.
 
using IOTypes
 Types that should be served to apply on invocation.
 
using IOTypes
 Types that should be served to apply on invocation.
 
using IOVectors
 Vector types that should be served to apply on invocation.
 
using IOVectors
 Vector types that should be served to apply on invocation.
 

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 concrete findlet.
 
virtual std::string getDescription ()
 Brief description of the purpose of the concrete 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
 Short hand for ToRangeImpl.
 
using ToVector
 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
 Flag to keep track whether initialization happened before.
 
bool m_terminated
 Flag to keep track whether termination happened 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 [1/2]

using IOTypes
inherited

Types that should be served to apply on invocation.

Definition at line 30 of file Findlet.h.

◆ IOTypes [2/2]

using IOTypes
inherited

Types that should be served to apply on invocation.

Definition at line 30 of file Findlet.h.

◆ IOVectors [1/2]

using IOVectors
inherited

Vector types that should be served to apply on invocation.

Definition at line 53 of file Findlet.h.

◆ IOVectors [2/2]

using IOVectors
inherited

Vector types that should be served to apply on invocation.

Definition at line 53 of file Findlet.h.

◆ Super

using Super
Initial value:
Specialized CKF State for extrapolating into the SVD.
Interface for a minimal algorithm part that wants to expose some parameters to a module.
Definition Findlet.h:26
Type for two related objects with a weight.

The parent findlet.

Definition at line 36 of file RelationFromSVDTracksCreator.h.

◆ ToVector [1/2]

using ToVector
protectedinherited

Short hand for ToRangeImpl.

Definition at line 49 of file Findlet.h.

◆ ToVector [2/2]

using ToVector
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 53 of file CompositeProcessingSignalListener.cc.

◆ 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 =
57 vxdRecoTrack.getRelated<SpacePointTrackCand>(m_param_spacePointTrackCandidateName);
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}
void setRelatedSVDTrack(const RecoTrack *relatedSVDTrack)
Set the related SVD track, if we go along one of them (or a nullptr)
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.
const std::vector< const Belle2::SpacePoint * > getSortedHits() const
get hits (space points) sorted by their respective sorting parameter

◆ beginEvent()

void beginEvent ( )
overrideinherited

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

Definition at line 36 of file CompositeProcessingSignalListener.cc.

32{
35 psl->beginEvent();
36 }
37}
void beginEvent() override
Receive and dispatch signal for the start of a new event.
virtual void beginEvent()
Receive signal for the start of a new event.

◆ beginRun()

void beginRun ( )
overrideinherited

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

Definition at line 33 of file CompositeProcessingSignalListener.cc.

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

◆ endRun()

void endRun ( )
overrideinherited

Receive and dispatch signal for the end of the run.

Definition at line 39 of file CompositeProcessingSignalListener.cc.

40{
42 psl->endRun();
43 }
45}
void endRun() override
Receive and dispatch signal for the end of the run.
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 CompositeProcessingSignalListener.

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() [1/2]

virtual std::string getDescription ( )
inlinevirtualinherited

Brief description of the purpose of the concrete findlet.

Definition at line 60 of file Findlet.h.

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

◆ getDescription() [2/2]

virtual std::string getDescription ( )
inlinevirtualinherited

Brief description of the purpose of the concrete 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 56 of file CompositeProcessingSignalListener.cc.

61{
63}

◆ initialize()

◆ terminate()

void terminate ( )
overrideinherited

Receive and dispatch Signal for termination of the event processing.

Definition at line 42 of file CompositeProcessingSignalListener.cc.

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

Member Data Documentation

◆ m_initialized

bool m_initialized
privateinherited

Flag to keep track whether initialization happened 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 60 of file CompositeProcessingSignalListener.h.

◆ m_terminated

bool m_terminated
privateinherited

Flag to keep track whether termination happened 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: