Belle II Software development
SpacePointLoaderAndPreparer Class Referenceabstract

Findlet for loading SVDSpacePoints and prepare them for usage in the FastInterceptFinder2D by creating VXDHoughStates in which the BeamSpotPosition is used to calculate the conformal transformed x,y coordinates and the creating pairs of coordinates for finding track candidates in r-phi and r-z. More...

#include <SpacePointLoaderAndPreparer.h>

Inheritance diagram for SpacePointLoaderAndPreparer:
Findlet< const SpacePoint *, VXDHoughState > CompositeProcessingSignalListener ProcessingSignalListener

Public Types

using IOTypes = std::tuple< AIOTypes... >
 Types that should be served to apply on invocation.
 
using IOVectors = std::tuple< std::vector< AIOTypes >... >
 Vector types that should be served to apply on invocation.
 

Public Member Functions

 SpacePointLoaderAndPreparer ()
 Load clusters and prepare them for intercept finding.
 
void exposeParameters (ModuleParamList *moduleParamList, const std::string &prefix) override
 Expose the parameters of the sub findlets.
 
void initialize () override
 Create the store arrays.
 
void beginRun () override
 Retrieve the BeamSpot from DB.
 
void apply (std::vector< const SpacePoint * > &spacePoints, std::vector< VXDHoughState > &hits) override
 Load the SVD SpacePoints and create a VXDHoughState object for each hit.
 
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 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 Types

using Super = TrackFindingCDC::Findlet< const SpacePoint *, VXDHoughState >
 Parent class.
 

Private Attributes

std::string m_SVDSpacePointStoreArrayName = "SVDSpacePoints"
 StoreArray name of the input Track Store Array.
 
bool m_useAllSpacePoints = false
 Use all SVDSpacePoints for track finding or only unassigned ones.
 
StoreArray< SpacePointm_storeSpacePoints
 Input SpacePoints Store Array.
 
B2Vector3D m_BeamSpotPosition
 B2Vector3D actually containing the BeamSpot position. This will be passed on to the VXDHoughState for the conformal transformation.
 
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 happened before.
 
bool m_terminated = false
 Flag to keep track whether termination happened before.
 
std::string m_initializedAs
 Name of the type during initialisation.
 

Detailed Description

Findlet for loading SVDSpacePoints and prepare them for usage in the FastInterceptFinder2D by creating VXDHoughStates in which the BeamSpotPosition is used to calculate the conformal transformed x,y coordinates and the creating pairs of coordinates for finding track candidates in r-phi and r-z.

Definition at line 35 of file SpacePointLoaderAndPreparer.h.

Member Typedef Documentation

◆ IOTypes

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

Types that should be served to apply on invocation.

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 invocation.

Definition at line 53 of file Findlet.h.

◆ Super

Parent class.

Definition at line 37 of file SpacePointLoaderAndPreparer.h.

◆ ToVector

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

Short hand for ToRangeImpl.

Definition at line 49 of file Findlet.h.

Constructor & Destructor Documentation

◆ SpacePointLoaderAndPreparer()

Load clusters and prepare them for intercept finding.

Definition at line 41 of file SpacePointLoaderAndPreparer.h.

41{};

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< const SpacePoint * > &  spacePoints,
std::vector< VXDHoughState > &  hits 
)
inlineoverride

Load the SVD SpacePoints and create a VXDHoughState object for each hit.

Definition at line 76 of file SpacePointLoaderAndPreparer.h.

77 {
78 if (m_storeSpacePoints.getEntries() == 0) return;
79
80 hits.reserve(m_storeSpacePoints.getEntries());
81 spacePoints.reserve(m_storeSpacePoints.getEntries());
82 for (auto& spacePoint : m_storeSpacePoints) {
83 if (not m_useAllSpacePoints and spacePoint.getAssignmentState() == true) {
84 continue;
85 }
86 hits.emplace_back(VXDHoughState(&spacePoint, m_BeamSpotPosition));
87 spacePoints.emplace_back(&spacePoint);
88 }
89 };
int getEntries() const
Get the number of objects in the array.
Definition: StoreArray.h:216
B2Vector3D m_BeamSpotPosition
B2Vector3D actually containing the BeamSpot position. This will be passed on to the VXDHoughState for...
bool m_useAllSpacePoints
Use all SVDSpacePoints for track finding or only unassigned ones.
StoreArray< SpacePoint > m_storeSpacePoints
Input SpacePoints Store Array.

◆ 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 ( )
inlineoverridevirtual

Retrieve the BeamSpot from DB.

Reimplemented from CompositeProcessingSignalListener.

Definition at line 63 of file SpacePointLoaderAndPreparer.h.

64 {
66
67 DBObjPtr<BeamSpot> beamSpotDB;
68 if (beamSpotDB.isValid()) {
69 m_BeamSpotPosition = (*beamSpotDB).getIPPosition();
70 } else {
71 m_BeamSpotPosition.SetXYZ(0., 0., 0.);
72 }
73 }
void SetXYZ(DataType x, DataType y, DataType z)
set all coordinates using data type
Definition: B2Vector3.h:464
void beginRun() override
Receive and dispatch 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 
)
inlineoverridevirtual

Expose the parameters of the sub findlets.

Reimplemented from Findlet< const SpacePoint *, VXDHoughState >.

Definition at line 44 of file SpacePointLoaderAndPreparer.h.

45 {
46 Super::exposeParameters(moduleParamList, prefix);
47
48 moduleParamList->addParameter(TrackFindingCDC::prefixed(prefix, "SVDSpacePointStoreArrayName"), m_SVDSpacePointStoreArrayName,
49 "Name of the SVDSpacePoints Store Array.", m_SVDSpacePointStoreArrayName);
50
51 moduleParamList->addParameter(TrackFindingCDC::prefixed(prefix, "useAllSpacePoints"), m_useAllSpacePoints,
52 "Use all SVDSpacePoints for track finding or only unassigned ones?", m_useAllSpacePoints);
53 };
virtual void exposeParameters(ModuleParamList *moduleParamList, const std::string &prefix)
Forward prefixed parameters of this findlet to the module parameter list.
Definition: Findlet.h:69
std::string m_SVDSpacePointStoreArrayName
StoreArray name of the input Track Store Array.

◆ getDescription()

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 60 of file CompositeProcessingSignalListener.cc.

61{
63}

◆ initialize()

void initialize ( )
inlineoverridevirtual

Create the store arrays.

Reimplemented from CompositeProcessingSignalListener.

Definition at line 56 of file SpacePointLoaderAndPreparer.h.

57 {
60 };
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_BeamSpotPosition

B2Vector3D m_BeamSpotPosition
private

B2Vector3D actually containing the BeamSpot position. This will be passed on to the VXDHoughState for the conformal transformation.

Definition at line 102 of file SpacePointLoaderAndPreparer.h.

◆ m_initialized

bool m_initialized = false
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_storeSpacePoints

StoreArray<SpacePoint> m_storeSpacePoints
private

Input SpacePoints Store Array.

Definition at line 99 of file SpacePointLoaderAndPreparer.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_SVDSpacePointStoreArrayName

std::string m_SVDSpacePointStoreArrayName = "SVDSpacePoints"
private

StoreArray name of the input Track Store Array.

Definition at line 93 of file SpacePointLoaderAndPreparer.h.

◆ m_terminated

bool m_terminated = false
privateinherited

Flag to keep track whether termination happened before.

Definition at line 55 of file ProcessingSignalListener.h.

◆ m_useAllSpacePoints

bool m_useAllSpacePoints = false
private

Use all SVDSpacePoints for track finding or only unassigned ones.

Definition at line 96 of file SpacePointLoaderAndPreparer.h.


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