Belle II Software development
StereoHitFinder.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/StereoHitFinder.h>
9
10#include <tracking/trackingUtilities/eventdata/hits/CDCWireHit.h>
11#include <tracking/trackingUtilities/eventdata/tracks/CDCTrack.h>
12
13#include <tracking/trackingUtilities/filters/base/ChooseableFilter.icc.h>
14
15using namespace Belle2;
16using namespace TrackFindingCDC;
17using namespace TrackingUtilities;
18
21
31
33{
34 return "Tries to add CDC stereo hits to the found CDC tracks by applying a histogramming method with a quad tree.";
35}
36
38{
40
41 m_rlTaggedWireHits.clear();
42 m_relations.clear();
43}
44
45void StereoHitFinder::exposeParameters(ModuleParamList* moduleParamList, const std::string& prefix)
46{
47 Super::exposeParameters(moduleParamList, prefix);
48
49 m_rlWireHitCreator.exposeParameters(moduleParamList, prefix);
50 m_matcher.exposeParameters(moduleParamList, prefix);
51 m_filterSelector.exposeParameters(moduleParamList, prefix);
52 m_singleMatchSelector.exposeParameters(moduleParamList, prefix);
53 m_adder.exposeParameters(moduleParamList, prefix);
54 m_szFitter.exposeParameters(moduleParamList, prefix);
55}
56
57void StereoHitFinder::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
62 m_rlWireHitCreator.apply(inputWireHits, m_rlTaggedWireHits);
66 m_adder.apply(m_relations);
67
68 m_szFitter.apply(tracks);
69}
The Module parameter list class.
TrackSZFitter m_szFitter
Fit the tracks after creation.
TrackingUtilities::FilterSelector< TrackingUtilities::CDCTrack, TrackingUtilities::CDCRLWireHit, TrackingUtilities::ChooseableFilter< StereoHitFilterFactory > > m_filterSelector
Filter for the Stereo Hits added to the track.
std::vector< TrackingUtilities::CDCRLWireHit > m_rlTaggedWireHits
Vector holding all possible wire hits with all possible RL combinations.
TrackingUtilities::Findlet< TrackingUtilities::CDCWireHit &, TrackingUtilities::CDCTrack & > Super
Type of the base class.
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.
TrackingUtilities::SingleMatchSelector< TrackingUtilities::CDCTrack, TrackingUtilities::CDCRLWireHit, TrackingUtilities::HitComperator > m_singleMatchSelector
Select only those where the relation is unique (or the best one in those groups)
std::vector< TrackingUtilities::WeightedRelation< TrackingUtilities::CDCTrack, const TrackingUtilities::CDCRLWireHit > > m_relations
Vector of relations between tracks and hits.
void exposeParameters(ModuleParamList *moduleParamList, const std::string &prefix) final
Expose the parameters to a module.
void apply(std::vector< TrackingUtilities::CDCWireHit > &inputWireHits, std::vector< TrackingUtilities::CDCTrack > &tracks) final
Generates the segment from wire hits.
RLTaggedWireHitCreator m_rlWireHitCreator
Create RL wire hits out of the wire hits.
StereoHitTrackQuadTreeMatcher< HitZ0TanLambdaLegendre > m_matcher
Find matching hits to a track.
StereoHitFinder()
Constructor registering the subordinary findlets to the processing signal distribution machinery.
Convenvience wrapper to setup a Chooseable filter from a specific factory object.
Filter can delegate to a filter chosen and set up at run time by parameters.
Abstract base class for different kinds of events.