Belle II Software development
MonopoleStereoHitFinder.cc
1/**************************************************************************
2 * basf2 (Belle II Analysis Software Framework) *
3 * Author: The Belle II Collaboration *
4 * *
5 * See git log for contributors and copyright holders. *
6 * This file is licensed under LGPL-3.0, see LICENSE.md. *
7 **************************************************************************/
8#include <tracking/trackFindingCDC/findlets/combined/MonopoleStereoHitFinder.h>
9
10#include <tracking/trackFindingCDC/eventdata/hits/CDCWireHit.h>
11#include <tracking/trackFindingCDC/eventdata/tracks/CDCTrack.h>
12
13#include <tracking/trackFindingCDC/filters/base/ChooseableFilter.icc.h>
14
15using namespace Belle2;
16using namespace TrackFindingCDC;
17
19
21{
28// addProcessingSignalListener(&m_szFitter);
29}
30
32{
33 return "Tries to add CDC stereo hits to the found CDC tracks by applying a histogramming method with a 3D hough tree looking for hyperbolic cosines.";
34}
35
37{
39
40 m_rlTaggedWireHits.clear();
41 m_relations.clear();
42}
43
44void MonopoleStereoHitFinder::exposeParameters(ModuleParamList* moduleParamList, const std::string& prefix)
45{
46 Super::exposeParameters(moduleParamList, prefix);
47
48 m_rlWireHitCreator.exposeParameters(moduleParamList, prefix);
49 m_matcher.exposeParameters(moduleParamList, prefix);
50 m_filterSelector.exposeParameters(moduleParamList, prefix);
51 m_singleMatchSelector.exposeParameters(moduleParamList, prefix);
52 m_adder.exposeParameters(moduleParamList, prefix);
53 m_inspector.exposeParameters(moduleParamList, prefix);
54// m_szFitter.exposeParameters(moduleParamList, prefix);
55}
56
57void MonopoleStereoHitFinder::apply(std::vector<CDCWireHit>& inputWireHits, std::vector<CDCTrack>& tracks)
58{
59 m_rlTaggedWireHits.reserve(2 * inputWireHits.size());
60 m_relations.reserve(2 * inputWireHits.size() * tracks.size());
61
64// m_filterSelector.apply(m_relations);
67 m_inspector.apply(tracks);
68
69 for (auto track : tracks)
70 track.sortByArcLength2D();
71// m_szFitter.apply(tracks);
72}
The Module parameter list class.
void apply(std::vector< WeightedRelationItem > &weightedRelations) override
Main function to do the adding. Override the add function below in your derived class.
Convenvience wrapper to setup a Chooseable filter from a specific factory object.
void addProcessingSignalListener(ProcessingSignalListener *psl)
Register a processing signal listener to be notified.
void beginEvent() override
Receive and dispatch signal for the start of a new event.
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::vector< WeightedRelation< CDCTrack, const CDCRLWireHit > > m_relations
Vector of relations between tracks and hits.
std::vector< CDCRLWireHit > m_rlTaggedWireHits
Fit the tracks after creation TODO the fitter obviously should be different.
StereoHitTrackAdder m_adder
Add the hits to the tracks.
void beginEvent() final
Signal the beginning of a new event.
std::string getDescription() final
Short description of the findlet.
void apply(std::vector< CDCWireHit > &inputWireHits, std::vector< CDCTrack > &tracks) final
Generates the segment from wire hits.
void exposeParameters(ModuleParamList *moduleParamList, const std::string &prefix) final
Expose the parameters to a module.
MonopoleStereoHitFinder()
Constructor registering the subordinary findlets to the processing signal distribution machinery.
FilterSelector< CDCTrack, CDCRLWireHit, ChooseableFilter< StereoHitFilterFactory > > m_filterSelector
Filter for the Stereo Hits added to the track.
RLTaggedWireHitCreator m_rlWireHitCreator
Create RL wire hits out of the wire hits.
StereoHitTrackQuadTreeMatcher< HitHyperHough > m_matcher
Find matching hits to a track.
SingleMatchSelector< CDCTrack, CDCRLWireHit, HitComperator > m_singleMatchSelector
Select only those where the relation is unique (or the best one in those groups)
void apply(std::vector< CDCWireHit > &inputWireHits, std::vector< CDCRLWireHit > &outputRLWireHits) final
Generates the segment from wire hits.
void apply(std::vector< CDCTrack > &tracks) final
Print the tracks.
void exposeParameters(ModuleParamList *moduleParamList, const std::string &prefix) final
Access parameters.
Abstract base class for different kinds of events.