Belle II Software  release-05-01-25
SegmentTrackCombiner.h
1 /**************************************************************************
2  * BASF2 (Belle Analysis Framework 2) *
3  * Copyright(C) 2015 - Belle II Collaboration *
4  * *
5  * Author: The Belle II Collaboration *
6  * Contributors: Nils Braun *
7  * *
8  * This software is provided "as is" without any warranty. *
9  **************************************************************************/
10 #pragma once
11 
12 #include <tracking/trackFindingCDC/findlets/base/Findlet.h>
13 
14 #include <tracking/trackFindingCDC/collectors/matchers/SharingHitsMatcher.h>
15 #include <tracking/trackFindingCDC/collectors/selectors/CutSelector.h>
16 #include <tracking/trackFindingCDC/collectors/selectors/FilterSelector.h>
17 #include <tracking/trackFindingCDC/collectors/selectors/SingleMatchSelector.h>
18 
19 #include <tracking/trackFindingCDC/findlets/minimal/TrackNormalizer.h>
20 #include <tracking/trackFindingCDC/findlets/minimal/SegmentTrackAdderWithNormalization.h>
21 #include <tracking/trackFindingCDC/findlets/minimal/TrackRejecter.h>
22 
23 #include <tracking/trackFindingCDC/filters/base/ChooseableFilter.dcl.h>
24 
25 #include <tracking/trackFindingCDC/filters/segmentTrack/BaseSegmentTrackFilter.h>
26 #include <tracking/trackFindingCDC/filters/segmentTrack/SegmentTrackFilterFactory.h>
27 
28 #include <tracking/trackFindingCDC/eventdata/segments/CDCSegment2D.h>
29 #include <tracking/trackFindingCDC/eventdata/tracks/CDCTrack.h>
30 
31 #include <vector>
32 
33 namespace Belle2 {
39  namespace TrackFindingCDC {
40 
41  // Guard to prevent repeated instantiations
42  extern template class TrackFindingCDC::Chooseable<BaseSegmentTrackFilter>;
43  extern template class TrackFindingCDC::ChooseableFilter<SegmentTrackFilterFactory>;
44 
60  class SegmentTrackCombiner : public Findlet<CDCSegment2D&, CDCTrack&> {
61 
62  private:
64  using Super = Findlet<CDCSegment2D&, CDCTrack&>;
65 
66  public:
69 
71  std::string getDescription() final;
72 
74  void beginEvent() final;
75 
77  void exposeParameters(ModuleParamList* moduleParamList, const std::string& prefix) final;
78 
80  void apply(std::vector<CDCSegment2D>& segments,
81  std::vector<CDCTrack>& tracks) override;
82 
83  private:
84  // Findlets
86  SharingHitsMatcher<CDCTrack, CDCSegment2D> m_sharedHitsMatcher;
87 
89  CutSelector<CDCTrack, CDCSegment2D> m_selectPairsWithSharedHits;
90 
93 
95  SingleMatchSelector<CDCTrack, CDCSegment2D> m_singleMatchSelector;
96 
98  SegmentTrackAdderWithNormalization m_segmentTrackAdderWithNormalization;
99 
101  TrackRejecter m_trackRejecter;
102 
104  TrackNormalizer m_trackNormalizer;
105 
107  std::vector<WeightedRelation<CDCTrack, const CDCSegment2D>> m_relations;
108  };
109  }
111 }
Belle2::TrackFindingCDC::CDCTrack
Class representing a sequence of three dimensional reconstructed hits.
Definition: CDCTrack.h:51
Belle2::TrackFindingCDC::ChooseableFilter
Convenvience wrapper to setup a Chooseable filter from a specific factory object.
Definition: ChooseableFilter.dcl.h:107
Belle2::TrackFindingCDC::FilterSelector
Selector to remove all weighted relations, where a definable Filter gives NaN as a result.
Definition: FilterSelector.h:55
Belle2::TrackFindingCDC::SegmentTrackFilterFactory
Factory that can create appropriate segment to track combinations filters from associated names.
Definition: SegmentTrackFilterFactory.h:34
Belle2::TrackFindingCDC::CutSelector
Selector to remove all weighted relations with a weight below a certain cut value.
Definition: CutSelector.h:52
Belle2
Abstract base class for different kinds of events.
Definition: MillepedeAlgorithm.h:19
Belle2::TrackFindingCDC::SegmentTrackAdderWithNormalization
Add the matched segments to the tracks and normalize the tracks afterwards.
Definition: SegmentTrackAdderWithNormalization.h:44
Belle2::TrackFindingCDC::TrackRejecter
Deletes fake tracks that have been rejected by a filter.
Definition: TrackRejecter.h:44
Belle2::TrackFindingCDC::SharingHitsMatcher
A generic matcher algorithm which outputs all combinations of elements with the number of shared hits...
Definition: SharingHitsMatcher.h:42
Belle2::TrackFindingCDC::SingleMatchSelector
Selector to remove all relations in the list, which share the same collection item - except one in ca...
Definition: SingleMatchSelector.h:54
Belle2::TrackFindingCDC::CDCSegment2D
A reconstructed sequence of two dimensional hits in one super layer.
Definition: CDCSegment2D.h:40
Belle2::TrackFindingCDC::WeightedRelation
Type for two related objects with a weight.
Definition: CDCSegment2D.h:36
Belle2::TrackFindingCDC::SegmentTrackCombiner
Findlet for the combination of tracks and segments.
Definition: SegmentTrackCombiner.h:68
Belle2::ModuleParamList
The Module parameter list class.
Definition: ModuleParamList.h:46
Belle2::TrackFindingCDC::TrackNormalizer
Findlet for normalizing the track (trajectory) into common requirements (e.g. let it start at the fir...
Definition: TrackNormalizer.h:32