Belle II Software development
TrackExporter Class Referenceabstract

Findlet to exports CDCTracks as RecoTracks. More...

#include <TrackExporter.h>

Inheritance diagram for TrackExporter:
Findlet< CDCTrack & > CompositeProcessingSignalListener ProcessingSignalListener

Public Types

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

std::string getDescription () final
 Short description of the findlet.
 
void exposeParameters (ModuleParamList *moduleParamList, const std::string &prefix) final
 Expose the parameters to a module.
 
void initialize () final
 Signal initialisation phase to register store array for export.
 
void apply (std::vector< CDCTrack > &tracks) final
 Write give tracks into track store array.
 
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 Types

using Super = Findlet< CDCTrack & >
 Type of the base class.
 

Private Attributes

bool m_param_exportTracks = true
 Parameter: Switch if a RecoTrack be generated for each track.
 
std::string m_param_exportTracksInto = ""
 Parameter: Name of the output StoreArray of the RecoTracks generated by this module.
 
bool m_param_discardCovarianceMatrix = false
 Parameter: Discard covariance matrix in favour of a hand written one.
 
double m_param_monopoleMomSeed = 0.0
 Parameter: If non-zero, estimate seeds as for monopoles and set the momentum magnitude as this value.
 
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

Findlet to exports CDCTracks as RecoTracks.

Definition at line 26 of file TrackExporter.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

using Super = Findlet<CDCTrack&>
private

Type of the base class.

Definition at line 30 of file TrackExporter.h.

◆ ToVector

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

Short hand for ToRangeImpl.

Definition at line 49 of file Findlet.h.

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< CDCTrack > &  tracks)
final

Write give tracks into track store array.

Definition at line 74 of file TrackExporter.cc.

75{
76 TMatrixDSym defaultCovSeed(6);
77 defaultCovSeed(0, 0) = 1e-3;
78 defaultCovSeed(1, 1) = 1e-3;
79 defaultCovSeed(2, 2) = 4e-3;
80 defaultCovSeed(3, 3) = 0.01e-3;
81 defaultCovSeed(4, 4) = 0.01e-3;
82 defaultCovSeed(5, 5) = 0.04e-3;
83
84 // Put code to generate gf track cands here if requested.
87 for (const CDCTrack& track : tracks) {
88 RecoTrack* newRecoTrack;
89 if (m_param_monopoleMomSeed != 0.0)
90 newRecoTrack = RecoTrackUtil::storeInto(track, storedRecoTracks, m_param_monopoleMomSeed);
91 else
92 newRecoTrack = RecoTrackUtil::storeInto(track, storedRecoTracks);
93 if (newRecoTrack) {
94 newRecoTrack->setQualityIndicator(track.getQualityIndicator());
95 }
96 if (newRecoTrack and m_param_discardCovarianceMatrix) {
97 newRecoTrack->setSeedCovariance(defaultCovSeed);
98 }
99 }
100 }
101}
This is the Reconstruction Event-Data Model Track.
Definition: RecoTrack.h:79
void setSeedCovariance(const TMatrixDSym &seedCovariance)
Set the covariance of the seed. ATTENTION: This is not the fitted covariance.
Definition: RecoTrack.h:614
void setQualityIndicator(const float qualityIndicator)
Set the quality index attached to this RecoTrack. 0 means likely fake.
Definition: RecoTrack.h:847
Accessor to arrays stored in the data store.
Definition: StoreArray.h:113
Class representing a sequence of three dimensional reconstructed hits.
Definition: CDCTrack.h:41
bool m_param_exportTracks
Parameter: Switch if a RecoTrack be generated for each track.
Definition: TrackExporter.h:47
std::string m_param_exportTracksInto
Parameter: Name of the output StoreArray of the RecoTracks generated by this module.
Definition: TrackExporter.h:50
bool m_param_discardCovarianceMatrix
Parameter: Discard covariance matrix in favour of a hand written one.
Definition: TrackExporter.h:53
double m_param_monopoleMomSeed
Parameter: If non-zero, estimate seeds as for monopoles and set the momentum magnitude as this value.
Definition: TrackExporter.h:56
static RecoTrack * storeInto(const CDCTrack &track, StoreArray< RecoTrack > &recoTracks, const double momentumSeedMagnitude)
For magnetic monopoles; estimates charge sign from all stereo hits, momentum direction from hits in c...

◆ 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 to a module.

Reimplemented from Findlet< CDCTrack & >.

Definition at line 31 of file TrackExporter.cc.

32{
33 moduleParamList->addParameter(prefixed(prefix, "RecoTracksStoreArrayName"),
35 "Alias for exportTracksInto",
37
38 moduleParamList->addParameter(prefixed(prefix, "WriteRecoTracks"),
40 "Alias for exportTracks",
42
43 moduleParamList->addParameter(prefixed(prefix, "exportTracks"),
45 "Switch for the creation of reco tracks for each cdc track.",
47
48 moduleParamList->addParameter(prefixed(prefix, "exportTracksInto"),
50 "Name of the output StoreArray of RecoTracks.",
52
53 moduleParamList->addParameter(prefixed(prefix, "discardCovarianceMatrix"),
55 "Discard covariance matrix in favour of a hand written one.",
57 moduleParamList->addParameter(prefixed(prefix, "monopoleMomSeed"),
59 "If non-zero, estimate seeds as for monopoles and set the momentum magnitude as this value.",
61}
void addParameter(const std::string &name, T &paramVariable, const std::string &description, const T &defaultValue)
Adds a new parameter to the module list.

◆ getDescription()

std::string getDescription ( )
finalvirtual

Short description of the findlet.

Reimplemented from Findlet< CDCTrack & >.

Definition at line 26 of file TrackExporter.cc.

27{
28 return "Creates a RecoTrack from each CDCTrack.";
29}

◆ 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

Signal initialisation phase to register store array for export.

Reimplemented from ProcessingSignalListener.

Definition at line 63 of file TrackExporter.cc.

64{
65 // Output StoreArray
68 storedRecoTracks.registerInDataStore(DataStore::c_ErrorIfAlreadyRegistered);
70 }
72}
@ c_ErrorIfAlreadyRegistered
If the object/array was already registered, produce an error (aborting initialisation).
Definition: DataStore.h:72
static void registerRequiredRelations(StoreArray< RecoTrack > &recoTracks, std::string const &pxdHitsStoreArrayName="", std::string const &svdHitsStoreArrayName="", std::string const &cdcHitsStoreArrayName="", std::string const &bklmHitsStoreArrayName="", std::string const &eklmHitsStoreArrayName="", std::string const &recoHitInformationStoreArrayName="")
Convenience method which registers all relations required to fully use a RecoTrack.
Definition: RecoTrack.cc:53
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_discardCovarianceMatrix

bool m_param_discardCovarianceMatrix = false
private

Parameter: Discard covariance matrix in favour of a hand written one.

Definition at line 53 of file TrackExporter.h.

◆ m_param_exportTracks

bool m_param_exportTracks = true
private

Parameter: Switch if a RecoTrack be generated for each track.

Definition at line 47 of file TrackExporter.h.

◆ m_param_exportTracksInto

std::string m_param_exportTracksInto = ""
private

Parameter: Name of the output StoreArray of the RecoTracks generated by this module.

Definition at line 50 of file TrackExporter.h.

◆ m_param_monopoleMomSeed

double m_param_monopoleMomSeed = 0.0
private

Parameter: If non-zero, estimate seeds as for monopoles and set the momentum magnitude as this value.

Definition at line 56 of file TrackExporter.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.


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